Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
TypeScript ai-agentcoding-agentdesktop-appelectronglobali18nlocal-firstmcppipi-agentpi-desktoppluginsreactrusttypescript
fix(transcript): fold finished groups as the turn moves on
v_wyxgwangd351bb80776b
diff --git a/apps/desktop/src/features/chat/transcript/ActivityGroup.tsx b/apps/desktop/src/features/chat/transcript/ActivityGroup.tsxindex d579e1a75..c9fe180e3 100644--- a/apps/desktop/src/features/chat/transcript/ActivityGroup.tsx+++ b/apps/desktop/src/features/chat/transcript/ActivityGroup.tsx@@ -245,6 +245,12 @@ export const ActivityGroup = memo(function ActivityGroup({// Parent tools after a Task fan-out live in a later activity part (D319), so// this card is not the turn's live tail while its delegates are still running.const topologyLive = hasSubagentTopology && subagentSummary.running > 0;+ // A later segment can render before a parallel tool or search has finished.+ // Ignore stale ordinary running rows once their owning turn is no longer live.+ const runningOperation = turnActive && items.some((item) =>+ (item.kind === "tool" && item.message.toolStatus === "running") ||+ (item.kind === "hostedSearch" && item.round.status === "searching"),+ );const live = isActive || topologyLive;const searchTarget = useContext(TranscriptSearchContext);const revealRequest = useMemo(() => searchTarget && items.some((item) => item.message.id === searchTarget.messageId)@@ -260,8 +266,7 @@ export const ActivityGroup = memo(function ActivityGroup({// their own switch, and the group's header states what it holds, so folding it// hides no detail the reader needs to expand the group to discover.const automaticallyOpen = activityGroupStartsOpen({- turnActive,- groupActive: live,+ groupActive: live || runningOperation,collapseSettled: collapseSettledGroups,});const disclosure = useAutomaticDisclosure(diff --git a/apps/desktop/src/lib/activity-group-folding.ts b/apps/desktop/src/lib/activity-group-folding.tsindex 14fa65d3e..66d70c3c1 100644--- a/apps/desktop/src/lib/activity-group-folding.ts+++ b/apps/desktop/src/lib/activity-group-folding.ts@@ -7,24 +7,19 @@* reader's explicit choice, the parent's visibility, and transient reading* protection (see `disclosure.tsx`).*- * Live work always stays visible. Everything else is settled, and the reader's- * preference decides: by default a completed turn folds both levels, so opening- * it reads as a compact list of what the agent did rather than a wall of rows.- * Size is deliberately not part of either rule - the old "groups of up to four- * rows stay open" tier was the reason `Show thinking` and small groups looked- * permanently expanded, and it is replaced by the two switches.+ * A group can settle before its turn ends. Only the current group and groups+ * with live work stay open by default; finished groups and Thinking rows+ * follow their own switches, regardless of size.*//** Whether a rendered activity group starts open. */export function activityGroupStartsOpen(state: {- /** The assistant turn this group belongs to is still running. */- turnActive: boolean;/** This group still owns live work, including running delegations. */groupActive: boolean;/** `resolveAutoCollapseSettledGroups` for the current settings. */collapseSettled: boolean;}): boolean {- return state.turnActive || state.groupActive || !state.collapseSettled;+ return state.groupActive || !state.collapseSettled;}/** Whether a rendered Thinking row starts open. */diff --git a/apps/desktop/test/activity-group-folding.test.mjs b/apps/desktop/test/activity-group-folding.test.mjsindex bf3d84065..63f80cb4c 100644--- a/apps/desktop/test/activity-group-folding.test.mjs+++ b/apps/desktop/test/activity-group-folding.test.mjs@@ -35,35 +35,15 @@ function translator(catalog) {const buckets = (...pairs) => pairs.map(([id, count]) => ({ id, count }));-test("a settled group folds by default and follows the switch", () => {- // The old size tier is gone: a two-row group and a twenty-row group answer the- // same way, because the setting - not the row count - decides.- for (const collapseSettled of [true]) {- assert.equal(- activityGroupStartsOpen({ turnActive: false, groupActive: false, collapseSettled }),- false,- );- }- assert.equal(- activityGroupStartsOpen({ turnActive: false, groupActive: false, collapseSettled: false }),- true,- "turning auto-collapse off keeps every settled group open",- );+test("a settled group follows the switch regardless of its turn or size", () => {+ assert.equal(activityGroupStartsOpen({ groupActive: false, collapseSettled: true }), false);+ assert.equal(activityGroupStartsOpen({ groupActive: false, collapseSettled: false }), true);assert.equal(ACTIVITY_LABEL_MAX_BUCKETS, 3);});-test("live work never folds", () => {+test("a group that still owns live work stays open", () => {for (const collapseSettled of [true, false]) {- assert.equal(- activityGroupStartsOpen({ turnActive: true, groupActive: false, collapseSettled }),- true,- "a running turn keeps every group visible",- );- assert.equal(- activityGroupStartsOpen({ turnActive: false, groupActive: true, collapseSettled }),- true,- "a group that still owns live work keeps its rows visible",- );+ assert.equal(activityGroupStartsOpen({ groupActive: true, collapseSettled }), true);}});@@ -169,7 +149,7 @@ test("the group header states composition and count and drops the issue badge",// Both nested levels read their own switch; neither inherits the other.assert.match(activityGroup,- /activityGroupStartsOpen\(\{\s*turnActive,\s*groupActive: live,\s*collapseSettled: collapseSettledGroups,\s*\}\)/,+ /activityGroupStartsOpen\(\{\s*groupActive: live \|\| runningOperation,\s*collapseSettled: collapseSettledGroups,\s*\}\)/,);assert.match(items, /autoOpen=\{thinkingRowStartsOpen\(\{ streaming, collapseSettled: collapseThinking \}\)\}/);});diff --git a/apps/desktop/test/thinking-ui.test.mjs b/apps/desktop/test/thinking-ui.test.mjsindex a03bcb3a5..b0b4577a6 100644--- a/apps/desktop/test/thinking-ui.test.mjs+++ b/apps/desktop/test/thinking-ui.test.mjs@@ -285,7 +285,7 @@ test("tool and search rows stay collapsed while reasoning follows its own switchassert.match(transcriptDisclosureSource, /const setManualOpen = useCallback/);assert.match(transcriptSource,- /const automaticallyOpen = activityGroupStartsOpen\(\{\s*turnActive,\s*groupActive: live,\s*collapseSettled: collapseSettledGroups,\s*\}\);/,+ /const automaticallyOpen = activityGroupStartsOpen\(\{\s*groupActive: live \|\| runningOperation,\s*collapseSettled: collapseSettledGroups,\s*\}\);/,);assert.match(transcriptSource,diff --git a/docs/adr/turn-process-and-thinking-display.md b/docs/adr/turn-process-and-thinking-display.mdindex 661e68a81..cb1127c78 100644--- a/docs/adr/turn-process-and-thinking-display.md+++ b/docs/adr/turn-process-and-thinking-display.md@@ -59,8 +59,10 @@ reasoning; when off, rendered reasoning rows stay open. Each is a sub-row of thesetting that gates it (`Show thinking`, and a non-flat `Transcript display`), andhiding a sub-row never writes a value, so the stored choice survives toggling theparent. The group no longer inherits open state from contained reasoning: closing-hides expanded reasoning, reopening restores each row's own answer. Live work never-folds — a running turn, or a group owning a running tool or delegation, stays open.+hides expanded reasoning, reopening restores each row's own answer. Folding+follows the group rather than the whole turn: once a group is no longer current+and has no running tool, search or delegation, an untouched group can fold+before the turn ends. Manual choices and reading protection still apply.A folded group is one line whose header states its composition: contained actionsjoined with the locale's list wording, capped at three plus "and more", then thecall count as a separate token that ellipsizes last (`搜索并读取文件 · 12 次操作`).diff --git a/docs/spec/04-ux/06-settings-ia.md b/docs/spec/04-ux/06-settings-ia.mdindex 3e58718d1..0f6906bde 100644--- a/docs/spec/04-ux/06-settings-ia.md+++ b/docs/spec/04-ux/06-settings-ia.md@@ -440,11 +440,11 @@ so no row repeats it.**Transcript display**, and appears only for **Commands first** and **Fullyfolded**; **Flat** renders no activity groups, so the row is hidden there andhas no effect. It persists the optional `autoCollapseSettledGroups` boolean,- absent and `true` both meaning fold: a group whose turn has settled starts- closed whatever its size, while a running turn, or a group that still owns a- running tool or delegation, stays open. Turning it off leaves every settled- group open - there is no size tier. Hiding the sub-row by switching to **Flat**- never writes a value, so the stored choice survives and returns with the mode.+ absent and `true` both meaning fold: a group closes as soon as it is no+ longer current and has no live work. The current group and groups still+ running a tool, search, or delegation stay open by default. Turning it off+ leaves every group open by default - there is no size tier. Hiding the sub-row+ by switching to **Flat** never writes a value, so the choice survives.Settings search indexes both the row and its description.### Agent behavior (`behavior` tab)diff --git a/docs/spec/04-ux/08-component-spec.md b/docs/spec/04-ux/08-component-spec.mdindex eeb6bb6df..360f30d28 100644--- a/docs/spec/04-ux/08-component-spec.md+++ b/docs/spec/04-ux/08-component-spec.md@@ -1012,21 +1012,18 @@ thinking never creates an empty wrapper. All three modes render exactly onetop-level process disclosure and change neither what a tool received nor what isstored.-Every group of a turn stays open while that turn is active, whether or not it-still owns the live execution segment, so work never folds away mid-run. Once the-turn settles both nested levels fold: expanding a completed turn lists what the-agent did instead of a wall of rows, and two opt-out switches carry the reader's-choice. `Auto-fold finished groups` (`autoCollapseSettledGroups`, on by default)-folds settled groups whatever their size; turned off it leaves every settled-group open, because the four-item tier is retired. `Auto-fold finished thinking`+`Auto-fold finished groups` (`autoCollapseSettledGroups`, on by default) folds+an untouched group when it is no longer current and has no live work, even while+its turn continues. The current group and groups with running tools, searches,+or delegations stay open by default. Turning the switch off leaves finished+groups open regardless of size. `Auto-fold finished thinking`(`autoCollapseThinking`, on by default) keeps only reasoning the live turn isstill streaming expanded. Each switch is a sub-row of the setting that gates it(`Show thinking`, and a non-flat `Transcript display`), it disappears with thatparent, and hiding it never rewrites the stored value. A group does not inherit-open state from the reasoning it contains: the group and its Thinking rows each-answer to their own switch, so closing a group hides expanded reasoning inside-it. Explicit user choices remain authoritative, and a running turn - or a group-that still owns a running tool or delegation - never folds. The group header+open state from its reasoning: folding a group hides expanded reasoning inside+it. Explicit user choices remain authoritative, and focus or text selection+in the group temporarily defers automatic folding. The group headerstates what the group did: the actions it contains, joined with the locale's ownlist wording and capped at three with "and more", followed by the call count asits own non-truncating token (`搜索并读取文件 · 12 次操作`). Reasoning is named in@@ -2669,7 +2666,7 @@ twice.| State | Header treatment | Expanded content ||---|---|---|| Running | Progressive action with readable text and a pulsing marker; a `run` row also shows its spinner and pulses the status dot beside `Working…` | The active multi-item group opens; no tool/search payload opens itself, except the display mode's Thinking default; live thinking follows its own indicator/disclosure policy |-| Success | Past-tense action + result chips; no green success badge, except a `run` row's dot and `Done` | Result blocks, then arguments if not already shown; small groups and Task topology groups stay open, large untouched ordinary groups close, and manual group and item choices are retained |+| Success | Past-tense action + result chips; no green success badge, except a `run` row's dot and `Done` | Result blocks, then arguments if not already shown; group folding follows the settings and live activity rules above, and manual group and item choices are retained || Error | Past-tense action + compact danger status; details remain collapsed by default and open only on user request. A `run` row is in this state whenever its command exited nonzero, whatever the call reported (D227) | Error note first, then arguments || Denied | Muted `Denied` status; payload remains closed until requested | Permission result when available |diff --git a/docs/spec/06-delivery/e2e/conversation.md b/docs/spec/06-delivery/e2e/conversation.mdindex 12e31f1a4..dbfdbc779 100644--- a/docs/spec/06-delivery/e2e/conversation.md+++ b/docs/spec/06-delivery/e2e/conversation.md@@ -4550,11 +4550,15 @@ command, a delegate, and an explicit Stop. Accepted input is delivered once.answer; the `Show thinking` preference on and off; the `Transcript display`preference at Flat, Commands first, and Fully folded; a restart with savedsettings; legacy message-level transcript search targets.-- **Steps:** Confirm a live active group starts open, let that same turn finish- without interacting, and confirm the process closes so only the final answer- (and any error or pending-action surface) remains. Reopen it and confirm a- every settled group folded and every finished reasoning row folded, and that- each group header names the actions it contains plus the call count+- **Steps:** In Commands first and Fully folded, start with an expanded current+ group. Advance past a progress paragraph into another group while the turn is+ still active. Verify that the previous group folds and the current group+ remains open. Repeat with a running tool left behind in the previous group; it+ stays open until that tool settles. Let the turn finish without interacting+ and confirm the process closes so only the final answer (and any error or+ pending-action surface) remains. Reopen it and confirm every settled group+ and finished reasoning row starts folded, and that each header names the actions+ it contains plus the call count(`搜索并读取文件 · 12 次操作`). Confirm tool and search payloads stay closed.Turn `Auto-fold finished groups` off and confirm every settled group openswhatever its size, then turn it back on; turn `Auto-fold finished thinking`@@ -4606,10 +4610,10 @@ command, a delegate, and an explicit Stop. Accepted input is delivered once.stay inside their groups and only ordinary assistant progress text splits agroup, so the middle progress paragraph ends the preceding group and thefollowing activity starts a new one. A group appears only with at least two- visible items; a singleton has no group. Every group stays open while its turn- runs; after completion both nested levels fold, so every settled group and- every reasoning row that is no longer streaming starts closed, whatever the- group's size. Only the reasoning a live turn is still streaming starts+ visible items; a singleton has no group. An untouched group folds when it is+ no longer current and has no running tool, search, or delegation, even before+ the turn ends. Finished reasoning also starts closed. Only the reasoning a+ live turn is still streaming startsexpanded when `Show thinking` is on, and a group does not inherit open statefrom the reasoning inside it, so folding a group hides expanded reasoning.Turning off `Auto-fold finished groups` opens every settled group; turning off@@ -4650,8 +4654,9 @@ command, a delegate, and an explicit Stop. Accepted input is delivered once.group presentation only; precise item-level transcript search targeting is outof scope and keeps the existing message-level search behavior.- **Automation:** `pnpm test:e2e:transcript` covers the command-first and- fully-folded layouts, active-to-completed process disclosure behavior, the- automatic folding and reading-hold transitions, and the activity issue+ fully-folded layouts, group-to-group handoff while the turn continues,+ active-to-completed process disclosure, automatic folding and reading holds,+ and the activity issuecounter's inline layout at 320/800px and 100%/150% zoom in English andSimplified Chinese; `pnpm test:e2e:transcript-disclosure` verifies manual-openretention and viewport anchoring; `apps/desktop/test/turn-process.test.mjs`diff --git a/docs/spec/08-meta/decisions-log.md b/docs/spec/08-meta/decisions-log.mdindex 72b5dbea3..93ff6e250 100644--- a/docs/spec/08-meta/decisions-log.md+++ b/docs/spec/08-meta/decisions-log.md@@ -5039,6 +5039,9 @@ See ADR 0332.absent or invalid values, keeps run rows inside their groups and lets onlyordinary assistant progress text split them. The mode is read while rendering,so switching repaints immediately.+- Follow-up: `autoCollapseSettledGroups` now folds an untouched group when it+ stops being current and has no live work, rather than waiting for its turn+ to end. The turn's outer disclosure and manual group choices are unchanged.- With `showThinking` on, Thinking rows default expanded in `flat` and`command-first`; `fully-folded` keeps the released exception where only thelast active row opens while it is live. With the preference off, no completeddiff --git a/packages/i18n/src/locales/de/index.ts b/packages/i18n/src/locales/de/index.tsindex 8a2789e2c..417981a9a 100644--- a/packages/i18n/src/locales/de/index.ts+++ b/packages/i18n/src/locales/de/index.ts@@ -1801,7 +1801,7 @@ sklm: {"autoCollapseThinking": "Abgeschlossenes Denken einklappen","autoCollapseThinkingDesc": "Nur laufendes Denken bleibt offen. Aus lässt alle Denkzeilen offen.","autoCollapseSettledGroups": "Abgeschlossene Gruppen einklappen",- "autoCollapseSettledGroupsDesc": "Nach dem Ende eines Turns bleiben Aktivitätsgruppen eingeklappt; die Kopfzeile nennt, was die Gruppe getan hat. Aus lässt jede abgeschlossene Gruppe offen.",+ "autoCollapseSettledGroupsDesc": "Abgeschlossene Aktivitätsgruppen klappen ein, sobald der Turn weitergeht. Deaktiviere diese Option, um sie offen zu lassen.","transcriptDisplayMode": "Prozessanzeige","transcriptDisplayModeDesc": "Legt fest, wie der Assistentenprozess im Transkript gruppiert wird.","radialMenu": "Radiales Kontextmenü",diff --git a/packages/i18n/src/locales/en/index.ts b/packages/i18n/src/locales/en/index.tsindex 95fe9c602..ef1ac0a40 100644--- a/packages/i18n/src/locales/en/index.ts+++ b/packages/i18n/src/locales/en/index.ts@@ -1815,7 +1815,7 @@ sklm: {autoCollapseThinking: "Fold finished thinking",autoCollapseThinkingDesc: "Only reasoning that is still being generated stays open. Turn this off to keep every reasoning row open.",autoCollapseSettledGroups: "Fold finished groups",- autoCollapseSettledGroupsDesc: "Once a turn ends, its activity groups stay folded and each header says what the group did. Turn this off to keep every finished group open.",+ autoCollapseSettledGroupsDesc: "Finished activity groups fold when the turn moves on, without waiting for the turn to end. Turn this off to keep them open.",transcriptDisplayMode: "Transcript display",transcriptDisplayModeDesc: "Choose how the assistant process is grouped in the transcript.",radialMenu: "Radial context menu",diff --git a/packages/i18n/src/locales/es/index.ts b/packages/i18n/src/locales/es/index.tsindex 0ab3a0b7a..bb637eccb 100644--- a/packages/i18n/src/locales/es/index.ts+++ b/packages/i18n/src/locales/es/index.ts@@ -1801,7 +1801,7 @@ sklm: {"autoCollapseThinking": "Plegar el razonamiento terminado","autoCollapseThinkingDesc": "Solo el razonamiento en curso queda abierto. Desactívalo para dejar abiertas todas las filas de razonamiento.","autoCollapseSettledGroups": "Plegar los grupos terminados",- "autoCollapseSettledGroupsDesc": "Al terminar el turno sus grupos de actividad quedan plegados y la cabecera indica qué hizo el grupo. Desactívalo para dejar abierto cada grupo terminado.",+ "autoCollapseSettledGroupsDesc": "Los grupos de actividad terminados se pliegan al pasar a la siguiente etapa, sin esperar al final del turno. Desactívalo para dejarlos abiertos.","transcriptDisplayMode": "Visualización del proceso","transcriptDisplayModeDesc": "Elige cómo se agrupa el proceso del asistente en la transcripción.","radialMenu": "Menú contextual radial",diff --git a/packages/i18n/src/locales/fr/index.ts b/packages/i18n/src/locales/fr/index.tsindex 31f6ce876..5e35f7b6c 100644--- a/packages/i18n/src/locales/fr/index.ts+++ b/packages/i18n/src/locales/fr/index.ts@@ -1801,7 +1801,7 @@ sklm: {"autoCollapseThinking": "Replier le raisonnement terminé","autoCollapseThinkingDesc": "Seul le raisonnement en cours reste ouvert. Désactivez pour laisser toutes les lignes de raisonnement ouvertes.","autoCollapseSettledGroups": "Replier les groupes terminés",- "autoCollapseSettledGroupsDesc": "À la fin du tour, ses groupes d'activité restent repliés et l'en-tête indique ce que le groupe a fait. Désactivez pour laisser chaque groupe terminé ouvert.",+ "autoCollapseSettledGroupsDesc": "Les groupes d’activité terminés se replient dès que le tour passe à la suite. Désactivez cette option pour les laisser ouverts.","transcriptDisplayMode": "Affichage du processus","transcriptDisplayModeDesc": "Choisit comment le processus de l'assistant est regroupé dans la transcription.","radialMenu": "Menu contextuel radial",diff --git a/packages/i18n/src/locales/ko/index.ts b/packages/i18n/src/locales/ko/index.tsindex 98381adc5..572896ff0 100644--- a/packages/i18n/src/locales/ko/index.ts+++ b/packages/i18n/src/locales/ko/index.ts@@ -1811,7 +1811,7 @@ sklm: {autoCollapseThinking: "완료된 사고 접기",autoCollapseThinkingDesc: "생성 중인 사고만 펼쳐 둡니다. 끄면 모든 사고 행이 펼쳐진 채로 유지됩니다.",autoCollapseSettledGroups: "완료된 그룹 접기",- autoCollapseSettledGroupsDesc: "턴이 끝나면 활동 그룹이 접힌 채로 남고, 헤더가 그룹이 한 일을 알려 줍니다. 끄면 완료된 그룹이 모두 펼쳐집니다.",+ autoCollapseSettledGroupsDesc: "작업이 다음 단계로 넘어가면 턴이 끝나기 전에도 완료된 활동 그룹이 접힙니다. 끄면 완료된 그룹을 펼쳐 둡니다.",transcriptDisplayMode: "프로세스 표시",transcriptDisplayModeDesc: "트랜스크립트에서 어시스턴트 프로세스를 묶는 방식을 선택합니다.",radialMenu: "방사형 컨텍스트 메뉴",diff --git a/packages/i18n/src/locales/pt-BR/index.ts b/packages/i18n/src/locales/pt-BR/index.tsindex f8f4733a1..88ef2c335 100644--- a/packages/i18n/src/locales/pt-BR/index.ts+++ b/packages/i18n/src/locales/pt-BR/index.ts@@ -1774,7 +1774,7 @@ export const ptBR = {autoCollapseThinking: "Recolher raciocínio concluído",autoCollapseThinkingDesc: "Apenas o raciocínio em geração fica aberto. Desative para manter todas as linhas de raciocínio abertas.",autoCollapseSettledGroups: "Recolher grupos concluídos",- autoCollapseSettledGroupsDesc: "Ao terminar o turno, os grupos de atividade ficam recolhidos e o cabeçalho indica o que o grupo fez. Desative para manter cada grupo concluído aberto.",+ autoCollapseSettledGroupsDesc: "Os grupos de atividade concluídos são recolhidos quando o turno avança, sem esperar que ele termine. Desative para mantê-los abertos.",transcriptDisplayMode: "Exibição do processo",transcriptDisplayModeDesc: "Escolha como o processo do assistente é agrupado na transcrição.",radialMenu: "Menu de contexto radial",diff --git a/packages/i18n/src/locales/tr/index.ts b/packages/i18n/src/locales/tr/index.tsindex e61cde3fe..ec98ffa74 100644--- a/packages/i18n/src/locales/tr/index.ts+++ b/packages/i18n/src/locales/tr/index.ts@@ -1805,7 +1805,7 @@ sklm: {autoCollapseThinking: "Tamamlanan düşünmeyi katla",autoCollapseThinkingDesc: "Yalnızca üretilmekte olan düşünme açık kalır. Kapatınca tüm düşünme satırları açık kalır.",autoCollapseSettledGroups: "Tamamlanan grupları katla",- autoCollapseSettledGroupsDesc: "Tur bittiğinde etkinlik grupları katlı kalır ve başlık grubun ne yaptığını söyler. Kapatınca tamamlanan her grup açık kalır.",+ autoCollapseSettledGroupsDesc: "Tamamlanan etkinlik grupları, turun bitmesi beklenmeden bir sonraki adıma geçildiğinde katlanır. Açık kalmaları için bu seçeneği kapatın.",transcriptDisplayMode: "Süreç görünümü",transcriptDisplayModeDesc: "Asistan sürecinin transkriptte nasıl gruplanacağını seçer.",radialMenu: "Dairesel bağlam menüsü",diff --git a/packages/i18n/src/locales/zh-CN/index.ts b/packages/i18n/src/locales/zh-CN/index.tsindex 4356c4310..3325ba8d4 100644--- a/packages/i18n/src/locales/zh-CN/index.ts+++ b/packages/i18n/src/locales/zh-CN/index.ts@@ -1795,7 +1795,7 @@ sklm: {autoCollapseThinking: "已完成思考自动收起",autoCollapseThinkingDesc: "只有正在生成的思考保持展开;关闭后所有思考内容保持展开。",autoCollapseSettledGroups: "已完成小组自动收起",- autoCollapseSettledGroupsDesc: "任务结束后,过程小组默认收起,标题会说明这一组做过什么。关闭后已结束的小组全部展开。",+ autoCollapseSettledGroupsDesc: "进入下一阶段时,已完成的过程小组会自动收起,不必等整轮结束。关闭后,已完成的小组默认保持展开。",transcriptDisplayMode: "过程显示",transcriptDisplayModeDesc: "选择助手过程在对话中的分组方式。",radialMenu: "环形右键菜单",diff --git a/packages/i18n/src/locales/zh-TW/index.ts b/packages/i18n/src/locales/zh-TW/index.tsindex 1c982e300..2a12b8e10 100644--- a/packages/i18n/src/locales/zh-TW/index.ts+++ b/packages/i18n/src/locales/zh-TW/index.ts@@ -1795,7 +1795,7 @@ sklm: {autoCollapseThinking: "已完成思考自動收合",autoCollapseThinkingDesc: "只有正在生成的思考保持展開;關閉後所有思考內容保持展開。",autoCollapseSettledGroups: "已完成群組自動收合",- autoCollapseSettledGroupsDesc: "任務結束後,過程群組預設收合,標題會說明這一組做過什麼。關閉後已結束的群組全部展開。",+ autoCollapseSettledGroupsDesc: "進入下一階段時,已完成的過程群組會自動收合,不必等整輪結束。關閉後,已完成的群組預設保持展開。",transcriptDisplayMode: "過程顯示",transcriptDisplayModeDesc: "選擇助理過程在對話中的分組方式。",radialMenu: "環形右鍵選單",diff --git a/scripts/e2e/transcript-auto-collapse.tsx b/scripts/e2e/transcript-auto-collapse.tsxindex 516083522..8d5bf38a6 100644--- a/scripts/e2e/transcript-auto-collapse.tsx+++ b/scripts/e2e/transcript-auto-collapse.tsx@@ -287,6 +287,42 @@ export async function transcriptAutoCollapseProbe() {focusOutside();}+ const progress = message("handoff-progress", "assistant", "Now checking the next files.", {+ status: "complete",+ });+ const beforeHandoff = reads.slice(0, 2);+ const afterHandoff = [...beforeHandoff, progress, ...reads.slice(2, 4)];+ const groupHeaders = () => [...container.querySelectorAll<HTMLButtonElement>(+ ".process-activity-group > .tool-activity-header",+ )];+ for (const mode of ["command-first", "fully-folded"] as const) {+ const id = `handoff-${mode}`;+ configure({ transcriptDisplayMode: mode });+ render(id, beforeHandoff, true);+ check(expanded(groupHeader()), `${mode}: the first group opens while current`);+ render(id, afterHandoff, true);+ const [previous, current] = groupHeaders();+ check(+ expanded(header()) && groupHeaders().length === 2 && !expanded(previous) && expanded(current),+ `${mode}: the previous group folds as the next group takes over in the same running turn`,+ );++ configure({ transcriptDisplayMode: mode, autoCollapseSettledGroups: false });+ check(expanded(previous) && expanded(current), `${mode}: turning folding off reopens the previous group`);+ configure({ transcriptDisplayMode: mode });+ click(previous);+ focusOutside();+ render(id, [...afterHandoff, reads[4]], true);+ check(expanded(previous), `${mode}: a manually reopened group stays open during later work`);++ const runningRead = { ...reads[1], toolStatus: "running" } as const;+ const parallel = [reads[0], runningRead, ...afterHandoff.slice(2)];+ render(`${id}-parallel`, parallel, true);+ check(expanded(groupHeader()), `${mode}: a previous group with a running tool stays open`);+ render(`${id}-parallel`, afterHandoff, true);+ check(!expanded(groupHeader()), `${mode}: a previous group folds when its last running tool finishes`);+ }+configure();// The group header no longer renders an issue counter: a failed call is// reported by the tool row that failed, not repeated on the group.diff --git a/scripts/e2e/turn-process.tsx b/scripts/e2e/turn-process.tsxindex 4b409ecef..98526183e 100644--- a/scripts/e2e/turn-process.tsx+++ b/scripts/e2e/turn-process.tsx@@ -270,12 +270,12 @@ export async function turnProcessProbe() {i18n.t("chat.processTools", { count: 5 }),"the process header counts every tool once",);- const activeGroupHeader = row("read")?.closest<HTMLElement>(+ const previousGroupHeader = row("read")?.closest<HTMLElement>(".process-activity-group.grouped",)?.querySelector<HTMLElement>(".tool-activity-header");check(- activeGroupHeader?.getAttribute("aria-expanded") === "true",- "the active small activity group starts open",+ previousGroupHeader?.getAttribute("aria-expanded") === "false",+ "the previous activity group folds once later steps take over",);render(mixed, false, null, "settling-activity-group");const completedGroupHeader = row("read")?.closest<HTMLElement>(