Skip to content

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

feat(transcript): add display modes and thinking shimmer

v_wyxgwang6cae2dff4100
diff --git a/apps/desktop/electron/main/runtime/provider-catalog.ts b/apps/desktop/electron/main/runtime/provider-catalog.ts
index 0c60524b5..51d51dc22 100644
--- a/apps/desktop/electron/main/runtime/provider-catalog.ts
+++ b/apps/desktop/electron/main/runtime/provider-catalog.ts
@@ -174,6 +174,12 @@ export function createProviderCatalogRuntime({
keepAwakeWhileRunning: (value as T & { keepAwakeWhileRunning?: unknown })
.keepAwakeWhileRunning === true,
jevEnabled: (value as T & { jevEnabled?: unknown }).jevEnabled === true,
+ transcriptDisplayMode:
+ (value as T & { transcriptDisplayMode?: unknown }).transcriptDisplayMode === "flat" ||
+ (value as T & { transcriptDisplayMode?: unknown }).transcriptDisplayMode === "command-first" ||
+ (value as T & { transcriptDisplayMode?: unknown }).transcriptDisplayMode === "fully-folded"
+ ? (value as T & { transcriptDisplayMode?: unknown }).transcriptDisplayMode
+ : "fully-folded",
defaultCommandShell: isCommandShellId(value.defaultCommandShell)
? value.defaultCommandShell
: defaultCommandShellForPlatform(process.platform),
@@ -193,6 +199,7 @@ export function createProviderCatalogRuntime({
lastNotifiedUpdateVersion?: unknown;
networkProxy?: unknown;
macosWindowTranslucency?: unknown;
+ transcriptDisplayMode?: unknown;
};
if (
Object.prototype.hasOwnProperty.call(value, "defaultCommandShell") &&
@@ -226,6 +233,16 @@ export function createProviderCatalogRuntime({
errorCode: ErrorCodes.INVALID_PARAMS,
});
}
+ if (
+ Object.prototype.hasOwnProperty.call(value, "transcriptDisplayMode") &&
+ value.transcriptDisplayMode !== "flat" &&
+ value.transcriptDisplayMode !== "command-first" &&
+ value.transcriptDisplayMode !== "fully-folded"
+ ) {
+ throw Object.assign(new Error("transcriptDisplayMode is invalid"), {
+ errorCode: ErrorCodes.INVALID_PARAMS,
+ });
+ }
if (
Object.prototype.hasOwnProperty.call(value, "macosWindowTranslucency") &&
typeof value.macosWindowTranslucency !== "boolean"
diff --git a/apps/desktop/src/components/settings/KeepCommandsExpandedRow.tsx b/apps/desktop/src/components/settings/KeepCommandsExpandedRow.tsx
deleted file mode 100644
index c32f47e61..000000000
--- a/apps/desktop/src/components/settings/KeepCommandsExpandedRow.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-import { useTranslation } from "react-i18next";
-import type { AppSettings } from "@pi-desktop/shared";
-import { resolveKeepCommandsExpanded } from "../../lib/command-folding";
-import { SettingsRow } from "../../features/settings/primitives";
-import { SettingsToggle } from "../ui";
-
-export function KeepCommandsExpandedRow({
- settings,
- saveSettings,
-}: {
- settings: AppSettings;
- saveSettings: (patch: Partial<AppSettings>) => Promise<void>;
-}) {
- const { t } = useTranslation();
- const expanded = resolveKeepCommandsExpanded(settings);
- return (
- <SettingsRow
- title={t("settings.keepCommandsExpanded")}
- description={t("settings.keepCommandsExpandedDesc")}
- >
- <SettingsToggle
- checked={expanded}
- label={t("settings.keepCommandsExpanded")}
- onChange={() => void saveSettings({ keepCommandsExpanded: !expanded })}
- />
- </SettingsRow>
- );
-}
diff --git a/apps/desktop/src/components/settings/TranscriptDisplayModeRow.tsx b/apps/desktop/src/components/settings/TranscriptDisplayModeRow.tsx
new file mode 100644
index 000000000..147954459
--- /dev/null
+++ b/apps/desktop/src/components/settings/TranscriptDisplayModeRow.tsx
@@ -0,0 +1,55 @@
+import { useTranslation } from "react-i18next";
+import type { AppSettings } from "@pi-desktop/shared";
+import {
+ resolveTranscriptDisplayMode,
+ type TranscriptDisplayMode,
+} from "../../lib/transcript-display-mode";
+import { SettingsRow } from "../../features/settings/primitives";
+import { SegmentedControl } from "../ui";
+
+const MODE_OPTIONS = [
+ { value: "flat", labelKey: "settings.transcriptDisplayModeFlat" },
+ {
+ value: "command-first",
+ labelKey: "settings.transcriptDisplayModeCommandFirst",
+ },
+ {
+ value: "fully-folded",
+ labelKey: "settings.transcriptDisplayModeFullyFolded",
+ },
+] as const satisfies readonly {
+ value: TranscriptDisplayMode;
+ labelKey: string;
+}[];
+
+/**
+ * Transcript process layout (Settings → AI → Defaults). Persists
+ * `AppSettings.transcriptDisplayMode`; an absent or unknown value keeps the
+ * released `fully-folded` layout.
+ */
+export function TranscriptDisplayModeRow({
+ settings,
+ saveSettings,
+}: {
+ settings: AppSettings;
+ saveSettings: (patch: Partial<AppSettings>) => Promise<void>;
+}) {
+ const { t } = useTranslation();
+ const mode = resolveTranscriptDisplayMode(settings);
+ return (
+ <SettingsRow
+ title={t("settings.transcriptDisplayMode")}
+ description={t("settings.transcriptDisplayModeDesc")}
+ >
+ <SegmentedControl
+ value={mode}
+ onChange={(value) => void saveSettings({ transcriptDisplayMode: value })}
+ options={MODE_OPTIONS.map((option) => ({
+ value: option.value,
+ label: t(option.labelKey),
+ }))}
+ label={t("settings.transcriptDisplayMode")}
+ />
+ </SettingsRow>
+ );
+}
diff --git a/apps/desktop/src/features/chat/transcript/ActivityGroup.tsx b/apps/desktop/src/features/chat/transcript/ActivityGroup.tsx
index b8c11ab63..48c4a6583 100644
--- a/apps/desktop/src/features/chat/transcript/ActivityGroup.tsx
+++ b/apps/desktop/src/features/chat/transcript/ActivityGroup.tsx
@@ -55,6 +55,7 @@ import {
import { TranscriptSearchContext } from "../../../lib/transcript-search-context";
import { useAppStore } from "../../../stores/app-store";
import { resolveShowThinking } from "../../../lib/thinking-visibility";
+import { resolveTranscriptDisplayMode } from "../../../lib/transcript-display-mode";
type Translate = (key: string, options?: Record<string, unknown>) => string;
@@ -202,6 +203,8 @@ export const ActivityGroup = memo(function ActivityGroup({
}: ActivityGroupProps) {
const showThinking = useAppStore((state) => resolveShowThinking(state.settings));
const hideThinking = !showThinking;
+ const displayMode = useAppStore((state) => resolveTranscriptDisplayMode(state.settings));
+ const thinkingDefaultOpen = displayMode !== "fully-folded";
const { t } = useTranslation();
const detailsId = useId();
const rawDelegateItems = useMemo(() => items.filter(isDelegationActivityItem), [items]);
@@ -318,8 +321,13 @@ export const ActivityGroup = memo(function ActivityGroup({
delegationStatuses={delegationStatuses}
delegationTimings={delegationTimings}
onUserInteraction={claimDisclosure}
+ thinkingDefaultOpen={thinkingDefaultOpen}
/>;
+ // Flat mode has one outer process disclosure and no nested group at all.
+ // The rows themselves still keep their own tool/thinking disclosures.
+ if (displayMode === "flat") return <>{renderedItems}</>;
+
if (!hasSubagentTopology) {
return (
<ProcessActivityGroup items={visibleItems} active={isActive} disclosure={disclosure}>
diff --git a/apps/desktop/src/features/chat/transcript/ActivityItems.tsx b/apps/desktop/src/features/chat/transcript/ActivityItems.tsx
index 720fce5d5..72c9aa8e7 100644
--- a/apps/desktop/src/features/chat/transcript/ActivityItems.tsx
+++ b/apps/desktop/src/features/chat/transcript/ActivityItems.tsx
@@ -22,6 +22,8 @@ type ActivityItemsProps = {
delegationStatuses: ReadonlyMap<string, SubagentOutcome>;
delegationTimings: ReadonlyMap<string, SubagentTiming>;
onUserInteraction: () => void;
+ /** Flat and command-first expand every Thinking row by default. */
+ thinkingDefaultOpen?: boolean;
};
type ActivityItemBlockProps = Omit<ActivityItemsProps, "items" | "delegateItems" | "delegationStatuses" | "delegationTimings"> & {
@@ -36,6 +38,7 @@ type ActivityItemBlockProps = Omit<ActivityItemsProps, "items" | "delegateItems"
const ActivityItemBlock = memo(function ActivityItemBlock({
block, isActive, live, lastItem, topologyItem,
delegateItems, delegationStatuses, delegationTimings, onUserInteraction,
+ thinkingDefaultOpen,
}: ActivityItemBlockProps) {
return <>{block.items.map((item) => {
// The topology predicate narrows to all tools, but a false result can still
@@ -71,7 +74,7 @@ const ActivityItemBlock = memo(function ActivityItemBlock({
key={`thinking-${item.message.id}`}
message={item.message}
streaming={isActive && item.message.status === "streaming"}
- autoOpen={live && item === lastItem}
+ autoOpen={thinkingDefaultOpen || (live && item === lastItem)}
onUserInteraction={onUserInteraction}
/>;
})}</>;
@@ -95,6 +98,7 @@ export const ActivityItems = memo(function ActivityItems({ items, ...context }:
delegationStatuses={ownsTopology ? context.delegationStatuses : undefined}
delegationTimings={ownsTopology ? context.delegationTimings : undefined}
onUserInteraction={context.onUserInteraction}
+ thinkingDefaultOpen={context.thinkingDefaultOpen}
/>;
})}</>;
});
diff --git a/apps/desktop/src/features/chat/transcript/AssistantTurn.tsx b/apps/desktop/src/features/chat/transcript/AssistantTurn.tsx
index 7e47519fe..e12b8e119 100644
--- a/apps/desktop/src/features/chat/transcript/AssistantTurn.tsx
+++ b/apps/desktop/src/features/chat/transcript/AssistantTurn.tsx
@@ -25,7 +25,7 @@ import {
} from "../../../lib/turn-process";
import { sessionAllows } from "../../../lib/remote-session-safety";
import { resolveShowThinking } from "../../../lib/thinking-visibility";
-import { resolveKeepCommandsExpanded } from "../../../lib/command-folding";
+import { resolveTranscriptDisplayMode } from "../../../lib/transcript-display-mode";
import { cachedVisibleProcessSteps } from "../../../lib/transcript-activity-summary";
import { useSlotSessionId } from "../../../plugins/renderer-slots/use-slots";
import { useAppStore } from "../../../stores/app-store";
@@ -355,10 +355,10 @@ export const AssistantTurn = memo(function AssistantTurn({
// by messages and compactions only, so a grouping decision made there would
// stay stale until new messages arrived. Segmenting here makes the preference
// apply on the next paint.
- const keepCommandsExpanded = useAppStore((state) => resolveKeepCommandsExpanded(state.settings));
+ const displayMode = useAppStore((state) => resolveTranscriptDisplayMode(state.settings));
const segments = useMemo(
- () => segmentTurnProcess(process, keepCommandsExpanded),
- [process, keepCommandsExpanded],
+ () => segmentTurnProcess(process, displayMode),
+ [process, displayMode],
);
// The one disclosure exists if it reveals anything at all. This uses the same
// helper the activity rows use: progress text counts, completed thinking is
diff --git a/apps/desktop/src/features/chat/transcript/TextShimmer.tsx b/apps/desktop/src/features/chat/transcript/TextShimmer.tsx
new file mode 100644
index 000000000..4297ffcbf
--- /dev/null
+++ b/apps/desktop/src/features/chat/transcript/TextShimmer.tsx
@@ -0,0 +1,29 @@
+import { memo } from "react";
+
+/**
+ * A whole-run text shimmer.
+ *
+ * The base layer stays in the layout while the shimmer layer sweeps a narrow
+ * gradient across the complete string. It is deliberately not a spinner and not
+ * a per-character animation: the same gradient crosses the whole label.
+ */
+export const TextShimmer = memo(function TextShimmer({
+ text,
+ active = true,
+ className,
+}: {
+ text: string;
+ active?: boolean;
+ className?: string;
+}) {
+ return (
+ <span
+ className={`text-shimmer${className ? ` ${className}` : ""}`}
+ data-active={active ? "true" : "false"}
+ aria-label={text}
+ >
+ <span className="text-shimmer-base" aria-hidden="true">{text}</span>
+ <span className="text-shimmer-peak" aria-hidden="true">{text}</span>
+ </span>
+ );
+});
diff --git a/apps/desktop/src/features/chat/transcript/shared.tsx b/apps/desktop/src/features/chat/transcript/shared.tsx
index f79dbcc12..3a075dd8b 100644
--- a/apps/desktop/src/features/chat/transcript/shared.tsx
+++ b/apps/desktop/src/features/chat/transcript/shared.tsx
@@ -61,6 +61,7 @@ import {
IconX,
} from "../../../components/icons";
import { TooltipButton } from "../../../components/ui";
+import { TextShimmer } from "./TextShimmer";
/**
* Legacy message navigation reveals the row it names, at message precision.
@@ -702,14 +703,13 @@ export const ThinkingRow = memo(function ThinkingRow({
<span className="tool-row-icon" aria-hidden>
<IconSparkles size={15} />
</span>
- <span className="tool-row-name running">
- {t("chat.thinking", { defaultValue: "Thinking" })}
+ <span className="tool-row-name">
+ <TextShimmer text={t("chat.thinking", { defaultValue: "Thinking" })} />
</span>
</div>
) : null;
}
const text = thinkingText(message);
- const summary = text.replace(/\s+/g, " ").trim();
return (
<div className={`tool-row thinking ${open ? "open" : ""}`}>
<button
@@ -723,10 +723,12 @@ export const ThinkingRow = memo(function ThinkingRow({
<span className="tool-row-icon">
<IconSparkles size={15} aria-hidden />
</span>
- <span className={`tool-row-name ${streaming ? "running" : ""}`}>
- {t("chat.thinking", { defaultValue: "Thinking" })}
+ <span className="tool-row-name">
+ <TextShimmer
+ text={t("chat.thinking", { defaultValue: "Thinking" })}
+ active={streaming && !open}
+ />
</span>
- <span className="tool-row-summary">{summary}</span>
<span className="tool-row-caret" aria-hidden>
<IconChevronRight size={12} />
</span>
diff --git a/apps/desktop/src/features/settings/SettingsPage.tsx b/apps/desktop/src/features/settings/SettingsPage.tsx
index 90c453740..a2f8f3d94 100644
--- a/apps/desktop/src/features/settings/SettingsPage.tsx
+++ b/apps/desktop/src/features/settings/SettingsPage.tsx
@@ -37,7 +37,7 @@ import { ModelConfigPage } from "../../components/settings/ModelConfigPage";
import { KeyboardShortcutsSection } from "../../components/settings/KeyboardShortcutsSection";
import { FontFamilyRow } from "../../components/settings/FontFamilyRow";
import { ShowThinkingRow } from "../../components/settings/ShowThinkingRow";
-import { KeepCommandsExpandedRow } from "../../components/settings/KeepCommandsExpandedRow";
+import { TranscriptDisplayModeRow } from "../../components/settings/TranscriptDisplayModeRow";
import { FontSizeRow } from "../../components/settings/FontSizeRow";
import { LanguageRow } from "../../components/settings/LanguageRow";
import { SettingsMenuSelect } from "../../components/settings/SettingsMenuSelect";
@@ -547,7 +547,7 @@ export function SettingsPage() {
<CommandShellRow settings={settings} saveSettings={saveSettings} />
<LinkOpenTargetRow settings={settings} saveSettings={saveSettings} />
<ShowThinkingRow settings={settings} saveSettings={saveSettings} />
- <KeepCommandsExpandedRow settings={settings} saveSettings={saveSettings} />
+ <TranscriptDisplayModeRow settings={settings} saveSettings={saveSettings} />
<ContextUsageDisplayRow
settings={settings}
saveSettings={saveSettings}
diff --git a/apps/desktop/src/lib/api.ts b/apps/desktop/src/lib/api.ts
index a6ed89649..1cfde9094 100644
--- a/apps/desktop/src/lib/api.ts
+++ b/apps/desktop/src/lib/api.ts
@@ -418,6 +418,12 @@ export type SessionHistoryReadOptions = {
contentLimit?: number;
};
+type TranscriptDisplayMode = NonNullable<AppSettings["transcriptDisplayMode"]>;
+
+function isTranscriptDisplayModeValue(value: unknown): value is TranscriptDisplayMode {
+ return value === "flat" || value === "command-first" || value === "fully-folded";
+}
+
export function normalizeSettings(settings: AppSettings): AppSettings {
return {
...settings,
@@ -425,6 +431,9 @@ export function normalizeSettings(settings: AppSettings): AppSettings {
sidebarRunningBadge: settings.sidebarRunningBadge !== false,
sidebarRunningRail: settings.sidebarRunningRail === true,
keepCommandsExpanded: settings.keepCommandsExpanded !== false,
+ transcriptDisplayMode: isTranscriptDisplayModeValue(settings.transcriptDisplayMode)
+ ? settings.transcriptDisplayMode
+ : "fully-folded",
defaultMode: normalizeMode((settings as { defaultMode?: unknown }).defaultMode),
infiniteProviderRetry:
(settings as { infiniteProviderRetry?: unknown }).infiniteProviderRetry === true,
@@ -466,6 +475,14 @@ export function validateSettingsWrite(settings: AppSettings): AppSettings {
errorCode: "INVALID_PARAMS",
});
}
+ if (
+ Object.prototype.hasOwnProperty.call(settings, "transcriptDisplayMode") &&
+ !isTranscriptDisplayModeValue(settings.transcriptDisplayMode)
+ ) {
+ throw Object.assign(new Error("transcriptDisplayMode is invalid"), {
+ errorCode: "INVALID_PARAMS",
+ });
+ }
const value = settings as AppSettings & {
defaultCommandShell?: unknown;
largePasteThreshold?: unknown;
diff --git a/apps/desktop/src/lib/command-folding.ts b/apps/desktop/src/lib/command-folding.ts
deleted file mode 100644
index e64c68177..000000000
--- a/apps/desktop/src/lib/command-folding.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import type { AppSettings } from "@pi-desktop/shared";
-
-/**
- * Resolve whether shell calls stay outside the tool groups they run among.
- *
- * `keepCommandsExpanded` is the preference; an absent value means `true`, so an
- * existing install keeps the scannable command rows it has today. This is a
- * presentation preference only: it never changes what a tool received, what it
- * returned, stored history, export, or the copy payload.
- *
- * It also never decides whether a turn renders a process disclosure. Both
- * values render exactly one, and only the placement of run rows inside it
- * changes.
- */
-export function resolveKeepCommandsExpanded(
- settings: Pick<AppSettings, "keepCommandsExpanded"> | null | undefined,
-): boolean {
- return settings?.keepCommandsExpanded !== false;
-}
diff --git a/apps/desktop/src/lib/settings-search.ts b/apps/desktop/src/lib/settings-search.ts
index 77c6b3319..7a1ea4531 100644
--- a/apps/desktop/src/lib/settings-search.ts
+++ b/apps/desktop/src/lib/settings-search.ts
@@ -120,8 +120,8 @@ export const SETTINGS_NAV: SettingsNavEntry[] = [
"settings.smoothStreamingDesc",
"settings.showThinking",
"settings.showThinkingDesc",
- "settings.keepCommandsExpanded",
- "settings.keepCommandsExpandedDesc",
+ "settings.transcriptDisplayMode",
+ "settings.transcriptDisplayModeDesc",
"settings.contextUsageDisplay",
"settings.contextUsageDisplayRemaining",
"settings.contextUsageDisplayUsed",
diff --git a/apps/desktop/src/lib/transcript-display-mode.ts b/apps/desktop/src/lib/transcript-display-mode.ts
new file mode 100644
index 000000000..437e49865
--- /dev/null
+++ b/apps/desktop/src/lib/transcript-display-mode.ts
@@ -0,0 +1,29 @@
+import type { AppSettings, TranscriptDisplayMode } from "@pi-desktop/shared";
+
+export type { TranscriptDisplayMode };
+
+const MODES = new Set<TranscriptDisplayMode>([
+ "flat",
+ "command-first",
+ "fully-folded",
+]);
+
+export function isTranscriptDisplayMode(
+ value: unknown,
+): value is TranscriptDisplayMode {
+ return typeof value === "string" && MODES.has(value as TranscriptDisplayMode);
+}
+
+/**
+ * Resolve the transcript process layout.
+ *
+ * The released layout keeps shell calls inside their surrounding activity
+ * group, so an absent or unknown value must fall back to `fully-folded`.
+ * `keepCommandsExpanded` is a deprecated compatibility field and is not read.
+ */
+export function resolveTranscriptDisplayMode(
+ settings: Pick<AppSettings, "transcriptDisplayMode"> | null | undefined,
+): TranscriptDisplayMode {
+ const value = settings?.transcriptDisplayMode;
+ return isTranscriptDisplayMode(value) ? value : "fully-folded";
+}
diff --git a/apps/desktop/src/lib/turn-process.ts b/apps/desktop/src/lib/turn-process.ts
index 1a87885ee..aef11dc7f 100644
--- a/apps/desktop/src/lib/turn-process.ts
+++ b/apps/desktop/src/lib/turn-process.ts
@@ -5,6 +5,7 @@ import type {
AssistantTurnPart,
} from "./assistant-turns";
import { isStandaloneRunActivity } from "./assistant-turns";
+import type { TranscriptDisplayMode } from "./transcript-display-mode";
import { isDelegationStartTool } from "./tool-display";
export function isThinkingActive(message: UiMessage, active: boolean): boolean {
@@ -133,48 +134,42 @@ function coalesceProcessActivityParts(
}
/**
- * Split one turn's process into the order it renders (ADR
- * turn-process-and-thinking-display).
+ * Split one turn's process into the order it renders.
*
- * With `keepCommandsExpanded` the `Bash` and run aliases are pulled out of the
- * process flow: each is its own `run` segment, rendered as a standalone row
- * beside the nested groups rather than inside one, and adjacent calls stay
- * separate. The remaining tools, thinking, hosted searches and progress text
- * keep their original order and are grouped into `process` chunks between the
- * run calls.
+ * `fully-folded` keeps the released v0.20.0 layout: contiguous activity parts
+ * are coalesced into one rendered group, including Bash/run rows, and progress
+ * text remains the only boundary. `flat` returns the original parts so the
+ * renderer can suppress activity-group wrappers while keeping every row in
+ * order. `command-first` pulls every Bash/run row out as its own segment and
+ * leaves the remaining activity in chronological process chunks.
*
- * Without it the run rows keep their place in the flow, so a command is just
- * another row of the group it ran among - the layout before commands were
- * separated at all. Because the entry builder keeps every run row in its own
- * activity part, folding coalesces contiguous ordinary parts into one rendered
- * group here, at render time. Progress messages remain paragraph boundaries and
- * a `Task`/delegation group never absorbs ordinary work around it. The
- * coalesced group is a new part whose end is the last source group's end; the
- * source parts and their items are not mutated.
- *
- * Either way the turn renders one top-level disclosure; only the placement of
- * run rows inside it changes. ON-mode segment parts are the same part objects
- * as the input, so downstream reveal and active-tail identity still hold.
+ * Every mode renders one top-level disclosure. Segment parts keep their source
+ * identity so reveal state and active-tail checks still work.
*/
export function segmentTurnProcess(
parts: readonly AssistantTurnPart[],
- keepCommandsExpanded: boolean,
+ mode: TranscriptDisplayMode,
): TurnProcessSegment[] {
- if (!keepCommandsExpanded) {
- const first = parts[0];
- if (!first) return [];
- const key =
- first.kind === "activity" ? first.items[0].message.id : first.message.id;
+ const first = parts[0];
+ if (!first) return [];
+ const key =
+ first.kind === "activity" ? first.items[0].message.id : first.message.id;
+ if (mode === "fully-folded") {
return [{ kind: "process", key, parts: coalesceProcessActivityParts(parts) }];
}
+ if (mode === "flat") {
+ // One outer process; the flat renderer suppresses every activity-group
+ // wrapper, so keep the original part order and message boundaries.
+ return [{ kind: "process", key, parts: [...parts] }];
+ }
const segments: TurnProcessSegment[] = [];
let pending: AssistantTurnPart[] = [];
const flushProcess = () => {
if (pending.length === 0) return;
- const first = pending[0];
- const key =
- first.kind === "activity" ? first.items[0].message.id : first.message.id;
- segments.push({ kind: "process", key, parts: pending });
+ const first2 = pending[0];
+ const key2 =
+ first2.kind === "activity" ? first2.items[0].message.id : first2.message.id;
+ segments.push({ kind: "process", key: key2, parts: pending });
pending = [];
};
for (const part of parts) {
diff --git a/apps/desktop/src/styles/messages.css b/apps/desktop/src/styles/messages.css
index 7e6ff2e2a..1a504010a 100644
--- a/apps/desktop/src/styles/messages.css
+++ b/apps/desktop/src/styles/messages.css
@@ -676,6 +676,63 @@
/* Running labels stay readable; the small marker carries the live feedback
so long tool names never flash between two text colours. */
.tool-activity-label.running,
+.text-shimmer {
+ display: inline-grid;
+ min-width: 0;
+ vertical-align: baseline;
+ white-space: nowrap;
+}
+.text-shimmer > span {
+ grid-area: 1 / 1;
+ white-space: pre;
+}
+.text-shimmer-base {
+ color: inherit;
+ opacity: 1;
+ transition: opacity 220ms ease-out;
+}
+.text-shimmer-peak {
+ color: transparent;
+ background-image:
+ linear-gradient(
+ 90deg,
+ transparent calc(50% - 5.2ch),
+ var(--ds-text-primary) 50%,
+ transparent calc(50% + 5.2ch)
+ ),
+ linear-gradient(var(--ds-text-secondary), var(--ds-text-secondary));
+ background-size: 360% 100%, 100% 100%;
+ background-position: 100% 0, 0 0;
+ background-repeat: no-repeat;
+ -webkit-background-clip: text;
+ background-clip: text;
+ -webkit-text-fill-color: transparent;
+ animation: text-shimmer-sweep 1.2s linear infinite;
+ opacity: 1;
+ transition: opacity 220ms ease-out;
+ will-change: background-position;
+}
+.text-shimmer[data-active="true"] .text-shimmer-base {
+ opacity: 0;
+}
+.text-shimmer[data-active="false"] .text-shimmer-peak {
+ animation: none;
+ opacity: 0;
+}
+@keyframes text-shimmer-sweep {
+ from { background-position: 100% 0, 0 0; }
+ to { background-position: 0 0, 0 0; }
+}
+@media (prefers-reduced-motion: reduce) {
+ .text-shimmer-peak {
+ animation: none !important;
+ opacity: 0 !important;
+ }
+ .text-shimmer-base {
+ opacity: 1 !important;
+ }
+}
+
.tool-row-name.running {
color: var(--ds-text-secondary);
}
diff --git a/apps/desktop/test/settings-roundtrip.test.mjs b/apps/desktop/test/settings-roundtrip.test.mjs
index b1e901f45..5db8556fc 100644
--- a/apps/desktop/test/settings-roundtrip.test.mjs
+++ b/apps/desktop/test/settings-roundtrip.test.mjs
@@ -91,6 +91,43 @@ test("command folding defaults on and rejects non-boolean writes before IPC", ()
}
});
+test("transcript display mode defaults to fully folded and validates its three values", () => {
+ const previousWindow = globalThis.window;
+ globalThis.window = { piDesktop: { platform: "win32" } };
+ try {
+ const base = { defaultMode: "agent", theme: "light", enterToSend: true };
+ assert.equal(renderer.normalizeSettings(base).transcriptDisplayMode, "fully-folded");
+ assert.equal(main.normalizeSettings(base).transcriptDisplayMode, "fully-folded");
+ for (const mode of ["flat", "command-first", "fully-folded"]) {
+ assert.equal(
+ renderer.normalizeSettings({ ...base, transcriptDisplayMode: mode }).transcriptDisplayMode,
+ mode,
+ );
+ assert.equal(
+ main.normalizeSettings({ ...base, transcriptDisplayMode: mode }).transcriptDisplayMode,
+ mode,
+ );
+ assert.equal(
+ renderer.validateSettingsWrite({ ...base, transcriptDisplayMode: mode }).transcriptDisplayMode,
+ mode,
+ );
+ }
+ for (const value of ["yes", 0, null, undefined, {}]) {
+ assert.throws(
+ () => renderer.validateSettingsWrite({ transcriptDisplayMode: value }),
+ /transcriptDisplayMode is invalid/,
+ );
+ assert.throws(
+ () => main.validateSettingsWrite({ transcriptDisplayMode: value }),
+ /transcriptDisplayMode is invalid/,
+ );
+ }
+ } finally {
+ if (previousWindow === undefined) delete globalThis.window;
+ else globalThis.window = previousWindow;
+ }
+});
+
test("settings write round-trips command folding through the preload boundary", async () => {
const previousWindow = globalThis.window;
const calls = [];
diff --git a/apps/desktop/test/thinking-ui.test.mjs b/apps/desktop/test/thinking-ui.test.mjs
index 04dfcbfb9..a0773f7af 100644
--- a/apps/desktop/test/thinking-ui.test.mjs
+++ b/apps/desktop/test/thinking-ui.test.mjs
@@ -281,7 +281,7 @@ test("tool and search rows stay collapsed while thinking keeps its leaf default"
assert.match(transcriptSource, /useAutomaticDisclosure\(\s*hasSubagentTopology \? live : visibleItems\.length <= 1/);
assert.match(
transcriptSource,
- /<ThinkingRow[\s\S]*?autoOpen=\{live && item === lastItem\}/,
+ /<ThinkingRow[\s\S]*?autoOpen=\{thinkingDefaultOpen \|\| \(live && item === lastItem\)\}/,
);
// The leaf default stays with thinking only; a tool, hosted-search or plan
// row waits for an explicit user action in either mode.
diff --git a/apps/desktop/test/command-folding-settings.test.mjs b/apps/desktop/test/transcript-display-mode-settings.test.mjs
similarity index 68%
rename from apps/desktop/test/command-folding-settings.test.mjs
rename to apps/desktop/test/transcript-display-mode-settings.test.mjs
index cce05f996..266bef976 100644
--- a/apps/desktop/test/command-folding-settings.test.mjs
+++ b/apps/desktop/test/transcript-display-mode-settings.test.mjs
@@ -17,7 +17,7 @@ const { flattenCatalog } = await import(
const copy = flattenCatalog(en);
const t = (key) => copy[key] ?? key;
-test("command folding is searchable from the AI preferences beside show thinking", () => {
+test("transcript display mode is searchable from the AI preferences beside show thinking", () => {
const ai = SETTINGS_NAV.find((entry) => entry.id === "ai");
assert.ok(ai, "AI settings entry is registered");
const showThinkingAt = ai.keywordKeys.indexOf("settings.showThinking");
@@ -27,28 +27,28 @@ test("command folding is searchable from the AI preferences beside show thinking
[
"settings.showThinking",
"settings.showThinkingDesc",
- "settings.keepCommandsExpanded",
- "settings.keepCommandsExpandedDesc",
+ "settings.transcriptDisplayMode",
+ "settings.transcriptDisplayModeDesc",
],
);
- const titleHits = searchSettings("collapse commands", t, {
+ const titleHits = searchSettings("transcript display", t, {
developerMode: false,
includeDevelopmentOnly: false,
}).filter((hit) => hit.tab === "ai");
assert.ok(
- titleHits.some((hit) => hit.rowKey === "settings.keepCommandsExpanded"),
- "the command-folding title is searchable",
+ titleHits.some((hit) => hit.rowKey === "settings.transcriptDisplayMode"),
+ "the transcript-display title is searchable",
);
- const descriptionHits = searchSettings("shell calls", t, {
+ const descriptionHits = searchSettings("assistant process", t, {
developerMode: false,
includeDevelopmentOnly: false,
}).filter((hit) => hit.tab === "ai");
assert.ok(
descriptionHits.some(
- (hit) => hit.rowKey === "settings.keepCommandsExpandedDesc",
+ (hit) => hit.rowKey === "settings.transcriptDisplayModeDesc",
),
- "the command-folding description is searchable",
+ "the transcript-display description is searchable",
);
});
diff --git a/apps/desktop/test/transcript-display-mode.test.mjs b/apps/desktop/test/transcript-display-mode.test.mjs
new file mode 100644
index 000000000..062920153
--- /dev/null
+++ b/apps/desktop/test/transcript-display-mode.test.mjs
@@ -0,0 +1,44 @@
+import assert from "node:assert/strict";
+import { register } from "node:module";
+import test from "node:test";
+register(new URL("./helpers/ts-import-hooks.mjs", import.meta.url));
+const {
+ isTranscriptDisplayMode,
+ resolveTranscriptDisplayMode,
+} = await import("../src/lib/transcript-display-mode.ts");
+
+test("transcript display mode defaults to the released fully-folded layout", () => {
+ assert.equal(resolveTranscriptDisplayMode(undefined), "fully-folded");
+ assert.equal(resolveTranscriptDisplayMode({}), "fully-folded");
+ assert.equal(
+ resolveTranscriptDisplayMode({ transcriptDisplayMode: "unknown" }),
+ "fully-folded",
+ );
+ assert.equal(
+ resolveTranscriptDisplayMode({ transcriptDisplayMode: "flat" }),
+ "flat",
+ );
+ assert.equal(
+ resolveTranscriptDisplayMode({ transcriptDisplayMode: "command-first" }),
+ "command-first",
+ );
+ assert.equal(
+ resolveTranscriptDisplayMode({ transcriptDisplayMode: "fully-folded" }),
+ "fully-folded",
+ );
+});
+
+test("the deprecated command-folding preference cannot select a mode", () => {
+ assert.equal(
+ resolveTranscriptDisplayMode({ keepCommandsExpanded: true }),
+ "fully-folded",
+ );
+ assert.equal(
+ resolveTranscriptDisplayMode({ keepCommandsExpanded: false }),
+ "fully-folded",
+ );
+ assert.equal(isTranscriptDisplayMode("flat"), true);
+ assert.equal(isTranscriptDisplayMode("command-first"), true);
+ assert.equal(isTranscriptDisplayMode("fully-folded"), true);
+ assert.equal(isTranscriptDisplayMode("compact"), false);
+});
diff --git a/apps/desktop/test/transcript-display-modes-ui.test.mjs b/apps/desktop/test/transcript-display-modes-ui.test.mjs
new file mode 100644
index 000000000..8bd614632
--- /dev/null
+++ b/apps/desktop/test/transcript-display-modes-ui.test.mjs
@@ -0,0 +1,54 @@
+import { readTranscriptModule } from "./helpers/source-contracts.mjs";
+import assert from "node:assert/strict";
+import { readFile } from "node:fs/promises";
+import test from "node:test";
+import { loadStyles } from "./helpers/styles.mjs";
+
+const activityGroupSource = await readTranscriptModule("ActivityGroup.tsx");
+const activityItemsSource = await readTranscriptModule("ActivityItems.tsx");
+const assistantTurnSource = await readTranscriptModule("AssistantTurn.tsx");
+const thinkingRowSource = await readTranscriptModule("shared.tsx");
+const shimmerSource = await readFile(
+ new URL("../src/features/chat/transcript/TextShimmer.tsx", import.meta.url),
+ "utf8",
+);
+const turnProcessSource = await readFile(
+ new URL("../src/lib/turn-process.ts", import.meta.url),
+ "utf8",
+);
+const stylesSource = await loadStyles();
+
+test("flat mode renders one outer process and no activity-group wrapper", () => {
+ assert.match(assistantTurnSource, /resolveTranscriptDisplayMode/);
+ assert.match(assistantTurnSource, /segmentTurnProcess\(process, displayMode\)/);
+ assert.match(activityGroupSource, /displayMode === "flat"/);
+ assert.match(activityGroupSource, /return <>\{renderedItems\}<\/>/);
+ assert.match(turnProcessSource, /mode === "flat"/);
+ assert.match(turnProcessSource, /parts: \[\.\.\.parts\]/);
+});
+
+test("command-first and fully-folded use distinct process segmentation", () => {
+ assert.match(turnProcessSource, /mode === "fully-folded"/);
+ assert.match(turnProcessSource, /coalesceProcessActivityParts\(parts\)/);
+ assert.match(turnProcessSource, /isStandaloneRunActivity\(item\)/);
+});
+
+test("thinking expands by default outside fully-folded mode", () => {
+ assert.match(activityGroupSource, /displayMode !== "fully-folded"/);
+ assert.match(activityGroupSource, /thinkingDefaultOpen=\{thinkingDefaultOpen\}/);
+ assert.match(activityItemsSource, /autoOpen=\{thinkingDefaultOpen \|\| \(live && item === lastItem\)\}/);
+});
+
+test("thinking collapsed state uses the whole-run TextShimmer, not a spinner", () => {
+ assert.match(thinkingRowSource, /import \{ TextShimmer \} from "\.\/TextShimmer"/);
+ assert.match(thinkingRowSource, /active=\{streaming && !open\}/);
+ assert.match(thinkingRowSource, /thinking-compact[\s\S]*?<TextShimmer/);
+ assert.doesNotMatch(thinkingRowSource, /tool-row-name running/);
+ assert.match(shimmerSource, /text-shimmer-base/);
+ assert.match(shimmerSource, /text-shimmer-peak/);
+ assert.match(shimmerSource, /data-active/);
+ assert.match(stylesSource, /\.text-shimmer \{/);
+ assert.match(stylesSource, /animation: text-shimmer-sweep 1\.2s linear infinite/);
+ assert.match(stylesSource, /transition: opacity 220ms ease-out/);
+ assert.match(stylesSource, /prefers-reduced-motion: reduce[\s\S]*?\.text-shimmer-peak/);
+});
diff --git a/apps/desktop/test/turn-process.test.mjs b/apps/desktop/test/turn-process.test.mjs
index c2fb32b68..b07bf4dad 100644
--- a/apps/desktop/test/turn-process.test.mjs
+++ b/apps/desktop/test/turn-process.test.mjs
@@ -154,7 +154,7 @@ test("process segments pull every Bash row out and keep chronological chunks", (
tool("bash", "Bash", { toolArgs: { command: "ls" } }),
tool("edit", "Edit", { toolResult: "c" }),
]);
- const segments = segmentTurnProcess(projectTurnProcess(entry).process, true);
+ const segments = segmentTurnProcess(projectTurnProcess(entry).process, "command-first");
assert.deepEqual(
segments.map((segment) => segment.kind),
["process", "run", "process"],
@@ -177,7 +177,7 @@ test("a Bash-only turn has no process segment at all", () => {
tool("bash1", "Bash", { toolArgs: { command: "a" } }),
tool("bash2", "Bash", { toolArgs: { command: "b" } }),
]);
- const segments = segmentTurnProcess(projectTurnProcess(entry).process, true);
+ const segments = segmentTurnProcess(projectTurnProcess(entry).process, "command-first");
assert.deepEqual(
segments.map((segment) => segment.kind),
["run", "run"],
@@ -190,7 +190,7 @@ test("a turn without Bash keeps one process segment", () => {
tool("read", "Read", { toolResult: "a" }),
tool("grep", "Grep", { toolResult: "b" }),
]);
- const segments = segmentTurnProcess(projectTurnProcess(entry).process, true);
+ const segments = segmentTurnProcess(projectTurnProcess(entry).process, "command-first");
assert.deepEqual(
segments.map((segment) => segment.kind),
["process"],
@@ -284,7 +284,7 @@ test("folding commands coalesces mixed work across run rows without mutating ent
Object.freeze(part);
}
Object.freeze(process);
- const [segment] = segmentTurnProcess(process, false);
+ const [segment] = segmentTurnProcess(process, "fully-folded");
assert.equal(segment.kind, "process");
// Progress text stays a paragraph boundary, so the run joins the group before
// it rather than the one after it.
@@ -313,12 +313,12 @@ test("folding commands coalesces mixed work across run rows without mutating ent
);
// ON is unchanged: the original chunks are still separate and the run row is
// still a standalone segment with its original item identity.
- const on = segmentTurnProcess(process, true);
+ const on = segmentTurnProcess(process, "command-first");
assert.deepEqual(on.map((part) => part.kind), ["process", "run", "process"]);
assert.equal(on[0].parts[0], process[0]);
assert.equal(on[0].parts[1], process[1]);
assert.equal(on[1].item, sourceActivities[1].items[0]);
- const again = segmentTurnProcess(process, true);
+ const again = segmentTurnProcess(process, "command-first");
assert.deepEqual(again.map((part) => part.kind), on.map((part) => part.kind));
assert.equal(again[0].parts[0], process[0]);
});
@@ -339,7 +339,7 @@ test("folding commands keeps Task topology and progress text as group boundaries
]);
const [segment] = segmentTurnProcess(
projectTurnProcess(entry).process,
- false,
+ "fully-folded",
);
const activityIds = segment.parts.flatMap((part) =>
part.kind === "activity"
@@ -359,6 +359,26 @@ test("folding commands keeps Task topology and progress text as group boundaries
assert.equal(task.items[0].delegate.items[0].message.id, "nested");
});
+test("flat keeps the original part order and never extracts a run", () => {
+ const entry = turn([
+ message("user", "user", "Run"),
+ tool("read", "Read", { toolResult: "a" }),
+ tool("bash", "Bash", { toolArgs: { command: "pnpm test" } }),
+ message("progress", "assistant", "Progress"),
+ tool("edit", "Edit", { toolResult: "b" }),
+ ]);
+ const process = projectTurnProcess(entry).process;
+ const [segment] = segmentTurnProcess(process, "flat");
+ assert.equal(segment.kind, "process");
+ assert.equal(segment.parts.length, process.length);
+ assert.ok(segment.parts.every((part, index) => part === process[index]));
+ assert.deepEqual(
+ segment.parts.map((part) => part.kind),
+ ["activity", "activity", "message", "activity"],
+ );
+ assert.equal(segment.parts[1].items[0].message.id, "bash");
+});
+
test("a Bash-only turn keeps one segment whether commands are expanded or not", () => {
const entry = turn([
message("user", "user", "Run"),
@@ -366,13 +386,13 @@ test("a Bash-only turn keeps one segment whether commands are expanded or not",
tool("bash2", "Bash", { toolArgs: { command: "b" } }),
]);
const process = projectTurnProcess(entry).process;
- assert.deepEqual(segmentTurnProcess(process, true).map((s) => s.kind), ["run", "run"]);
- assert.deepEqual(segmentTurnProcess(process, false).map((s) => s.kind), ["process"]);
+ assert.deepEqual(segmentTurnProcess(process, "command-first").map((s) => s.kind), ["run", "run"]);
+ assert.deepEqual(segmentTurnProcess(process, "fully-folded").map((s) => s.kind), ["process"]);
});
test("an empty process segments to nothing in either mode", () => {
- assert.deepEqual(segmentTurnProcess([], false), []);
- assert.deepEqual(segmentTurnProcess([], true), []);
+ assert.deepEqual(segmentTurnProcess([], "fully-folded"), []);
+ assert.deepEqual(segmentTurnProcess([], "command-first"), []);
});
test("the turn header reports failure, stop, live and completion in that order", () => {
diff --git a/crates/host-core/src/config_sync/domains.rs b/crates/host-core/src/config_sync/domains.rs
index 076441bee..7c5d09df6 100644
--- a/crates/host-core/src/config_sync/domains.rs
+++ b/crates/host-core/src/config_sync/domains.rs
@@ -35,6 +35,7 @@ pub(crate) const PORTABLE_APPLICATION_FIELDS: &[&str] = &[
"fontScale",
"showThinking",
"thinkingDisplayMode",
+ "transcriptDisplayMode",
"keepCommandsExpanded",
"enterToSend",
"largePasteThreshold",
@@ -101,6 +102,7 @@ pub const DOMAIN_ADAPTERS: &[DomainAdapterSpec] = &[
"fontScale",
"showThinking",
"thinkingDisplayMode",
+ "transcriptDisplayMode",
"enterToSend",
"keepCommandsExpanded",
"keybindings",
@@ -628,14 +630,18 @@ mod tests {
fn adapter_registry_covers_every_portable_domain() {
assert_eq!(DOMAIN_ADAPTERS.len(), ALL_DOMAINS.len());
assert!(!PORTABLE_APPLICATION_FIELDS.contains(&"defaultPermissionMode"));
- // The explicit reasoning-display boolean, its legacy fallback, and the
- // command-folding preference are portable, and each is advertised by the
- // application adapter.
+ // The reasoning-display boolean, its legacy fallback, the transcript
+ // display mode and the deprecated command-folding preference are portable,
+ // and each is advertised by the application adapter.
assert!(PORTABLE_APPLICATION_FIELDS.contains(&"showThinking"));
+ assert!(PORTABLE_APPLICATION_FIELDS.contains(&"transcriptDisplayMode"));
assert!(PORTABLE_APPLICATION_FIELDS.contains(&"thinkingDisplayMode"));
assert!(PORTABLE_APPLICATION_FIELDS.contains(&"keepCommandsExpanded"));
let application = adapter_for(DOMAIN_APPLICATION).expect("application adapter");
assert!(application.exportable_fields.contains(&"showThinking"));
+ assert!(application
+ .exportable_fields
+ .contains(&"transcriptDisplayMode"));
assert!(application
.exportable_fields
.contains(&"thinkingDisplayMode"));
diff --git a/crates/host-core/src/config_sync/engine_s3_tests.rs b/crates/host-core/src/config_sync/engine_s3_tests.rs
index b5ad1b539..b158dbe25 100644
--- a/crates/host-core/src/config_sync/engine_s3_tests.rs
+++ b/crates/host-core/src/config_sync/engine_s3_tests.rs
@@ -130,6 +130,7 @@ async fn application_show_thinking_roundtrips_and_keeps_local_only_settings() ->
"theme": "light",
"showThinking": false,
"thinkingDisplayMode": "detailed",
+ "transcriptDisplayMode": "command-first",
"keepCommandsExpanded": false,
"defaultPermissionMode": "accept-edits",
}),
@@ -144,6 +145,7 @@ async fn application_show_thinking_roundtrips_and_keeps_local_only_settings() ->
assert_eq!(settings["theme"], "light");
// A false boolean survives capture and apply instead of reading as absent.
assert_eq!(settings["showThinking"], false);
+ assert_eq!(settings["transcriptDisplayMode"], "command-first");
assert_eq!(settings["keepCommandsExpanded"], false);
// The legacy field is still exported so older readers keep working.
assert_eq!(settings["thinkingDisplayMode"], "detailed");
@@ -157,6 +159,7 @@ async fn application_show_thinking_roundtrips_and_keeps_local_only_settings() ->
"theme": "light",
"showThinking": false,
"thinkingDisplayMode": "detailed",
+ "transcriptDisplayMode": "command-first",
"keepCommandsExpanded": false,
"defaultPermissionMode": "ask",
}),
@@ -168,6 +171,7 @@ async fn application_show_thinking_roundtrips_and_keeps_local_only_settings() ->
"theme": "light",
"showThinking": true,
"thinkingDisplayMode": "detailed",
+ "transcriptDisplayMode": "flat",
"keepCommandsExpanded": true,
"defaultPermissionMode": "accept-edits",
}),
@@ -178,6 +182,7 @@ async fn application_show_thinking_roundtrips_and_keeps_local_only_settings() ->
let settings = app_settings(&state)?;
assert_eq!(settings["showThinking"], true);
assert_eq!(settings["thinkingDisplayMode"], "detailed");
+ assert_eq!(settings["transcriptDisplayMode"], "flat");
assert_eq!(settings["keepCommandsExpanded"], true);
assert_eq!(settings["defaultPermissionMode"], "ask");
Ok(())
diff --git a/docs/adr/0149-calm-transcript-running-status-motion.md b/docs/adr/0149-calm-transcript-running-status-motion.md
index 07ec1f847..de5d428ac 100644
--- a/docs/adr/0149-calm-transcript-running-status-motion.md
+++ b/docs/adr/0149-calm-transcript-running-status-motion.md
@@ -2,6 +2,7 @@
- Status: Accepted
- Date: 2026-09-04
+- Amended: 2026-10-21
- Deciders: PI-Desktop core
- Related: D071, D290, E2E-053, E2E-083
@@ -23,9 +24,13 @@ status marker with a one-second opacity pulse instead of a text shimmer. Tool
spinners, run-row status dots, and the assistant streaming rail keep their
existing state feedback.
-All new marker motion is disabled under `prefers-reduced-motion: reduce`; the
-text and static marker remain visible so state is never conveyed by motion
-alone. No protocol, persistence, runtime, or localization contract changes.
+The Thinking indicator is the explicit exception: the collapsed/live Thinking
+label uses a whole-run `TextShimmer` with a 1.2s sweep and 220ms fade, defined by
+`turn-process-and-thinking-display` (2026-10-21). It does not move the highlight
+glyph by glyph. All marker and shimmer motion is disabled under
+`prefers-reduced-motion: reduce`; the text and static marker remain visible so
+state is never conveyed by motion alone. No protocol, persistence, runtime, or
+localization contract changes.
## Consequences
diff --git a/docs/adr/turn-process-and-thinking-display.md b/docs/adr/turn-process-and-thinking-display.md
index 09613bb79..01a8a399f 100644
--- a/docs/adr/turn-process-and-thinking-display.md
+++ b/docs/adr/turn-process-and-thinking-display.md
@@ -30,29 +30,45 @@ boundaries.
One turn renders exactly one process disclosure. Every row the turn produced
before its answer lives inside it — the activity groups and the `Bash` run rows
alike — so a long turn collapses in one gesture instead of leaving a column of
-sibling disclosures above the answer. The answer itself stays outside it.
-
-Inside that disclosure, non-Bash activity forms ordinary activity groups: one
-contiguous tool/search/thinking segment between progress paragraphs or run rows,
-appearing only when at least two items are visible under the current thinking
-preference. A singleton uses its item disclosure directly; hidden thinking does
-not create a redundant wrapper. Existing Task topology remains its segment's
-container and is not duplicated inside an ordinary activity group.
-
-Whether a run row sits *inside* its group or *beside* it is the
-`keepCommandsExpanded` preference, which defaults to on. When on, `Bash` and run
-aliases are lifted out of the groups they ran among: each becomes its own row at
-the disclosure's top level, adjacent calls stay separate, and the row's detail
-stays closed until the user opens it. When off, a run row keeps its place in the
-flow, so a command reads as another line of the group around it — the layout
-before commands were separated. The preference never changes how many
-disclosures a turn renders: both values render exactly one.
-
-Group folding defaults are unified and do not depend on either preference. The
-ordinary activity group that owns the active execution segment starts open, then
-closes on completion only while untouched. 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.
+sibling disclosures above the answer. The answer itself stays outside it. An
+untouched process closes when the turn completes, so only the final answer
+remains; when the turn produced no final text, the process header and its error
+or pending-action surfaces remain visible.
+
+Inside that disclosure, the display mode decides how activity is grouped.
+`AppSettings.transcriptDisplayMode` is one of `flat`, `command-first`, or
+`fully-folded`; an absent or unknown value resolves to `fully-folded`, the
+layout released in v0.20.0. Every mode renders exactly one outer disclosure.
+
+- In `fully-folded`, contiguous activity forms ordinary activity groups: one
+ contiguous tool/search/thinking/Bash segment between ordinary assistant
+ progress paragraphs. A `Bash`/run row stays inside the group around it, so a
+ command reads as another line of that group. Existing Task topology remains
+ its segment's container and is not duplicated inside an ordinary activity
+ group.
+- In `command-first`, ordinary activity groups still render, but every
+ `Bash`/run alias is lifted out as a standalone row beside them: adjacent calls
+ stay separate and a row's detail stays closed until the user opens it. A
+ normal assistant progress message and a command both end the current group.
+- In `flat`, no nested activity groups render at all. The outer disclosure lists
+ active tools, commands, thinking and progress rows in transcript order, with
+ tool details collapsed.
+
+In `command-first` and `fully-folded`, a group appears only when at least two
+items are visible under the current thinking preference. A singleton uses its
+item disclosure directly, and hidden thinking does not create a redundant
+wrapper.
+
+`keepCommandsExpanded` is deprecated. It is retained only so persisted settings
+still load, is no longer exposed in Settings, and is not read for rendering; new
+writes store `transcriptDisplayMode`.
+
+Group folding defaults are unified across modes and do not depend on the
+thinking preference. Where a group renders, the group that owns the active
+execution segment starts open, then closes on completion only while untouched.
+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
@@ -71,18 +87,25 @@ The disclosure and the levels it reveals share one left edge. Hierarchy is
carried by type size and colour, not by indentation, so a nested group header and
a run row start exactly where the turn header does.
-The thinking preference is a boolean `showThinking`. When it is false, the live
-thinking indicator stays visible, while completed thinking rows and excerpts are
-hidden and empty thinking-only containers are omitted; the stored reasoning is
-retained, so turning the preference back on restores the completed rows and
-excerpts. Hidden thinking never creates an empty group wrapper.
+The thinking preference is a boolean `showThinking`. With it on, `flat` and
+`command-first` expand every Thinking row by default and let the user collapse
+them; an expanded row shows the full reasoning markdown, while a collapsed row
+shows only the Thinking indicator with no summary or excerpt. `fully-folded`
+keeps the released exception: earlier Thinking rows stay collapsed, and the last
+active Thinking row opens only while it is the live step, so completed rows
+collapse. With the preference off, no completed reasoning row renders; only a
+live whole-run `TextShimmer` `Thinking` indicator remains while reasoning is
+actively streaming. The shimmer is a 1.2s linear sweep with a 220ms fade — no
+spinner, pulsing dot, or per-character animation — and stays static under
+reduced motion. The stored reasoning is retained, so turning the preference back
+on restores the rows. Hidden thinking never creates an empty group wrapper.
The leaf default that an earlier decision first introduced was later removed.
-Item payloads never open themselves: a tool-call, hosted-search or plan row
-stays a header row until the user opens it, wherever it sits in the group, and
-this holds regardless of the thinking preference. Group defaults are unchanged,
-and opening a closed ancestor still exposes the retained item choices without
-opening all descendants.
+Except for the display-mode Thinking defaults above, item payloads never open
+themselves: a tool-call, hosted-search or plan row stays a header row until the
+user opens it, wherever it sits in the group, and this holds regardless of the
+thinking preference. Group defaults are unchanged, and opening a closed ancestor
+still exposes the retained item choices without opening all descendants.
Each header toggles only its own level. Parent and child states are independent:
closing a parent preserves descendant choices, reopening restores them, and
@@ -95,8 +118,9 @@ Pane eviction, session deletion, or renderer restart releases this presentation
memory; it is not stored in messages or host settings.
Search/navigation reveals the ancestor path its target needs: the turn process
-and the activity group that own the named message. Item-level targeting is not
-part of this change, so each row's own details stay behind its own disclosure.
+and, where one exists, the activity group that own the named message. Item-level
+targeting is not part of this change, so each row's own details stay behind its
+own disclosure.
Replaying the same request does not repeatedly override a later manual close.
Reasoning hidden by the preference stays hidden until the user turns
`showThinking` on. Assistant errors, stopped trailing partial answers,
@@ -104,34 +128,45 @@ permission/question/plan/goal decisions, and any other pending action surface
remain outside hidden process content and reachable without expanding it.
Settings → AI → Defaults exposes a `Show thinking` boolean that persists as the
-optional `showThinking` `AppSettings` field. Absent and non-boolean values fall
-back to the legacy `thinkingDisplayMode` field: an explicit `compact` hides
-reasoning while `detailed`, an unknown value, or an absent field shows it. The
-legacy field is retained for persisted-settings compatibility and is no longer
-exposed in the UI. The preference changes presentation only; it does not alter
-provider thinking levels, runtime/model context, stored reasoning, export,
-permissions, execution, or copy payloads, and it 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.
+optional `showThinking` `AppSettings` field, and a `Transcript display`
+segmented control with the labels `Flat`, `Commands first`, and `Fully folded`
+that persists the optional `transcriptDisplayMode` field. Absent and invalid
+`transcriptDisplayMode` values resolve to `fully-folded` in both the renderer and
+main-process settings normalizers. Absent and non-boolean values for
+`showThinking` fall back to the legacy `thinkingDisplayMode` field: an explicit
+`compact` hides reasoning while `detailed`, an unknown value, or an absent field
+shows it. The legacy `thinkingDisplayMode` and deprecated
+`keepCommandsExpanded` fields are retained for persisted-settings compatibility
+and are no longer exposed in the UI. `keepCommandsExpanded` is also no longer
+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.
## Consequences
- One disclosure per turn keeps the final answer and actionable interruptions
reachable, and makes a long turn collapsible in a single gesture.
-- Group folding defaults are unified: active work stays visible, untouched
- completed groups fold by default, and explicit disclosure choices are preserved
- regardless of the thinking preference. Closing the turn's disclosure closes the
- groups under it, and reopening restores the groups the user had opened.
-- When `showThinking` is false, the live indicator stays visible while completed
- reasoning rows and excerpts are hidden. The stored reasoning is retained and
- reappears when the preference is turned back on.
-- With `keepCommandsExpanded` on (the default), run aliases render as their own
- rows so shell-heavy turns stay scannable; turning it off restores the older
- layout where a command reads as another line of its group. Neither value
- changes the number of disclosures, and because the preference is read while
- rendering rather than while building entries, toggling it repaints the
- transcript immediately instead of waiting for new messages.
+- Group folding defaults are unified across display modes: active work stays
+ visible, untouched completed groups fold by default, and explicit disclosure
+ choices are preserved regardless of the thinking preference. Closing the
+ turn's disclosure closes the groups under it, and reopening restores the groups
+ the user had opened.
+- With `showThinking` off, no completed reasoning row renders; only the live
+ whole-run TextShimmer `Thinking` indicator remains while reasoning streams.
+ Stored reasoning is retained and reappears when the preference is turned back
+ on.
+- `transcriptDisplayMode` keeps the three layouts available and defaults to the
+ released `fully-folded` layout. `flat` removes nested groups, `command-first`
+ lifts commands to standalone rows, and `fully-folded` keeps commands in their
+ groups; all three render exactly one disclosure, and reading the mode while
+ rendering repaints the transcript immediately instead of waiting for new
+ 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.
@@ -157,8 +192,13 @@ the i18n catalog tests cover the new `settings.showThinking` copy. The UI,
resolver, and E2E scenarios are validated on the integration candidate; see
E2E-CHAT-turn-process-and-thinking-display for the synchronized scenario text.
For the 2026-10-21 amendment, `apps/desktop/test/turn-process.test.mjs` covers
-one-disclosure segmentation, command-folding on and off, and header phase
-precedence; `apps/desktop/test/transcript-style.test.mjs` covers the shared left
-edge and the removed live item echo. The interactive transcript probes cover the
-rendered disclosure count, command placement, and header labels. See
+mode segmentation, including `flat`, `command-first` and `fully-folded`, and
+header phase precedence. `apps/desktop/test/transcript-display-modes-ui.test.mjs`
+covers the renderer wiring for distinct mode segmentation, Thinking-row defaults
+and the whole-run `TextShimmer` used for a collapsed or hidden Thinking
+indicator.
+`apps/desktop/test/transcript-display-mode-settings.test.mjs` covers the
+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.
diff --git a/docs/spec/03-runtime/04-data-storage.md b/docs/spec/03-runtime/04-data-storage.md
index 66d44cfb4..3d7cc6472 100644
--- a/docs/spec/03-runtime/04-data-storage.md
+++ b/docs/spec/03-runtime/04-data-storage.md
@@ -415,12 +415,17 @@ reasoning visibility. It is a portable application preference and synchronizes
across devices like the legacy field. Missing values fall back to the legacy
`thinkingDisplayMode` field (`compact` hides, `detailed`/unknown/absent shows),
which is retained only for persisted-settings compatibility and as that
-fallback. The app settings JSON optionally stores `keepCommandsExpanded`
-(boolean) for command-row placement inside a turn's process disclosure: absent
-means on, so `Bash` and run aliases stay on their own rows beside the activity
-groups; `false` folds them into their groups. It is a portable application
-preference and changes presentation only. These additive display preferences
-neither rewrite stored reasoning nor change the database schema.
+fallback. The app settings JSON also optionally stores `transcriptDisplayMode`
+(`flat` | `command-first` | `fully-folded`) for transcript process grouping:
+`flat` renders no nested activity groups, `command-first` renders `Bash`/run rows
+as standalone rows beside activity groups, and `fully-folded` keeps each command
+inside the group around it. Missing or unknown values normalize to
+`fully-folded` in both the renderer and main-process settings normalizers. It is
+a portable application preference and changes presentation only. The deprecated
+`keepCommandsExpanded` boolean is retained only for persisted-settings
+compatibility; it is no longer exposed in Settings and no longer read for
+rendering. These additive display preferences neither rewrite stored reasoning
+nor change the database schema.
The settings blob may still contain legacy prompt-enhancement keys from an
earlier release. They are retained for rollback and downgrade compatibility,
diff --git a/docs/spec/04-ux/06-settings-ia.md b/docs/spec/04-ux/06-settings-ia.md
index 060541c06..c07857e79 100644
--- a/docs/spec/04-ux/06-settings-ia.md
+++ b/docs/spec/04-ux/06-settings-ia.md
@@ -284,8 +284,9 @@ Settings is a **full-window page** that replaces the app sidebar + main chrome (
control column.
- **Defaults** card: the host-backed default operating mode (Agent / Plan / Goal),
command shell selection, Link open destination, context usage display
- (remaining or used), the Show thinking toggle, Enter-to-send control, the
- infinite provider retry switch, and the large text paste threshold. The
+ (remaining or used), the Show thinking toggle, the Transcript display
+ segmented control, Enter-to-send control, the infinite provider retry switch,
+ and the large text paste threshold. The
retry switch is off by default and explains that network/transient provider
failures keep retrying until success; Stop still cancels the turn and the
setting may continue API usage while enabled. Link open destination uses the Work panel browser by default
@@ -308,24 +309,32 @@ Settings is a **full-window page** that replaces the app sidebar + main chrome (
prompt-enhancement preferences is specified in
`04-ux/12-prompt-enhancement.md`.
- **Show thinking** is a toggle that persists as the optional `showThinking`
- boolean in host-owned settings. Off keeps the live thinking indicator visible
- and hides completed reasoning rows and excerpts; stored reasoning is retained
- and reappears when the toggle is turned back on. It affects presentation only,
- not model reasoning configuration, and it does not control turn-process or
- activity-group folding: active processes start open and untouched completed
- processes fold by default regardless of the toggle. The legacy
- `thinkingDisplayMode` field (`detailed` / `compact`) is retained only for
- persisted-settings compatibility and is no longer exposed; an absent or
+ boolean in host-owned settings. Off hides completed reasoning rows and, while
+ reasoning is actively streaming, leaves only the whole-run TextShimmer
+ `Thinking` indicator; a collapsed row shows that indicator without an excerpt.
+ Stored reasoning is retained and reappears when the toggle is turned back on.
+ With it on, Thinking rows default expanded in Flat and Commands first, while
+ Fully folded keeps the released live-only auto-open exception. It affects
+ presentation only, not model reasoning configuration, and it does not control
+ turn-process or activity-group folding: active processes start open and
+ untouched completed processes fold by default regardless of the toggle. The
+ legacy `thinkingDisplayMode` field (`detailed` / `compact`) is retained only
+ for persisted-settings compatibility and is no longer exposed; an absent or
unknown value shows reasoning and an explicit `compact` hides it. Settings
search indexes the row.
-- **Don't collapse commands** is a toggle that persists as the optional
- `keepCommandsExpanded` boolean in host-owned settings, defaulting to on when
- absent. On keeps shell calls on their own rows beside the tool groups they ran
- among; off folds them back into those groups, the layout used before commands
- were separated. It affects presentation only — neither value changes how many
- process disclosures a turn renders (always one), what a tool received, or what
- is stored — and it is read at render time, so toggling repaints the transcript
- immediately. Settings search indexes the row.
+- **Transcript display** is a segmented control in Defaults immediately after
+ **Show thinking**. It persists the optional `transcriptDisplayMode` field as
+ `flat`, `command-first`, or `fully-folded`, with the labels **Flat**,
+ **Commands first**, and **Fully folded**; an absent or unknown value resolves
+ to **Fully folded**, the layout released in v0.20.0. **Flat** renders one
+ outer process disclosure with no nested activity groups. **Commands first**
+ keeps activity groups but lifts `Bash`/run rows into standalone rows, and a
+ normal assistant progress message or a command ends a group. **Fully folded**
+ keeps commands inside their groups and lets only ordinary progress text split
+ them. All three render exactly one process disclosure, change presentation
+ only, and are read at render time, so switching repaints the transcript
+ immediately. The deprecated `keepCommandsExpanded` boolean is no longer
+ exposed and is not read for rendering. Settings search indexes the row.
- The **Command shell** row in Defaults uses the host-discovered catalog of native
PowerShell 5.1, PowerShell 7, cmd, Git Bash, and Bash with IDs
`windows-powershell`, `windows-pwsh`, `cmd`, `git-bash`, and
diff --git a/docs/spec/04-ux/07-ui-design-system.md b/docs/spec/04-ux/07-ui-design-system.md
index f681f6b3c..0048d643f 100644
--- a/docs/spec/04-ux/07-ui-design-system.md
+++ b/docs/spec/04-ux/07-ui-design-system.md
@@ -799,7 +799,7 @@ are also explicitly suppressed or collapsed to a static state.
- No parallax
- No continuous background animations (particles, waves); the bounded
foreground mascot loop is the explicit empty-home exception
-- No shimmer/skeleton animations longer than 1s loop — use simple fade-in for loading states
+- No shimmer/skeleton animations longer than 1s loop — use simple fade-in for loading states. Exception: the transcript Thinking indicator's whole-run TextShimmer runs 1.2s with a 220ms fade (ADR turn-process-and-thinking-display); it is not a per-glyph loop and becomes static under reduced motion.
- No bounce effects
- No multi-second boot theatrical sequences; splash exits as soon as ready (+ min dwell)
diff --git a/docs/spec/04-ux/08-component-spec.md b/docs/spec/04-ux/08-component-spec.md
index aca6e3a8e..ea74e6206 100644
--- a/docs/spec/04-ux/08-component-spec.md
+++ b/docs/spec/04-ux/08-component-spec.md
@@ -876,30 +876,34 @@ activity groups and `Bash` run rows alike. A turn therefore renders exactly one
top-level process disclosure, including a Bash-only turn; no run row is a sibling
of it, and a long turn collapses in one gesture. The answer, assistant errors,
stopped trailing partial text and pending action cards remain outside, reachable
-without expanding the process.
-
-Within the process, an ordinary activity group represents one contiguous
-tool/search/thinking segment between progress paragraphs or run rows. It renders a
-group header only when at least two items are visible under the current thinking
-preference. A singleton uses its item disclosure directly, hidden thinking never
-creates an empty wrapper, and the existing Task topology remains the container for
-delegated work.
-
-`keepCommandsExpanded` decides where a run row sits inside that disclosure and
-defaults to on. When on, `Bash` and run aliases are lifted out of the groups they
-ran among and render as their own rows at the disclosure's top level; adjacent
-calls stay separate and a row's detail stays closed until the user opens it. When
-off, a run row keeps its place in the flow and reads as another line of the group
-around it. Neither value changes the disclosure count, what a tool received, or
-what is stored.
+without expanding the process. An untouched process closes on completion, leaving
+the final answer; with no final text, the process header and those surfaces
+remain.
+
+Within the process, the `Transcript display` mode decides the grouping.
+`fully-folded` (the default; absent or unknown values use it) forms ordinary
+activity groups from contiguous tool/search/thinking segments between ordinary
+assistant progress paragraphs, and keeps `Bash`/run aliases inside the group
+around them. A `Task` delegation keeps its own topology and is not duplicated
+inside an ordinary group. `command-first` keeps those groups but lifts every
+`Bash`/run alias into a standalone row beside them: adjacent calls stay separate,
+a row's detail stays closed until the user opens it, and a normal assistant
+progress message or a command ends the current group. `flat` renders no nested
+activity groups; the outer disclosure lists tools, commands, thinking and
+progress rows in transcript order. In `command-first` and `fully-folded`, a group
+header appears only when at least two items are visible under the current
+thinking preference; a singleton uses its item disclosure directly, and hidden
+thinking never creates an empty wrapper. All three modes render exactly one
+top-level process disclosure and change neither what a tool received nor what is
+stored.
The ordinary group owning the active execution segment starts open while a turn is
active, then closes on completion only if untouched; other completed groups start
closed. An untouched active group remains open when any failed or denied tool has
been recorded, through later successful recovery, and closes on completion if still
-untouched. These group defaults are unified and do not depend on either
-preference. Group headers summarize count, running state and issue count without
-treating a failed child as a failed turn.
+untouched. These group defaults are unified across modes and do not depend on the
+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
@@ -913,13 +917,19 @@ beside the label. The disclosure and the levels it reveals share one left edge;
hierarchy is carried by type size and colour, not by indentation, so a nested
group header and a run row start exactly where the turn header does.
-No item payload opens itself: a tool, hosted-search or plan call stays a header row
-until the user opens its disclosure, including a Bash row, whose detail stays closed
-until the user opens it. The activity groups keep their automatic open defaults, so
-a live turn still shows its work. When the `Show thinking` preference is off, the
-live thinking indicator stays visible while completed reasoning rows and excerpts
-are suppressed and empty thinking-only containers are omitted; the stored reasoning
-is retained and reappears when the preference is turned back on.
+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
+disclosure, including a Bash row, whose detail stays closed until the user opens
+it. The activity groups keep their automatic open defaults, so
+a live turn still shows its work. With `Show thinking` on, Thinking rows expand by
+default in Flat and Commands first and collapse only on user action; Fully folded
+keeps the released exception where earlier rows stay collapsed and only the last
+active row opens while it is live. An expanded Thinking row shows its full
+reasoning markdown; a collapsed one shows only the Thinking indicator, with no
+summary or excerpt. With `Show thinking` off, no completed reasoning row renders;
+only a live whole-run TextShimmer `Thinking` indicator remains while reasoning is
+actively streaming, and empty thinking-only containers are omitted. The stored
+reasoning is retained and reappears when the preference is turned back on.
Group, run row and item are independent controls. Closing an ancestor keeps
descendant choices and reopening restores them; closing the turn's disclosure hides
@@ -2287,20 +2297,21 @@ Lightweight inline disclosure row showing a semantic tool action, its primary
argument hint, status, and a readable rendering of the result. It follows D071
and is intentionally not an elevated card.
-The turn's process is one disclosure. Inside it, one contiguous
-tool/search/thinking segment between progress paragraphs or run rows becomes an
-ordinary processing group only when it has two or more visible items under the
-current thinking preference. A singleton uses its item disclosure directly, and
-Task topology keeps its existing container. `Bash` and run aliases stay inside the
-turn's disclosure: with `keepCommandsExpanded` on (the default) each renders as
-its own row beside the groups, and adjacent calls remain separate; with it off a
-run row stays in the flow of its group. A Bash-only turn still has its one
-disclosure. While the turn is active, the ordinary group owning the execution
-segment opens; when it settles, an untouched group closes. These group defaults do
-not depend on the thinking preference. No item payload opens itself: a tool,
-hosted-search or plan row stays a header row until the user opens it, whichever
-item of the group it is, including a Bash row whose detail stays closed until
-opened.
+The turn's process is one disclosure. With `fully-folded` (the default), one
+contiguous tool/search/thinking segment between ordinary progress paragraphs
+becomes an ordinary processing group only when it has two or more visible items
+under the current thinking preference, and `Bash`/run aliases stay inside their
+group. With `command-first`, the groups remain but each `Bash`/run alias renders
+as its own row beside them, and a progress message or command ends a group. With
+`flat`, no group renders and the rows keep transcript order inside the outer
+disclosure. A singleton uses its item disclosure directly, and Task topology
+keeps its existing container. A Bash-only turn still has its one disclosure.
+While the turn is active, the ordinary group owning the execution segment opens;
+when it settles, an untouched group closes. These group defaults do not depend on
+the thinking preference. No item payload opens itself, except the display mode's
+Thinking default: a tool, hosted-search or plan row stays a header row until the
+user opens it, whichever item of the group it is, including a Bash row whose
+detail stays closed until opened.
The group header shows `Processing · 12s` while active or `Processed for 12s`
after completion, plus bounded item and issue counts. Expanding it reveals the
@@ -2333,15 +2344,15 @@ seconds when non-zero) from one hour onward. Zero-value units are omitted, so
completion only if untouched; completed groups otherwise start closed. These
defaults do not depend on the thinking preference. A singleton has no group
header.
-- Tool/search payloads stay collapsed until the user opens them; no row
- auto-opens, so a final thinking item never selects an earlier tool. Live
+- Tool/search payloads stay collapsed until the user opens them; no tool/search
+ row auto-opens, so a final thinking item never selects an earlier tool. Live
thinking follows its own indicator/disclosure policy and never opens sibling
payloads.
-- `Bash` and run rows are revealed by the turn's process disclosure. With
- `keepCommandsExpanded` on they sit at its top level beside the groups and
- adjacent rows stay separate; with it off they render inside their group. They
- are never siblings of the turn's process, and their details stay closed until
- opened.
+- `Bash` and run rows are revealed by the turn's process disclosure. In
+ `fully-folded` they sit inside their group; in `command-first` they sit at its
+ top level beside the groups with adjacent rows separate; in `flat` no groups
+ exist, so they follow transcript order inside the disclosure. They are never
+ siblings of the turn's process, and their details stay closed until opened.
- The processing group spans the full available assistant column, so expanded
result details keep a usable width even when the header or payload is short.
- The visible label is a natural-language action (`Read`, `Ran`, `Searched`),
@@ -2414,16 +2425,17 @@ 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 item payload opens itself; live thinking follows its own indicator/disclosure policy |
+| 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; an untouched active group closes on completion, while 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 |
### 9.6 Interactions
-- Click the row: expand/collapse only that result payload. Payloads start
- closed. No payload opens itself, so the row the user opens is the only expanded
- one; failed and denied rows behave the same.
+- Click the row: expand/collapse only that result payload. Tool/search payloads
+ start closed. No tool/search payload opens itself, so the row the user opens is
+ the only expanded one; failed and denied rows behave the same. Thinking rows
+ follow the display mode's default described above.
- A file path that a row or its result names is a link, not decoration: clicking
the summary path of a `Read`, `Write`, `Edit`, or `fetch` row, or a path in a
result's file list or match groups, completes the reference through the same
diff --git a/docs/spec/04-ux/09-interaction-patterns.md b/docs/spec/04-ux/09-interaction-patterns.md
index 1dcdfe453..78bca6941 100644
--- a/docs/spec/04-ux/09-interaction-patterns.md
+++ b/docs/spec/04-ux/09-interaction-patterns.md
@@ -920,20 +920,22 @@ may be retained while exactly one workspace supplies the visible shell context.
- One unified presentation gives each loaded assistant turn a single collapsible
process disclosure. It contains thinking, tools, hosted searches, intermediate
progress text and the turn's `Bash`/run rows; the trailing answer, assistant
- errors and stopped trailing text remain outside it.
+ errors and stopped trailing text remain outside it. The `Transcript display`
+ mode selects the layout: `flat` has no nested groups, `command-first` lifts
+ commands into standalone rows, and `fully-folded` (the default) keeps commands
+ inside their groups.
- A contiguous activity segment receives a group disclosure only when it has at
- least two visible items under the current thinking preference. Progress text or a
- run row ends the segment, a singleton uses its item disclosure directly, and
- hidden thinking does not create a redundant group. Existing Task topology remains
- separate. `keepCommandsExpanded` (default on) decides only where a run row sits
- inside the turn's disclosure: on lifts `Bash` and run aliases out of their groups
- into their own top-level rows, with adjacent calls remaining separate; off keeps
- a run row in the flow of its group. Neither value adds another disclosure or
- leaves a run row outside the process.
+ least two visible items under the current thinking preference, and only in
+ `command-first` or `fully-folded`. In `fully-folded`, ordinary assistant
+ progress text ends the segment; in `command-first`, a normal assistant progress
+ message or a command ends it. A singleton uses its item disclosure directly,
+ hidden thinking does not create a redundant group, and existing Task topology
+ remains separate. No mode adds a second top-level disclosure or leaves a run
+ row outside the process.
- The active ordinary group starts open and closes when it completes only if
untouched; completed groups otherwise start closed, and an untouched active group
with any recorded failed/denied tool remains open through recovery. These group
- defaults do not depend on either preference. Closing the turn's disclosure hides
+ defaults do not depend on the thinking preference. Closing the turn's disclosure hides
every group and run row under it without erasing their choices; reopening
restores the groups the user had opened.
- The turn header reports `Failed`, `Stopped`, `Running`, or `Finished` in that
@@ -942,13 +944,16 @@ may be retained while exactly one workspace supplies the visible shell context.
transcript recorded none, and never echoes the current command or query. A
nested group header and a run row share its left edge; hierarchy is carried by
type size and colour rather than indentation.
-- No item payload opens itself: a tool, hosted-search or plan call stays a header
- row until the user opens it, including the literal final item of the last
- activity group. Group defaults are unchanged, so a final thinking item never
- causes a backward scan. When `Show thinking` is off, every item payload stays
- closed and completed reasoning text/excerpts are hidden while the live thinking
- indicator remains visible; stored reasoning is retained and reappears when the
- preference is turned back on.
+- No item payload opens itself, except the display mode's Thinking default: a
+ tool, hosted-search or plan call stays a header row until the user opens it,
+ including the literal final item of the last activity group. Group defaults are
+ unchanged, so a final thinking item never causes a backward scan. With
+ `Show thinking` on, Thinking rows default expanded in Flat and Commands first and
+ collapse only on user action; Fully folded keeps the released live-only
+ auto-open exception. A collapsed row shows only the Thinking indicator, with no
+ excerpt. With `Show thinking` off, no completed reasoning row renders; only a
+ live whole-run TextShimmer `Thinking` indicator remains while reasoning streams.
+ Stored reasoning is retained and reappears when the preference is turned back on.
- Activating a group or item header toggles only that level. Closing a parent
preserves child state, reopening restores it, and sibling groups remain
independent. Opening a parent is never an expand-all action.
diff --git a/docs/spec/06-delivery/04-e2e-test-plan.md b/docs/spec/06-delivery/04-e2e-test-plan.md
index c6989e987..73061cc72 100644
--- a/docs/spec/06-delivery/04-e2e-test-plan.md
+++ b/docs/spec/06-delivery/04-e2e-test-plan.md
@@ -3371,44 +3371,46 @@ identify the platform validation still needed.
pre-answer row; close it and confirm the groups and run rows close with it, then
reopen and confirm the group choice returns. 4) Open one completed group and one
item, copy its output, close and reopen the group, then open a sibling group
- independently. 5) Toggle `Don't collapse commands` off and on and inspect where
- the run rows render while the disclosure count stays one. 6) Repeat with a
- singleton item and with the last activity group's literal final item set to a
- tool/search, thinking, failed tool, and denied tool. 7) Toggle `Show thinking`
- off and on and inspect the active-thinking, failure/recovery and completed
- states. 8) Remount rows within the retained pane, then reload the renderer and
- reopen the session.
+ independently. 5) Switch `Transcript display` across Flat, Commands first, and
+ Fully folded and inspect the grouping, group boundaries, where the run rows
+ render, and the disclosure count. 6) Repeat with a singleton item and with the
+ last activity group's literal final item set to a tool/search, thinking, failed
+ tool, and denied tool. 7) Toggle `Show thinking` off and on and inspect the
+ active-thinking, failure/recovery and completed states. 8) Remount rows within
+ the retained pane, then reload the renderer and reopen the session.
- **Expected**: A turn renders exactly one process disclosure containing every
pre-answer row, the `Bash`/run rows included; the trailing answer, assistant
errors and stopped trailing text stay outside it, as do pending actions. The
active group opens, then closes on completion only if untouched; completed
groups otherwise start closed. Closing the turn's disclosure closes the groups
- and run rows under it, and reopening restores the user's group choices. With
- `Don't collapse commands` on (default), run rows render as their own top-level
- rows beside the groups, adjacent calls stay separate, and a row's detail stays
- closed until opened; with it off they fold into their groups. Neither value
- changes the disclosure count. A singleton has no group wrapper. No item payload
- opens itself: a tool/search row stays a header until the user opens it, while a
- final thinking item keeps its own leaf default and never selects an earlier
- tool. The header reports `Running`, `Finished`, `Stopped`, or `Failed` with
- failure and stop outranking a normal finish, reads `Thinking` while the live
- step is reasoning, never repeats the current command, and omits the duration
- when none was recorded. When `Show thinking` is off, the
- live thinking indicator stays visible while completed reasoning text and excerpts
- are hidden and empty thinking-only containers are omitted; turning it back on
- restores them. Parent, child and sibling choices are independent;
- closing/reopening a parent preserves descendants, and streaming/completion does
- not override user-owned choices. Retained-pane remounts preserve choices;
- renderer restart reapplies defaults while tool names, arguments, results and
- statuses remain restored. Group headers show bounded running and issue summaries
- without marking the whole turn failed.
+ and run rows under it, and reopening restores the user's group choices. In
+ Fully folded (the default), run rows stay inside their groups and only ordinary
+ assistant progress text splits a group. In Commands first, run rows render as
+ their own rows beside the groups, adjacent calls stay separate, a row's detail
+ stays closed until opened, and a normal assistant progress message or a command
+ ends a group. In Flat, no nested group renders and the rows keep transcript
+ order inside the outer disclosure. Every mode keeps the disclosure count at one.
+ A singleton has no group wrapper. No item payload opens itself except the
+ display mode's Thinking default: a tool/search row stays a header until the user
+ opens it, while a final thinking item never selects an earlier tool. The header
+ reports `Running`, `Finished`, `Stopped`, or `Failed` with failure and stop
+ outranking a normal finish, reads `Thinking` while the live step is reasoning,
+ never repeats the current command, and omits the duration when none was
+ recorded. When `Show thinking` is off, no completed reasoning row renders; only
+ the live TextShimmer `Thinking` indicator remains while reasoning streams, and
+ turning it back on restores the completed rows. Parent, child and sibling
+ choices are independent; closing/reopening a parent preserves descendants, and
+ streaming/completion does not override user-owned choices. Retained-pane
+ remounts preserve choices; renderer restart reapplies defaults while tool names,
+ arguments, results and statuses remain restored. Group headers show bounded
+ running and issue summaries without marking the whole turn failed.
- **Specs linked**: `04-ux/01-ui-ia.md`,
`04-ux/07-ui-design-system.md`, `04-ux/08-component-spec.md`,
`04-ux/09-interaction-patterns.md`
- **Acceptance**: C (chat stream), E (tools), F (persistence)
- **Milestone**: M3
-- **Status**: Draft. Unit and style checks cover the one-disclosure,
- command-folding and header rules; this scenario remains the intended manual
+- **Status**: Draft. Unit and style checks cover the display modes, Thinking
+ defaults and header rules; this scenario remains the intended manual
transcript-reload behavior.
#### E2E-041: Conversation minimap navigates long transcripts
@@ -17180,60 +17182,86 @@ plugin-form fixtures in an isolated temporary directory at runtime.
- **Preconditions:** A turn with progress paragraph A, multiple searches plus
thinking, progress paragraph B, multiple commands plus thinking, and a final
- answer; the `Show thinking` preference on and off; the `Don't collapse
- commands` preference on and off; legacy message-level transcript search
- targets.
+ answer; the `Show thinking` preference on and off; the `Transcript display`
+ preference at Flat, Commands first, and Fully folded; a restart with saved
+ settings; legacy message-level transcript search targets.
- **Steps:** Confirm a live active group starts open, let that same turn finish
- without interacting, and confirm the group collapses. On a second turn,
- explicitly open a completed group and confirm the choice survives subsequent
- updates; then close the turn's disclosure and confirm the group closes with it,
- and reopen to confirm the group choice is restored. Turn `Show thinking` off
- and confirm the live thinking indicator remains while completed reasoning rows
- and excerpts disappear and no empty thinking-only container is left; turn it
- back on and confirm the completed rows return. Turn `Don't collapse commands`
- off and confirm the run rows fold into their groups while the turn still
- renders exactly one disclosure, then turn it on and confirm the standalone rows
- return. 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 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.
+ without interacting, and confirm the process closes so only the final answer
+ (and any error or pending-action surface) remains. On a second turn, explicitly
+ open a completed group and confirm the choice survives subsequent updates; then
+ close the turn's disclosure and confirm the group closes with it, and reopen to
+ confirm the group choice is restored. In Fully folded, confirm run rows stay
+ inside their activity groups and that only ordinary assistant progress text
+ splits a group. In Commands first, confirm `Bash`/run rows render as standalone
+ rows beside the groups, that a normal assistant progress message or a command
+ ends the current group, adjacent calls stay separate, and Thinking rows default
+ expanded. In Flat, confirm no nested activity group renders, the outer
+ disclosure lists tools, commands, thinking and progress in transcript order,
+ and tool details stay collapsed. In every mode confirm the turn renders exactly
+ one outer disclosure and that closing it hides, then reopening restores, the
+ rows under it. Turn `Show thinking` off and confirm no completed reasoning row
+ remains and only a live whole-run TextShimmer `Thinking` indicator appears
+ while reasoning streams, with no spinner, pulsing dot or per-character
+ animation and a static presentation under reduced motion; turn it back on and
+ confirm the completed rows return. Select each `Transcript display` value,
+ restart, and confirm it persists; remove the saved value and confirm it
+ 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
+ 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.
- **Expected:** A turn renders exactly one process disclosure containing every
pre-answer row, leaving the final answer, assistant errors, stopped trailing
- text and pending actions outside it. The active group starts open; untouched
- groups collapse at completion, while explicit user choices persist and are
- restored when the enclosing disclosure is reopened. These group defaults do not
- depend on the `Show thinking` preference. With `Don't collapse commands` on,
- run aliases render as their own rows beside the groups, adjacent rows stay
- separate and a row's detail stays closed until opened; with it off they fold
- into their groups. Neither value changes the disclosure count. The header
+ text and pending actions outside it; when no final answer text exists, the
+ process header and those error or pending-action surfaces remain. An untouched
+ process closes at completion. In Flat there are no nested activity groups, and
+ active tools, commands, thinking and progress rows follow transcript order with
+ tool details collapsed. In Commands first, `Bash`/run rows are standalone
+ beside the groups, adjacent calls stay separate, and a normal assistant
+ progress message or a command ends a group, so the middle progress paragraph
+ and each command start a new group. In Fully folded (the default), run rows
+ stay inside their groups and only ordinary assistant progress text splits a
+ group, so the middle progress paragraph ends the preceding group and the
+ following activity starts a new one. A group appears only with at least two
+ visible items; a singleton has no group. Thinking rows default expanded in
+ Flat and Commands first, while Fully folded keeps the released exception:
+ earlier rows stay collapsed and only the last active row opens while it is
+ live, then completed rows collapse.
+ Explicit user choices persist and are restored when the enclosing disclosure is
+ reopened; these group defaults do not depend on `Show thinking`. The header
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, the live thinking indicator stays visible,
- completed reasoning rows and excerpts are hidden, and empty thinking-only
- containers are omitted; turning it back on restores them. Singletons have no
- group. No item payload opens itself: a tool/search row stays closed until the user
- opens it, while a final thinking item keeps its own leaf default.
+ 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 activity group that own the named message
- once per request; item-level targeting is not part of this change, and reasoning
- hidden by the preference stays hidden until the user turns `Show thinking` on.
- Saved `showThinking` survives restart; an absent value falls back to the legacy
+ updates, preference changes and remounts, and renderer restart reapplies
+ defaults. Search reveals the turn process and, where one exists, the activity
+ group that own the named message once per request; item-level targeting is not
+ part of this change, and reasoning hidden by the preference stays hidden until
+ the user turns `Show thinking` on. A saved `transcriptDisplayMode` survives
+ restart and an absent or unknown value resolves to Fully folded; saved
+ `showThinking` survives restart, and an absent value falls back to the legacy
`thinkingDisplayMode` (`compact` hides, `detailed`/unknown/absent shows).
- **Validation scope for the 2026-09-20 change:** Nested disclosure and activity
group presentation only; precise item-level transcript search targeting is out
of scope and keeps the existing message-level search behavior.
-- **Automation:** `pnpm test:e2e:transcript` covers default and active-to-completed
- process disclosure behavior; `pnpm test:e2e:transcript-disclosure` verifies
- manual-open retention and viewport anchoring; `apps/desktop/test/turn-process.test.mjs`
- covers process defaults and `apps/desktop/test/thinking-visibility.test.mjs`
- covers the `showThinking`/legacy resolver precedence.
+- **Automation:** `pnpm test:e2e:transcript` covers the command-first and
+ fully-folded layouts and active-to-completed process disclosure behavior;
+ `pnpm test:e2e:transcript-disclosure` verifies manual-open retention and
+ 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/transcript-display-mode-settings.test.mjs` covers the
+ Settings row and search indexing, and
+ `apps/desktop/test/settings-roundtrip.test.mjs` covers normalization, write
+ validation and the fully-folded default.
- **Specs:** 04-ux/06-settings-ia, 04-ux/08-component-spec,
04-ux/09-interaction-patterns; ADR turn-process-and-thinking-display.
diff --git a/docs/spec/08-meta/decisions-log.md b/docs/spec/08-meta/decisions-log.md
index 2c432fe69..8d6165908 100644
--- a/docs/spec/08-meta/decisions-log.md
+++ b/docs/spec/08-meta/decisions-log.md
@@ -332,7 +332,7 @@ Gold source: local Codex electron captures; latest row wins where rows conflict.
| D602 | Crash dumps stay in the data directory | **Electron's Crashpad reporter starts local-only (`uploadToServer: false`) before `ready`. Dumps live under `<data_dir>/crash-dumps`, not the default Electron `userData` crashDumps path, so a `PI_DESKTOP_DATA_DIR` profile does not share dumps. The next lock-holding launch writes one `diagnostics` line for dumps newer than `crash-dumps.json`, classified by Crashpad `ptype`: `error` if any new dump is the browser/main process, `warn` for recovered renderer/GPU/utility crashes. Host-core and sidecar crashes stay on the supervisor path. No upload, no IPC, no schema change.** | A crash left a minidump nobody read. Crashpad also records recovered renderer crashes, so a next-launch `error` that said the previous run died was a lie; and dumps outside the data directory escaped `PI_DESKTOP_DATA_DIR` isolation. |
| D619 | A copied formula is its TeX source | **Renderer only: a copy whose selection covers rendered math writes `text/plain` from the MathML `annotation` — `$…$` inline, `$$…$$` on its own lines, the delimiters `lib/latex-math.ts` normalizes `\(…\)` and `\[…\]` to, each run widened past any run inside the formula as a code span's fence is — instead of the two trees KaTeX paints. A cut that lands inside a formula grows to the whole formula. Only the formulas are rewritten: the reduced clone is read back through `Selection.toString()`, the serializer a copy itself runs, so prose, lists, tables and code blocks sharing the selection keep the platform's own reading — `user-select: none` chrome left behind included, which `innerText` would have written out. A selection with no formula in it, and a copy raised where the selection does not live, are left to the platform entirely. One flavour is written, `text/plain`: taking the event over drops the platform's `text/html` too and none is written back, because the reduced clone is app markup that would carry the `user-select: none` chrome the text reading drops, and because carrying the rendering instead would paste every formula twice — KaTeX's stylesheet is the only thing hiding the MathML tree and no stylesheet travels on the clipboard. One document `copy` listener owned by the shell, and the transcript's right-click Copy reads the same selection through the same module.** | A formula pasted as its glyphs, once per rendered tree, so it could not be carried into a LaTeX document or another Markdown editor (issue #414). ADR 0268 removed quoting on the grounds that the OS clipboard was the substitute; the clipboard had to actually carry the source. |
| D620 | pi-ai built-in API-key services are named presets | **Add fifteen named endpoint presets — Ant Ling, Baseten, Cerebras, Hugging Face, Meta (`responses`), MiniMax (International), Moonshot AI (International), NVIDIA, OpenCode Zen, Vercel AI Gateway, Qwen Token Plan (`alibaba-token-plan`), Qwen Token Plan (China), Xiaomi Token Plan (China / Europe / Singapore) — to `NAMED_ENDPOINT_PRESETS`, each at its published host, with the pi-ai provider id kept as an alias wherever the models.dev key differs. Eight built-in providers remain exceptions with a recorded reason: Amazon Bedrock, Azure OpenAI, Cloudflare AI Gateway, Cloudflare Workers AI, Google Vertex AI (account- or region-scoped URLs), GitHub Copilot and OpenAI Codex (vendor-account rows), and Radius (`pi_messages` is account-only here). `packages/agent-runtime/src/pi-ai-provider-sync.test.ts` fails on a pi-ai upgrade that leaves a provider neither covered nor excepted. No protocol, storage, or IPC change.** | Every other pi-ai capability was already reachable, but the API-key half of the service catalog was hand-maintained and had drifted from the library's own provider list (ADR 0307). |
-| D668 | One process disclosure per turn, with a command-folding preference | **Amend D661 / the `turn-process-and-thinking-display` ADR. A turn renders exactly one top-level process disclosure holding every pre-answer row, the run rows included; the answer stays outside it. `Bash` and run aliases are no longer excluded from every folded container. Inside that disclosure, the optional boolean `AppSettings.keepCommandsExpanded` (absent means on) decides whether run rows are lifted beside the groups they ran among or stay inside them; both values render exactly one disclosure. The preference is read while rendering, not while building transcript entries, so toggling it repaints immediately - the projection cache is keyed by messages and compactions only. The disclosure header reports failed / stopped / running / finished with precedence in that order and never echoes the current item, and the disclosure shares one left edge with the levels it reveals. `keepCommandsExpanded` joins the portable application fields. No host protocol, persistence schema, permission, or plugin contract change. See the amended ADR, `04-ux/06-settings-ia.md`, `04-ux/08-component-spec.md`, `04-ux/09-interaction-patterns.md`, and E2E-CHAT-turn-process-and-thinking-display.** | Chronological segmentation split one turn into several sibling disclosures above the answer, and always-visible command rows could not be turned off by readers who preferred the older grouped layout; one disclosure plus a presentation-only preference satisfies both without changing what a tool received or stored. |
+| D668 | One process disclosure per turn, with three transcript display modes | **Amend D661 / the `turn-process-and-thinking-display` ADR. A turn renders exactly one top-level process disclosure holding every pre-answer row; the answer stays outside it. `AppSettings.transcriptDisplayMode` selects the layout: `flat` renders no nested activity groups, `command-first` renders `Bash`/run rows as standalone rows beside activity groups, and `fully-folded` (the default for absent or invalid values) keeps commands inside their groups and lets only ordinary assistant progress text split them. The mode is read while rendering, so switching repaints immediately - the projection cache is keyed by messages and compactions only. The disclosure header reports failed / stopped / running / finished with precedence in that order and never echoes the current item, and the disclosure shares one left edge with the levels it reveals. `transcriptDisplayMode` joins the portable application fields; `keepCommandsExpanded` is deprecated, retained only for persisted-settings compatibility, and no longer exposed or read for rendering. No host protocol, persistence schema, permission, or plugin contract change. See the amended ADR, `04-ux/06-settings-ia.md`, `04-ux/08-component-spec.md`, `04-ux/09-interaction-patterns.md`, and E2E-CHAT-turn-process-and-thinking-display.** | Chronological segmentation split one turn into several sibling disclosures above the answer, and the boolean command-folding preference could only express two layouts; a three-mode setting covers flat, command-first, and the released grouped view without changing what a tool received or stored. |
## M0. Model catalog decisions
@@ -7849,24 +7849,31 @@ must keep splitting are covered by `markdown-blocks.test.mjs`.
`04-ux/06-settings-ia.md`, `04-ux/08-component-spec.md`, and
`apps/desktop/test/macos-window-translucency.test.mjs`.
-## 2026-10-21 — One process disclosure per turn, with command folding (D668)
+## 2026-10-21 — One process disclosure per turn, with three transcript display modes (D668)
- D668 amends D661 / the `turn-process-and-thinking-display` ADR: a turn now
renders exactly one top-level process disclosure containing every pre-answer
- row, the `Bash`/run rows included. No run row is a sibling of that disclosure;
- the trailing answer, assistant errors, stopped trailing text, and pending action
- surfaces stay outside it.
-- `AppSettings.keepCommandsExpanded` (absent means on) decides whether run rows are
- lifted beside the groups they ran among or stay inside them. The preference is
- read while rendering, not while building transcript entries, so toggling it
- repaints immediately; both values render exactly one disclosure.
-- The disclosure header reports failed / stopped / running / finished in that
- order, names compaction and recovery while those stages are live, drops an
- unavailable duration instead of showing zero, and never echoes the current item.
- The disclosure and the levels it reveals share one left edge.
-- `keepCommandsExpanded` joins the portable application fields. Covered by
- `apps/desktop/test/turn-process.test.mjs`,
- `apps/desktop/test/transcript-style.test.mjs`, and the interactive transcript
- probes. See the amended ADR, `04-ux/06-settings-ia.md`,
- `04-ux/08-component-spec.md`, `04-ux/09-interaction-patterns.md`, and
+ row. No run row is a sibling of that disclosure; the trailing answer, assistant
+ errors, stopped trailing text, and pending action surfaces stay outside it.
+- `AppSettings.transcriptDisplayMode` selects the layout. `flat` renders no
+ nested activity groups and lists rows in transcript order. `command-first`
+ keeps the groups but lifts `Bash`/run rows into standalone rows, with a normal
+ progress message or a command ending a group. `fully-folded`, the default for
+ absent or invalid values, keeps run rows inside their groups and lets only
+ ordinary assistant progress text split them. The mode is read while rendering,
+ so switching repaints immediately.
+- With `showThinking` on, Thinking rows default expanded in `flat` and
+ `command-first`; `fully-folded` keeps the released exception where only the
+ last active row opens while it is live. With the preference off, no completed
+ reasoning row renders and only a live whole-run TextShimmer `Thinking`
+ indicator remains while reasoning streams.
+- `keepCommandsExpanded` is deprecated and retained only for persisted-settings
+ compatibility; it is no longer exposed or read for rendering. The disclosure
+ header, left edge, and pane-owned disclosure memory are unchanged.
+- Covered by `apps/desktop/test/turn-process.test.mjs`,
+ `apps/desktop/test/transcript-display-modes-ui.test.mjs`,
+ `apps/desktop/test/transcript-display-mode-settings.test.mjs`, and
+ `apps/desktop/test/settings-roundtrip.test.mjs`. See the amended ADR,
+ `04-ux/06-settings-ia.md`, `04-ux/08-component-spec.md`,
+ `04-ux/09-interaction-patterns.md`, and
E2E-CHAT-turn-process-and-thinking-display.
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 b1bc0832c..a033c2aba 100644
--- a/docs/zh-CN/adr/turn-process-and-thinking-display.md
+++ b/docs/zh-CN/adr/turn-process-and-thinking-display.md
@@ -25,18 +25,28 @@
每个回合只渲染一个过程披露。回合在给出答案之前产生的所有行都位于其中——活动组与 `Bash`
命令行同样如此——因此长回合可以用一次操作收起,而不会在答案上方留下一列并列披露。答案本身
-位于披露之外。
+位于披露之外。未操作的过程在回合完成时收起,因此只剩最终回答;若回合没有产出最终文字,
+过程标题及其错误或待处理操作面仍会保留。
-在该披露内部,非 Bash 活动形成普通活动组:两个进度段落或命令行之间的一段连续工具、搜索或
-思考活动,并且仅在当前思考偏好下至少有两个可见项时出现。单项活动直接使用自身披露;被隐藏的
-思考不会制造多余的组包装。现有 Task 拓扑仍是其片段的容器,不会在普通活动组中重复渲染。
+在该披露内部,活动如何分组由显示模式决定。`AppSettings.transcriptDisplayMode` 取值为
+`flat`、`command-first` 或 `fully-folded`;缺失或无效值解析为 `fully-folded`,即
+v0.20.0 发布的布局。三种模式都只渲染一个外层披露。
-命令行位于其组内还是组旁,由 `keepCommandsExpanded` 偏好决定,默认开启。开启时,`Bash`
-和 run 别名会从所处的组中提取出来:各自成为披露顶层的独立行,相邻调用保持分离,详情在用户
-打开之前保持收起。关闭时,命令行保留在流程中的原位置,读起来就是所在组的另一行——即命令尚未
-被分离之前的布局。该偏好不会改变回合渲染的披露数量:两种取值都只渲染一个。
+- `fully-folded` 中,连续活动形成普通活动组:普通助手进度段落之间的一段连续工具、搜索、
+ 思考或 `Bash`/run 活动。`Bash`/run 行留在其周围的组内,命令读起来就是该组的另一行。
+ 现有 Task 拓扑仍是其片段的容器,不会在普通活动组中重复渲染。
+- `command-first` 中,普通活动组仍会渲染,但每个 `Bash`/run 别名都会提取为组旁的独立行:
+ 相邻调用保持分离,详情在用户打开前保持收起。普通助手进度消息和命令都会结束当前组。
+- `flat` 不渲染任何嵌套活动组。外层披露按转录顺序列出活动工具、命令、思考和进度行,工具
+ 详情保持收起。
-活动组的折叠默认值是统一的,不依赖思考偏好或上述偏好。拥有当前执行片段的普通活动组默认展开,
+在 `command-first` 与 `fully-folded` 中,只有在当前思考偏好下至少有两个可见项时才显示组。
+单项活动直接使用自身披露,被隐藏的思考不会制造多余的组包装。
+
+`keepCommandsExpanded` 已弃用:仅为使已持久化的设置仍可加载而保留,不再在设置中暴露,
+也不再参与渲染读取;新的写入保存 `transcriptDisplayMode`。
+
+组折叠默认值在各模式间统一,且不依赖思考偏好。凡渲染组时,拥有当前执行片段的组默认展开,
仅在用户未操作时于完成后收起;其他已完成组默认收起。只要活动组中记录过失败或被拒工具,
尚未被用户接管的活动组就会在后续恢复期间保持展开,并在回合完成后收起。关闭回合披露会一并
关闭其下的组,重新展开则恢复用户此前展开过的组。
@@ -52,13 +62,18 @@
披露与它展开的层级共用同一条左边缘。层级由字号与颜色表达,而不是缩进,因此嵌套的组标题与
命令行起始位置与回合标题完全一致。
-思考偏好是一个布尔值 `showThinking`。当它为 false 时,活动思考指示器保持可见,而已完成
-的思考行和摘要会被隐藏,空的纯思考容器会被省略;已存推理仍会保留,因此重新打开该偏好
-会恢复已完成的思考行和摘要。被隐藏的思考不会制造空的组包装。
+思考偏好是一个布尔值 `showThinking`。开启时,`flat` 与 `command-first` 中的每个思考行
+默认展开,用户可将其收起;展开时显示完整推理 Markdown,收起时只显示 Thinking 指示器,
+不显示摘要或摘录。`fully-folded` 保留已发布的例外:较早的思考行保持收起,最后一个活动
+思考行仅在其为当前步骤时自动展开,完成后收起。关闭时不再渲染任何已完成的推理行,仅在推理
+正在流式输出时保留整段运行的 `TextShimmer` `Thinking` 指示器。该微光为 1.2 秒线性扫过、
+220 毫秒淡出,不使用转圈、脉冲圆点或逐字符动画;减少动态效果时保持静态。已存推理仍会
+保留,因此重新打开该偏好会恢复这些行。被隐藏的思考不会制造空的组包装。
-本决策早先引入的叶子默认值后来被移除。条目载荷都不会自动展开:工具调用、托管搜索或
-计划行在用户打开之前始终只是标题行,无论它位于活动组的哪一项,且与思考偏好无关。
-组默认值不变,打开一个已收起的祖先仍会恢复已保留的条目选择,不会展开所有后代。
+本决策早先引入的叶子默认值后来被移除。除上文的显示模式思考默认值外,条目载荷都不会自动
+展开:工具调用、托管搜索或计划行在用户打开之前始终只是标题行,无论它位于活动组的哪一项,
+且与思考偏好无关。组默认值不变,打开一个已收起的祖先仍会恢复已保留的条目选择,不会展开
+所有后代。
每个标题只切换自己的层级。父子状态彼此独立:收起父级会保留后代选择,重新展开会恢复
这些选择,同级组不是互斥手风琴。用户操作某个条目时,会把所属组标记为用户接管,但不会
@@ -66,30 +81,38 @@
窗格仍存在,手动选择就跨流式更新、完成、偏好切换、单项变组和行重新挂载保留。窗格淘汰、
会话删除或渲染器重启会释放这些展示状态;它们不写入消息或宿主设置。
-搜索和导航只展开目标所需的祖先路径:拥有该消息的回合过程和活动组。条目级精确定位不在
-本次范围内,各行详情仍由各自的折叠控制。同一请求重新渲染时,不会反复覆盖用户之后的
-手动收起。被偏好隐藏的推理会保持隐藏,直到用户打开 `showThinking`。助手错误、中止后的
-末尾部分回答、权限/提问/计划/目标决策及其他待处理操作面必须位于隐藏过程之外,
+搜索和导航只展开目标所需的祖先路径:拥有该消息的回合过程,以及存在时的活动组。条目级
+精确定位不在本次范围内,各行详情仍由各自的折叠控制。同一请求重新渲染时,不会反复覆盖
+用户之后的手动收起。被偏好隐藏的推理会保持隐藏,直到用户打开 `showThinking`。助手错误、
+中止后的末尾部分回答、权限/提问/计划/目标决策及其他待处理操作面必须位于隐藏过程之外,
无需展开过程即可操作。
“设置 -> AI -> 默认项”提供一个 `Show thinking` 布尔开关,以可选的 `showThinking`
-`AppSettings` 字段持久化。缺失或非布尔值会回退到旧版 `thinkingDisplayMode` 字段:
-显式 `compact` 隐藏推理,而 `detailed`、未知值或缺失值都显示推理。旧字段为持久化设置的
-兼容性而保留,不再在界面中暴露。该偏好只改变展示,不改变提供商思考级别、运行时或模型
-上下文、已存推理、导出、权限、执行或复制载荷,也不控制回合过程或活动组的折叠。过程标题
-使用已记录的计时、直接工具/搜索计数、运行状态和问题计数;不会重复计算委派子任务,
-也不会把单个失败工具误报为整个助手回合失败。
+`AppSettings` 字段持久化;并在其后提供「过程显示」分段控件,标签为「平铺显示」
+「命令工具优先」与「全折叠显示」,以可选的 `transcriptDisplayMode` 字段持久化。缺失或
+无效的 `transcriptDisplayMode` 在渲染层与主进程设置规范化中都解析为 `fully-folded`。
+`showThinking` 缺失或非布尔值会回退到旧版 `thinkingDisplayMode` 字段:显式 `compact`
+隐藏推理,而 `detailed`、未知值或缺失值都显示推理。旧版 `thinkingDisplayMode` 与已弃用的
+`keepCommandsExpanded` 仅为持久化设置兼容性保留,不再在界面中暴露;
+`keepCommandsExpanded` 也不再参与渲染读取。这些偏好只改变展示,不改变提供商思考级别、
+运行时或模型上下文、已存推理、导出、权限、执行或复制载荷,思考偏好也不控制回合过程或
+活动组的折叠。过程标题使用已记录的计时、直接工具/搜索计数、运行状态和问题计数;不会
+重复计算委派子任务,也不会把单个失败工具误报为整个助手回合失败。
## 结果
- 每个回合一个披露,让最终回答与待处理操作保持可达,并使长回合可以用一次操作收起。
-- 活动组的折叠默认值统一:运行中的工作保持可见,未操作的已完成组默认收起,无论思考偏好如何
- 都保留用户明确的披露选择。关闭回合披露会关闭其下的组,重新展开则恢复用户此前展开过的组。
-- 当 `showThinking` 为 false 时,活动指示器保持可见,而已完成的推理行和摘要被隐藏。
- 已存推理仍会保留,重新打开偏好时重新出现。
-- 当 `keepCommandsExpanded` 开启(默认)时,run 别名作为独立行渲染,命令密集的回合保持易读;
- 关闭时恢复较早的布局,命令行读起来就是所在组的另一行。两种取值都不改变披露数量;该偏好
- 在渲染时读取而非在构建条目时读取,因此切换后立即重绘,而无需等待新消息。
+- 活动组的折叠默认值在各显示模式间统一:运行中的工作保持可见,未操作的已完成组默认收起,
+ 无论思考偏好如何都保留用户明确的披露选择。关闭回合披露会关闭其下的组,重新展开则恢复
+ 用户此前展开过的组。
+- 当 `showThinking` 关闭时,不再渲染任何已完成的推理行,仅在推理流式输出期间保留整段运行的
+ TextShimmer `Thinking` 指示器。已存推理仍会保留,重新打开偏好时重新出现。
+- `transcriptDisplayMode` 保留三种布局,并默认使用已发布的 `fully-folded` 布局。
+ `flat` 移除嵌套组,`command-first` 将命令提升为独立行,`fully-folded` 让命令留在
+ 所属组内;三者都只渲染一个披露,且模式在渲染时读取,因此切换后立即重绘,而无需等待
+ 新消息。
+- `showThinking` 开启时,`flat` 与 `command-first` 中的思考行默认展开;`fully-folded`
+ 保留仅活动行自动展开的例外。
- 标题用一行说明回合的结果。回显当前命令的做法已被移除:它会把计数挤出该行,并且与打开该项
已经能看到的内容重复。
- 披露记忆是以稳定回合、组和条目标识为键的窗格展示状态,不是持久化转录契约,也不
@@ -108,7 +131,10 @@
`showThinking`/旧版 `thinkingDisplayMode` 的解析优先级,并由 i18n 目录测试覆盖新增的
`settings.showThinking` 文案。界面、解析器与 E2E 场景在集成候选上验证;同步后的场景文本见
E2E-CHAT-turn-process-and-thinking-display。
-2026-10-21 修订由 `apps/desktop/test/turn-process.test.mjs` 覆盖单披露分段、
-命令折叠开关与标题阶段优先级,由 `apps/desktop/test/transcript-style.test.mjs` 覆盖共享
-左边缘与已移除的实时条目回显;交互式转录探针覆盖实际渲染的披露数量、命令行位置和标题
-文案。同步后的场景文本见 E2E-CHAT-turn-process-and-thinking-display。
+2026-10-21 修订由 `apps/desktop/test/turn-process.test.mjs` 覆盖模式分段(包括
+`flat`、`command-first` 与 `fully-folded`)及标题阶段优先级;
+`apps/desktop/test/transcript-display-modes-ui.test.mjs` 覆盖渲染层的模式分段接线、
+思考行默认值以及收起或隐藏思考指示器使用的整段运行 `TextShimmer`;
+`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。
diff --git a/docs/zh-CN/spec/03-runtime/04-data-storage.md b/docs/zh-CN/spec/03-runtime/04-data-storage.md
index 98cab0296..60132669b 100644
--- a/docs/zh-CN/spec/03-runtime/04-data-storage.md
+++ b/docs/zh-CN/spec/03-runtime/04-data-storage.md
@@ -1232,10 +1232,13 @@ outbox 排空。渲染器侧的停止绝不重写已有已开始回复的转录
应用设置 JSON 还可选存储布尔值 `showThinking`,用于转录中的推理可见性。它是可移植的
应用偏好,会像旧字段一样跨设备同步。缺失值回退到旧版 `thinkingDisplayMode` 字段
(`compact` 隐藏,`detailed`/未知/缺失显示);该旧字段仅为持久化设置兼容性保留,
-并作为该回退来源。应用设置 JSON 还可选存储布尔值 `keepCommandsExpanded`,用于回合
-过程披露中的命令行位置:缺失即开启,`Bash` 与 run 别名保留在活动组旁的独立行;
-`false` 折回所属组。它是可移植的应用偏好,只改变展示。这些新增展示偏好既不重写
-已存推理,也不改变数据库 schema。
+并作为该回退来源。应用设置 JSON 还可选存储 `transcriptDisplayMode`
+(`flat` | `command-first` | `fully-folded`),用于转录中的过程分组:`flat` 不渲染
+嵌套活动组,`command-first` 将 `Bash`/run 行作为活动组旁的独立行,`fully-folded`
+让每条命令留在其周围的组内。缺失或未知值在渲染层与主进程设置规范化中都归一化为
+`fully-folded`。它是可移植的应用偏好,只改变展示。已弃用的 `keepCommandsExpanded`
+布尔值仅为持久化设置兼容性保留;它不再在设置中暴露,也不再参与渲染读取。这些新增展示
+偏好既不重写已存推理,也不改变数据库 schema。
应用设置 JSON 可能仍包含旧版本写入的提示词增强键。为支持回退和降级,宿主保留这些值,
但不会再把它们作为有效偏好读取或写入。用户安装并授权独立的
diff --git a/docs/zh-CN/spec/04-ux/06-settings-ia.md b/docs/zh-CN/spec/04-ux/06-settings-ia.md
index 9e903d272..10be4998d 100644
--- a/docs/zh-CN/spec/04-ux/06-settings-ia.md
+++ b/docs/zh-CN/spec/04-ux/06-settings-ia.md
@@ -109,7 +109,7 @@
都以相同方式展开。关闭时的触发器按当前文案收缩,不超过设置控件列。
- **默认项**卡:主机支持的默认运行模式(Agent / Plan / Goal)、
命令 Shell 选择、链接打开目标、上下文用量显示(剩余或已用)、
- 显示思考开关、回车发送控制、无尽重试开关和大段文本粘贴阈值。无尽重试默认关闭;开启后网络/临时提供商故障会持续到成功,
+ 显示思考开关、过程显示分段控件、回车发送控制、无尽重试开关和大段文本粘贴阈值。无尽重试默认关闭;开启后网络/临时提供商故障会持续到成功,
但停止按钮仍可取消回合,开启期间可能持续消耗 API 用量。链接打开目标默认使用工作面板浏览器,
可将对话、会话记录和插件页的 HTTP(S) 点击路由到系统浏览器。插件/设置页
若目标是工作面板,会先回到对话再打开(不记入导航栈),避免被遮罩挡住;没有会话时才回退到
@@ -123,17 +123,22 @@
`pi.prompt-enhancement` 插件。插件设置在「插件」页编辑;旧提示词增强偏好的单次迁移见
`04-ux/12-prompt-enhancement.md`。
- **显示思考**是一个开关,以可选的 `showThinking` 布尔值持久化到宿主设置。关闭时
- 仍显示活动思考指示器,并隐藏已完成的推理行和摘要;已存推理仍会保留,重新打开时
- 重新出现。它只影响展示,不改变模型推理配置,也不控制回合过程或活动组的折叠:
+ 隐藏已完成的推理行;仅在推理正在流式输出时保留整段运行的 TextShimmer `Thinking`
+ 指示器,收起的行只显示该指示器,不显示摘录。已存推理仍会保留,重新打开时重新出现。
+ 开启时,平铺显示与命令工具优先中的思考行默认展开,全折叠显示保留已发布的仅活动行
+ 自动展开例外。它只影响展示,不改变模型推理配置,也不控制回合过程或活动组的折叠:
无论开关如何,运行中的过程默认展开,未操作的已完成过程默认收起。旧版
`thinkingDisplayMode` 字段(`detailed` / `compact`)仅为持久化设置兼容性保留,
不再在界面暴露;缺失或未知值显示推理,显式 `compact` 隐藏推理。设置搜索会索引
该行。
-- **不折叠命令**是一个开关,以可选的 `keepCommandsExpanded` 布尔值持久化到宿主设置,
- 缺失时默认开启。开启时,shell 调用保留在它们所运行的工具组旁,作为独立行;关闭时
- 折回这些组,即命令被分离之前的布局。它只影响展示——两种取值都不改变回合渲染的过程
- 披露数量(始终为一个),也不改变工具收到的内容或持久化内容——并且在渲染时读取,
- 因此切换后会立即重绘转录。设置搜索会索引该行。
+- **过程显示**是**显示思考**之后紧邻的分段控件,以可选的 `transcriptDisplayMode`
+ 字段持久化为 `flat`、`command-first` 或 `fully-folded`,标签为「平铺显示」
+ 「命令工具优先」「全折叠显示」;缺失或未知值解析为「全折叠显示」,即 v0.20.0
+ 发布的布局。「平铺显示」只渲染一个外层过程披露,不包含嵌套活动组。「命令工具优先」
+ 保留活动组,但把 `Bash`/run 行提升为独立行;普通助手进度消息或命令都会结束当前组。
+ 「全折叠显示」让命令留在所属组内,只有普通进度文字会拆分活动组。三者都只渲染一个
+ 过程披露,只改变展示,并在渲染时读取,因此切换后立即重绘转录。已弃用的
+ `keepCommandsExpanded` 布尔值不再暴露,也不再参与渲染读取。设置搜索会索引该行。
- 语音绑定(`AppSettings.speech`)**不属于设置页面**(ADR 0291)。宿主仍保留语音能力与
`speech/*` IPC,供插件和已存绑定使用;这里不再提供转写/朗读的服务、协议、模型或音色
选择,设置搜索也不再索引语音相关键。
diff --git a/docs/zh-CN/spec/04-ux/07-ui-design-system.md b/docs/zh-CN/spec/04-ux/07-ui-design-system.md
index 269ea04fe..0e5655114 100644
--- a/docs/zh-CN/spec/04-ux/07-ui-design-system.md
+++ b/docs/zh-CN/spec/04-ux/07-ui-design-system.md
@@ -710,7 +710,7 @@ Toast enter/exit 保留现有移除合同(`animationend` 于
- 无视差
- 没有连续的背景动画(粒子、波浪);有界的
前台吉祥物循环是显式的空主异常
-- shimmer/skeleton 动画的循环时间不超过 1 秒 — 使用简单的淡入来显示加载状态
+- shimmer/skeleton 动画的循环时间不超过 1 秒 — 使用简单的淡入来显示加载状态。例外:transcript 的 Thinking 指示器使用整段 TextShimmer,周期 1.2s、停止 220ms 淡回(ADR 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 d6d89adca..07c8a7fef 100644
--- a/docs/zh-CN/spec/04-ux/08-component-spec.md
+++ b/docs/zh-CN/spec/04-ux/08-component-spec.md
@@ -1065,21 +1065,23 @@ SESSIONS [msg+][↕]
该披露包含回合在给出回答之前产生的所有行:普通活动组与 `Bash` 命令行都在其中。因此
每个回合只渲染一个顶层过程披露,只有 Bash 调用的回合也一样;任何命令行都不是该披露的
同级,长回合可以用一次操作收起。末尾回答、助手错误、中止后的末尾部分文字和待处理操作
-卡留在披露之外,无需展开过程即可访问。
-
-在披露内部,普通活动组表示两个进度段落或命令行之间的一段连续工具、搜索或思考活动。
-只有在当前思考偏好下至少有两个可见项时才显示组标题。单项活动直接使用自身披露,被隐藏
-的思考不会制造空包装,委派工作继续使用现有 Task 拓扑作为容器。
-
-`keepCommandsExpanded` 决定命令行在该披露内的位置,默认开启。开启时,`Bash` 和 run
-别名会从所处的组中提取出来,作为披露顶层的独立行渲染;相邻调用保持分离,详情在用户
-打开之前保持收起。关闭时,命令行保留在流程中的原位置,读起来就是所在组的另一行。两种
-取值都不改变披露数量、工具实际收到的内容或持久化内容。
-
-活动组的折叠默认值统一,不依赖任一偏好。拥有当前执行片段的普通活动组在回合运行时默认
-展开,完成时仅在用户未操作的情况下收起;其他已完成组默认收起。若活动组记录过失败或被
-拒工具,尚未被用户接管的活动组会在后续成功恢复期间保持展开,并在回合完成后收起。组
-标题汇总计数、运行状态和问题计数,但不会把失败子项当作整个回合失败。
+卡留在披露之外,无需展开过程即可访问。未操作的过程在完成时收起,只剩最终回答;没有最终
+文字时,过程标题和这些操作面仍会保留。
+
+在披露内部,`过程显示`模式决定活动如何分组。`fully-folded`(默认;缺失或未知值使用
+它)把普通助手进度段落之间的连续工具、搜索或思考片段组为普通活动组,`Bash`/run 别名
+留在其周围的组内。`Task` 委派保留自身拓扑,不会在普通组内重复渲染。`command-first`
+保留这些组,但把每个 `Bash`/run 别名提升为组旁的独立行:相邻调用保持分离,详情在用户
+打开前保持收起,普通助手进度消息或命令都会结束当前组。`flat` 不渲染任何嵌套活动组;
+外层披露按转录顺序列出工具、命令、思考和进度行。在 `command-first` 与 `fully-folded`
+中,只有在当前思考偏好下至少有两个可见项时才显示组标题;单项活动直接使用自身披露,
+被隐藏的思考不会制造空包装。三种模式都只渲染一个顶层过程披露,不改变工具收到的内容或
+持久化内容。
+
+活动组的折叠默认值在各模式间统一,不依赖思考偏好。拥有当前执行片段的普通活动组在回合
+运行时默认展开,完成时仅在用户未操作的情况下收起;其他已完成组默认收起。若活动组记录过
+失败或被拒工具,尚未被用户接管的活动组会在后续成功恢复期间保持展开,并在回合完成后收起。
+组标题汇总计数、运行状态和问题计数,但不会把失败子项当作整个回合失败。
回合披露的标题只陈述回合结果,绝不回显正在处理的具体项,因为 shell 命令或搜索词可能
任意长。它显示 `Failed`、`Stopped`、`Running` 或 `Finished`,优先级依次为失败、停止、
@@ -1090,11 +1092,14 @@ SESSIONS [msg+][↕]
展开的层级共用同一条左边缘;层级由字号与颜色表达,而不是缩进,因此嵌套组标题与命令行
起始位置与回合标题完全一致。
-条目载荷都不会自动展开:工具调用、托管搜索或计划卡片行在用户打开其披露之前始终只是
-标题行,包括 Bash 行——其详情在用户打开之前保持收起。活动组保留各自的自动展开默认值,
-因此进行中的回合仍会展示自己的工作。当 `Show thinking` 偏好关闭时,活动思考指示器保持
-可见,而已完成的推理行和摘要被隐藏,空的纯思考容器被省略;已存推理仍会保留,重新打开
-偏好时重新出现。
+除显示模式的思考默认值外,条目载荷都不会自动展开:工具调用、托管搜索或计划卡片行在用户
+打开其披露之前始终只是标题行,包括 Bash 行——其详情在用户打开之前保持收起。活动组保留各自的自动展开默认值,
+因此进行中的回合仍会展示自己的工作。`Show thinking` 开启时,思考行在「平铺显示」与
+「命令工具优先」中默认展开,仅在用户操作时收起;「全折叠显示」保留已发布的例外:较早的
+行保持收起,只有最后一个活动行在其为当前步骤时展开。展开的思考行显示完整推理 Markdown;
+收起的行只显示 Thinking 指示器,不显示摘要或摘录。`Show thinking` 关闭时,不再渲染任何
+已完成的推理行,仅在推理正在流式输出时保留整段运行的 TextShimmer `Thinking` 指示器,
+并省略空的纯思考容器。已存推理仍会保留,重新打开偏好时重新出现。
活动组、命令行和条目是相互独立的控件。收起祖先会保留下级选择,重新展开时恢复;收起
回合披露会隐藏其下所有行,重新展开时恢复用户此前展开的组。展开父级不会展开所有后代。
@@ -1540,14 +1545,15 @@ sorting, new settings, persistence, or host protocol is introduced.
参数提示、状态和结果的可读呈现。遵循D071
并且故意不是一张高级卡。
-回合过程是一个披露。在该披露内部,两个进度段落或命令行之间的一段连续工具、搜索或思考
-活动,仅在当前思考偏好下有两个及以上可见项时成为普通处理组。单项活动直接使用自身披露,
-Task 拓扑继续使用原有容器。`Bash` 和 run 别名保留在回合披露内:`keepCommandsExpanded`
-开启(默认)时,每一项作为组旁的独立行渲染,相邻调用保持分离;关闭时,命令行留在所在组
-的流程中。只有 Bash 调用的回合仍保留其唯一披露。回合活动期间,拥有当前执行片段的普通组
-默认展开;未操作的组在完成时自动收起。这些组默认值不依赖思考偏好。条目载荷都不会自动
-展开:工具调用、托管搜索或计划行在用户打开之前始终只是标题行,无论它位于活动组的哪一项,
-包括详情在打开前保持收起的 Bash 行。
+回合过程是一个披露。`fully-folded`(默认)中,普通进度段落之间的一段连续工具、搜索或
+思考活动,仅在当前思考偏好下有两个及以上可见项时成为普通处理组,`Bash`/run 别名留在
+所属组内。`command-first` 中组仍会渲染,但每个 `Bash`/run 别名作为组旁的独立行,进度
+消息或命令会结束当前组。`flat` 中不渲染组,各行在外层披露内保持转录顺序。单项活动直接
+使用自身披露,Task 拓扑继续使用原有容器。只有 Bash 调用的回合仍保留其唯一披露。回合
+活动期间,拥有当前执行片段的普通组默认展开;未操作的组在完成时自动收起。这些组默认值
+不依赖思考偏好。除显示模式的思考默认值外,条目载荷都不会自动展开:工具调用、托管搜索或
+计划行在用户打开之前始终只是标题行,无论它位于活动组的哪一项,包括详情在打开前保持收起
+的 Bash 行。
组标题在活动时显示 `Processing · 12s`,完成后显示 `Processed for 12s`,并提供有界
条目与问题计数。展开后显示有序活动行及其相互独立的结果披露。失败子项仍在自己的
@@ -1575,11 +1581,11 @@ ToolCallRow 上显示错误,但不会让组或整个回合成为终端失败
- 多项组标题拥有经过时间以及条目和问题计数,并在完成后保留在转录中。活动组默认展开,
完成时仅在用户未操作时收起;其他已完成组默认收起。这些默认值不依赖思考偏好。单项
活动没有组标题。
-- 工具/搜索载荷保持收起,直到用户打开;没有任何行会自动展开,因此
- 最后一项为思考时绝不会选择更早的工具。活动思考遵循自身披露策略,绝不会展开同级载荷。
-- `Bash` 和 run 行由回合过程披露展开。`keepCommandsExpanded` 开启时,它们位于披露顶层、
- 组旁,相邻行保持独立;关闭时,它们渲染在所属组内。它们绝不是回合过程的同级,详情在
- 用户打开之前保持收起。
+- 工具/搜索载荷保持收起,直到用户打开;没有任何工具行会自动展开,因此
+ 最后一项为思考时绝不会选择更早的工具。思考行遵循显示模式的默认展开规则,绝不会展开同级载荷。
+- `Bash` 和 run 行由回合过程披露展开。`fully-folded` 中它们位于所属组内;
+ `command-first` 中它们位于披露顶层、组旁,相邻行保持独立;`flat` 中没有组,它们
+ 在披露内按转录顺序排列。它们绝不是回合过程的同级,详情在用户打开之前保持收起。
- 处理组跨越完整可用的辅助列,因此扩展
即使标头或有效负载很短,结果详细信息也会保持可用宽度。
- 可见标签是自然语言操作(`Read`、`Ran`、`Searched`),
@@ -1635,15 +1641,16 @@ pi-ai 结果信封携带 `details` 中的结构化有效负载并重复它
| 状态 | 标头处理 | 扩展内容 |
|---|---|---|
-| 运行中 | 渐进动作配可读文字与脉冲标记;`run` 行还显示旋转器,并让 `Working…` 旁状态点脉冲 | 活动多项组默认展开;没有条目载荷会自动展开;活动思考遵循自身指示器/披露策略 |
+| 运行中 | 渐进动作配可读文字与脉冲标记;`run` 行还显示旋转器,并让 `Working…` 旁状态点脉冲 | 活动多项组默认展开;除显示模式的思考默认值外,没有工具/搜索载荷会自动展开;活动思考遵循自身指示器/披露策略 |
| 成功 | 过去时动作加结果芯片;除 `run` 行状态点和 `Done` 外不显示绿色成功徽标 | 先显示结果块,再显示尚未呈现的参数;未操作的活动组在完成时收起,手动组与条目选择保留 |
| 错误 | 过去时动作加紧凑危险状态;详情默认收起,只在用户请求时展开。只要命令退出码非零,`run` 行就处于此状态,不受调用报告影响(D227) | 先显示错误说明,再显示参数 |
| 被拒绝 | 静音 `Denied` 状态;载荷在请求前保持关闭 | 可用时显示权限结果 |
### 9.6 互动
-- 单击条目只展开/收起该结果载荷。载荷默认关闭。没有载荷会自动展开,因此只有用户打开
- 的那一行是展开的;失败和被拒行行为相同。
+- 单击条目只展开/收起该结果载荷。工具/搜索载荷默认关闭。没有工具/搜索载荷会自动展开
+ (思考行遵循上文的显示模式默认值),因此只有用户打开的那一行是展开的;失败和被拒行
+ 行为相同。
- 单击处理标题只展开/收起该有序活动列表。活动组默认展开,完成时仅在用户未操作的情况下
收起;其他已完成组默认收起。展开组不会展开所有条目。
- 单击或用键盘激活展开思考、工具详情、委派工作或处理步骤旁的左侧栏,只收起所属
diff --git a/docs/zh-CN/spec/04-ux/09-interaction-patterns.md b/docs/zh-CN/spec/04-ux/09-interaction-patterns.md
index 29f46e1f7..e448c9726 100644
--- a/docs/zh-CN/spec/04-ux/09-interaction-patterns.md
+++ b/docs/zh-CN/spec/04-ux/09-interaction-patterns.md
@@ -703,24 +703,28 @@
自动展开。
- 统一的展示为每个已加载的助手回合提供一个可折叠的过程披露。它包含思考、工具、托管搜索、
中间进度文字以及该回合的 `Bash`/run 行;末尾回答、助手错误和中止后的末尾文字留在
- 披露之外。
-- 连续活动片段仅在当前思考偏好下至少有两个可见项时获得组披露。进度文字或命令行结束
- 该片段,单项活动直接使用自身披露,被隐藏的思考不会制造多余组;Task 拓扑保持独立。
- `keepCommandsExpanded`(默认开启)只决定命令行在该披露内的位置:开启时把 `Bash` 和
- run 别名从组中提取为顶层独立行,相邻调用保持分离;关闭时命令行留在所在组的流程中。
- 两种取值都不会增加披露,也不会让命令行落在回合过程之外。
+ 披露之外。`过程显示`模式选择布局:`flat` 没有嵌套组,`command-first` 将命令提升为
+ 独立行,`fully-folded`(默认)让命令留在所属组内。
+- 连续活动片段仅在当前思考偏好下至少有两个可见项时获得组披露,且只出现在
+ `command-first` 或 `fully-folded` 中。`fully-folded` 由普通助手进度文字结束片段;
+ `command-first` 由普通助手进度消息或命令结束片段。单项活动直接使用自身披露,被隐藏的
+ 思考不会制造多余组;Task 拓扑保持独立。任何模式都不会增加第二个顶层披露,也不会让
+ 命令行落在回合过程之外。
- 活动普通组默认展开,完成时仅在用户未操作的情况下收起;其他已完成组默认收起,而记录过
- 失败或被拒工具的未接管活动组会在恢复期间保持展开。这些组默认值不依赖任一偏好。收起
+ 失败或被拒工具的未接管活动组会在恢复期间保持展开。这些组默认值不依赖思考偏好。收起
回合披露会隐藏其下所有组与命令行,但不会清除它们的选择;重新展开时恢复用户此前展开
的组。
- 回合标题按失败、停止、执行中、已完成的优先级显示 `Failed`、`Stopped`、`Running` 或
`Finished`;执行期间压缩上下文与恢复会各自命名,当前步骤为推理时显示 `Thinking`;
转录未记录时长时不显示时长;标题绝不回显当前命令或查询。嵌套组标题与命令行共用它的
左边缘,层级由字号和颜色而不是缩进表达。
-- 条目载荷都不会自动展开:工具调用、托管搜索或计划卡片行在用户打开之前始终只是标题行,
- 包括最后一个活动组的字面最后一项。组的默认展开不变,因此最后一项为思考时
- 绝不会向前回扫。当 `Show thinking` 关闭时,所有条目载荷保持关闭,已完成的推理正文与
- 摘要被隐藏,同时活动思考指示器保持可见;已存推理仍会保留,重新打开偏好时重新出现。
+- 除显示模式的思考默认值外,条目载荷都不会自动展开:工具调用、托管搜索或计划卡片行在
+ 用户打开之前始终只是标题行,包括最后一个活动组的字面最后一项。组的默认展开不变,因此
+ 最后一项为思考时绝不会向前回扫。`Show thinking` 开启时,思考行在「平铺显示」与
+ 「命令工具优先」中默认展开,仅在用户操作时收起;「全折叠显示」保留已发布的仅活动行
+ 自动展开例外。收起的行只显示 Thinking 指示器,不显示摘录。`Show thinking` 关闭时,
+ 不再渲染任何已完成的推理行,仅在推理流式输出期间保留整段运行的 TextShimmer
+ `Thinking` 指示器;已存推理仍会保留,重新打开偏好时重新出现。
- 激活组或条目标题只切换该层级。收起父级会保留子级状态,重新展开时恢复,
同级组彼此独立;展开父级不是“全部展开”。
- 手动操作条目会把所属组标记为用户接管,但不会切换该组。流式更新和完成不会
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 20fdd2d13..f292bc371 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
@@ -1358,32 +1358,33 @@ task-candidate E2E 从请求工作树运行,但使用主工作区已经准备
多项命令片段。2) 检查已展开的活动组;在更多输出到达时手动收起该组。3) 完成回合,
确认恰好一个过程披露拥有全部回答前的行;收起它并确认其下的组与命令行一并收起,再
重新展开并确认组选择恢复。4) 展开一个已完成组和其中一个条目,复制输出,收起并重新
- 展开该组,再独立打开同级组。5) 切换 `Don't collapse commands` 关闭与开启,检查命令行
- 的渲染位置,同时确认披露数量始终为一个。6) 分别检查单项片段,以及最后一个活动组的
- 字面最后一项为工具/搜索、思考、失败工具和被拒工具。7) 关闭并重新打开
- `Show thinking`,检查活动思考、失败后恢复及完成状态。8) 在保留窗格内重新挂载行,
- 然后重载渲染器并重新打开会话。
+ 展开该组,再独立打开同级组。5) 在 `过程显示` 的「平铺显示」「命令工具优先」
+ 「全折叠显示」之间切换,检查分组、组边界、命令行的渲染位置以及披露数量。6) 分别检查
+ 单项片段,以及最后一个活动组的字面最后一项为工具/搜索、思考、失败工具和被拒工具。
+ 7) 关闭并重新打开 `Show thinking`,检查活动思考、失败后恢复及完成状态。8) 在保留窗格内
+ 重新挂载行,然后重载渲染器并重新打开会话。
- **预期**:一个回合只渲染一个过程披露,其中包含全部回答前的行,`Bash`/run 行也不例外;
末尾回答、助手错误和中止后的末尾文字留在披露之外,待处理操作也一样。活动组默认展开,
并且只在用户未操作时于完成后收起;其他已完成组默认收起。收起回合披露会一并收起其下
- 的组与命令行,重新展开则恢复用户的组选择。`Don't collapse commands` 开启(默认)时,
- 命令行作为组旁的顶层独立行渲染,相邻调用保持分离,详情在打开前保持收起;关闭时它们
- 折回所属组。两种取值都不改变披露数量。单项没有组包装。没有任何条目载荷会自动展开:
- 工具/搜索行在用户打开之前保持标题行,最后一个活动组的字面最后一项也不例外,而思考项
- 保留自身的叶子默认值。回合标题按 `Running`、`Finished`、`Stopped` 或 `Failed` 报告
- 结果,失败与停止优先于正常完成,当前步骤为推理时显示 `Thinking`,绝不回显当前命令;
- 转录未记录时长时不显示时长。当 `Show thinking` 关闭时,活动思考指示器保持可见,已完成的
- 推理正文与摘要被隐藏,空的
- 纯思考容器被省略;重新打开时恢复。父级、子级和同级选择彼此独立;收起/重新展开父级
- 会保留后代,流式更新和完成不会覆盖用户接管的选择。保留窗格中的重新挂载保留选择;
- 渲染器重启重新应用默认值,但工具名称、参数、结果和状态仍会恢复。组标题显示有界运行
- 和问题摘要,不会把整个回合标记为失败。
+ 的组与命令行,重新展开则恢复用户的组选择。「全折叠显示」(默认)中,命令行留在所属组内,
+ 只有普通助手进度文字会拆分活动组;「命令工具优先」中,命令行作为组旁的独立行渲染,
+ 相邻调用保持分离,详情在打开前保持收起,普通助手进度消息或命令会结束当前组;
+ 「平铺显示」中不渲染嵌套组,各行在外层披露内保持转录顺序。所有模式都只渲染一个披露。
+ 单项没有组包装。除显示模式的思考默认值外,没有任何条目载荷会自动展开:工具/搜索行在
+ 用户打开之前保持标题行,而思考项绝不会选择更早的工具。回合标题按 `Running`、`Finished`、
+ `Stopped` 或 `Failed` 报告结果,失败与停止优先于正常完成,当前步骤为推理时显示
+ `Thinking`,绝不回显当前命令;转录未记录时长时不显示时长。当 `Show thinking` 关闭时,
+ 不再渲染任何已完成的推理行,仅在推理流式输出期间保留活动的 TextShimmer `Thinking`
+ 指示器;重新打开时恢复。父级、子级和同级选择彼此独立;收起/重新展开父级会保留后代,
+ 流式更新和完成不会覆盖用户接管的选择。保留窗格中的重新挂载保留选择;渲染器重启重新
+ 应用默认值,但工具名称、参数、结果和状态仍会恢复。组标题显示有界运行和问题摘要,不会
+ 把整个回合标记为失败。
- **链接规格**:`04-ux/01-ui-ia.md`、`04-ux/07-ui-design-system.md`、
`04-ux/08-component-spec.md`、`04-ux/09-interaction-patterns.md`
- **验收**:C(聊天流)、E(工具)、F(持久性)
- **里程碑**:M3
-- **状态**:草案。单元与样式检查覆盖单披露、命令折叠和标题规则;本场景仍是转录重新加载
- 的预期人工行为。
+- **状态**:草案。单元与样式检查覆盖显示模式、思考默认值与标题规则;本场景仍是转录
+ 重新加载的预期人工行为。
#### E2E-TRANSCRIPT-invalid-utf8-window-remains-readable
@@ -9204,39 +9205,55 @@ Follow the [current S3 acceptance scenario](/spec/06-delivery/04-e2e-test-plan#e
### E2E-CHAT-turn-process-and-thinking-display
- **先决条件:** 一个回合包含进度段落 A、多次搜索及思考、进度段落 B、多条命令及
- 思考和最终回答;`Show thinking` 偏好开启与关闭两种状态;`Don't collapse commands`
- 偏好开启与关闭两种状态;旧版消息级转录搜索目标。
-- **步骤:** 确认活动组默认展开,让同一回合在无人操作时完成,并确认组收起。另一个
- 回合中,明确展开已完成组,并确认后续更新仍保留该选择;随后收起回合披露并确认组随之
- 收起,再重新展开并确认组选择恢复。关闭 `Show thinking`,确认活动思考指示器仍然可见、
- 已完成的推理行和摘要消失且不残留空的纯思考容器;再重新打开,确认已完成的推理行恢复。
- 关闭 `Don't collapse commands`,确认命令行折回所属组且回合仍只渲染一个披露;再开启,
- 确认独立行恢复。确认标题分别显示执行中、已完成、已停止或失败,执行期间压缩上下文与
- 恢复会各自命名,未记录时长时不显示时长,且绝不回显当前命令。检查嵌套路径,包括相互
- 独立的组/条目切换、父级收起与恢复、单项片段、字面最后一项选择、失败/被拒/恢复、
- 保留窗格重新挂载、命令行详情在打开前保持收起,以及旧版搜索定位。
-- **预期:** 一个回合只渲染一个过程披露,包含全部回答前的行,命令行也不例外;最终回答、
- 助手错误、中止后的末尾文字和待处理操作留在披露之外。活动组默认展开;未操作的组在回合
- 完成时收起,用户明确选择的状态继续保留,并在外层披露重新展开时恢复。这些组默认值不
- 依赖 `Show thinking` 偏好。`Don't collapse commands` 开启时,命令行作为组旁的顶层独立
- 行渲染,相邻行保持独立,详情在用户打开前保持收起;关闭时它们折回所属组。两种取值都
- 不改变披露数量。回合标题按执行中、已完成、已停止、失败的顺序报告,失败与停止优先于
- 正常完成,当前步骤为推理时显示 `Thinking`,执行期间压缩上下文和恢复会各自命名,未记录
- 时长时不显示时长,且绝不回显当前命令。嵌套组标题与命令行共用回合标题的左边缘。
- `Show thinking` 关闭时,活动思考指示器
- 保持可见,已完成的推理行和摘要被隐藏,空的纯思考容器被省略;重新打开时恢复。单项没有
- 组。没有任何条目载荷会自动展开:工具/搜索行在用户打开之前保持收起,而思考项保留自身
- 的叶子默认值。父级、子级和同级状态相互独立;窗格拥有的用户选择跨更新、偏好切换和重新
- 挂载保留,渲染器重启后重新应用默认值。搜索只展开拥有目标消息的回合过程和活动组,每个
- 请求应用一次;条目级精确定位不在本次范围内,被偏好隐藏的推理会保持隐藏,直到用户打开
- `Show thinking`。已保存的 `showThinking` 跨重启保留;缺失值回退到旧版
- `thinkingDisplayMode`(`compact` 隐藏,`detailed`/未知/缺失显示)。
+ 思考和最终回答;`Show thinking` 偏好开启与关闭两种状态;`过程显示` 偏好分别为
+ 「平铺显示」「命令工具优先」「全折叠显示」;重启后保留已保存的设置;旧版消息级
+ 转录搜索目标。
+- **步骤:** 确认活动组默认展开,让同一回合在无人操作时完成,并确认过程收起,只剩最终
+ 回答(以及错误或待处理操作面)。另一个回合中,明确展开已完成组,并确认后续更新仍保留
+ 该选择;随后收起回合披露并确认组随之收起,再重新展开并确认组选择恢复。在「全折叠显示」
+ 中,确认命令行留在所属活动组内,且只有普通助手进度文字会拆分活动组。在「命令工具优先」
+ 中,确认 `Bash`/run 行作为组旁的独立行渲染,普通助手进度消息或命令会结束当前组,
+ 相邻调用保持分离,思考行默认展开。在「平铺显示」中,确认不渲染嵌套活动组,外层披露按
+ 转录顺序列出工具、命令、思考和进度行,工具详情保持收起。在每种模式中确认回合只渲染
+ 一个外层披露,收起它会隐藏、重新展开会恢复其下的行。关闭 `Show thinking`,确认不再
+ 渲染任何已完成的推理行,仅在推理流式输出期间保留整段运行的 TextShimmer `Thinking`
+ 指示器,不使用转圈、脉冲圆点或逐字符动画,减少动态效果时保持静态;重新打开后确认
+ 已完成的推理行恢复。分别选择每个 `过程显示` 值并重启,确认设置保留;移除已保存的值,
+ 确认默认使用「全折叠显示」。确认标题分别显示执行中、已完成、已停止或失败,执行期间
+ 压缩上下文与恢复会各自命名,未记录时长时不显示时长,且绝不回显当前命令。检查嵌套路径,
+ 包括相互独立的组/条目切换、父级收起与恢复、单项片段、字面最后一项选择、失败/被拒/
+ 恢复、保留窗格重新挂载、命令行详情在打开前保持收起,以及旧版搜索定位。
+- **预期:** 一个回合只渲染一个过程披露,包含全部回答前的行,最终回答、助手错误、中止后
+ 的末尾文字和待处理操作留在披露之外;没有最终回答文字时,过程标题和这些错误或待处理
+ 操作面仍然保留。未被操作的披露在完成时收起。「平铺显示」中没有嵌套活动组,活动工具、
+ 命令、思考和进度行按转录顺序排列,工具详情保持收起。「命令工具优先」中,`Bash`/run 行
+ 作为组旁的独立行,相邻调用保持分离,普通助手进度消息或命令会结束当前组,因此中间进度
+ 段落和每条命令都会开启新组。「全折叠显示」(默认)中,命令行留在所属组内,只有普通
+ 助手进度文字会拆分活动组,因此中间进度段落会结束前一组,后续活动开启新组。只有在至少
+ 两个可见项时才显示组;单项没有组。思考行在「平铺显示」与「命令工具优先」中默认展开;
+ 「全折叠显示」保留已发布的例外:较早的行保持收起,只有最后一个活动行在其为当前步骤时
+ 展开,完成后收起。用户明确选择的状态继续保留,并在外层披露重新展开时恢复;这些组默认值
+ 不依赖 `Show thinking` 偏好。回合标题按执行中、已完成、已停止、失败的顺序报告,失败与
+ 停止优先于正常完成,当前步骤为推理时显示 `Thinking`,执行期间压缩上下文和恢复会各自
+ 命名,未记录时长时不显示时长,且绝不回显当前命令。嵌套组标题与命令行共用回合标题的
+ 左边缘。`Show thinking` 关闭时,不再渲染任何已完成的推理行,仅在推理流式输出期间保留
+ 整段运行的 TextShimmer `Thinking` 指示器;重新打开时恢复。除显示模式的思考默认值外,
+ 没有任何条目载荷会自动展开:工具/搜索行在用户打开之前保持收起。父级、子级和同级状态
+ 相互独立;窗格拥有的用户选择跨更新、偏好切换和重新挂载保留,渲染器重启后重新应用默认值。
+ 搜索只展开拥有目标消息的回合过程,以及存在时的活动组,每个请求应用一次;条目级精确定位
+ 不在本次范围内,被偏好隐藏的推理会保持隐藏,直到用户打开 `Show thinking`。已保存的
+ `transcriptDisplayMode` 跨重启保留,缺失或未知值解析为「全折叠显示」;已保存的
+ `showThinking` 跨重启保留,缺失值回退到旧版 `thinkingDisplayMode`(`compact` 隐藏,
+ `detailed`/未知/缺失显示)。
- **2026-09-20 变更的验证范围:** 本次变更只包含多级折叠与活动组呈现;精确转录搜索
定位不在本次范围内,保持原有搜索行为。
-- **自动化:** `pnpm test:e2e:transcript` 覆盖默认及运行中到完成时的过程披露行为;
- `pnpm test:e2e:transcript-disclosure` 验证手动展开状态保留和视口锚定;
- `apps/desktop/test/turn-process.test.mjs` 覆盖过程默认值,
- `apps/desktop/test/thinking-visibility.test.mjs` 覆盖 `showThinking`/旧版解析优先级。
+- **自动化:** `pnpm test:e2e:transcript` 覆盖「命令工具优先」与「全折叠显示」布局
+ 以及运行中到完成时的过程披露行为;`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`
+ 覆盖设置行与搜索索引,`apps/desktop/test/settings-roundtrip.test.mjs` 覆盖规范化、
+ 写入校验与全折叠默认值。
- **规格:** 04-ux/06-settings-ia、04-ux/08-component-spec、
04-ux/09-interaction-patterns;ADR turn-process-and-thinking-display。
### E2E-CONTEXT-estimate-calibration-stays-safe
diff --git a/docs/zh-CN/spec/08-meta/decisions-log.md b/docs/zh-CN/spec/08-meta/decisions-log.md
index ab5cdb1f4..44972d4d0 100644
--- a/docs/zh-CN/spec/08-meta/decisions-log.md
+++ b/docs/zh-CN/spec/08-meta/decisions-log.md
@@ -335,7 +335,7 @@
| D602 | 崩溃转储留在数据目录 | **Electron 的 Crashpad 报告器在 `ready` 之前以本地模式启动(`uploadToServer: false`)。转储放在 `<data_dir>/crash-dumps`,而不是 Electron 默认的 `userData` crashDumps 路径,因此 `PI_DESKTOP_DATA_DIR` profile 不会与其它安装共用转储。下一次持有单实例锁的启动会为新于 `crash-dumps.json` 的转储写一条 `diagnostics` 记录,按 Crashpad `ptype` 分类:任一新转储属于 browser/main 进程则为 `error`,已恢复的 renderer/GPU/utility 崩溃为 `warn`。host-core 与 sidecar 崩溃仍走监督器路径。不上传,不改 IPC,不改 schema。** | 崩溃留下的 minidump 无人读取。Crashpad 也会记录已恢复的渲染进程崩溃,因此下次启动用 `error` 声称上次运行已死是错的;而数据目录之外的转储会逃出 `PI_DESKTOP_DATA_DIR` 隔离。 |
| D619 | 复制公式得到的是它的 TeX 源码 | **仅渲染层:当选区覆盖到渲染出来的公式时,`text/plain` 从 MathML `annotation` 写出——行内 `$…$`,块级 `$$…$$` 独占行,也就是 `lib/latex-math.ts` 把 `\(…\)` 和 `\[…\]` 归一到的那组定界符,且每组定界符都像代码段的围栏那样加长到盖过公式内部出现的最长同字符串——而不是 KaTeX 画的那两棵树。落在公式内部的切口会扩展成整个公式。只有公式被改写:归约后的克隆经由 `Selection.toString()`——复制自己跑的那个序列化器——读回,因此同处一个选区的正文、列表、表格和代码块保留平台自己的读法,包括 `innerText` 会写出、而复制本就会略过的 `user-select: none` 界面零件。不含公式的选区,以及在选区所在位置之外触发的复制,整份交回平台。只写一种 flavour:`text/plain`。接管事件同时丢掉了平台的 `text/html`,且不再写回——归约后的克隆是应用自己的标记,写回去会带上文本读法已略过的 `user-select: none` 界面零件;而改为携带渲染结果则会把每个公式粘贴两遍,因为隐藏 MathML 树的只有 KaTeX 自己的样式表,样式表不会随剪贴板一起走。只有一个由外壳持有的文档级 `copy` 监听器,记录区的右键复制经由同一个模块读取同一个选区。** | 公式粘出来是它的字形,而且每棵渲染树各一份,无法带进 LaTeX 文档或别的 Markdown 编辑器(issue #414)。ADR 0268 当年移除「引用」的理由正是 OS 剪贴板可以替代,那剪贴板就得真的装着源码。 |
| D620 | pi-ai 内置的 API-key 服务成为命名预设 | **向 `NAMED_ENDPOINT_PRESETS` 新增十五条命名预设——Ant Ling、Baseten、Cerebras、Hugging Face、Meta(`responses`)、MiniMax(国际)、Moonshot AI(国际)、NVIDIA、OpenCode Zen、Vercel AI Gateway、Qwen Token 套餐(`alibaba-token-plan`)、Qwen Token 套餐(中国)、小米 Token 套餐(中国/欧洲/新加坡)——各自使用官方主机名;models.dev 键与 pi-ai 提供方 id 不同的那几条,把 pi-ai id 保留为别名。八个内置提供方仍作例外并写明原因:Amazon Bedrock、Azure OpenAI、Cloudflare AI Gateway、Cloudflare Workers AI、Google Vertex AI(URL 里带账户或区域),GitHub Copilot 与 OpenAI Codex(以厂商账号行提供),以及 Radius(这里的 `pi_messages` 仅限账号)。pi-ai 升级后若某提供方既未被覆盖也不在例外中,`packages/agent-runtime/src/pi-ai-provider-sync.test.ts` 会失败。不改协议、存储或 IPC。** | pi-ai 其他能力本就可达,但服务目录的 API-key 一半靠手工维护,已经跟库自带的提供方列表脱节(ADR 0307)。 |
-| D668 | 每回合一个过程披露,并提供命令折叠偏好 | **修订 D661 / `turn-process-and-thinking-display` ADR:每个回合渲染一个顶层过程披露,包含回答前的全部行,`Bash`/run 行也不例外;回答留在披露之外。`Bash` 与 run 别名不再被排除在所有折叠容器之外。可选的布尔值 `AppSettings.keepCommandsExpanded`(缺失即开启)决定命令行是放在其运行所在的组旁,还是留在组内;两种取值都只渲染一个披露。该偏好在渲染时读取,而不是在构建转录条目时读取,因此切换后立即重绘——投影缓存只以消息和压缩为键。披露标题按失败/停止/执行中/已完成的优先级报告,且绝不回显当前条目;披露与它展开的层级共用一条左边缘。`keepCommandsExpanded` 加入可移植应用字段。无 Host 协议、持久化 schema、权限或插件契约变更。见修订后的 ADR、`04-ux/06-settings-ia.md`、`04-ux/08-component-spec.md`、`04-ux/09-interaction-patterns.md` 与 E2E-CHAT-turn-process-and-thinking-display。** | 按时间顺序的分段把同一回合拆成答案上方多个并列披露,而始终可见的命令行也无法被偏好旧分组布局的读者关闭;一个披露加上仅影响展示的偏好同时满足两种需求,且不改变工具收到的内容或持久化内容。 |
+| D668 | 每回合一个过程披露,并提供三种转录显示模式 | **修订 D661 / `turn-process-and-thinking-display` ADR:每个回合渲染一个顶层过程披露,包含回答前的全部行;回答留在披露之外。`AppSettings.transcriptDisplayMode` 选择布局:`flat` 不渲染嵌套活动组,`command-first` 将 `Bash`/run 行作为活动组旁的独立行,`fully-folded`(缺失或无效值的默认)让命令留在所属组内,且只有普通助手进度文字会拆分活动组。该模式在渲染时读取,因此切换后立即重绘——投影缓存只以消息和压缩为键。披露标题按失败/停止/执行中/已完成的优先级报告,且绝不回显当前条目;披露与它展开的层级共用一条左边缘。`transcriptDisplayMode` 加入可移植应用字段;`keepCommandsExpanded` 已弃用,仅为持久化设置兼容性保留,不再暴露,也不再参与渲染读取。无 Host 协议、持久化 schema、权限或插件契约变更。见修订后的 ADR、`04-ux/06-settings-ia.md`、`04-ux/08-component-spec.md`、`04-ux/09-interaction-patterns.md` 与 E2E-CHAT-turn-process-and-thinking-display。** | 按时间顺序的分段把同一回合拆成答案上方多个并列披露,而布尔命令折叠偏好只能表达两种布局;三种模式覆盖平铺、命令优先与已发布的分组视图,且不改变工具收到的内容或持久化内容。 |
## M0. 模型目录决策
@@ -5490,17 +5490,23 @@ Markdown 源码,不是 `text/html` 负载;对禁用行内 HTML 的外部编
schema 或迁移。设置读取通过渲染层 API 规范化应用这些默认值。见
`04-ux/01-ui-ia.md`、`04-ux/06-settings-ia.md` 与 E2E-266。
-## 2026-10-21 —— 每回合一个过程披露与命令折叠偏好(D668)
+## 2026-10-21 —— 每回合一个过程披露与三种转录显示模式(D668)
- D668 修订 D661 / `turn-process-and-thinking-display` ADR:每个回合现在渲染一个顶层
- 过程披露,包含回答前的全部行,`Bash`/run 行也不例外。命令行不再是披露的同级;末尾
- 回答、助手错误、中止后的末尾文字和待处理操作面留在披露之外。
-- `AppSettings.keepCommandsExpanded`(缺失即开启)决定命令行是提取到其运行所在的组旁,
- 还是留在组内。该偏好在渲染时读取,而不是在构建转录条目时读取,因此切换后立即重绘;
- 两种取值都只渲染一个披露。
-- 披露标题按失败/停止/执行中/已完成的优先级报告,执行期间压缩上下文与恢复会各自
- 命名,未记录时长时不显示为零,且绝不回显当前条目。披露与它展开的层级共用一条左边缘。
-- `keepCommandsExpanded` 加入可移植应用字段。已由 `apps/desktop/test/turn-process.test.mjs`、
- `apps/desktop/test/transcript-style.test.mjs` 与交互式转录探针覆盖。见修订后的 ADR、
+ 过程披露,包含回答前的全部行。命令行不再是披露的同级;末尾回答、助手错误、中止后的
+ 末尾文字和待处理操作面留在披露之外。
+- `AppSettings.transcriptDisplayMode` 选择布局。`flat` 不渲染嵌套活动组,按转录顺序列出
+ 各行。`command-first` 保留活动组,但把 `Bash`/run 行提升为独立行,普通进度消息或命令
+ 会结束当前组。`fully-folded` 是缺失或无效值的默认,让命令行留在所属组内,只有普通助手
+ 进度文字会拆分活动组。该模式在渲染时读取,因此切换后立即重绘。
+- `showThinking` 开启时,`flat` 与 `command-first` 中的思考行默认展开;`fully-folded`
+ 保留已发布的例外,只有最后一个活动行在其为当前步骤时展开。关闭偏好时不再渲染任何
+ 已完成的推理行,仅在推理流式输出期间保留整段运行的 TextShimmer `Thinking` 指示器。
+- `keepCommandsExpanded` 已弃用,仅为持久化设置兼容性保留;不再暴露,也不再参与渲染
+ 读取。披露标题、左边缘与窗格拥有的披露记忆保持不变。
+- 已由 `apps/desktop/test/turn-process.test.mjs`、
+ `apps/desktop/test/transcript-display-modes-ui.test.mjs`、
+ `apps/desktop/test/transcript-display-mode-settings.test.mjs` 与
+ `apps/desktop/test/settings-roundtrip.test.mjs` 覆盖。见修订后的 ADR、
`04-ux/06-settings-ia.md`、`04-ux/08-component-spec.md`、
`04-ux/09-interaction-patterns.md` 与 E2E-CHAT-turn-process-and-thinking-display。
diff --git a/packages/i18n/src/locales/de/index.ts b/packages/i18n/src/locales/de/index.ts
index a8de52988..2a4354cfd 100644
--- a/packages/i18n/src/locales/de/index.ts
+++ b/packages/i18n/src/locales/de/index.ts
@@ -1455,6 +1455,11 @@ sklm: {
"thinkingDisplayCompact": "Kompakt",
"showThinking": "Denkprozess anzeigen",
"showThinkingDesc": "Zeigt den Denkprozess des Modells. Wenn aus, bleibt die Live-Denk-Anzeige sichtbar und abgeschlossene Denkzeilen und Auszüge werden ausgeblendet.",
+ "transcriptDisplayMode": "Prozessanzeige",
+ "transcriptDisplayModeDesc": "Legt fest, wie der Assistentenprozess im Transkript gruppiert wird.",
+ "transcriptDisplayModeFlat": "Flach",
+ "transcriptDisplayModeCommandFirst": "Befehle zuerst",
+ "transcriptDisplayModeFullyFolded": "Vollständig eingeklappt",
"keepCommandsExpanded": "Befehle nicht einklappen",
"keepCommandsExpandedDesc": "Shell-Aufrufe bleiben in eigenen Zeilen, statt in die umgebende Werkzeuggruppe eingeklappt zu werden.",
"contextUsageDisplay": "Kontextnutzung-Anzeige",
diff --git a/packages/i18n/src/locales/en/index.ts b/packages/i18n/src/locales/en/index.ts
index 4cd59d3c2..a82506d83 100644
--- a/packages/i18n/src/locales/en/index.ts
+++ b/packages/i18n/src/locales/en/index.ts
@@ -1469,6 +1469,11 @@ sklm: {
thinkingDisplayCompact: "Compact",
showThinking: "Show thinking",
showThinkingDesc: "Show the model's reasoning. Off keeps the live thinking indicator visible and hides completed reasoning rows and excerpts.",
+ transcriptDisplayMode: "Transcript display",
+ transcriptDisplayModeDesc: "Choose how the assistant process is grouped in the transcript.",
+ transcriptDisplayModeFlat: "Flat",
+ transcriptDisplayModeCommandFirst: "Commands first",
+ transcriptDisplayModeFullyFolded: "Fully folded",
keepCommandsExpanded: "Don't collapse commands",
keepCommandsExpandedDesc: "Keep shell calls on their own rows instead of folding them into the surrounding tool group.",
contextUsageDisplay: "Context usage readout",
diff --git a/packages/i18n/src/locales/es/index.ts b/packages/i18n/src/locales/es/index.ts
index e36c4cf05..a235bc818 100644
--- a/packages/i18n/src/locales/es/index.ts
+++ b/packages/i18n/src/locales/es/index.ts
@@ -1455,6 +1455,11 @@ sklm: {
"thinkingDisplayCompact": "Compacto",
"showThinking": "Mostrar razonamiento",
"showThinkingDesc": "Muestra el razonamiento del modelo. Desactivado, el indicador de razonamiento en vivo sigue visible y las filas y extractos de razonamiento completados quedan ocultos.",
+ "transcriptDisplayMode": "Visualización del proceso",
+ "transcriptDisplayModeDesc": "Elige cómo se agrupa el proceso del asistente en la transcripción.",
+ "transcriptDisplayModeFlat": "Plano",
+ "transcriptDisplayModeCommandFirst": "Comandos primero",
+ "transcriptDisplayModeFullyFolded": "Totalmente plegado",
"keepCommandsExpanded": "No plegar los comandos",
"keepCommandsExpandedDesc": "Las llamadas de shell se mantienen en filas propias en lugar de plegarse en el grupo de herramientas contiguo.",
"contextUsageDisplay": "Lectura del uso del contexto",
diff --git a/packages/i18n/src/locales/fr/index.ts b/packages/i18n/src/locales/fr/index.ts
index c3f39ca01..ed45c0db0 100644
--- a/packages/i18n/src/locales/fr/index.ts
+++ b/packages/i18n/src/locales/fr/index.ts
@@ -1455,6 +1455,11 @@ sklm: {
"thinkingDisplayCompact": "Compact",
"showThinking": "Afficher le raisonnement",
"showThinkingDesc": "Affiche le raisonnement du modèle. Désactivé, l'indicateur de raisonnement en direct reste visible et les lignes et extraits de raisonnement terminés sont masqués.",
+ "transcriptDisplayMode": "Affichage du processus",
+ "transcriptDisplayModeDesc": "Choisit comment le processus de l'assistant est regroupé dans la transcription.",
+ "transcriptDisplayModeFlat": "À plat",
+ "transcriptDisplayModeCommandFirst": "Commandes d'abord",
+ "transcriptDisplayModeFullyFolded": "Entièrement replié",
"keepCommandsExpanded": "Ne pas replier les commandes",
"keepCommandsExpandedDesc": "Les appels shell restent sur leurs propres lignes au lieu d'être repliés dans le groupe d'outils voisin.",
"contextUsageDisplay": "Affichage de l'usage du contexte",
diff --git a/packages/i18n/src/locales/ko/index.ts b/packages/i18n/src/locales/ko/index.ts
index 483452762..fbfe5c79c 100644
--- a/packages/i18n/src/locales/ko/index.ts
+++ b/packages/i18n/src/locales/ko/index.ts
@@ -1465,6 +1465,11 @@ sklm: {
thinkingDisplayCompact: "간결",
showThinking: "사고 과정 표시",
showThinkingDesc: "모델의 사고 과정을 표시합니다. 끄면 실시간 사고 표시기는 계속 보이고 완료된 사고 행과 발췌는 숨겨집니다.",
+ transcriptDisplayMode: "프로세스 표시",
+ transcriptDisplayModeDesc: "트랜스크립트에서 어시스턴트 프로세스를 묶는 방식을 선택합니다.",
+ transcriptDisplayModeFlat: "평면 표시",
+ transcriptDisplayModeCommandFirst: "명령 우선",
+ transcriptDisplayModeFullyFolded: "전체 접기",
keepCommandsExpanded: "명령 접지 않기",
keepCommandsExpandedDesc: "셸 호출을 주변 도구 그룹에 접지 않고 자체 행으로 유지합니다.",
contextUsageDisplay: "컨텍스트 사용량 표시",
diff --git a/packages/i18n/src/locales/pt-BR/index.ts b/packages/i18n/src/locales/pt-BR/index.ts
index e4d19e8e1..eacfa53f9 100644
--- a/packages/i18n/src/locales/pt-BR/index.ts
+++ b/packages/i18n/src/locales/pt-BR/index.ts
@@ -1428,6 +1428,11 @@ export const ptBR = {
thinkingDisplayCompact: "Compacto",
showThinking: "Mostrar raciocínio",
showThinkingDesc: "Mostra o raciocínio do modelo. Quando desativado, o indicador de raciocínio ao vivo continua visível e as linhas e trechos de raciocínio concluídos ficam ocultos.",
+ transcriptDisplayMode: "Exibição do processo",
+ transcriptDisplayModeDesc: "Escolha como o processo do assistente é agrupado na transcrição.",
+ transcriptDisplayModeFlat: "Plano",
+ transcriptDisplayModeCommandFirst: "Comandos primeiro",
+ transcriptDisplayModeFullyFolded: "Totalmente recolhido",
keepCommandsExpanded: "Não recolher comandos",
keepCommandsExpandedDesc: "As chamadas de shell ficam em linhas próprias em vez de serem recolhidas no grupo de ferramentas ao redor.",
contextUsageDisplay: "Indicador de uso do contexto",
diff --git a/packages/i18n/src/locales/tr/index.ts b/packages/i18n/src/locales/tr/index.ts
index 4f3ef8364..26b8f4015 100644
--- a/packages/i18n/src/locales/tr/index.ts
+++ b/packages/i18n/src/locales/tr/index.ts
@@ -1459,6 +1459,11 @@ sklm: {
thinkingDisplayCompact: "Sade",
showThinking: "Düşünmeyi göster",
showThinkingDesc: "Modelin düşünmesini gösterir. Kapalıyken canlı düşünme göstergesi görünür kalır; tamamlanan düşünme satırları ve alıntılar gizlenir.",
+ transcriptDisplayMode: "Süreç görünümü",
+ transcriptDisplayModeDesc: "Asistan sürecinin transkriptte nasıl gruplanacağını seçer.",
+ transcriptDisplayModeFlat: "Düz",
+ transcriptDisplayModeCommandFirst: "Önce komutlar",
+ transcriptDisplayModeFullyFolded: "Tamamen katlanmış",
keepCommandsExpanded: "Komutları katlama",
keepCommandsExpandedDesc: "Kabuk çağrıları, çevresindeki araç grubuna katlanmak yerine kendi satırlarında kalır.",
contextUsageDisplay: "Bağlam kullanımı göstergesi",
diff --git a/packages/i18n/src/locales/zh-CN/index.ts b/packages/i18n/src/locales/zh-CN/index.ts
index fe9dd50d8..c1c7cc373 100644
--- a/packages/i18n/src/locales/zh-CN/index.ts
+++ b/packages/i18n/src/locales/zh-CN/index.ts
@@ -1449,6 +1449,11 @@ sklm: {
thinkingDisplayCompact: "精简",
showThinking: "显示思考",
showThinkingDesc: "显示模型的推理内容。关闭后仍显示实时思考指示器,并隐藏已完成的推理行和摘要。",
+ transcriptDisplayMode: "过程显示",
+ transcriptDisplayModeDesc: "选择助手过程在对话中的分组方式。",
+ transcriptDisplayModeFlat: "平铺显示",
+ transcriptDisplayModeCommandFirst: "命令工具优先",
+ transcriptDisplayModeFullyFolded: "全折叠显示",
keepCommandsExpanded: "命令不折叠",
keepCommandsExpandedDesc: "命令行单独成行显示,不并入上下文的工具分组。",
contextUsageDisplay: "上下文用量读数",
diff --git a/packages/i18n/src/locales/zh-TW/index.ts b/packages/i18n/src/locales/zh-TW/index.ts
index 1f13023ed..434bfa416 100644
--- a/packages/i18n/src/locales/zh-TW/index.ts
+++ b/packages/i18n/src/locales/zh-TW/index.ts
@@ -1449,6 +1449,11 @@ sklm: {
thinkingDisplayCompact: "精簡",
showThinking: "顯示思考",
showThinkingDesc: "顯示模型的推理內容。關閉後仍顯示即時思考指示器,並隱藏已完成的推理列和摘要。",
+ transcriptDisplayMode: "過程顯示",
+ transcriptDisplayModeDesc: "選擇助理過程在對話中的分組方式。",
+ transcriptDisplayModeFlat: "平鋪顯示",
+ transcriptDisplayModeCommandFirst: "命令工具優先",
+ transcriptDisplayModeFullyFolded: "全摺疊顯示",
keepCommandsExpanded: "指令不折疊",
keepCommandsExpandedDesc: "指令列單獨成列顯示,不併入上下文的工具分組。",
contextUsageDisplay: "上下文用量讀數",
diff --git a/packages/shared/src/types/settings.ts b/packages/shared/src/types/settings.ts
index ce2f9040d..fbb7c1b27 100644
--- a/packages/shared/src/types/settings.ts
+++ b/packages/shared/src/types/settings.ts
@@ -37,6 +37,8 @@ export type JevKeyCheckResult = {
*/
export type CloseBehavior = "ask" | "tray" | "quit";
+export type TranscriptDisplayMode = "flat" | "command-first" | "fully-folded";
+
export type AppSettings = {
imageGeneration?: import("../image-generation.js").ImageGenerationBinding | null;
/** All models marked for image generation; absent falls back to imageGeneration. */
@@ -107,13 +109,19 @@ export type AppSettings = {
*/
showThinking?: boolean;
/**
- * Keep shell calls (`Bash`, `exec`, `shell`, …) as their own rows instead of
- * folding them into the surrounding tool group. Absent means `true`, so an
- * existing install keeps today's scannable command rows.
+ * How the assistant turn's process is grouped in the transcript.
+ *
+ * - `flat`: one outer process disclosure, no nested activity groups.
+ * - `command-first`: run rows stay standalone; other activity groups.
+ * - `fully-folded`: the v0.20.0 layout; run rows join activity groups.
*
- * The turn's process disclosure itself is not affected: both values render
- * exactly one top-level disclosure per turn. This preference only decides
- * whether a run row sits inside a group or beside it.
+ * Absent means `fully-folded`, preserving the released transcript layout.
+ * This is presentation only and never changes tool execution or stored data.
+ */
+ transcriptDisplayMode?: TranscriptDisplayMode;
+ /**
+ * @deprecated Replaced by `transcriptDisplayMode`. Retained for persisted
+ * settings and older clients; current rendering no longer reads it.
*/
keepCommandsExpanded?: boolean;
/**
diff --git a/scripts/e2e/transcript-render.tsx b/scripts/e2e/transcript-render.tsx
index d3ce4d7d8..8f535942f 100644
--- a/scripts/e2e/transcript-render.tsx
+++ b/scripts/e2e/transcript-render.tsx
@@ -64,7 +64,7 @@ async function markdownLinkInteractionProbe(
useAppStore.setState({
activeSessionId: "markdown-link-probe",
page: "chat",
- settings: { ...initialState.settings, linkOpenTarget: "workpanel" },
+ settings: { ...initialState.settings, linkOpenTarget: "workpanel", transcriptDisplayMode: "command-first" },
openUrlInWorkPanel: (url) => openedUrls.push(url),
});
flushSync(() =>
@@ -362,6 +362,7 @@ globalThis.resetContextOverflowRecoveryProbe = async () => {
enterToSend: true,
onboardingDismissed: false,
smoothStreaming: false,
+ transcriptDisplayMode: "command-first",
},
});
};
@@ -424,6 +425,7 @@ globalThis.transcriptRenderProbe = async () => {
enterToSend: true,
onboardingDismissed: false,
smoothStreaming: false,
+ transcriptDisplayMode: "command-first",
},
});
const container = document.createElement("div");
diff --git a/scripts/e2e/turn-process.tsx b/scripts/e2e/turn-process.tsx
index 98c5b10dd..3f25c1133 100644
--- a/scripts/e2e/turn-process.tsx
+++ b/scripts/e2e/turn-process.tsx
@@ -6,7 +6,7 @@ import { en } from "@pi-desktop/i18n";
import type { AppSettings, UiMessage } from "@pi-desktop/shared";
import { AssistantTurn } from "../../apps/desktop/src/features/chat/transcript/AssistantTurn";
import { ShowThinkingRow } from "../../apps/desktop/src/components/settings/ShowThinkingRow";
-import { KeepCommandsExpandedRow } from "../../apps/desktop/src/components/settings/KeepCommandsExpandedRow";
+import { TranscriptDisplayModeRow } from "../../apps/desktop/src/components/settings/TranscriptDisplayModeRow";
import { buildTranscriptEntries } from "../../apps/desktop/src/lib/assistant-turns";
import { TranscriptSearchContext } from "../../apps/desktop/src/lib/transcript-search-context";
import type { TranscriptSearchTarget } from "../../apps/desktop/src/lib/transcript-reading";
@@ -67,6 +67,7 @@ export async function turnProcessProbe() {
theme: "light",
enterToSend: true,
onboardingDismissed: true,
+ transcriptDisplayMode: "command-first",
};
const setSettings = (patch: Partial<AppSettings> = {}) =>
flushSync(() => useAppStore.setState({ settings: { ...baseSettings, ...patch } }));
@@ -540,7 +541,7 @@ export async function turnProcessProbe() {
container.querySelectorAll(".turn-run-row").length === 2,
"the mounted turn starts with standalone command rows",
);
- setSettings({ keepCommandsExpanded: false });
+ setSettings({ transcriptDisplayMode: "fully-folded" });
check(
container.querySelectorAll(".turn-process").length === 1 &&
container.querySelectorAll(".turn-run-row").length === 0,
@@ -575,9 +576,21 @@ export async function turnProcessProbe() {
"toggling command folding back restores standalone rows without a remount",
);
+ // Flat keeps the outer process but suppresses nested activity groups and
+ // standalone run wrappers.
+ setSettings({ transcriptDisplayMode: "flat" });
+ render(contiguous, false, null, "flat-mode");
+ check(
+ container.querySelector(".turn-process") !== null &&
+ container.querySelectorAll(".process-activity-group").length === 0 &&
+ container.querySelectorAll(".turn-run-row").length === 0,
+ "flat mode renders one outer process with no nested activity groups",
+ );
+ setSettings();
+
// The active tail may be wrapped in a merged off-mode part; the merged group
// must still receive the live disclosure defaults.
- setSettings({ keepCommandsExpanded: false });
+ setSettings({ transcriptDisplayMode: "fully-folded" });
render(
[read, grep, run("live-folded-bash", "pnpm test")],
true,
@@ -630,29 +643,32 @@ export async function turnProcessProbe() {
"an aborted running Bash row reports the turn stopped",
);
- // The Settings row is a boolean command-folding toggle, defaulting to on.
- let foldSaved: Partial<AppSettings> | undefined;
+ // The Settings row is a three-way transcript display mode control.
+ let modeSaved: Partial<AppSettings> | undefined;
flushSync(() =>
root.render(
<I18nextProvider i18n={i18n}>
- <KeepCommandsExpandedRow
+ <TranscriptDisplayModeRow
settings={{ ...baseSettings }}
saveSettings={async (patch) => {
- foldSaved = patch;
+ modeSaved = patch;
}}
/>
</I18nextProvider>,
),
);
- const foldToggle = container.querySelector<HTMLElement>('[role="switch"]');
+ const modeButtons = Array.from(
+ container.querySelectorAll<HTMLElement>('[role="radiogroup"] button'),
+ );
check(
- foldToggle?.getAttribute("aria-checked") === "true",
- "the command-folding row defaults to keeping commands expanded",
+ modeButtons.length === 3 &&
+ modeButtons[1]?.getAttribute("aria-checked") === "true",
+ "the transcript-display row exposes flat, command-first and fully-folded with command-first selected",
);
- click(foldToggle);
+ click(modeButtons[2] ?? null);
check(
- foldSaved?.keepCommandsExpanded === false,
- "the command-folding row saves the boolean preference",
+ modeSaved?.transcriptDisplayMode === "fully-folded",
+ "the transcript-display row saves the selected mode",
);