Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

feat(chat): rework the top-level turn fold header

v_wyxgwangc318a9721747
diff --git a/apps/desktop/src/features/chat/transcript/TurnProcess.tsx b/apps/desktop/src/features/chat/transcript/TurnProcess.tsx
index 26b88294d..7b0d83bd9 100644
--- a/apps/desktop/src/features/chat/transcript/TurnProcess.tsx
+++ b/apps/desktop/src/features/chat/transcript/TurnProcess.tsx
@@ -115,22 +115,20 @@ export function TurnProcess({
0, Math.floor(((isActive ? now : (endedAt ?? startedAt)) - startedAt) / 1000),
);
const elapsed = formatToolDuration(seconds);
- // The header states the turn's outcome and nothing else: a shell command can
- // be arbitrarily long, so echoing the current one would push the counts off
- // the row. `startedAt` is absent for history that recorded no timing, and
- // "0s" would be a lie there, so the duration is dropped instead.
+ // The header states the turn's outcome and its bounded metadata: status,
+ // recorded duration and direct tool count. A shell command can be arbitrarily
+ // long, so echoing the current one would push that metadata off the row.
+ // `startedAt` is absent for history that recorded no timing, and "0s" would be
+ // a lie there, so the duration is dropped instead.
const hasTiming = startedAt !== undefined && seconds > 0;
const phase = turnProcessPhase({ parts: turnParts, isActive, failed, activity });
+ // The header's label is the status alone. Duration and tool count are separate
+ // values so each can be omitted independently, and the caret can follow the
+ // last one instead of being pushed to the far edge of the band.
const label = (() => {
- if (phase.kind === "failed") {
- return hasTiming ? t("chat.processFailedFor", { time: elapsed }) : t("chat.processFailed");
- }
- if (phase.kind === "stopped") {
- return hasTiming ? t("chat.processStoppedFor", { time: elapsed }) : t("chat.processStopped");
- }
- if (phase.kind === "completed") {
- return hasTiming ? t("chat.processCompletedFor", { time: elapsed }) : t("chat.processCompleted");
- }
+ if (phase.kind === "failed") return t("chat.processFailed");
+ if (phase.kind === "stopped") return t("chat.processStopped");
+ if (phase.kind === "completed") return t("chat.processCompleted");
// Live: only stages with their own settled wording get their own label. The
// rest describe an instant at the start of a request, and naming them would
// make the row flicker instead of telling the reader anything.
@@ -158,14 +156,17 @@ export function TurnProcess({
{label}
</span>
{isActive ? <span className="activity-marker" aria-hidden /> : null}
- {summary.issues > 0 && phase.kind !== "failed" ? (
- <span className="turn-process-error">
- <IconCircleAlert size={14} aria-hidden />
- {t("chat.activityFailures", { count: summary.issues })}
- </span>
+ {hasTiming ? (
+ <>
+ <span className="turn-sep" aria-hidden>·</span>
+ <span className="turn-duration">{elapsed}</span>
+ </>
) : null}
{toolCount > 0 ? (
- <span className="tool-activity-count">{t("chat.processTools", { count: toolCount })}</span>
+ <>
+ <span className="turn-sep" aria-hidden>·</span>
+ <span className="tool-activity-count">{t("chat.processTools", { count: toolCount })}</span>
+ </>
) : null}
<span className="tool-activity-caret" aria-hidden><IconChevronRight size={12} /></span>
</button>
diff --git a/apps/desktop/src/styles/messages.css b/apps/desktop/src/styles/messages.css
index 9dc23f946..315932175 100644
--- a/apps/desktop/src/styles/messages.css
+++ b/apps/desktop/src/styles/messages.css
@@ -3465,6 +3465,54 @@
min-width: 0;
}
+/*
+ * The top-level fold is a hairline row, not a hover chip. Status, duration,
+ * tool count and the caret form one left-aligned run, so the disclosure
+ * indicator trails the metadata instead of being pushed to the far edge of the
+ * band. Hover only strengthens the ink; no background fill is involved.
+ */
+.turn-process > .tool-activity-header {
+ gap: 6px;
+ margin: 0;
+ border-radius: 0;
+ border-bottom: 1px solid var(--ds-border-subtle);
+ padding: 4px 0 8px;
+}
+
+.turn-process > .tool-activity-header:hover {
+ background: transparent;
+ color: var(--ds-text-primary);
+}
+
+.turn-process > .tool-activity-header:hover .tool-activity-icon,
+.turn-process > .tool-activity-header:hover .tool-activity-label,
+.turn-process > .tool-activity-header:hover .turn-duration,
+.turn-process > .tool-activity-header:hover .tool-activity-count,
+.turn-process > .tool-activity-header:hover .tool-activity-caret {
+ color: var(--ds-text-primary);
+}
+
+.turn-process > .tool-activity-header:hover .turn-sep {
+ color: var(--ds-text-secondary);
+}
+
+.turn-process > .tool-activity-header > .tool-activity-caret {
+ margin-inline-start: 0;
+ opacity: 0.8;
+}
+
+.turn-duration {
+ flex: none;
+ color: var(--ds-text-muted);
+ font-variant-numeric: tabular-nums;
+ white-space: nowrap;
+}
+
+.turn-sep {
+ flex: none;
+ color: var(--ds-text-faint);
+}
+
.turn-process.open > .tool-activity-header > .tool-activity-caret,
.process-activity-group.open > .tool-activity-header > .tool-activity-caret {
transform: rotate(90deg);
@@ -3530,15 +3578,6 @@
padding-block: 6px;
}
-.turn-process-error {
- display: inline-flex;
- align-items: center;
- gap: 4px;
- flex: none;
- font-size: var(--text-xs-plus);
- color: var(--ds-error);
-}
-
/* Provider-hosted web search round. The row reuses the tool-row idiom; only
* the body payload needs its own rules. */
.hosted-search-query {
diff --git a/apps/desktop/test/turn-process-header-style.test.mjs b/apps/desktop/test/turn-process-header-style.test.mjs
new file mode 100644
index 000000000..a8561c5b3
--- /dev/null
+++ b/apps/desktop/test/turn-process-header-style.test.mjs
@@ -0,0 +1,54 @@
+import assert from "node:assert/strict";
+import test from "node:test";
+import { loadStyles } from "./helpers/styles.mjs";
+import { readTranscriptModule } from "./helpers/transcript-source.mjs";
+
+const stylesSource = await loadStyles();
+const turnProcessSource = await readTranscriptModule("TurnProcess.tsx");
+
+test("the top-level disclosure is a hairline row with an inline caret", () => {
+ const header = stylesSource.match(
+ /\.turn-process > \.tool-activity-header \{([^}]*)\}/,
+ )?.[1];
+ assert.ok(header);
+ assert.match(header, /border-bottom:\s*1px solid var\(--ds-border-subtle\);/);
+ assert.match(header, /margin:\s*0;/);
+ assert.doesNotMatch(header, /background/);
+
+ const hover = stylesSource.match(
+ /\.turn-process > \.tool-activity-header:hover \{([^}]*)\}/,
+ )?.[1];
+ assert.ok(hover);
+ assert.match(hover, /background:\s*transparent;/);
+ assert.doesNotMatch(hover, /--ds-bg-hover/);
+
+ const caret = stylesSource.match(
+ /\.turn-process > \.tool-activity-header > \.tool-activity-caret \{([^}]*)\}/,
+ )?.[1];
+ assert.ok(caret);
+ assert.match(caret, /margin-inline-start:\s*0;/);
+});
+
+test("nested disclosure headers keep their hover fill", () => {
+ // Only the top-level turn fold is a hairline row. Activity-group and subagent
+ // headers keep the released chip hover, so this change cannot flatten the
+ // hierarchy below it.
+ assert.match(
+ stylesSource,
+ /\.tool-activity-header:hover \{[\s\S]*?background:\s*var\(--ds-bg-hover\);/,
+ );
+});
+
+test("the header carries status, duration and tool count but no issue count", () => {
+ assert.match(turnProcessSource, /className=\{`tool-activity-label/);
+ assert.match(turnProcessSource, /className="turn-sep"/);
+ assert.match(turnProcessSource, /className="turn-duration"/);
+ assert.match(turnProcessSource, /className="tool-activity-count"/);
+ assert.match(turnProcessSource, /className="tool-activity-caret"/);
+ assert.doesNotMatch(turnProcessSource, /turn-process-error|activityFailures/);
+ assert.doesNotMatch(
+ turnProcessSource,
+ /processCompletedFor|processFailedFor|processStoppedFor/,
+ );
+ assert.doesNotMatch(stylesSource, /\.turn-process-error/);
+});
diff --git a/apps/desktop/test/turn-process-header.test.mjs b/apps/desktop/test/turn-process-header.test.mjs
new file mode 100644
index 000000000..77f3eb4bd
--- /dev/null
+++ b/apps/desktop/test/turn-process-header.test.mjs
@@ -0,0 +1,112 @@
+import assert from "node:assert/strict";
+import test from "node:test";
+import { createElement } from "react";
+import { renderToStaticMarkup } from "react-dom/server";
+import { createInstance } from "i18next";
+import { I18nextProvider } from "react-i18next";
+import { catalogs } from "@pi-desktop/i18n";
+import { createServer } from "vite";
+import { fileURLToPath } from "node:url";
+
+const tool = (id, offsetSeconds, extra = {}) => ({
+ kind: "tool",
+ message: {
+ id,
+ role: "tool",
+ content: "",
+ toolName: "Read",
+ createdAt: `2026-09-17T00:00:${String(offsetSeconds).padStart(2, "0")}.000Z`,
+ ...extra,
+ },
+});
+
+const answer = {
+ kind: "message",
+ message: {
+ id: "answer",
+ role: "assistant",
+ content: "Done",
+ status: "complete",
+ createdAt: "2026-09-17T00:00:08.000Z",
+ },
+};
+
+test("the top-level header keeps only status, duration, tool count and an inline caret", async () => {
+ const server = await createServer({
+ root: fileURLToPath(new URL("..", import.meta.url)),
+ configFile: false,
+ server: { middlewareMode: true, hmr: false, ws: false },
+ esbuild: { jsx: "automatic" },
+ appType: "custom",
+ optimizeDeps: { noDiscovery: true, include: [] },
+ });
+ try {
+ const { TurnProcess } = await server.ssrLoadModule(
+ "/src/features/chat/transcript/TurnProcess.tsx",
+ );
+ const i18n = createInstance();
+ await i18n.init({ lng: "en", resources: { en: { translation: catalogs.en } } });
+ const render = (props, children = "process body") =>
+ renderToStaticMarkup(
+ createElement(
+ I18nextProvider,
+ { i18n },
+ createElement(TurnProcess, {
+ ...props,
+ children: createElement("span", null, children),
+ }),
+ ),
+ );
+
+ const tools = Array.from({ length: 12 }, (_, index) =>
+ tool(`tool-${index}`, index === 11 ? 7 : 0),
+ );
+ const processParts = [{ kind: "activity", items: tools }];
+ const turnParts = [...processParts, answer];
+ const html = render({
+ turnId: "turn",
+ processParts,
+ turnParts,
+ visibleSteps: 13,
+ isActive: false,
+ failed: false,
+ });
+
+ assert.match(html, /class="tool-activity-label">Finished</);
+ assert.match(html, />8s</);
+ assert.match(html, />12 tools</);
+ assert.doesNotMatch(html, /issue|turn-process-error|activityFailures/i);
+ assert.ok(
+ html.indexOf("Finished") < html.indexOf("8s") &&
+ html.indexOf("8s") < html.indexOf("12 tools") &&
+ html.indexOf("12 tools") < html.indexOf("tool-activity-caret"),
+ "status, duration, tool count and the caret must stay in that order",
+ );
+ assert.match(html, /aria-expanded="false"/);
+
+ // A turn with recorded issues still names only its failed status: the issue
+ // count no longer has a place in the top-level header.
+ const failedTools = [
+ tool("denied", 0, { toolStatus: "denied" }),
+ ...Array.from({ length: 8 }, (_, index) => tool(`failed-tool-${index}`, index)),
+ ];
+ const failedParts = [{ kind: "activity", items: failedTools }];
+ const failedHtml = render({
+ turnId: "failed-turn",
+ processParts: failedParts,
+ turnParts: [...failedParts, answer],
+ visibleSteps: 10,
+ isActive: false,
+ failed: true,
+ });
+
+ assert.match(failedHtml, />Failed</);
+ assert.match(failedHtml, />9 tools</);
+ assert.doesNotMatch(
+ failedHtml,
+ /issue|问题|turn-process-error|activityFailures/i,
+ );
+ } finally {
+ await server.close();
+ }
+});
diff --git a/docs/adr/turn-process-and-thinking-display.md b/docs/adr/turn-process-and-thinking-display.md
index 9619c84bd..921abafcd 100644
--- a/docs/adr/turn-process-and-thinking-display.md
+++ b/docs/adr/turn-process-and-thinking-display.md
@@ -2,7 +2,7 @@
- Status: Accepted
- Date: 2026-09-17
-- Amended: 2026-10-21
+- Amended: 2026-10-22
- Issues: #510, #461
- Amends: D071, [ADR 0242](0242-delta-only-streaming-updates.md)
@@ -70,18 +70,24 @@ Other completed groups start closed. An untouched active group containing any
recorded failed or denied tool stays open through later recovery and closes on
turn completion if still untouched.
-The turn's disclosure header states the turn's outcome and never echoes the item
-it is working on, because a shell command or search query can be arbitrarily
-long. It reads `failed`, `stopped`, `running`, or finished, in that precedence:
-a recorded failure outranks a stop, because the turn produced no answer and a
-normal-looking header hid that. A stop is read from an aborted message, the only
-signal the runtime records — the turn result distinguishes completed from failed
-only. Aborted activity rows also record a stop while a tool or reasoning step is
-in flight; delegated child rows do not determine the parent turn's outcome.
-While running, stages a reader can sit in front of (compaction, recovery)
-name themselves; a live reasoning step reads `Thinking`, and momentary stages
-read as plain running. Durations are dropped when the transcript recorded no
-timing rather than shown as zero, and issue counts sit beside the label.
+The turn's disclosure header states the turn's outcome and carries only its
+bounded metadata: status, recorded duration and direct tool/search count. It
+never echoes the item it is working on, because a shell command or search query
+can be arbitrarily long. It reads `failed`, `stopped`, `running`, or finished, in
+that precedence: a recorded failure outranks a stop, because the turn produced no
+answer and a normal-looking header hid that. A stop is read from an aborted
+message, the only signal the runtime records — the turn result distinguishes
+completed from failed only. Aborted activity rows also record a stop while a tool
+or reasoning step is in flight; delegated child rows do not determine the parent
+turn's outcome. While running, stages a reader can sit in front of (compaction,
+recovery) name themselves; a live reasoning step reads `Thinking`, and momentary
+stages read as plain running. Durations are dropped when the transcript recorded
+no timing rather than shown as zero. Issue counts are not repeated here: a
+failure is already named by the status itself. The header is a full-width row
+separated by a hairline; status, duration, tool count and the disclosure caret
+form one left-aligned run, so the caret trails the metadata instead of sitting at
+the far edge of the band. Hovering strengthens the text colour only and never
+paints a background.
The disclosure and its group headers share one left edge. A nested activity
group keeps the released v0.20.1 hierarchy below that header: its body indents
@@ -145,9 +151,10 @@ read for rendering. These preferences change presentation only; they do not
alter provider thinking levels, runtime/model context, stored reasoning, export,
permissions, execution, or copy payloads, and the thinking preference does not
control turn-process or activity-group folding. Process headers use recorded
-timing, direct tool/search counts, running state, and issue counts; they do not
-double-count delegated child work or treat a failed child as a failed assistant
-turn.
+timing, direct tool/search counts, and running state; they do not double-count
+delegated child work or treat a failed child as a failed assistant turn. The
+top-level fold does not repeat issue counts; activity-group headers keep their
+own bounded issue summaries.
## Consequences
@@ -170,9 +177,11 @@ turn.
messages.
- With `showThinking` on, Thinking rows default expanded in `flat` and
`command-first`; `fully-folded` keeps the live-only auto-open exception.
-- The header answers "how did this turn end up" in one short line. Echoing the
- current command was removed: it pushed the counts off the row and duplicated
- what opening the item already shows.
+- The header answers "how did this turn end up" in one short line and carries
+ only status, recorded duration and direct tool/search count. A hairline
+ underlines the row, the caret trails the metadata, and hover changes ink only.
+ Echoing the current command was removed: it pushed the counts off the row and
+ duplicated what opening the item already shows.
- Disclosure memory is pane-owned presentation state with stable turn, group,
and item identities; it is neither a persisted transcript contract nor a
central workflow-store concern.
@@ -205,3 +214,12 @@ Settings row label and search indexing, and
`apps/desktop/test/settings-roundtrip.test.mjs` covers normalization, write
validation and the `fully-folded` default. See
E2E-CHAT-turn-process-and-thinking-display for the synchronized scenario text.
+For the 2026-10-22 amendment,
+`apps/desktop/test/turn-process-header.test.mjs` renders the top-level header and
+covers status, duration, tool count, inline-caret order and the absence of issue
+counts in both completed and failed turns;
+`apps/desktop/test/turn-process-header-style.test.mjs` covers the hairline,
+text-only hover and the inline caret position, while `turn-process.test.mjs` and
+`transcript-style.test.mjs` continue to cover phase precedence and the shared
+header geometry. See E2E-CHAT-turn-process-and-thinking-display for the
+synchronized scenario text.
diff --git a/docs/spec/04-ux/08-component-spec.md b/docs/spec/04-ux/08-component-spec.md
index c0cabe228..34fb69f36 100644
--- a/docs/spec/04-ux/08-component-spec.md
+++ b/docs/spec/04-ux/08-component-spec.md
@@ -905,19 +905,24 @@ untouched. These group defaults are unified across modes and do not depend on th
thinking preference. Group headers summarize count, running state and issue count
without treating a failed child as a failed turn.
-The turn disclosure header states the turn's outcome and never echoes the item it
-is working on, because a shell command or search query can be arbitrarily long. It
-reads `Failed`, `Stopped`, `Running`, or `Finished`, with failure outranking stop,
-stop outranking completion, and a live turn reporting running. While running,
-stages a reader can sit in front of (compaction, recovery) name themselves; a
-live reasoning step reads `Thinking`, and momentary stages read as plain running.
-Elapsed time is omitted when the
-transcript recorded no timing rather than shown as zero, and issue counts sit
-beside the label. The disclosure and its group headers share one left edge; a
-nested activity group keeps the released v0.20.1 hierarchy below that header,
-indenting its child rows by 12px and keeping the group's collapse rail in that
-gutter. The rail stays invisible at rest, shows a 2px bar on hover or focus, and
-collapses the group when clicked. The outer turn fold adds no extra hierarchy.
+The turn disclosure header states the turn's outcome and carries only its bounded
+metadata: status, recorded duration and direct tool/search count. It never echoes
+the item it is working on, because a shell command or search query can be
+arbitrarily long. It reads `Failed`, `Stopped`, `Running`, or `Finished`, with
+failure outranking stop, stop outranking completion, and a live turn reporting
+running. While running, stages a reader can sit in front of (compaction, recovery)
+name themselves; a live reasoning step reads `Thinking`, and momentary stages read
+as plain running. Elapsed time is omitted when the transcript recorded no timing
+rather than shown as zero. Issue counts are not repeated at this level: a failed
+turn is already named by its status. The header is a full-width row separated by
+a 1px hairline; status, duration, tool count and the disclosure caret form one
+left-aligned run, so the caret trails the metadata. Hovering strengthens the text
+colour only and never paints a background. The disclosure and its group headers
+share one left edge; a nested activity group keeps the released v0.20.1 hierarchy
+below that header, indenting its child rows by 12px and keeping the group's
+collapse rail in that gutter. The rail stays invisible at rest, shows a 2px bar on
+hover or focus, and collapses the group when clicked. The outer turn fold adds no
+extra hierarchy.
Except for the display mode's Thinking default, no item payload opens itself: a
tool, hosted-search or plan call stays a header row until the user opens its
diff --git a/docs/spec/06-delivery/04-e2e-test-plan.md b/docs/spec/06-delivery/04-e2e-test-plan.md
index ced0b4975..d935af860 100644
--- a/docs/spec/06-delivery/04-e2e-test-plan.md
+++ b/docs/spec/06-delivery/04-e2e-test-plan.md
@@ -17245,7 +17245,11 @@ plugin-form fixtures in an isolated temporary directory at runtime.
defaults to Fully folded. Confirm the header reads running, finished, stopped,
or failed for each case, names compaction and recovery while those stages are
live, omits the duration when none was recorded, and never repeats the current
- command. Review the nested path, including independent group/item toggles, a
+ command. Confirm the top-level header shows exactly status, recorded duration
+ and direct tool/search count; its caret sits immediately after the tool count;
+ a hairline underlines the row; hovering changes only the text colour with no
+ background fill; and a failed turn does not add an issue count. Review the
+ nested path, including independent group/item toggles, a
singleton segment, literal-final-item leaf selection, failure/denial/recovery,
retained-pane remounts, run rows keeping their details closed until opened, and
a legacy search reveal.
@@ -17271,12 +17275,15 @@ plugin-form fixtures in an isolated temporary directory at runtime.
reports running, finished, stopped, or failed with failure and stop outranking
a normal finish, reads `Thinking` while the live step is reasoning, names
compaction and recovery while those stages are live, omits a duration the
- transcript did not record, and never repeats the current command. Nested group
- headers and run rows share the turn header's left edge. When `Show thinking` is
- off, no completed reasoning row renders, and only the live whole-run TextShimmer
- `Thinking` indicator remains while reasoning streams; turning it back on
- restores the rows. No item payload opens itself except the display mode's
- Thinking default: a tool/search row stays closed until the user opens it.
+ transcript did not record, and never repeats the current command. It carries
+ only status, duration and direct tool/search count, with the caret immediately
+ after the tool count, a hairline under the row, text-colour-only hover, and no
+ issue count. Nested group headers and run rows share the turn header's left
+ edge. When `Show thinking` is off, no completed reasoning row renders, and only
+ the live whole-run TextShimmer `Thinking` indicator remains while reasoning
+ streams; turning it back on restores the rows. No item payload opens itself
+ except the display mode's Thinking default: a tool/search row stays closed until
+ the user opens it.
Parent/child/sibling states remain independent, pane-owned user choices survive
updates, preference changes and remounts, and renderer restart reapplies
defaults. Search reveals the turn process and, where one exists, the activity
@@ -17295,6 +17302,10 @@ plugin-form fixtures in an isolated temporary directory at runtime.
viewport anchoring; `apps/desktop/test/turn-process.test.mjs` covers mode
segmentation, `apps/desktop/test/transcript-display-modes-ui.test.mjs` covers
the renderer's mode wiring, Thinking defaults and TextShimmer,
+ `apps/desktop/test/turn-process-header.test.mjs` covers the top-level header's
+ status/duration/tool-count composition and the absence of issue counts,
+ `apps/desktop/test/turn-process-header-style.test.mjs` covers its hairline and
+ text-only hover,
`apps/desktop/test/transcript-display-mode-settings.test.mjs` covers the
Settings row and search indexing, and
`apps/desktop/test/settings-roundtrip.test.mjs` covers normalization, write
diff --git a/docs/zh-CN/adr/turn-process-and-thinking-display.md b/docs/zh-CN/adr/turn-process-and-thinking-display.md
index 90efd34e8..9b93733de 100644
--- a/docs/zh-CN/adr/turn-process-and-thinking-display.md
+++ b/docs/zh-CN/adr/turn-process-and-thinking-display.md
@@ -4,7 +4,7 @@
- 状态:已接受
- 日期:2026-09-17
-- 修订:2026-10-21
+- 修订:2026-10-22
- Issues:#510、#461
- 修订对象:D071、[ADR 0242](/adr/0242-delta-only-streaming-updates)
@@ -51,13 +51,15 @@ v0.20.0 发布的布局。三种模式都只渲染一个外层披露。
尚未被用户接管的活动组就会在后续恢复期间保持展开,并在回合完成后收起。关闭回合披露会一并
关闭其下的组,重新展开则恢复用户此前展开过的组。
-回合披露的标题只陈述回合的结果,绝不回显正在处理的具体项,因为一条 shell 命令或搜索词可能
-任意长。其取值优先级依次为失败、已停止、执行中、已完成:已记录的失败优先于停止,因为该回合
-没有产出答案,而看起来正常的标题会掩盖这一点。停止取自被中止的消息,这是运行时唯一记录的信
-号——回合结果只区分完成与失败。工具或思考仍在执行时,被中止的活动行同样记录停止;委派子任务
-的行不决定父回合结果。执行期间,用户可能长时间停留的阶段(压缩上下文、恢复)会各自
-命名;当前步骤为推理时显示 `Thinking`,瞬时阶段则显示为普通执行中。转录未记录时间时不显示
-时长,而不是显示为零;问题计数与标签并列显示。
+回合披露的标题陈述回合结果,并只保留有界元数据:状态、已记录的耗时与直接工具/搜索数。
+它绝不回显正在处理的具体项,因为一条 shell 命令或搜索词可能任意长。其取值优先级依次为
+失败、已停止、执行中、已完成:已记录的失败优先于停止,因为该回合没有产出答案,而看起来
+正常的标题会掩盖这一点。停止取自被中止的消息,这是运行时唯一记录的信号——回合结果只区分
+完成与失败。工具或思考仍在执行时,被中止的活动行同样记录停止;委派子任务的行不决定父回合
+结果。执行期间,用户可能长时间停留的阶段(压缩上下文、恢复)会各自命名;当前步骤为推理时
+显示 `Thinking`,瞬时阶段则显示为普通执行中。转录未记录时间时不显示时长,而不是显示为零;
+此层不重复问题计数,失败已由状态本身表明。标题是一条由细线分隔的整行:状态、耗时、工具数
+与折叠指示组成一个左对齐序列,指示器紧跟在工具数之后。悬停只加深文字颜色,不绘制背景。
披露与其组标题共用同一条左边缘。嵌套活动组沿用已发布的 v0.20.1 层级:组正文将子行缩进
12px,组的折叠栏位于该沟槽中——静息时不可见,悬停或聚焦时显示 2px 竖条,点击即收起该组。
@@ -98,8 +100,9 @@ v0.20.0 发布的布局。三种模式都只渲染一个外层披露。
`keepCommandsExpanded` 仅为持久化设置兼容性保留,不再在界面中暴露;
`keepCommandsExpanded` 也不再参与渲染读取。这些偏好只改变展示,不改变提供商思考级别、
运行时或模型上下文、已存推理、导出、权限、执行或复制载荷,思考偏好也不控制回合过程或
-活动组的折叠。过程标题使用已记录的计时、直接工具/搜索计数、运行状态和问题计数;不会
-重复计算委派子任务,也不会把单个失败工具误报为整个助手回合失败。
+活动组的折叠。过程标题使用已记录的计时、直接工具/搜索计数和运行状态;不会
+重复计算委派子任务,也不会把单个失败工具误报为整个助手回合失败。顶层折叠不重复显示
+问题计数;活动组标题保留各自有界的问题摘要。
## 结果
@@ -115,8 +118,9 @@ v0.20.0 发布的布局。三种模式都只渲染一个外层披露。
新消息。
- `showThinking` 开启时,`flat` 与 `command-first` 中的思考行默认展开;`fully-folded`
保留仅活动行自动展开的例外。
-- 标题用一行说明回合的结果。回显当前命令的做法已被移除:它会把计数挤出该行,并且与打开该项
- 已经能看到的内容重复。
+- 标题用一行说明回合的结果,并只保留状态、已记录的耗时与直接工具/搜索数。标题行由细线
+ 分隔,折叠指示紧跟工具数,悬停只改变文字颜色。回显当前命令的做法已被移除:它会把计数
+ 挤出该行,并且与打开该项已经能看到的内容重复。
- 披露记忆是以稳定回合、组和条目标识为键的窗格展示状态,不是持久化转录契约,也不
属于中央工作流 store。
- 只对已加载的转录条目分组;不会重建未加载历史,也不会跨压缩边界合并回合。
@@ -140,3 +144,9 @@ E2E-CHAT-turn-process-and-thinking-display。
`apps/desktop/test/transcript-display-mode-settings.test.mjs` 覆盖设置行标签与搜索索引;
`apps/desktop/test/settings-roundtrip.test.mjs` 覆盖规范化、写入校验与 `fully-folded`
默认值。同步后的场景文本见 E2E-CHAT-turn-process-and-thinking-display。
+2026-10-22 修订由 `apps/desktop/test/turn-process-header.test.mjs` 渲染顶层标题,覆盖
+状态、耗时、工具数、内联指示顺序,以及完成与失败回合都不显示问题计数;
+`apps/desktop/test/turn-process-header-style.test.mjs` 覆盖整行细线、仅文字变色的悬停
+与内联指示位置;`turn-process.test.mjs` 与 `transcript-style.test.mjs` 继续覆盖阶段
+优先级与共享标题几何。同步后的场景文本见
+E2E-CHAT-turn-process-and-thinking-display。
diff --git a/docs/zh-CN/spec/04-ux/08-component-spec.md b/docs/zh-CN/spec/04-ux/08-component-spec.md
index 1f66f179e..79565900a 100644
--- a/docs/zh-CN/spec/04-ux/08-component-spec.md
+++ b/docs/zh-CN/spec/04-ux/08-component-spec.md
@@ -1083,12 +1083,15 @@ SESSIONS [msg+][↕]
失败或被拒工具,尚未被用户接管的活动组会在后续成功恢复期间保持展开,并在回合完成后收起。
组标题汇总计数、运行状态和问题计数,但不会把失败子项当作整个回合失败。
-回合披露的标题只陈述回合结果,绝不回显正在处理的具体项,因为 shell 命令或搜索词可能
-任意长。它显示 `Failed`、`Stopped`、`Running` 或 `Finished`,优先级依次为失败、停止、
-运行中、已完成:已记录的失败优先于停止,停止优先于正常完成,运行中的回合显示为执行中。
-执行期间,用户可能长时间停留的阶段(压缩上下文、恢复)会各自命名;当前步骤为推理时显示
-`Thinking`,瞬时阶段显示为普通执行中。转录未记录时间时不显示时长,而不是显示为零;问题
-计数与标签并列显示。披露与其组标题共用同一条左边缘;嵌套活动组沿用已发布的 v0.20.1
+回合披露的标题陈述回合结果,并只保留有界元数据:状态、已记录的耗时与直接工具/搜索数。
+它绝不回显正在处理的具体项,因为 shell 命令或搜索词可能任意长。它显示 `Failed`、
+`Stopped`、`Running` 或 `Finished`,优先级依次为失败、停止、运行中、已完成:已记录的
+失败优先于停止,停止优先于正常完成,运行中的回合显示为执行中。执行期间,用户可能长时间
+停留的阶段(压缩上下文、恢复)会各自命名;当前步骤为推理时显示 `Thinking`,瞬时阶段
+显示为普通执行中。转录未记录时间时不显示时长,而不是显示为零;此层不重复问题计数,
+失败已由状态本身表明。标题是一条由 1px 细线分隔的整行:状态、耗时、工具数与折叠指示
+组成一个左对齐序列,指示器紧跟在工具数之后。悬停只加深文字颜色,不绘制背景。披露与其
+组标题共用同一条左边缘;嵌套活动组沿用已发布的 v0.20.1
层级:组正文将子行缩进 12px,组的折叠栏位于该沟槽中。折叠栏静息时不可见,悬停或聚焦时
显示 2px 竖条,点击即收起该组。外部回合折叠不会额外增加层级。
diff --git a/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md b/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md
index d6b118154..fae4f2c13 100644
--- a/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md
+++ b/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md
@@ -9249,7 +9249,9 @@ Follow the [current S3 acceptance scenario](/spec/06-delivery/04-e2e-test-plan#e
指示器,不使用转圈、脉冲圆点或逐字符动画,减少动态效果时保持静态;重新打开后确认
已完成的推理行恢复。分别选择每个 `过程显示` 值并重启,确认设置保留;移除已保存的值,
确认默认使用「全折叠显示」。确认标题分别显示执行中、已完成、已停止或失败,执行期间
- 压缩上下文与恢复会各自命名,未记录时长时不显示时长,且绝不回显当前命令。检查嵌套路径,
+ 压缩上下文与恢复会各自命名,未记录时长时不显示时长,且绝不回显当前命令。确认顶层标题
+ 只显示状态、已记录的耗时与直接工具/搜索数;折叠指示紧跟工具数;标题行下方有一条细线;
+ 悬停只改变文字颜色、不绘制背景;失败回合不追加问题计数。检查嵌套路径,
包括相互独立的组/条目切换、父级收起与恢复、单项片段、字面最后一项选择、失败/被拒/
恢复、保留窗格重新挂载、命令行详情在打开前保持收起,以及旧版搜索定位。
- **预期:** 一个回合只渲染一个过程披露,包含全部回答前的行,最终回答、助手错误、中止后
@@ -9264,8 +9266,10 @@ Follow the [current S3 acceptance scenario](/spec/06-delivery/04-e2e-test-plan#e
展开,完成后收起。用户明确选择的状态继续保留,并在外层披露重新展开时恢复;这些组默认值
不依赖 `Show thinking` 偏好。回合标题按执行中、已完成、已停止、失败的顺序报告,失败与
停止优先于正常完成,当前步骤为推理时显示 `Thinking`,执行期间压缩上下文和恢复会各自
- 命名,未记录时长时不显示时长,且绝不回显当前命令。嵌套组标题与命令行共用回合标题的
- 左边缘。`Show thinking` 关闭时,不再渲染任何已完成的推理行,仅在推理流式输出期间保留
+ 命名,未记录时长时不显示时长,且绝不回显当前命令。标题只包含状态、耗时与直接工具/
+ 搜索数,折叠指示紧跟工具数,标题行下方有细线,悬停只改变文字颜色、不绘制背景,且不
+ 显示问题计数。嵌套组标题与命令行共用回合标题的左边缘。`Show thinking` 关闭时,不再
+ 渲染任何已完成的推理行,仅在推理流式输出期间保留
整段运行的 TextShimmer `Thinking` 指示器;重新打开时恢复。除显示模式的思考默认值外,
没有任何条目载荷会自动展开:工具/搜索行在用户打开之前保持收起。父级、子级和同级状态
相互独立;窗格拥有的用户选择跨更新、偏好切换和重新挂载保留,渲染器重启后重新应用默认值。
@@ -9280,7 +9284,10 @@ Follow the [current S3 acceptance scenario](/spec/06-delivery/04-e2e-test-plan#e
以及运行中到完成时的过程披露行为;`pnpm test:e2e:transcript-disclosure` 验证手动
展开状态保留和视口锚定;`apps/desktop/test/turn-process.test.mjs` 覆盖模式分段,
`apps/desktop/test/transcript-display-modes-ui.test.mjs` 覆盖渲染层模式接线、
- 思考默认值与 TextShimmer,`apps/desktop/test/transcript-display-mode-settings.test.mjs`
+ 思考默认值与 TextShimmer,`apps/desktop/test/turn-process-header.test.mjs` 覆盖
+ 顶层标题的状态/耗时/工具数组合及不显示问题计数,
+ `apps/desktop/test/turn-process-header-style.test.mjs` 覆盖整行细线与仅文字变色的
+ 悬停,`apps/desktop/test/transcript-display-mode-settings.test.mjs`
覆盖设置行与搜索索引,`apps/desktop/test/settings-roundtrip.test.mjs` 覆盖规范化、
写入校验与全折叠默认值。
- **规格:** 04-ux/06-settings-ia、04-ux/08-component-spec、