diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx index 94e56ad63f2cd..b597346e12370 100644 --- a/apps/web/src/components/ChatView.tsx +++ b/apps/web/src/components/ChatView.tsx @@ -427,8 +427,6 @@ import { makeThreadErrorSetter, } from "./ChatView.logic"; -const activityCollapsedThreadsSchema = Schema.NullOr(Schema.Record(Schema.String, Schema.Boolean)); - const EMPTY_SEEN_MESSAGES: ReadonlyArray = []; const EMPTY_PROVIDERS: ServerProvider[] = []; const ACTIVE_RUN_STATUSES: ReadonlySet = new Set([ @@ -2006,22 +2004,6 @@ export default function ChatView(props: ChatViewProps) { selectThreadPanelOpen(state.threadPanelVisibilityByThreadKey, activeThreadRef, "inline"), ); const isStandingBot = activeStanding !== null; - const [activityCollapsedThreads, setActivityCollapsedThreads] = useLocalStorage( - "t3code:activity-collapsed-threads", - null, - activityCollapsedThreadsSchema, - ); - const activityCollapsed = - activeThreadKey === null || - activityCollapsedThreads === null || - activityCollapsedThreads[activeThreadKey] !== false; - const toggleActivityCollapsed = () => { - if (activeThreadKey === null) return; - setActivityCollapsedThreads((stored) => ({ - ...stored, - [activeThreadKey]: !activityCollapsed, - })); - }; // oxlint-disable-next-line t3code/no-unreasoned-state-sync -- folds a bot's details card (branch, worktree, PR) the first time this client shows that bot; the panel toggle reopens it and that choice persists useEffect(() => { if (!isStandingBot || !activeThreadRef || !activeThreadKey) return; @@ -3769,11 +3751,6 @@ export default function ChatView(props: ChatViewProps) { {...(threadFindEnabled ? { onFindInThread: openThreadFindStable } : {})} standing={activeStanding} botAvatarState={activeBotAvatarState} - activityCollapsed={ - isServerThread && activeThreadKey !== null - ? { on: activityCollapsed, onToggle: toggleActivityCollapsed } - : null - } /> )} @@ -3831,7 +3808,6 @@ export default function ChatView(props: ChatViewProps) { entriesInput={timelineEntriesInput} draftEntries={isServerThread ? null : draftTimelineEntries} activeThreadKey={activeThreadKey} - collapseActivity={activityCollapsed} unseenDivider={unseenDivider} includeOtherActivity={isStandingBot} decisionRequestedAt={ diff --git a/apps/web/src/components/chat/ChatHeader.tsx b/apps/web/src/components/chat/ChatHeader.tsx index 70a6179864cf5..52a4c2ea2891f 100644 --- a/apps/web/src/components/chat/ChatHeader.tsx +++ b/apps/web/src/components/chat/ChatHeader.tsx @@ -65,11 +65,6 @@ interface ChatHeaderProps { standing?: ThreadStanding | null | undefined; /** Drives the bot avatar's motion in the header; idle when absent. */ botAvatarState?: BotAvatarState | undefined; - /** - * Collapse agent, automation and system activity, or null when the thread has - * no toggle. A standing thread passes it. - */ - activityCollapsed?: { readonly on: boolean; readonly onToggle: () => void } | null | undefined; } function resolveRenameCommit(input: { @@ -97,7 +92,6 @@ export const ChatHeader = memo(function ChatHeader({ onFindInThread, standing, botAvatarState, - activityCollapsed = null, }: ChatHeaderProps) { const gt = useGT(); const activeProjectName = activeProject?.isScratch ? gt("No project") : activeProject?.title; @@ -300,7 +294,6 @@ export const ChatHeader = memo(function ChatHeader({ ) : null} - {isServerThread ? : null} ); @@ -469,47 +462,6 @@ export const ChatHeader = memo(function ChatHeader({ {isServerThread ? : null} - ); }); - -/** - * Switches the timeline between the founder's conversation and everything that - * happened in the thread. Absent when the thread has nothing to collapse. - */ -function ActivityViewToggle({ - collapsed, -}: { - collapsed: { readonly on: boolean; readonly onToggle: () => void } | null; -}) { - const gt = useGT(); - if (collapsed === null) return null; - const label = collapsed.on ? gt("Human conversation") : gt("All activity"); - return ( - - - } - > - {label} - - - {collapsed.on - ? gt("Agent, automation and system updates are collapsed. Click to show everything.") - : gt("Showing everything. Click to keep only your messages and the replies to them.")} - - - ); -} diff --git a/apps/web/src/components/chat/MessagesTimeline.browser.test.tsx b/apps/web/src/components/chat/MessagesTimeline.browser.test.tsx index 02aae57715e8f..504d5620df295 100644 --- a/apps/web/src/components/chat/MessagesTimeline.browser.test.tsx +++ b/apps/web/src/components/chat/MessagesTimeline.browser.test.tsx @@ -657,15 +657,23 @@ describe("MessagesTimeline messages", () => { it("keeps the first and last message headings reachable from either end", async () => { setup(); - const props = { ...baseProps(), collapseActivity: false }; + const props = baseProps(); // Folded messages at both ends: their headings must not live inside the fold. const entries = Array.from({ length: 120 }, (_, index) => index === 0 - ? message("First turn", { scheduledTaskId: TASK_ID }, "turn-0") + ? message( + "First turn", + { scheduledTaskId: TASK_ID, timelineVisibility: "user_timeline" }, + "turn-0", + ) : index === 119 ? message( "Last turn", - { createdBy: "agent", senderThreadId: ThreadId.make("thread-sender") }, + { + createdBy: "agent", + senderThreadId: ThreadId.make("thread-sender"), + timelineVisibility: "user_timeline", + }, "turn-119", ) : message( @@ -1706,12 +1714,17 @@ describe("MessagesTimeline agent messages", () => { const onOpenThread = vi.fn(); await using screen = await renderTimeline( [ - message(AGENT_MESSAGE, { createdBy: "agent", senderThreadId: SENDER_THREAD_ID }), + message(AGENT_MESSAGE, { + createdBy: "agent", + senderThreadId: SENDER_THREAD_ID, + timelineVisibility: "user_timeline", + }), // Sent from a linked environment this client does not reach. message( "Linked review finished", { createdBy: "agent", + timelineVisibility: "user_timeline", linkedSender: { environmentId: EnvironmentId.make("environment-linked"), threadId: SENDER_THREAD_ID, @@ -1721,7 +1734,7 @@ describe("MessagesTimeline agent messages", () => { "message-linked", ), ], - { onOpenThread, collapseActivity: false }, + { onOpenThread }, ); const row = screen.button(/^Agent/); expect(row.textContent).toContain("Review finished"); diff --git a/apps/web/src/components/chat/MessagesTimeline.tsx b/apps/web/src/components/chat/MessagesTimeline.tsx index d5533d0a14652..42321cd474a3d 100644 --- a/apps/web/src/components/chat/MessagesTimeline.tsx +++ b/apps/web/src/components/chat/MessagesTimeline.tsx @@ -368,12 +368,6 @@ interface MessagesTimelineProps { activeFindMatch?: ThreadFindMatch | null; findNavigationId?: number; findSender?: OrchestrationMessageSenderFilter | null; - /** - * Collapse runs of agent, automation and system activity into expandable - * pills, leaving the founder's messages and the model's replies to them. - * Off by default; a standing thread turns it on. - */ - collapseActivity?: boolean; /** Messages that arrived after the place the viewer had been shown; draws a divider and a jump pill. */ unseenDivider?: { readonly afterMessageId: MessageId; readonly count: number } | null; includeOtherActivity?: boolean; @@ -431,7 +425,6 @@ const ConversationTimeline = memo(function ConversationTimeline({ activeFindMatch = null, findNavigationId = 0, findSender = null, - collapseActivity = true, unseenDivider = null, includeOtherActivity = false, decisionRequestedAt, @@ -868,7 +861,7 @@ const ConversationTimeline = memo(function ConversationTimeline({ const senderRows = useSenderFilteredRows(stableRows, findSender); // A sender filter already removed every other message, so collapsing what it // kept would hide the very rows it was asked to show. - const collapseRows = collapseActivity && findSender === null; + const collapseRows = findSender === null; const chatter = collapseRows ? timelineActivityContext( timelineEntries, diff --git a/apps/web/src/i18n/translations/de.json b/apps/web/src/i18n/translations/de.json index 88dc82c44c919..caeb45d0aa2e8 100644 --- a/apps/web/src/i18n/translations/de.json +++ b/apps/web/src/i18n/translations/de.json @@ -3485,10 +3485,6 @@ "890c34762a621a66": "Übergeordneten Thread öffnen: {title}", "7514746d2bd43a1c": "Thread-Titel", "ab42a6d2ab6073d9": "Thread-Aktionen für {title}", - "15996382e99119d3": "Human conversation", - "339ee12600085fde": "All activity", - "1af5644d639848d5": "Agent, automation and system updates are collapsed. Click to show everything.", - "a6643567147e574a": "Showing everything. Click to keep only your messages and the replies to them.", "cd8fd5a47060164b": [ "Neuer Thread in ", { diff --git a/apps/web/src/i18n/translations/en.json b/apps/web/src/i18n/translations/en.json index 6dacbbc09af0a..ee56cf2863c13 100644 --- a/apps/web/src/i18n/translations/en.json +++ b/apps/web/src/i18n/translations/en.json @@ -3484,10 +3484,6 @@ "890c34762a621a66": "Open parent thread: {title}", "7514746d2bd43a1c": "Thread title", "ab42a6d2ab6073d9": "Thread actions for {title}", - "15996382e99119d3": "Human conversation", - "339ee12600085fde": "All activity", - "1af5644d639848d5": "Agent, automation and system updates are collapsed. Click to show everything.", - "a6643567147e574a": "Showing everything. Click to keep only your messages and the replies to them.", "cd8fd5a47060164b": [ "New thread in ", { diff --git a/apps/web/src/i18n/translations/es.json b/apps/web/src/i18n/translations/es.json index 6002bb2f67202..c2a9156f4b6e8 100644 --- a/apps/web/src/i18n/translations/es.json +++ b/apps/web/src/i18n/translations/es.json @@ -3484,10 +3484,6 @@ "890c34762a621a66": "Abrir el hilo principal: {title}", "7514746d2bd43a1c": "Título del hilo", "ab42a6d2ab6073d9": "Acciones del hilo {title}", - "15996382e99119d3": "Human conversation", - "339ee12600085fde": "All activity", - "1af5644d639848d5": "Agent, automation and system updates are collapsed. Click to show everything.", - "a6643567147e574a": "Showing everything. Click to keep only your messages and the replies to them.", "cd8fd5a47060164b": [ "Nuevo hilo en ", { diff --git a/apps/web/src/i18n/translations/fr.json b/apps/web/src/i18n/translations/fr.json index 5cbe3aa89deb2..4925f50d9c9c8 100644 --- a/apps/web/src/i18n/translations/fr.json +++ b/apps/web/src/i18n/translations/fr.json @@ -3484,10 +3484,6 @@ "890c34762a621a66": "Ouvrir le fil parent : {title}", "7514746d2bd43a1c": "Titre du fil", "ab42a6d2ab6073d9": "Actions du fil {title}", - "15996382e99119d3": "Human conversation", - "339ee12600085fde": "All activity", - "1af5644d639848d5": "Agent, automation and system updates are collapsed. Click to show everything.", - "a6643567147e574a": "Showing everything. Click to keep only your messages and the replies to them.", "cd8fd5a47060164b": [ "Nouveau fil dans ", { diff --git a/apps/web/src/i18n/translations/ja.json b/apps/web/src/i18n/translations/ja.json index 5400f6de43ab3..db1e23a6fa72e 100644 --- a/apps/web/src/i18n/translations/ja.json +++ b/apps/web/src/i18n/translations/ja.json @@ -3482,10 +3482,6 @@ "890c34762a621a66": "親スレッドを開く: {title}", "7514746d2bd43a1c": "スレッドのタイトル", "ab42a6d2ab6073d9": "{title} のスレッド操作", - "15996382e99119d3": "Human conversation", - "339ee12600085fde": "All activity", - "1af5644d639848d5": "Agent, automation and system updates are collapsed. Click to show everything.", - "a6643567147e574a": "Showing everything. Click to keep only your messages and the replies to them.", "cd8fd5a47060164b": [ { "i": 1, diff --git a/apps/web/src/i18n/translations/ko.json b/apps/web/src/i18n/translations/ko.json index 722c9dfa778c0..7d1b99636855c 100644 --- a/apps/web/src/i18n/translations/ko.json +++ b/apps/web/src/i18n/translations/ko.json @@ -3482,10 +3482,6 @@ "890c34762a621a66": "상위 스레드 열기: {title}", "7514746d2bd43a1c": "스레드 제목", "ab42a6d2ab6073d9": "{title} 스레드 작업", - "15996382e99119d3": "Human conversation", - "339ee12600085fde": "All activity", - "1af5644d639848d5": "Agent, automation and system updates are collapsed. Click to show everything.", - "a6643567147e574a": "Showing everything. Click to keep only your messages and the replies to them.", "cd8fd5a47060164b": [ { "i": 1, diff --git a/apps/web/src/i18n/translations/pt-BR.json b/apps/web/src/i18n/translations/pt-BR.json index 5907cfa450de2..8b34cf5d7a52d 100644 --- a/apps/web/src/i18n/translations/pt-BR.json +++ b/apps/web/src/i18n/translations/pt-BR.json @@ -3484,10 +3484,6 @@ "890c34762a621a66": "Abrir a thread principal: {title}", "7514746d2bd43a1c": "Título da thread", "ab42a6d2ab6073d9": "Ações da thread {title}", - "15996382e99119d3": "Human conversation", - "339ee12600085fde": "All activity", - "1af5644d639848d5": "Agent, automation and system updates are collapsed. Click to show everything.", - "a6643567147e574a": "Showing everything. Click to keep only your messages and the replies to them.", "cd8fd5a47060164b": [ "Nova thread em ", { diff --git a/apps/web/src/i18n/translations/ru.json b/apps/web/src/i18n/translations/ru.json index 34a9f25966295..f5c4afa06ba9a 100644 --- a/apps/web/src/i18n/translations/ru.json +++ b/apps/web/src/i18n/translations/ru.json @@ -3484,10 +3484,6 @@ "890c34762a621a66": "Открыть родительский тред: {title}", "7514746d2bd43a1c": "Название треда", "ab42a6d2ab6073d9": "Действия с тредом «{title}»", - "15996382e99119d3": "Human conversation", - "339ee12600085fde": "All activity", - "1af5644d639848d5": "Agent, automation and system updates are collapsed. Click to show everything.", - "a6643567147e574a": "Showing everything. Click to keep only your messages and the replies to them.", "cd8fd5a47060164b": [ "Новый тред в ", { diff --git a/apps/web/src/i18n/translations/sv.json b/apps/web/src/i18n/translations/sv.json index 52b210b22497f..ae018de82b99c 100644 --- a/apps/web/src/i18n/translations/sv.json +++ b/apps/web/src/i18n/translations/sv.json @@ -3484,10 +3484,6 @@ "890c34762a621a66": "Öppna överordnad tråd: {title}", "7514746d2bd43a1c": "Trådtitel", "ab42a6d2ab6073d9": "Trådåtgärder för {title}", - "15996382e99119d3": "Human conversation", - "339ee12600085fde": "All activity", - "1af5644d639848d5": "Agent, automation and system updates are collapsed. Click to show everything.", - "a6643567147e574a": "Showing everything. Click to keep only your messages and the replies to them.", "cd8fd5a47060164b": [ "Ny tråd i ", { diff --git a/apps/web/src/i18n/translations/zh.json b/apps/web/src/i18n/translations/zh.json index 48ea59011d21d..802dce776a738 100644 --- a/apps/web/src/i18n/translations/zh.json +++ b/apps/web/src/i18n/translations/zh.json @@ -3488,10 +3488,6 @@ "890c34762a621a66": "打开父会话:{title}", "7514746d2bd43a1c": "会话标题", "ab42a6d2ab6073d9": "{title} 的会话操作", - "15996382e99119d3": "Human conversation", - "339ee12600085fde": "All activity", - "1af5644d639848d5": "Agent, automation and system updates are collapsed. Click to show everything.", - "a6643567147e574a": "Showing everything. Click to keep only your messages and the replies to them.", "cd8fd5a47060164b": [ "在 ", { diff --git a/qa/features.ts b/qa/features.ts index c50bdc690d4b0..2e1a4f141610f 100644 --- a/qa/features.ts +++ b/qa/features.ts @@ -124,9 +124,11 @@ export const FEATURES: ReadonlyArray = [ drive: [ "open a seeded thread", "expect the breadcrumb with project and title", + "expect no Human conversation or All activity mode control", "open Thread actions", ], - success: "Breadcrumb names the project and thread; the actions menu opens.", + success: + "Breadcrumb names the project and thread; the actions menu opens; no separate timeline mode is offered.", code: [`${C}chat/ChatHeader.tsx`], }), f({ @@ -183,10 +185,13 @@ export const FEATURES: ReadonlyArray = [ path: "A thread whose turn ran a command.", drive: [ "open the command-output thread", + "reload with each legacy conversation-mode override", "open the agent updates strip", "expect the command text and its output", + "close the strip and expect the legacy override unchanged", ], - success: "Command and output text are readable in the timeline.", + success: + "Command and output text are readable through inline disclosures regardless of legacy mode overrides.", code: [ `${C}chat/CommandOutputPanel.tsx`, `${C}chat/MessagesTimeline.tsx`, diff --git a/qa/specs/20-thread.spec.ts b/qa/specs/20-thread.spec.ts index c9e156a4598a3..4ff995c17c60e 100644 --- a/qa/specs/20-thread.spec.ts +++ b/qa/specs/20-thread.spec.ts @@ -5,6 +5,9 @@ feature("thread.header", "breadcrumb and actions menu", async ({ page, qa }) => const crumb = page.getByRole("navigation", { name: "Thread breadcrumb" }); await expect(crumb.getByRole("button", { name: "New thread in QA demo" })).toBeVisible(); await expect(crumb.getByRole("heading", { name: "QA showcase" })).toBeVisible(); + await expect( + page.getByRole("button", { name: /^(Human conversation|All activity)$/ }), + ).toHaveCount(0); await crumb.getByRole("button", { name: "Thread actions for QA showcase" }).click(); await expect(page.getByRole("menu").first()).toBeVisible(); await qa.shot("actions"); @@ -64,16 +67,29 @@ feature("timeline.user-input", "agent question shows its options", async ({ page feature("timeline.command-output", "command and output are readable", async ({ page, qa }) => { await qa.open(qa.thread("command")); - await page - .getByRole("button", { name: /agent updates?$/ }) - .first() - .click(); - await expect( - page - .getByRole("region", { name: "Conversation" }) - .getByText("The command printed one JSON line.") - .first(), - ).toBeVisible(); + for (const collapsed of [false, true]) { + const stored = JSON.stringify({ + [`${qa.state.environmentId}:${qa.state.threads.command}`]: collapsed, + }); + await page.evaluate((value) => { + localStorage.setItem("t3code:activity-collapsed-threads", value); + }, stored); + await page.reload(); + const updates = page.getByRole("button", { name: /agent updates?$/ }).first(); + await expect(updates).toHaveAttribute("aria-expanded", "false"); + await updates.click(); + await expect( + page + .getByRole("region", { name: "Conversation" }) + .getByText("The command printed one JSON line.") + .first(), + ).toBeVisible(); + await updates.click(); + await expect(updates).toHaveAttribute("aria-expanded", "false"); + expect( + await page.evaluate(() => localStorage.getItem("t3code:activity-collapsed-threads")), + ).toBe(stored); + } await qa.shot("command"); });