diff --git a/dev-docs/SETTINGS.md b/dev-docs/SETTINGS.md index adbecd6982..de30ffbb43 100644 --- a/dev-docs/SETTINGS.md +++ b/dev-docs/SETTINGS.md @@ -8,6 +8,8 @@ Settings rows and actions, the native Preferences window and its project context - Settings → OpenCode's `ServiceSupervisionCard` presents the shared preference with the lone-setting switch, protection state, fixed localized cause, responding-service distinction and known attempt/retry/recovery dates. Status, errors and actionable recovery information stay visible. The shared focusable **i** tip beside the label, available on hover, keyboard focus and touch, explains the service-wide scope, default-ON behavior, OFF leaving the service running, Linux lingering's effect on every enabled user service, login scope and OS sleep limits. `useServiceSupervision` reads on section demand, visibility restoration, reconnect and explicit refresh, coalesces trailing reads and fences selection/unmount responses. Passive failures retain the last successful display and disable writes until a successful read. In-flight and uncertain controls survive card remounts in per-window memory, keyed by service and exact request; status reads reconcile receipts and only an explicit original-action retry can resend. A known revision conflict triggers a read and review message. Deferred linger rollback remains visible with explicit Retry. Browser regression: `tests/browser/service-supervision.test.ts`; all ten locale cause/placeholder contracts: `src/lib/i18n/service-supervision.test.ts`. +- General offers `autoExpandActiveSubsessions` (default true): a new working/compacting/input chevron state opens visible branches belonging to the selected conversation, including its descendants at every depth (`dev-docs/UI_SHELL.md`). Disabling it leaves activity indicators and explicit navigation available; the preference is stored with the shared UI settings. + - Settings → Providers separates Models, Web search and Images into three shared `.settings-disclosure` groups (no icons): Models starts open, Web search and Images folded, and a folded group mounts nothing, so its connection metadata, configuration contract and image-model catalog are read only once opened. Models and Web search each start with a provider selector, Connect action and configured-provider list; Web search then shows its global default and project override. Images (`opencode/image-settings.ts`, `settings/image-settings-card.tsx`, `styles/components/image-settings.css`) edits the Global document's `experimental.image_generate` and `experimental.media_blob`. OpenCode reads `image_generate` per field from the highest-priority document that sets it (unset means on, with the automatic model; only `false` turns the image tool off), but `media_blob` (like `subagent_depth`) from the whole `experimental` object of the highest-priority document that has one, so writing a project block would hide inherited experimental settings. The document that decides each value is read from the native configuration entries and reported under its control when it is not the Global one. When the selected Location's own project document (the project write target) decides `media_blob` through its existing `experimental` object, the snapshot names it under `mediaStorage.project` instead, the box shows the effective value and saving also writes `media_blob` there; the edit is refused if that object has disappeared, because creating one would hide inherited settings. The Missions depth editor's Inherit removes a project object left holding only that `media_blob` when it equals the Global one (`dev-docs/MISSIONS.md`); Off is written as `false`, because removing the key would expose a lower-priority document that enables it. When the fresh Global write target has no `experimental` object while a lower-priority document has one, creating it would hide that whole object (subagent depth, todos) from every Location without its own, even when the selected Location overrides it, so the group is read-only and the backend refuses the write; never copy the inherited values into the Global document instead. Each control appears only when the connected daemon's `Config.InfoEncoded` declares its key, because the native `experimental` object rejects unknown keys; never write either key without that capability. Image models come from native `GET /api/model?types=image` for the selected Location. Reuse provider rows, selectors, inputs and action styles; do not add an API-key disclosure or a separate card design. Search-only integrations stay out of the Models group. Web search configuration lives entirely here. Read connection metadata while this Settings surface is visible, never credential secret values; keep API-key entry explicit and clear drafts on context changes. Use the authorized Global/Project document operations shared with plugin controls and `opencode/native-setting-document.ts` for targeted JSONC edits. Preserve unrelated fields, native discovery roots, WSL atomic writes and conflict/connection/deletion fences. Group/search styling lives in `styles/components/websearch-settings.css`; credentials use native integration methods and remain global. - Stats preferences explicitly aggregate the entire connected OpenCode service via `opencode/service-usage.ts`. Reserve the Usage label for the provider subscription panel. Native project IDs span independent clones, so never label native `session.stats` as physical-folder/Git-family scoped. Keep connection/workspace fences, `tools: "none"` and periods bounded to 366 days; never load transcripts for statistics or imply billing/quota precision. Last snapshots and period choices restore through backend-owned `state.ui.serviceUsage` (eight each/1 MiB, validated service/channel/folder identity), never a Preferences writer to main-window client state or a workspace-UUID cache. Native aggregation must not await optional discovery/cache reads; cached responses cannot replace fresh data. Backend authorized admission order, not completion order or client time, chooses the period across windows; optional publication is bounded and shutdown-fenced. Keep last-known-owner totals explicitly stale through disconnect/errors and revoke them on verified owner/discovery changes. Read while mounted and document-visible; hide cancels queued/trailing demand, activation revalidates once and terminal hints use the shared activity cooldown. Never treat document visibility as native minimize/occlusion detection or equate blur with hidden. See `dev-docs/CACHE_REFRESH_CONVENTIONS.md` for the remaining native scope. Styles live in `styles/components/usage-dashboard.css`. - Settings rows keep only a title unless a caption is essential; secondary explanations go behind `components/settings/settings-info-tip.tsx` (a focusable "i" with a hover/focus tooltip that a tap toggles on touch screens, a span so it never becomes a row label's control or toggles it), styled in `styles/components/settings-info-tip.css`. Behavior settings opt in with `infoKey` instead of `subtitleKey`. Folded settings groups use the one `.settings-disclosure` (`styles/components/settings-disclosure.css`; a summary may hold an inline heading that keeps the summary's look): Missions gathers every agent/model choice under "Agents and models" with the current request in its summary, and Advanced ends with the environment-variable editor folded under a single title. diff --git a/dev-docs/UI_SHELL.md b/dev-docs/UI_SHELL.md index 70722e72d2..0e07b755ea 100644 --- a/dev-docs/UI_SHELL.md +++ b/dev-docs/UI_SHELL.md @@ -7,7 +7,7 @@ Panel toggles, floating drawers, project/right-panel tabs, the session sidebar a - Docked panel resize handles follow the composer's Pointer Events design: capture the pointer on the handle and keep its `.is-resizing` highlight until pointer up/cancel, capture loss or the active handle's cleanup. Scope each handle's cleanup to its own side so resizing continues when the opposite panel closes. Keep event handlers local in `useDrawerResize.ts` and styles in `styles/panels/session-layout.css`; validate both sides, RTL and touch with `tests/browser/panel-resize.test.ts`. - Session rows keep actions inline until their measured title, badges, and controls no longer fit. Keep responsive action styles in `styles/components/session-row-actions.css`; hidden inline controls remain measurable but inert, and an open overflow menu stays mounted until dismissal. -- A subsession that starts working is revealed only below the session active in that instance (`revealWorkingSubsession`); other families stay collapsed. A collapsed parent's own expander chevron carries its descendants' most urgent visible state (input steady, working/compacting pulsing, idle steady green) with counted states in its label (`session-child-activity.ts`); idle follows the existing badge visibility, unseen-subagent preference and seen/fade lifecycle, and never outranks input or work. Never add a separate badge, and an expanded parent's chevron stays plain. Automatic reveals are transient: excluded from restorable expansion state until the user toggles or explicitly reveals the row, and a manual collapse dismisses the branch for subsessions running at that moment. Styles live in `styles/components/session-child-activity.css`. +- A collapsed parent's own expander chevron carries its descendants' most urgent visible state (input steady, working/compacting pulsing, idle steady green) with counted states in its label (`session-child-activity.ts`); idle follows the existing badge visibility, unseen-subagent preference and seen/fade lifecycle, and never outranks input or work. Never add a separate badge, and an expanded parent's chevron stays plain. General's `autoExpandActiveSubsessions` preference defaults on: when a visible collapsed row is selected or has the selected conversation as an ancestor and its descendant activity changes to working, compacting or permission/form input, `SessionList` reveals the paths to active descendants through `revealSubsession`. This applies recursively to visible subsessions at every depth. Check the row against the scroll viewport, including Virtua's offscreen buffer. Observe activity kind independently of expansion and preferences; scrolling a busy row into view, collapsing it or enabling the setting alone leaves its current expansion intact. Activity in other families stays represented by the chevron. Manual and activity-driven expansions share the same restorable state and local restoration authority. Styles live in `styles/components/session-child-activity.css`; validate with `tests/browser/session-child-activity.test.ts` and `stores/session-subsession-activity.test.ts`. - Conversation header actions (inline and in their overflow menu) offer the web preview on every platform, with Full screen added on mobile. Remote Control clients hide the preview entry while their host keeps web previews off: `/api/meta` then reports `previewsUnavailable` (`previewsUnavailable()` in `lib/server-meta.ts`). Validate with `tests/browser/header-windows.test.ts`. - Session hierarchy geometry lives in `styles/components/session-tree.css`; connector axes follow the parent expander at every depth, including selection mode, RTL and touch layouts. - Session search/filter mode uses flat per-session results with an optional subsession switch; filters, sorting, worktree badges and selection use each result's own identity. Normal browsing retains the session hierarchy. diff --git a/docs/help/de/conversations.md b/docs/help/de/conversations.md index 90cda9ff32..e557fbf157 100644 --- a/docs/help/de/conversations.md +++ b/docs/help/de/conversations.md @@ -13,7 +13,7 @@ Kopfzeilen von Denkprozessen und Werkzeugen zeigen, wie lange jeder Schritt geda 3. Grenzen Sie die Liste mit **Sitzungen suchen...**, **Hauptsitzungen** / **Untersitzungen**, dem Worktree-Filter und der Sortierung nach **Aktivität**, **Name** oder **Worktree** ein. Ziehen Sie in Suchergebnissen über die Kontrollkästchen der Zeilen, um mehrere Unterhaltungen auf einmal aus- oder abzuwählen. 4. Verwenden Sie **Zurück** und **Vorwärts** in der Seitenleiste, um zuvor angezeigte Unterhaltungen erneut aufzurufen. -Normales Durchsuchen ist hierarchisch; Such-/Filterergebnisse sind flache Einträge mit eigener Identität und eigenem Worktree jeder Unterhaltung. Eine neu arbeitende Untersitzung wird nur unter der Familie der aktiven Unterhaltung automatisch eingeblendet. Das Einklappen dieses Zweigs beendet diese automatische Einblendung für die derzeit laufenden Nachfahren. +Normales Durchsuchen ist hierarchisch; Such-/Filterergebnisse sind flache Einträge mit eigener Identität und eigenem Worktree jeder Unterhaltung. Unter **Einstellungen → Allgemein** ist **Untersitzungen automatisch aufklappen** standardmäßig aktiviert. Eine sichtbare eingeklappte Zeile öffnet die Pfade zu ihren aktiven Untersitzungen, wenn ihr Pfeil zu Arbeit, Komprimierung oder Eingabe erforderlich wechselt und sie ausgewählt ist oder zur Nachkommenschaft der ausgewählten Unterhaltung gehört. Diese Regel gilt auf jeder Ebene. Eine bereits aktive Zeile bleibt beim Hereinscrollen bis zu einem neuen Zustandswechsel geschlossen. Deaktivieren Sie die Option, damit Aktivität keine Zweige öffnet; manuelles Aufklappen und ausdrückliche Navigation bleiben verfügbar. Geöffnete Zweige, auch automatisch geöffnete, werden zur Wiederherstellung gespeichert. Zurück/Vorwärts ist ein Besuchsverlauf pro Projekt-Tab und Fenster, nicht die Reihenfolge der Liste. Er bleibt im Arbeitsspeicher, überspringt nicht verfügbare/gelöschte Unterhaltungen und wird nach einem Neustart nicht wiederhergestellt. Die Auswahl einer neuen Unterhaltung nach dem Zurückgehen ersetzt den Vorwärtspfad. **Vorherige Sitzung** / **Nächste Sitzung** in der Palette durchlaufen stattdessen die sichtbare Liste. diff --git a/docs/help/en/conversations.md b/docs/help/en/conversations.md index 2830ff6bd0..509a5a7ce3 100644 --- a/docs/help/en/conversations.md +++ b/docs/help/en/conversations.md @@ -13,7 +13,7 @@ Reasoning and tool headers show how long each step took, counting live while it 3. Use **Search sessions…**, **Main sessions** / **Subsessions**, the worktree filter and **Activity**, **Name** or **Worktree** sorting to narrow the list. In search results, drag across the rows' checkboxes to select or clear several conversations at once. 4. Use the sidebar's **Back** and **Forward** to revisit conversations you displayed. -Normal browsing is hierarchical; search/filter results are flat entries with each conversation's own identity and worktree. A newly working subsession is automatically revealed only beneath the active conversation's family. Collapsing that branch dismisses that automatic reveal for the currently running descendants. +Normal browsing is hierarchical; search/filter results are flat entries with each conversation's own identity and worktree. In **Settings → General**, **Automatically expand subsessions** is enabled by default. A visible collapsed row opens the paths to its active subsessions when its chevron changes to working, compacting or awaiting input, provided it is selected or belongs to the selected conversation's descendants. The same rule applies at every depth. Scrolling an already active row into view leaves it closed until a new transition. Disable the option to keep activity from opening branches; manual expansion and explicit navigation remain available. Open branches, including automatically opened ones, are saved for restoration. Back/Forward is a per-project-tab, per-window visit history, not list order. It is kept in memory, skips unavailable/deleted conversations and is not restored after restart. Selecting a new conversation after going back replaces the forward path. The palette's **Previous Session** / **Next Session** instead cycle the visible list. diff --git a/docs/help/es/conversations.md b/docs/help/es/conversations.md index deb91b6977..442ca43c75 100644 --- a/docs/help/es/conversations.md +++ b/docs/help/es/conversations.md @@ -13,7 +13,7 @@ Los encabezados de razonamiento y de herramientas muestran cuánto duró cada pa 3. Usa **Buscar sesiones…**, **Sesiones principales** / **Subsesiones**, el filtro de worktree y la ordenación por **Actividad**, **Nombre** o **Worktree** para acotar la lista. En los resultados de búsqueda, arrastra sobre las casillas de las filas para seleccionar o deseleccionar varias conversaciones a la vez. 4. Usa **Atrás** y **Adelante** en la barra lateral para volver a conversaciones que hayas mostrado. -La exploración normal es jerárquica; los resultados de búsqueda/filtro son entradas planas con la identidad y el worktree propios de cada conversación. Una subsesión que empiece a trabajar solo se revela automáticamente dentro de la familia de la conversación activa. Contraer esa rama descarta esa apertura automática para los descendientes actualmente en ejecución. +La exploración normal es jerárquica; los resultados de búsqueda/filtro son entradas planas con la identidad y el worktree propios de cada conversación. En **Ajustes → General**, **Expandir subsesiones automáticamente** está activado por defecto. Una fila visible y contraída abre las rutas a sus subsesiones activas cuando su flecha pasa a trabajar, compactar o esperar una respuesta, si está seleccionada o desciende de la conversación seleccionada. La regla se aplica a cualquier profundidad. Desplazarse hasta una fila ya activa la deja cerrada hasta una nueva transición. Desactiva la opción para que la actividad no abra ramas; la expansión manual y la navegación explícita siguen disponibles. Las ramas abiertas, incluidas las abiertas automáticamente, se guardan para restaurarlas. Atrás/Adelante es un historial de visitas por pestaña de proyecto y ventana, no el orden de la lista. Se conserva en memoria, omite conversaciones no disponibles/eliminadas y no se restaura tras reiniciar. Seleccionar una conversación nueva después de retroceder reemplaza la ruta hacia delante. En cambio, **Sesión anterior** / **Siguiente sesión** en la paleta recorren cíclicamente la lista visible. diff --git a/docs/help/fr/conversations.md b/docs/help/fr/conversations.md index 39d276326f..96fc4e00e5 100644 --- a/docs/help/fr/conversations.md +++ b/docs/help/fr/conversations.md @@ -13,7 +13,7 @@ Les en-têtes de raisonnement et d’outils indiquent la durée de chaque étape 3. Utilisez **Rechercher des sessions…**, **Sessions principales** / **Sous-sessions**, le filtre de worktree et le tri **Activité**, **Nom** ou **Worktree** pour réduire la liste. Dans les résultats de recherche, faites glisser le pointeur sur les cases des lignes pour sélectionner ou désélectionner plusieurs conversations d'un coup. 4. Utilisez **Retour** et **Avancer** dans la barre latérale pour revisiter les conversations affichées. -La navigation normale est hiérarchique ; les résultats de recherche/filtre sont des entrées à plat avec l’identité et le worktree propres à chaque conversation. Une sous-session qui commence à travailler n’est révélée automatiquement que sous la famille de la conversation active. Replier cette branche annule cette révélation automatique pour les descendants actuellement en cours. +La navigation normale est hiérarchique ; les résultats de recherche/filtre sont des entrées à plat avec l’identité et le worktree propres à chaque conversation. Dans **Réglages → Général**, **Déplier automatiquement les sous-sessions** est activé par défaut. Une ligne visible et repliée ouvre les chemins vers ses sous-sessions actives lorsque son chevron passe en activité, en compactage ou en attente de réponse, si elle est sélectionnée ou descend de la conversation sélectionnée. La règle s’applique à chaque profondeur. Faire défiler une ligne déjà active dans la zone visible la laisse fermée jusqu’à une nouvelle transition. Désactivez l’option pour empêcher l’activité d’ouvrir des branches ; le dépliage manuel et la navigation explicite restent disponibles. Les branches ouvertes, y compris automatiquement, sont mémorisées pour la restauration. Retour/Avancer est un historique de visites par onglet de projet et par fenêtre, pas l’ordre de la liste. Il reste en mémoire, ignore les conversations indisponibles/supprimées et n’est pas restauré après redémarrage. Sélectionner une nouvelle conversation après un retour remplace le parcours suivant. **Session précédente** / **Session suivante** dans la palette parcourent plutôt la liste visible. diff --git a/docs/help/he/conversations.md b/docs/help/he/conversations.md index bf0f011fc9..ad289b58dc 100644 --- a/docs/help/he/conversations.md +++ b/docs/help/he/conversations.md @@ -13,7 +13,7 @@ CodeNomad מציג סשנים מקוריים של OpenCode כשיחות, עם ה 3. השתמשו ב־**חפש סשנים…**, ב־**סשנים ראשיים** / **תת־סשנים**, במסנן worktree ובמיון **פעילות**, **שם** או **Worktree** לצמצום הרשימה. בתוצאות החיפוש, גררו מעל תיבות הסימון של השורות כדי לבחור כמה שיחות בבת אחת או לבטל את בחירתן. 4. השתמשו ב־**אחורה** וב־**קדימה** בסרגל הצד כדי לחזור לשיחות שהצגתם. -עיון רגיל הוא היררכי; תוצאות חיפוש/סינון הן רשומות שטוחות עם הזהות וה־worktree של כל שיחה. תת־סשן שמתחיל לעבוד נחשף אוטומטית רק תחת משפחת השיחה הפעילה. כיווץ הענף מבטל את החשיפה האוטומטית עבור הצאצאים שפועלים באותו רגע. +עיון רגיל הוא היררכי; תוצאות חיפוש/סינון הן רשומות שטוחות עם הזהות וה־worktree של כל שיחה. ב־**הגדרות → כללי**, **הרחבה אוטומטית של תת־סשנים** מופעלת כברירת מחדל. שורה גלויה ומכווצת פותחת נתיבים לתת־הסשנים הפעילים שלה כשהחץ עובר לעבודה, דחיסה או המתנה לקלט, אם היא נבחרת או נמצאת בצאצאי השיחה הנבחרת. הכלל חל בכל עומק. גלילה לשורה שכבר פעילה משאירה אותה סגורה עד לשינוי מצב חדש. כבו את האפשרות כדי שפעילות לא תפתח ענפים; הרחבה ידנית וניווט מפורש נשארים זמינים. ענפים פתוחים, גם כאלה שנפתחו אוטומטית, נשמרים לשחזור. אחורה/קדימה הם היסטוריית ביקורים לכל לשונית פרויקט ולכל חלון, לא סדר הרשימה. היא נשמרת בזיכרון, מדלגת על שיחות לא זמינות/שנמחקו ואינה משוחזרת לאחר הפעלה מחדש. בחירת שיחה חדשה לאחר חזרה אחורה מחליפה את המסלול קדימה. **סשן קודם** / **סשן הבא** בלוח הפקודות עוברים במקום זאת במחזור ברשימה הגלויה. diff --git a/docs/help/ja/conversations.md b/docs/help/ja/conversations.md index d0b01bfa35..dac40c9cae 100644 --- a/docs/help/ja/conversations.md +++ b/docs/help/ja/conversations.md @@ -13,7 +13,7 @@ CodeNomad は、OpenCode ネイティブのセッションを会話として表 3. **セッションを検索…**、**メインセッション**/**サブセッション**、ワークツリーフィルター、および **アクティビティ**、**名前**、**ワークツリー** の並べ替えで一覧を絞り込みます。検索結果では、行のチェックボックスの上をドラッグすると、複数の会話をまとめて選択または選択解除できます。 4. サイドバーの **戻る** と **進む** で、以前表示した会話を再訪します。 -通常の閲覧は階層表示です。検索/フィルター結果は、各会話自身の識別情報とワークツリーを持つ平坦な項目です。新たに作業を開始したサブセッションは、アクティブな会話のファミリー配下でのみ自動表示されます。その枝を折りたたむと、現在実行中の子孫に対する自動表示は解除されます。 +通常の閲覧は階層表示です。検索/フィルター結果は、各会話自身の識別情報とワークツリーを持つ平坦な項目です。**設定 → 一般**の**サブセッションを自動展開**は既定で有効です。表示中の折りたたまれた行が選択中、または選択中の会話の子孫である場合、矢印が作業中、圧縮中、入力待ちに変わると、アクティブなサブセッションへの経路を開きます。同じルールがすべての深さで適用されます。既にアクティブな行をスクロールで表示しても、新しい状態変化までは閉じたままです。無効にすると活動による展開を停止しますが、手動展開と明示的な移動は利用できます。自動で開いた枝も含め、開いた枝は復元用に保存されます。 戻る/進むは、一覧の順序ではなく、プロジェクトタブごと、ウィンドウごとの閲覧履歴です。メモリ内に保持され、利用不可/削除済みの会話はスキップし、再起動後は復元されません。戻った後に新しい会話を選ぶと、進む先の経路が置き換わります。一方、パレットの **前のセッション**/**次のセッション** は、表示中の一覧を巡回します。 diff --git a/docs/help/ne/conversations.md b/docs/help/ne/conversations.md index 755b08ae19..5c943ecbe4 100644 --- a/docs/help/ne/conversations.md +++ b/docs/help/ne/conversations.md @@ -13,7 +13,7 @@ CodeNomad ले नेटिभ OpenCode सत्रलाई कुराक 3. सूची साँघुरो बनाउन **सत्रहरू खोज्नुहोस्...**, **मुख्य सत्रहरू** / **उप-सत्रहरू**, worktree filter र **गतिविधि**, **नाम** वा **वर्कट्री** क्रम प्रयोग गर्नुहोस्। खोज नतिजाहरूमा, धेरै वार्तालापहरू एकैपटक चयन गर्न वा चयन हटाउन पङ्क्तिहरूका checkbox हरूमाथि ड्र्याग गर्नुहोस्। 4. पहिले देखेका कुराकानीमा फर्कन sidebar का **पछाडि** र **अगाडि** प्रयोग गर्नुहोस्। -सामान्य ब्राउज पदानुक्रममा हुन्छ; खोज/filter नतिजा हरेक कुराकानीको आफ्नै पहिचान र worktree सहित सपाट प्रविष्टि हुन्छन्। नयाँ काम गर्ने उप-सत्र सक्रिय कुराकानीको परिवारमुनि मात्र स्वतः देखिन्छ। त्यो branch संक्षिप्त गर्दा अहिले चलिरहेका descendants का लागि स्वचालित देखाइ खारेज हुन्छ। +सामान्य ब्राउज पदानुक्रममा हुन्छ; खोज/filter नतिजा हरेक कुराकानीको आफ्नै पहिचान र worktree सहित सपाट प्रविष्टि हुन्छन्। **सेटिङहरू → सामान्य** मा **उप-सत्रहरू स्वतः विस्तार गर्नुहोस्** पूर्वनिर्धारित रूपमा खुला हुन्छ। देखिने बन्द पङ्क्ति चयन गरिएको छ वा चयन गरिएको कुराकानीको सन्तान हो भने, यसको तीर काम गर्दै, कम्प्याक्ट गर्दै वा जवाफ पर्खँदै अवस्थामा बदलिँदा सक्रिय उप-सत्रहरूसम्मको बाटो खुल्छ। उही नियम हरेक गहिराइमा लागू हुन्छ। पहिल्यै सक्रिय पङ्क्ति स्क्रोल गरेर देखाउँदा नयाँ अवस्था परिवर्तन नहुँदासम्म बन्द नै रहन्छ। गतिविधिले शाखा नखोलोस् भन्न यो विकल्प बन्द गर्नुहोस्; हातैले विस्तार र स्पष्ट नेभिगेसन उपलब्ध रहन्छन्। स्वतः खोलिएका सहित खुला शाखाहरू पुनर्स्थापनाका लागि सुरक्षित हुन्छन्। Back/Forward प्रति-परियोजना-ट्याब, प्रति-विन्डो भ्रमण इतिहास हो, सूची क्रम होइन। यो memory मा रहन्छ, अनुपलब्ध/मेटिएका कुराकानी छोड्छ र पुनःसुरुवातपछि फर्किँदैन। पछाडि गएपछि नयाँ कुराकानी चयन गर्दा अगाडिको मार्ग बदलिन्छ। प्यालेटका **अघिल्लो सत्र** / **अर्को सत्र** ले भने देखिएको सूची घुमाउँछन्। diff --git a/docs/help/ru/conversations.md b/docs/help/ru/conversations.md index 151c914cf6..ccc946a83d 100644 --- a/docs/help/ru/conversations.md +++ b/docs/help/ru/conversations.md @@ -13,7 +13,7 @@ CodeNomad представляет нативные сессии OpenCode как 3. Используйте **Поиск сессий…**, **Основные сессии** / **Подсессии**, фильтр worktree и сортировку **Активность**, **Имя** или **Worktree**, чтобы сузить список. В результатах поиска проведите с зажатой кнопкой по флажкам строк, чтобы выбрать несколько разговоров сразу или снять с них выбор. 4. Используйте **Назад** и **Вперёд** на боковой панели, чтобы вернуться к просмотренным разговорам. -Обычный просмотр иерархический; результаты поиска/фильтра — плоские записи с собственной идентичностью и worktree каждого разговора. Начавшая работу подсессия автоматически показывается только в семействе активного разговора. Сворачивание ветки отменяет этот автоматический показ для выполняющихся сейчас потомков. +Обычный просмотр иерархический; результаты поиска/фильтра — плоские записи с собственной идентичностью и worktree каждого разговора. В **Настройки → Общие** параметр **Автоматически раскрывать подсессии** включён по умолчанию. Видимая свёрнутая строка раскрывает пути к своим активным подсессиям при переходе стрелки к работе, компактизации или ожиданию ввода, если она выбрана или является потомком выбранного разговора. Правило действует на любой глубине. Прокрутка до уже активной строки оставляет её закрытой до нового перехода состояния. Отключите параметр, чтобы активность не открывала ветви; ручное раскрытие и явная навигация остаются доступны. Открытые ветви, включая открытые автоматически, сохраняются для восстановления. Назад/Вперёд — история посещений для каждой вкладки проекта и окна, а не порядок списка. Она хранится в памяти, пропускает недоступные/удалённые разговоры и не восстанавливается после перезапуска. Выбор нового разговора после возврата назад заменяет путь вперёд. Команды палитры **Предыдущая сессия** / **Следующая сессия**, напротив, перебирают видимый список. diff --git a/docs/help/tr/conversations.md b/docs/help/tr/conversations.md index 976a573223..e5c5577da4 100644 --- a/docs/help/tr/conversations.md +++ b/docs/help/tr/conversations.md @@ -13,7 +13,7 @@ Akıl yürütme ve araç başlıkları her adımın ne kadar sürdüğünü gös 3. Listeyi daraltmak için **Session ara…**, **Ana oturumlar** / **Alt oturumlar**, çalışma ağacı filtresini ve **Etkinlik**, **Ad** veya **Çalışma ağacı** sıralamasını kullanın. Arama sonuçlarında, birden fazla konuşmayı tek seferde seçmek veya seçimini kaldırmak için satırların onay kutularının üzerinde sürükleyin. 4. Görüntülediğiniz konuşmaları yeniden ziyaret etmek için kenar çubuğundaki **Geri** ve **İleri** öğesini kullanın. -Normal gezinme hiyerarşiktir; arama/filtre sonuçları her konuşmanın kendi kimliği ve çalışma ağacıyla düz listelenir. Yeni çalışmaya başlayan alt oturum yalnızca etkin konuşmanın ailesi altında otomatik gösterilir. Dalı kapatmak o anda çalışan alt konuşmaların otomatik gösterimini kaldırır. +Normal gezinme hiyerarşiktir; arama/filtre sonuçları her konuşmanın kendi kimliği ve çalışma ağacıyla düz listelenir. **Ayarlar → Genel** içindeki **Alt oturumları otomatik genişlet** varsayılan olarak açıktır. Görünen kapalı bir satır seçiliyse veya seçili konuşmanın altındaysa, oku çalışıyor, sıkıştırılıyor veya girdi bekleniyor durumuna geçtiğinde etkin alt oturumlarına giden yollar açılır. Aynı kural her derinlikte geçerlidir. Zaten etkin bir satırı kaydırarak görünür yapmak, yeni bir durum değişikliğine kadar onu kapalı bırakır. Etkinliğin dalları açmasını önlemek için seçeneği kapatın; elle genişletme ve açık gezinme kullanılabilir kalır. Otomatik açılanlar dahil açık dallar geri yüklemek üzere kaydedilir. Geri/İleri, liste sırası değil, proje sekmesi başına, pencere başına ziyaret geçmişidir. Bellekte tutulur, kullanılamayan/silinmiş konuşmalar atlanır ve yeniden başlatıldıktan sonra geri yüklenmez. Geri döndükten sonra yeni bir görüşme seçmek ileri yolun yerini alır. Paletin **Önceki Session** / **Sonraki Session**'si bunun yerine görünür listeyi döndürür. diff --git a/docs/help/zh-Hans/conversations.md b/docs/help/zh-Hans/conversations.md index 88ca18751d..cd0c77b51f 100644 --- a/docs/help/zh-Hans/conversations.md +++ b/docs/help/zh-Hans/conversations.md @@ -13,7 +13,7 @@ CodeNomad 将原生 OpenCode 会话呈现为对话,为委派工作提供层级 3. 使用**搜索会话…**、**主会话** / **子会话**、工作树筛选和**活动时间**、**名称**或**工作树**排序来缩小列表范围。在搜索结果中,在各行的复选框上拖动可一次选中或取消选中多个对话。 4. 使用侧栏的**后退**和**前进**重新访问曾显示的对话。 -正常浏览采用层级结构;搜索/筛选结果是扁平条目,各自保留对话身份和工作树。新开始工作的子会话只会在活动对话所属会话族下自动显示。折叠分支会针对当前正在运行的后代取消这种自动显示。 +正常浏览采用层级结构;搜索/筛选结果是扁平条目,各自保留对话身份和工作树。**设置 → 常规**中的**自动展开子会话**默认启用。可见的折叠行被选中或属于所选对话的后代时,其箭头切换为工作中、压缩中或等待输入,就会展开通向活动子会话的路径。同一规则适用于各个深度。滚动到已活动的行时,它会保持折叠,直到下一次状态变化。禁用此选项可阻止活动打开分支;手动展开和显式导航仍可使用。已打开的分支(包括自动打开的分支)会保存以供恢复。 后退/前进是每个项目标签页、每个窗口的访问历史,而非列表顺序。它保存在内存中,跳过不可用/已删除对话,重启后不会恢复。后退后选择新对话会替换前进路径。命令面板的**上一个会话** / **下一个会话**则按可见列表循环切换。 diff --git a/packages/ui/src/components/session-list.tsx b/packages/ui/src/components/session-list.tsx index 57c71500d7..cf51de6e10 100644 --- a/packages/ui/src/components/session-list.tsx +++ b/packages/ui/src/components/session-list.tsx @@ -43,6 +43,7 @@ import { getLogger } from "../lib/logger" import { copyToClipboard } from "../lib/clipboard" import { useConfig } from "../stores/preferences" import { isSessionListViewportAttached, shouldRenderSessionRows } from "./session-list-visibility" +import { getDescendantSessions, getSessionAncestorIds, revealSubsession } from "../stores/session-state" const log = getLogger("session") @@ -589,6 +590,29 @@ const SessionList: Component = (props) => { const isActive = () => props.activeSessionId === sessionId() // A collapsed parent's chevron carries its subsessions' visible status. const childActivity = () => rowProps.hasChildren && !rowProps.expanded ? descendantActivity().get(sessionId()) : undefined + // Observe activity independently of expansion: folding a busy branch is not + // a new activity transition. Visible descendants follow the same rule. + const activityKind = createMemo(() => { + const activity = descendantActivity().get(sessionId()) + return activity ? childActivityKind(activity) : undefined + }) + createEffect(on(activityKind, (kind, previous) => { + if (kind === previous || !kind || kind === "idle" || rowProps.expanded + || props.enableFilterBar || !preferences().autoExpandActiveSubsessions) return + const active = props.activeSessionId + if (!active || (!isActive() && !getSessionAncestorIds(props.instanceId, sessionId()).includes(active))) return + const row = rowElement()?.getBoundingClientRect(), viewport = listEl()?.getBoundingClientRect() + // Virtua also mounts buffered rows beyond the viewport; only visible rows reveal. + if (!row || !viewport || row.width <= 0 || row.height <= 0 + || row.bottom <= Math.max(0, viewport.top) || row.top >= Math.min(window.innerHeight, viewport.bottom) + || row.right <= Math.max(0, viewport.left) || row.left >= Math.min(window.innerWidth, viewport.right)) return + for (const descendant of getDescendantSessions(props.instanceId, sessionId())) { + if (descendant.pendingPermission || descendant.pendingForm + || descendant.status === "working" || descendant.status === "compacting") { + revealSubsession(props.instanceId, descendant.id) + } + } + }, { defer: true })) const expanderLabel = (key: string) => { const label = t(`sessionList.expand.${key}`) const activity = childActivity() diff --git a/packages/ui/src/components/settings/general-settings-section.tsx b/packages/ui/src/components/settings/general-settings-section.tsx index a945c9c514..c96f9b1c61 100644 --- a/packages/ui/src/components/settings/general-settings-section.tsx +++ b/packages/ui/src/components/settings/general-settings-section.tsx @@ -22,6 +22,7 @@ export const GeneralSettingsSection: Component = (p getBehaviorSettings(config).filter( (setting) => setting.id === "behavior.messageTimeline" || + setting.id === "behavior.autoExpandActiveSubsessions" || setting.id === "behavior.diffViewMode" || setting.id === "behavior.followUpBehavior", ), diff --git a/packages/ui/src/lib/i18n/messages/de/settings.ts b/packages/ui/src/lib/i18n/messages/de/settings.ts index 26f060c153..1be9ef49bc 100644 --- a/packages/ui/src/lib/i18n/messages/de/settings.ts +++ b/packages/ui/src/lib/i18n/messages/de/settings.ts @@ -1,4 +1,6 @@ export const settingsMessages = { + "settings.behavior.autoExpandActiveSubsessions.title": "Untersitzungen automatisch aufklappen", + "settings.behavior.autoExpandActiveSubsessions.info": "Wenn ein sichtbarer eingeklappter Zweig unter der ausgewählten Unterhaltung zu Arbeit, Komprimierung oder Eingabe erforderlich wechselt, wird der Pfad zu seinen aktiven Untersitzungen aufgeklappt. Sichtbare Untersitzungen folgen derselben Regel auf jeder Ebene. Deaktivieren, damit Aktivität keine Zweige öffnet. Geöffnete Zweige werden zur Wiederherstellung gespeichert.", "settings.usage.cached": "Zuletzt gespeicherte Statistik · Aktualisierung ausstehend", "settings.native.openFailed": "Die Einstellungen konnten nicht in ihrem Fenster geöffnet werden. Starten oder aktualisieren Sie die CodeNomad-App und versuchen Sie es erneut.", "settings.accounts.current": "Aktives Konto", diff --git a/packages/ui/src/lib/i18n/messages/en/settings.ts b/packages/ui/src/lib/i18n/messages/en/settings.ts index 40d5304087..af300a1f01 100644 --- a/packages/ui/src/lib/i18n/messages/en/settings.ts +++ b/packages/ui/src/lib/i18n/messages/en/settings.ts @@ -1,4 +1,6 @@ export const settingsMessages = { + "settings.behavior.autoExpandActiveSubsessions.title": "Automatically expand subsessions", + "settings.behavior.autoExpandActiveSubsessions.info": "When a visible collapsed branch under the selected conversation changes to working, compacting or awaiting input, expand the path to its active subsessions. Visible subsessions follow the same rule at every depth. Disable to keep activity from opening branches. Open branches are saved for restoration.", "settings.usage.cached": "Previous saved statistics · awaiting refresh", "settings.native.openFailed": "Preferences could not open in their window. Restart or update the CodeNomad desktop app, then try again.", "settings.accounts.current": "Active account", diff --git a/packages/ui/src/lib/i18n/messages/es/settings.ts b/packages/ui/src/lib/i18n/messages/es/settings.ts index 09a3ab0c36..0f5e9fc258 100644 --- a/packages/ui/src/lib/i18n/messages/es/settings.ts +++ b/packages/ui/src/lib/i18n/messages/es/settings.ts @@ -1,4 +1,6 @@ export const settingsMessages = { + "settings.behavior.autoExpandActiveSubsessions.title": "Expandir subsesiones automáticamente", + "settings.behavior.autoExpandActiveSubsessions.info": "Cuando una rama visible y contraída de la conversación seleccionada pasa a trabajar, compactar o esperar una respuesta, se expande la ruta hasta sus subsesiones activas. Las subsesiones visibles siguen la misma regla a cualquier profundidad. Desactiva para que la actividad no abra ramas. Las ramas abiertas se guardan para restaurarlas.", "settings.usage.cached": "Últimas estadísticas guardadas · actualización pendiente", "settings.native.openFailed": "No se pudieron abrir las preferencias en su ventana. Reinicia o actualiza la aplicación CodeNomad e inténtalo de nuevo.", "settings.accounts.current": "Cuenta activa", diff --git a/packages/ui/src/lib/i18n/messages/fr/settings.ts b/packages/ui/src/lib/i18n/messages/fr/settings.ts index c0d76fe36f..b943923f40 100644 --- a/packages/ui/src/lib/i18n/messages/fr/settings.ts +++ b/packages/ui/src/lib/i18n/messages/fr/settings.ts @@ -1,4 +1,6 @@ export const settingsMessages = { + "settings.behavior.autoExpandActiveSubsessions.title": "Déplier automatiquement les sous-sessions", + "settings.behavior.autoExpandActiveSubsessions.info": "Lorsqu’une branche visible et repliée sous la conversation sélectionnée passe en activité, en compactage ou en attente de réponse, déplier le chemin vers ses sous-sessions actives. Les sous-sessions visibles suivent la même règle à chaque profondeur. Désactiver pour empêcher l’activité d’ouvrir des branches. Les branches ouvertes sont mémorisées pour la restauration.", "settings.usage.cached": "Dernières statistiques sauvegardées · en attente d’actualisation", "settings.native.openFailed": "Les préférences n'ont pas pu s'ouvrir dans leur fenêtre. Redémarrez ou mettez à jour l'application CodeNomad, puis réessayez.", "settings.accounts.current": "Compte actif", diff --git a/packages/ui/src/lib/i18n/messages/he/settings.ts b/packages/ui/src/lib/i18n/messages/he/settings.ts index 8ffdb4c4a9..dd60f3af77 100644 --- a/packages/ui/src/lib/i18n/messages/he/settings.ts +++ b/packages/ui/src/lib/i18n/messages/he/settings.ts @@ -1,4 +1,6 @@ export const settingsMessages = { + "settings.behavior.autoExpandActiveSubsessions.title": "הרחבה אוטומטית של תת־סשנים", + "settings.behavior.autoExpandActiveSubsessions.info": "כשענף גלוי ומכווץ בשיחה הנבחרת עובר לעבודה, דחיסה או המתנה לקלט, הנתיב לתת־הסשנים הפעילים שלו נפתח. אותו כלל חל על תת־סשנים גלויים בכל עומק. כבו כדי שפעילות לא תפתח ענפים. ענפים פתוחים נשמרים לשחזור.", "settings.usage.cached": "הנתונים הסטטיסטיים האחרונים שנשמרו · ממתין לרענון", "settings.native.openFailed": "לא ניתן היה לפתוח את ההעדפות בחלון שלהן. הפעילו מחדש או עדכנו את אפליקציית CodeNomad ונסו שוב.", "settings.accounts.current": "חשבון פעיל", diff --git a/packages/ui/src/lib/i18n/messages/ja/settings.ts b/packages/ui/src/lib/i18n/messages/ja/settings.ts index 33373bfc88..2f57a1329f 100644 --- a/packages/ui/src/lib/i18n/messages/ja/settings.ts +++ b/packages/ui/src/lib/i18n/messages/ja/settings.ts @@ -1,4 +1,6 @@ export const settingsMessages = { + "settings.behavior.autoExpandActiveSubsessions.title": "サブセッションを自動展開", + "settings.behavior.autoExpandActiveSubsessions.info": "選択中の会話内で、表示中の折りたたまれた枝が作業中、圧縮中、入力待ちに変わると、アクティブなサブセッションへの経路を展開します。表示中のサブセッションにも深さに関係なく同じルールが適用されます。無効にすると活動による展開を停止します。開いた枝は復元用に保存されます。", "settings.usage.cached": "前回保存した統計 · 更新待ち", "settings.native.openFailed": "設定ウィンドウを開けませんでした。CodeNomad アプリを再起動または更新してから、もう一度お試しください。", "settings.accounts.current": "有効なアカウント", diff --git a/packages/ui/src/lib/i18n/messages/ne/settings.ts b/packages/ui/src/lib/i18n/messages/ne/settings.ts index b336799b38..45bbc15d6a 100644 --- a/packages/ui/src/lib/i18n/messages/ne/settings.ts +++ b/packages/ui/src/lib/i18n/messages/ne/settings.ts @@ -1,4 +1,6 @@ export const settingsMessages = { + "settings.behavior.autoExpandActiveSubsessions.title": "उप-सत्रहरू स्वतः विस्तार गर्नुहोस्", + "settings.behavior.autoExpandActiveSubsessions.info": "चयन गरिएको कुराकानीको देखिने बन्द शाखा काम गर्दै, कम्प्याक्ट गर्दै वा जवाफ पर्खँदै अवस्थामा बदलिएमा त्यसका सक्रिय उप-सत्रहरूसम्मको बाटो खुल्छ। देखिने उप-सत्रहरूमा हरेक गहिराइमा उही नियम लागू हुन्छ। गतिविधिले शाखा नखोलोस् भन्न यो बन्द गर्नुहोस्। खुला शाखाहरू पुनर्स्थापनाका लागि सुरक्षित हुन्छन्।", "settings.usage.cached": "पछिल्लो सुरक्षित तथ्याङ्क · अद्यावधिकको प्रतीक्षामा", "settings.native.openFailed": "प्राथमिकताहरू तिनको विन्डोमा खोल्न सकिएन। CodeNomad एप पुनः सुरु गर्नुहोस् वा अद्यावधिक गर्नुहोस्, त्यसपछि फेरि प्रयास गर्नुहोस्।", "settings.accounts.current": "सक्रिय खाता", diff --git a/packages/ui/src/lib/i18n/messages/ru/settings.ts b/packages/ui/src/lib/i18n/messages/ru/settings.ts index 424c00384a..5cc1c18aed 100644 --- a/packages/ui/src/lib/i18n/messages/ru/settings.ts +++ b/packages/ui/src/lib/i18n/messages/ru/settings.ts @@ -1,4 +1,6 @@ export const settingsMessages = { + "settings.behavior.autoExpandActiveSubsessions.title": "Автоматически раскрывать подсессии", + "settings.behavior.autoExpandActiveSubsessions.info": "Когда видимая свёрнутая ветвь выбранного разговора переходит к работе, компактизации или ожиданию ввода, раскрывается путь к её активным подсессиям. Видимые подсессии следуют тому же правилу на любой глубине. Отключите, чтобы активность не открывала ветви. Открытые ветви сохраняются для восстановления.", "settings.usage.cached": "Последняя сохранённая статистика · ожидание обновления", "settings.native.openFailed": "Не удалось открыть настройки в их окне. Перезапустите или обновите приложение CodeNomad и повторите попытку.", "settings.accounts.current": "Активный аккаунт", diff --git a/packages/ui/src/lib/i18n/messages/tr/settings.ts b/packages/ui/src/lib/i18n/messages/tr/settings.ts index 3b6425603d..1f4345f563 100644 --- a/packages/ui/src/lib/i18n/messages/tr/settings.ts +++ b/packages/ui/src/lib/i18n/messages/tr/settings.ts @@ -1,4 +1,6 @@ export const settingsMessages = { + "settings.behavior.autoExpandActiveSubsessions.title": "Alt oturumları otomatik genişlet", + "settings.behavior.autoExpandActiveSubsessions.info": "Seçili konuşmanın görünen kapalı bir dalı çalışıyor, sıkıştırılıyor veya girdi bekleniyor durumuna geçerse etkin alt oturumlarına giden yol açılır. Görünen alt oturumlar her derinlikte aynı kurala uyar. Etkinliğin dalları açmasını önlemek için kapatın. Açık dallar geri yüklemek üzere kaydedilir.", "settings.usage.cached": "Son kaydedilen istatistikler · yenileme bekleniyor", "settings.native.openFailed": "Tercihler kendi penceresinde açılamadı. CodeNomad uygulamasını yeniden başlatın veya güncelleyin, ardından tekrar deneyin.", "settings.accounts.current": "Etkin hesap", diff --git a/packages/ui/src/lib/i18n/messages/zh-Hans/settings.ts b/packages/ui/src/lib/i18n/messages/zh-Hans/settings.ts index 7740447e4b..e431d23e54 100644 --- a/packages/ui/src/lib/i18n/messages/zh-Hans/settings.ts +++ b/packages/ui/src/lib/i18n/messages/zh-Hans/settings.ts @@ -1,4 +1,6 @@ export const settingsMessages = { + "settings.behavior.autoExpandActiveSubsessions.title": "自动展开子会话", + "settings.behavior.autoExpandActiveSubsessions.info": "当所选对话中可见的折叠分支切换为工作中、压缩中或等待输入时,展开通向其活动子会话的路径。可见子会话在各个深度都遵循同一规则。禁用后,活动不会打开分支。已打开的分支会保存以供恢复。", "settings.usage.cached": "上次保存的统计数据 · 等待刷新", "settings.native.openFailed": "无法在设置窗口中打开偏好设置。请重启或更新 CodeNomad 应用后重试。", "settings.accounts.current": "活动账户", diff --git a/packages/ui/src/lib/settings/behavior-registry.ts b/packages/ui/src/lib/settings/behavior-registry.ts index eb89ed2718..7074fa5021 100644 --- a/packages/ui/src/lib/settings/behavior-registry.ts +++ b/packages/ui/src/lib/settings/behavior-registry.ts @@ -259,6 +259,14 @@ export function getBehaviorSettings(actions: BehaviorRegistryActions): BehaviorS } }, }, + { + kind: "toggle", + id: "behavior.autoExpandActiveSubsessions", + titleKey: "settings.behavior.autoExpandActiveSubsessions.title", + infoKey: "settings.behavior.autoExpandActiveSubsessions.info", + get: (p) => p.autoExpandActiveSubsessions, + set: (next) => updatePreferences?.({ autoExpandActiveSubsessions: next }), + }, { kind: "toggle", id: "behavior.focusExistingWindowOnSecondLaunch", diff --git a/packages/ui/src/stores/preferences.tsx b/packages/ui/src/stores/preferences.tsx index bfd94640a6..5fe7455967 100644 --- a/packages/ui/src/stores/preferences.tsx +++ b/packages/ui/src/stores/preferences.tsx @@ -132,6 +132,7 @@ export interface UiSettings { showProviderUsageCreditBalance: boolean autoCleanupBlankSessions: boolean keepUnseenSubagentIdleStatus: boolean + autoExpandActiveSubsessions: boolean focusExistingWindowOnSecondLaunch: boolean modelVisibility: ModelVisibilityPreferences missionProfileDefaults: MissionProfileDefault[] @@ -247,6 +248,7 @@ const defaultUiSettings: UiSettings = { showProviderUsageCreditBalance: false, autoCleanupBlankSessions: true, keepUnseenSubagentIdleStatus: true, + autoExpandActiveSubsessions: true, focusExistingWindowOnSecondLaunch: false, modelVisibility: {}, missionProfileDefaults: [], @@ -373,6 +375,8 @@ function normalizeUiSettings(input?: Partial | null): UiSettings { autoCleanupBlankSessions: sanitized.autoCleanupBlankSessions ?? defaultUiSettings.autoCleanupBlankSessions, keepUnseenSubagentIdleStatus: sanitized.keepUnseenSubagentIdleStatus ?? defaultUiSettings.keepUnseenSubagentIdleStatus, + autoExpandActiveSubsessions: typeof sanitized.autoExpandActiveSubsessions === "boolean" + ? sanitized.autoExpandActiveSubsessions : defaultUiSettings.autoExpandActiveSubsessions, focusExistingWindowOnSecondLaunch: sanitized.focusExistingWindowOnSecondLaunch === true, modelVisibility: normalizeModelVisibilityPreferences(sanitized.modelVisibility), missionProfileDefaults: normalizeMissionDefaults(sanitized.missionProfileDefaults), diff --git a/packages/ui/src/stores/session-events.ts b/packages/ui/src/stores/session-events.ts index 6819913e05..86ce147c37 100644 --- a/packages/ui/src/stores/session-events.ts +++ b/packages/ui/src/stores/session-events.ts @@ -40,7 +40,7 @@ import { type SessionRetryState, type SessionStatus, } from "../types/session" -import { activeSessionId, getAuthoritativelyDeletedSessionIdsForInstance, invalidateSessionMessageLoad, isSessionInWorkspaceScope, prependSessionListId, revealWorkingSubsession, sessions, setSessionStatus, setSessions, withSession } from "./session-state" +import { activeSessionId, getAuthoritativelyDeletedSessionIdsForInstance, invalidateSessionMessageLoad, isSessionInWorkspaceScope, prependSessionListId, sessions, setSessionStatus, setSessions, withSession } from "./session-state" import { mergeFetchedSessionRuntimeState } from "./session-generation-recovery" import { showsRequestOfSession } from "./interruption-scope" import { getRetrySeconds } from "./session-status" @@ -369,7 +369,6 @@ async function fetchSessionInfo(instanceId: string, sessionId: string, directory const fetched = createClientSession(info, instanceId) let updatedInstanceSessions: Map | undefined - let shouldExpandAncestors = false setSessions((prev) => { const next = new Map(prev) @@ -397,10 +396,6 @@ async function fetchSessionInfo(instanceId: string, sessionId: string, directory instanceSessions.set(sessionId, merged) next.set(instanceId, instanceSessions) updatedInstanceSessions = instanceSessions - - if (merged.parentId && merged.status === "working" && (existing?.status ?? "idle") !== "working") { - shouldExpandAncestors = true - } return next }) @@ -409,8 +404,6 @@ async function fetchSessionInfo(instanceId: string, sessionId: string, directory const published = updatedInstanceSessions?.get(sessionId) if (published && !published.parentId) prependSessionListId(instanceId, sessionId) - if (shouldExpandAncestors) revealWorkingSubsession(instanceId, sessionId) - return fetched } catch (error) { log.error("Failed to fetch session info", error) diff --git a/packages/ui/src/stores/session-state.ts b/packages/ui/src/stores/session-state.ts index df5e1c272b..543314c4aa 100644 --- a/packages/ui/src/stores/session-state.ts +++ b/packages/ui/src/stores/session-state.ts @@ -92,11 +92,6 @@ const [threadTotalsByInstance, setThreadTotalsByInstance] = createSignal>>(new Map()) -// Rows opened only to reveal subsession activity: transient, never persisted, -// and handed to the user as soon as they toggle the row themselves. -const autoExpandedSessions = new Map>() -// `${rowId}\0${descendantId}` pairs the user collapsed while that descendant ran. -const dismissedActivityReveals = new Map>() export type InstanceSessionIndicatorStatus = "permission" | SessionStatus @@ -787,8 +782,6 @@ function setSessionStatus( status: SessionStatus, options: { retry?: SessionRetryState | null; force?: boolean } = {}, ): void { - let expandAncestors = false - withSession(instanceId, sessionId, (session) => { const admissionPending = session.generationAdmissionToken !== undefined && status === "idle" const generationRecovery = admissionPending @@ -817,13 +810,7 @@ function setSessionStatus( } session.idleSince = getIdleSinceForStatusTransition(previous, status, session.idleSince) session.retry = retry - - if (session.parentId && status === "working" && previous !== "working") { - expandAncestors = true - } }) - - if (expandAncestors) revealWorkingSubsession(instanceId, sessionId) } function getActiveParentSession(instanceId: string): Session | null { @@ -902,15 +889,6 @@ function isSessionExpanded(instanceId: string, sessionId: string): boolean { function setSessionExpanded(instanceId: string, sessionId: string, expanded: boolean): void { addAuthoritativeKey(setAuthoritativeSessionExpansionKeys, getDraftKey(instanceId, sessionId)) - autoExpandedSessions.get(instanceId)?.delete(sessionId) - if (!expanded) { - // Collapsing a busy branch dismisses it for the subsessions running now. - const dismissed = dismissedActivityReveals.get(instanceId) ?? new Set() - for (const descendant of getDescendantSessions(instanceId, sessionId)) { - if (descendant.status === "working" || descendant.status === "compacting") dismissed.add(`${sessionId}\0${descendant.id}`) - } - if (dismissed.size) dismissedActivityReveals.set(instanceId, dismissed) - } setExpandedSessions((prev) => { const next = new Map(prev) const currentSet = next.get(instanceId) ?? new Set() @@ -933,8 +911,6 @@ function setSessionExpanded(instanceId: string, sessionId: string, expanded: boo function clearInstanceSessionExpansionState(instanceId: string): void { if (!instanceId) return const prefix = `${instanceId}:` - autoExpandedSessions.delete(instanceId) - dismissedActivityReveals.delete(instanceId) setExpandedSessions((prev) => { if (!prev.has(instanceId)) return prev const next = new Map(prev) @@ -951,14 +927,10 @@ function hydrateSessionExpansion(instanceId: string, sessionIds: readonly string const authoritative = getAuthoritativeSessionExpansionIdsForInstance(instanceId) const deleted = getAuthoritativelyDeletedSessionIdsForInstance(instanceId) const restored = sessionIds.filter((id) => !authoritative.has(id) && !deleted.has(id)) - // A reveal can race restore: restored rows are the user's own again, while - // reveals still pending stay open like other local changes. - const auto = autoExpandedSessions.get(instanceId) - for (const id of restored) auto?.delete(id) setExpandedSessions((prev) => { const current = prev.get(instanceId) const expanded = new Set(restored) - for (const id of current ?? []) if ((authoritative.has(id) || auto?.has(id)) && !deleted.has(id)) expanded.add(id) + for (const id of current ?? []) if (authoritative.has(id) && !deleted.has(id)) expanded.add(id) if (current?.size === expanded.size && [...expanded].every((id) => current.has(id))) return prev const next = new Map(prev) if (expanded.size) next.set(instanceId, expanded) @@ -991,8 +963,6 @@ function ensureSessionAncestorsExpanded(instanceId: string, sessionId: string): if (ancestorIds.length === 0) return for (const ancestorId of ancestorIds) { addAuthoritativeKey(setAuthoritativeSessionExpansionKeys, getDraftKey(instanceId, ancestorId)) - // An explicit reveal (selection, navigation) makes the path the user's own. - autoExpandedSessions.get(instanceId)?.delete(ancestorId) } setExpandedSessions((prev) => { const next = new Map(prev) @@ -1006,26 +976,20 @@ function ensureSessionAncestorsExpanded(instanceId: string, sessionId: string): } /** - * A subsession started working. Reveal it only inside the conversation this - * instance is showing (the active session or its descendants); elsewhere the - * collapsed ancestor shows a child-activity dot instead. Each project tab has - * its own active session, so another tab of the same folder stays untouched. + * Reveal a descendant's path below the conversation this instance is showing. + * The list decides whether the visible row's activity transition warrants a reveal. */ -function revealWorkingSubsession(instanceId: string, sessionId: string): void { +function revealSubsession(instanceId: string, sessionId: string): void { const active = activeSessionId().get(instanceId) if (!active) return const ancestors = getSessionAncestorIds(instanceId, sessionId) const start = ancestors.indexOf(active) if (start < 0) return const path = ancestors.slice(start) - const dismissed = dismissedActivityReveals.get(instanceId) - if (path.some((id) => dismissed?.has(`${id}\0${sessionId}`))) return const current = expandedSessions().get(instanceId) const missing = path.filter((id) => !current?.has(id)) if (missing.length === 0) return - const auto = autoExpandedSessions.get(instanceId) ?? new Set() - for (const id of missing) auto.add(id) - autoExpandedSessions.set(instanceId, auto) + for (const id of missing) addAuthoritativeKey(setAuthoritativeSessionExpansionKeys, getDraftKey(instanceId, id)) setExpandedSessions((prev) => { const next = new Map(prev) next.set(instanceId, new Set([...missing, ...(prev.get(instanceId) ?? [])])) @@ -1033,10 +997,9 @@ function revealWorkingSubsession(instanceId: string, sessionId: string): void { }) } -/** Expanded rows the user chose; automatic activity reveals are not restorable state. */ +/** All expanded rows are restorable, whether opened manually or by activity. */ function getPersistentExpandedSessionIds(instanceId: string): string[] { - const auto = autoExpandedSessions.get(instanceId) - return [...(expandedSessions().get(instanceId) ?? [])].filter((id) => !auto?.has(id)) + return [...(expandedSessions().get(instanceId) ?? [])] } function getVisibleSessionIds(instanceId: string): string[] { @@ -1345,7 +1308,7 @@ export { ensureSessionExpanded, getSessionAncestorIds, ensureSessionAncestorsExpanded, - revealWorkingSubsession, + revealSubsession, getPersistentExpandedSessionIds, setActiveSessionFromList, isSessionMessagesLoading, diff --git a/packages/ui/src/stores/session-subsession-activity.test.ts b/packages/ui/src/stores/session-subsession-activity.test.ts index 577afacc26..335233fbbf 100644 --- a/packages/ui/src/stores/session-subsession-activity.test.ts +++ b/packages/ui/src/stores/session-subsession-activity.test.ts @@ -8,6 +8,7 @@ import { expandedSessions, getPersistentExpandedSessionIds, hydrateSessionExpansion, + revealSubsession, setActiveSession, setSessionExpanded, setSessionStatus, @@ -38,53 +39,68 @@ const expanded = (instanceId: string) => [...(expandedSessions().get(instanceId) describe("subsession activity", () => { beforeEach(() => seed("tab-a", "tab-b")) - it("reveals a working subsession only inside the conversation each tab is showing", () => { + it("reveals a requested subsession only inside the conversation each tab is showing", () => { setActiveSession("tab-a", "parent") setActiveSession("tab-b", "other") setSessionStatus("tab-a", "grandchild", "working") setSessionStatus("tab-b", "grandchild", "working") + assert.deepEqual(expanded("tab-a"), []) + revealSubsession("tab-a", "grandchild") + revealSubsession("tab-b", "grandchild") // Tab A shows `parent`: only the path below it opens. Tab B shows another family: nothing moves. assert.deepEqual(expanded("tab-a"), ["child", "parent"]) assert.deepEqual(expanded("tab-b"), []) }) - it("keeps automatic reveals out of restorable state until the user takes them over", () => { + it("restores automatic reveals just like manual expansions", () => { setActiveSession("tab-a", "root") setSessionExpanded("tab-a", "other", true) setSessionStatus("tab-a", "child", "working") + revealSubsession("tab-a", "child") + assert.deepEqual(expanded("tab-a"), ["other", "parent", "root"]) + const saved = getPersistentExpandedSessionIds("tab-a") + assert.deepEqual(saved.sort(), ["other", "parent", "root"]) + clearInstanceSessionExpansionState("tab-a") + hydrateSessionExpansion("tab-a", saved) assert.deepEqual(expanded("tab-a"), ["other", "parent", "root"]) - assert.deepEqual(getPersistentExpandedSessionIds("tab-a"), ["other"]) - setSessionExpanded("tab-a", "parent", true) - assert.deepEqual(getPersistentExpandedSessionIds("tab-a").sort(), ["other", "parent"]) }) it("keeps restored and revealed rows when a reveal races restore hydration", () => { // The restored selection is seeded before the expansion snapshot is hydrated. setActiveSession("tab-a", "root") setSessionStatus("tab-a", "child", "working") - // The snapshot already held the user's `root`: it becomes theirs again. + revealSubsession("tab-a", "child") + // The snapshot held `root`; the live reveal of `parent` also survives hydration. hydrateSessionExpansion("tab-a", ["root"]) assert.deepEqual(expanded("tab-a"), ["parent", "root"]) - assert.deepEqual(getPersistentExpandedSessionIds("tab-a"), ["root"]) + assert.deepEqual(getPersistentExpandedSessionIds("tab-a").sort(), ["parent", "root"]) seed("tab-c") setActiveSession("tab-c", "root") setSessionStatus("tab-c", "child", "working") + revealSubsession("tab-c", "child") // An empty snapshot must not collapse a reveal for a still-running subsession. hydrateSessionExpansion("tab-c", []) assert.deepEqual(expanded("tab-c"), ["parent", "root"]) - assert.deepEqual(getPersistentExpandedSessionIds("tab-c"), []) + assert.deepEqual(getPersistentExpandedSessionIds("tab-c").sort(), ["parent", "root"]) }) - it("does not reopen a branch the user collapsed for the same running subsession", () => { + it("allows revealing the same subsession after a manual collapse", () => { setActiveSession("tab-a", "root") setSessionStatus("tab-a", "child", "working") + revealSubsession("tab-a", "child") setSessionExpanded("tab-a", "parent", false) - setSessionStatus("tab-a", "child", "idle") + assert.deepEqual(expanded("tab-a"), ["root"]) + // A repeated working status alone is unchanged; a new start reopens the path. setSessionStatus("tab-a", "child", "working") assert.deepEqual(expanded("tab-a"), ["root"]) + setSessionStatus("tab-a", "child", "idle") + setSessionStatus("tab-a", "child", "working") + revealSubsession("tab-a", "child") + assert.deepEqual(expanded("tab-a"), ["parent", "root"]) // Another subsession in the same branch is still revealed. setSessionStatus("tab-a", "grandchild", "working") + revealSubsession("tab-a", "grandchild") assert.deepEqual(expanded("tab-a"), ["child", "parent", "root"]) }) diff --git a/packages/ui/tests/browser/fixtures/session-child-activity.tsx b/packages/ui/tests/browser/fixtures/session-child-activity.tsx index 51035f0986..038945987d 100644 --- a/packages/ui/tests/browser/fixtures/session-child-activity.tsx +++ b/packages/ui/tests/browser/fixtures/session-child-activity.tsx @@ -1,13 +1,15 @@ import { createMemo, createSignal } from "solid-js" import { render } from "solid-js/web" import SessionList from "../../../src/components/session-list" -import { ConfigProvider, updatePreferences } from "../../../src/stores/preferences" +import { ConfigProvider, preferences, updatePreferences } from "../../../src/stores/preferences" import { I18nProvider } from "../../../src/lib/i18n" +import { ThemeProvider } from "../../../src/lib/theme" +import { GeneralSettingsSection } from "../../../src/components/settings/general-settings-section" import { serverApi } from "../../../src/lib/api-client" import { addInstance } from "../../../src/stores/instances" import { sessions, setActiveSession, setSessionPage, setSessionPendingPermission, setSessionStatus, setSessions, - markSessionIdleSeen, withSession, + markSessionIdleSeen, withSession, getPersistentExpandedSessionIds, clearInstanceSessionExpansionState, hydrateSessionExpansion, } from "../../../src/stores/session-state" import { clearSessionIdleFade, markSessionIdleFadeStarted } from "../../../src/stores/session-status" import { buildSessionThreadsFromMap } from "../../../src/stores/session-tree" @@ -23,6 +25,8 @@ function make(sessionId: string, title: string, updated: number, parentId: strin const items = [ make("work", "Work conversation", 3), make("work-child", "Work helper", 3, "work"), + make("work-grandchild", "Work nested helper", 3, "work-child"), + make("work-great-grandchild", "Work recursive helper", 3, "work-grandchild"), make("other", "Other conversation", 2), make("other-child", "Other helper", 2, "other"), make("other-grandchild", "Other nested helper", 2, "other-child"), @@ -42,16 +46,26 @@ setActiveSession(id, "work") const [active, setActive] = createSignal("work") function Fixture() { const threads = createMemo(() => buildSessionThreadsFromMap(sessions().get(id)!, ["work", "other"])) - return
+ return
{ setActive(value); setActiveSession(id, value) }} onNew={() => {}} enableFilterBar={false} showHeader={false} showFooter={false} /> -
+
} render(() => , document.getElementById("root")!) await updatePreferences({ locale: "en", keepUnseenSubagentIdleStatus: true }) ;(window as any).fixture = { + preferences, status: (sessionId: string, status: Session["status"]) => setSessionStatus(id, sessionId, status, { force: true }), + add: (sessionId: string, parentId: string, status: Session["status"]) => setSessions(previous => { + const next = new Map(previous), entries = new Map(next.get(id)) + entries.set(sessionId, { ...make(sessionId, sessionId, 3, parentId), status }) + next.set(id, entries) + return next + }), permission: (sessionId: string, pending: boolean) => setSessionPendingPermission(id, sessionId, pending), + form: (sessionId: string, pendingForm: boolean) => withSession(id, sessionId, session => { session.pendingForm = pendingForm }), + expanded: () => getPersistentExpandedSessionIds(id), + restore: (saved: string[]) => { clearInstanceSessionExpansionState(id); hydrateSessionExpansion(id, saved) }, seen: (sessionId: string) => markSessionIdleSeen(id, sessionId), idle: (sessionId: string, idleSince: number, extra = {}) => withSession(id, sessionId, session => { Object.assign(session, { status: "idle", idleSince, retry: null, generationRecovery: null }, extra) diff --git a/packages/ui/tests/browser/session-child-activity.test.ts b/packages/ui/tests/browser/session-child-activity.test.ts index ff54e93bee..55044346de 100644 --- a/packages/ui/tests/browser/session-child-activity.test.ts +++ b/packages/ui/tests/browser/session-child-activity.test.ts @@ -130,7 +130,8 @@ test("a collapsed parent's chevron carries visible subsession statuses without r assert.equal(await chevron("other").getAttribute("data-child-activity"), null) } - // A subsession of the viewed conversation is revealed below it. + // A new activity in the viewed conversation reveals it without pointer interaction. + await page.mouse.move(1100, 850) await page.evaluate(() => (window as any).fixture.status("work-child", "working")) await page.locator('[data-session-id="work-child"]').waitFor() assert.deepEqual((await rows()).slice(0, 2), ["work", "work-child"]) @@ -138,3 +139,142 @@ test("a collapsed parent's chevron carries visible subsession statuses without r assert.deepEqual(errors, []) } finally { await page.close() } }) + +test("visible branches follow new chevron states recursively, restore all opened levels and can be disabled in General", async () => { + const page = await browser.newPage({ viewport: { width: 1200, height: 900 } }) + const errors: string[] = [] + page.on("pageerror", error => errors.push(error.message)) + await page.route("**/api/**", route => route.fulfill({ contentType: "application/json", body: "{}" })) + const row = (id: string) => page.locator(`[data-session-id="${id}"]`) + const chevron = (id: string) => row(id).locator(".session-item-expander") + const expanded = () => chevron("work").getAttribute("aria-expanded") + const status = (value: string) => page.evaluate(value => (window as any).fixture.status("work-grandchild", value), value) + const settled = () => page.evaluate(() => new Promise(resolve => requestAnimationFrame(() => requestAnimationFrame(resolve)))) + try { + await page.goto(url) + await page.waitForFunction(() => Boolean((window as any).fixture)) + const option = page.getByRole("checkbox", { name: "Automatically expand subsessions", exact: true }) + assert.equal(await option.isChecked(), true, "enabled by default in General") + + // A transition opens every required level without hover. + await page.mouse.move(1100, 850) + await status("working") + await row("work-grandchild").waitFor() + assert.equal(await expanded(), "true") + const saved = await page.evaluate(() => (window as any).fixture.expanded() as string[]) + assert.deepEqual(saved.sort(), ["work", "work-child"]) + await page.evaluate(saved => (window as any).fixture.restore(saved), saved) + await row("work-grandchild").waitFor() + + // The visible grandchild is not selected. Its own chevron now becomes active: + // only that branch needs opening, while its ancestors are already expanded. + await page.evaluate(() => (window as any).fixture.status("work-great-grandchild", "working")) + await row("work-great-grandchild").waitFor() + assert.equal(await chevron("work-grandchild").getAttribute("aria-expanded"), "true") + await chevron("work-grandchild").click() + await settled() + assert.equal(await chevron("work-grandchild").getAttribute("aria-expanded"), "false") + await page.evaluate(() => (window as any).fixture.status("work-great-grandchild", "idle")) + await page.evaluate(() => (window as any).fixture.form("work-great-grandchild", true)) + await row("work-great-grandchild").waitFor() + // Keep the next root-level transition independent of that recursive helper. + await page.evaluate(() => { + ;(window as any).fixture.form("work-great-grandchild", false) + ;(window as any).fixture.status("work-great-grandchild", "idle") + }) + // A newly created recursive agent beneath a visible leaf opens that leaf too. + await page.evaluate(() => (window as any).fixture.add("work-deep-agent", "work-great-grandchild", "working")) + await row("work-deep-agent").waitFor() + await page.evaluate(() => (window as any).fixture.status("work-deep-agent", "idle")) + + // Manual collapse itself is not a new status; a later start of the same helper reopens it. + await chevron("work").click() + await settled() + assert.equal(await expanded(), "false") + await row("work").locator(".session-item-title").hover() + await status("working") + await settled() + assert.equal(await expanded(), "false") + await status("idle") + await status("working") + await row("work-grandchild").waitFor() + + // Turning it off blocks both work and requests. + await chevron("work").click() + await option.uncheck() + assert.equal(await page.evaluate(() => (window as any).fixture.preferences().autoExpandActiveSubsessions), false) + await row("work").locator(".session-item-title").hover() + await status("idle") + await status("compacting") + await page.evaluate(() => (window as any).fixture.permission("work-grandchild", true)) + await settled() + assert.equal(await expanded(), "false") + assert.equal(await chevron("work").getAttribute("data-child-activity"), "permission") + await chevron("work").click() + await row("work-grandchild").waitFor() + await chevron("work").click() + + // Re-enabling during an existing request is not a status transition either. + await option.check() + await row("work").locator(".session-item-title").hover() + await settled() + assert.equal(await expanded(), "false") + await page.evaluate(() => { + ;(window as any).fixture.permission("work-grandchild", false) + ;(window as any).fixture.status("work-grandchild", "idle") + }) + await page.evaluate(() => (window as any).fixture.form("work-grandchild", true)) + await row("work-grandchild").waitFor() + + // A permission arriving after work started is a new chevron state too. + await chevron("work").click() + await row("work").locator(".session-item-title").hover() + await page.evaluate(() => (window as any).fixture.form("work-grandchild", false)) + await page.evaluate(() => (window as any).fixture.permission("work-grandchild", true)) + await row("work-grandchild").waitFor() + + // Pointer position is irrelevant to a new transition. + await chevron("work").click() + await row("work").locator(".session-item-title").hover() + await page.mouse.move(1100, 850) + await page.evaluate(() => (window as any).fixture.permission("work-grandchild", false)) + await status("working") + await settled() + await row("work-grandchild").waitFor() + assert.equal(await expanded(), "true") + assert.deepEqual(errors, []) + } finally { await page.close() } +}) + +test("buffered offscreen subsessions wait for a fresh transition while visible", async () => { + const page = await browser.newPage({ viewport: { width: 1200, height: 900 } }) + const errors: string[] = [] + page.on("pageerror", error => errors.push(error.message)) + await page.route("**/api/**", route => route.fulfill({ contentType: "application/json", body: "{}" })) + const row = page.locator('[data-session-id="work-grandchild"]') + const chevron = row.locator(".session-item-expander") + try { + await page.goto(url) + await page.waitForFunction(() => Boolean((window as any).fixture)) + await page.evaluate(() => (window as any).fixture.status("work-grandchild", "working")) + await row.waitFor() + const top = await row.evaluate(el => { + const viewport = el.closest(".session-list")! + return viewport.scrollTop + el.getBoundingClientRect().top - viewport.getBoundingClientRect().top + }) + await page.locator(".session-list-container").evaluate(el => { el.parentElement!.style.height = "40px" }) + await page.evaluate(() => (window as any).fixture.status("work-great-grandchild", "working")) + assert.equal(await chevron.getAttribute("aria-expanded"), "false", "a buffered row beyond the scroll viewport stays closed") + await page.locator(".session-list").evaluate((el, top) => { el.scrollTop = top }, top) + await page.waitForFunction(() => { + const row = document.querySelector('[data-session-id="work-grandchild"]')?.getBoundingClientRect() + const viewport = document.querySelector(".session-list")?.getBoundingClientRect() + return row && viewport && row.top < viewport.bottom && row.bottom > viewport.top + }) + assert.equal(await chevron.getAttribute("aria-expanded"), "false", "scrolling into view alone does not open it") + await page.evaluate(() => (window as any).fixture.status("work-great-grandchild", "idle")) + await page.evaluate(() => (window as any).fixture.status("work-great-grandchild", "working")) + assert.equal(await chevron.getAttribute("aria-expanded"), "true") + assert.deepEqual(errors, []) + } finally { await page.close() } +})