Skip to content

feat(web): the working row shows the agent's latest thought (upstream #16284) - #270

Merged
TheDarkPhantom merged 3 commits into
mainfrom
feat/upstream-sidebar-latest-thought
Oct 9, 2026
Merged

TheDarkPhantom merged 3 commits into
mainfrom
feat/upstream-sidebar-latest-thought

Conversation

@TheDarkPhantom

Copy link
Copy Markdown
Owner

While an agent works, the live "Working for Xs" row at the bottom of the chat now shows the first sentence of the agent's latest thought, with a brain icon. A finding no longer hides behind the collapsed Thought row and the tool calls that follow it. Clicking the line opens that thought; an open thought hides the preview.

Note: upstream pingdotgg#16284 ("live row shows the agent's latest thought", Theo Browne) changes the chat timeline's live activity row, not a sidebar. Neither sidebar is touched here (see "Left out").

How it was ported

Upstream's thoughts are work-log entries inside a live tool group (work-live row). The fork keeps thoughts as reasoning role messages (ported in #259) and has no work-live row, so the change is re-expressed against the fork's working indicator row:

  • liveThoughtLine (verbatim from upstream's client-runtime work-log/presentation.ts, which the fork lacks) lives in a new apps/web/src/components/chat/liveThoughtLine.ts. A bold-only opening line (the Codex summary heading) wins, otherwise the first sentence, markdown flattened.
  • deriveMessagesTimelineRows attaches thought: { messageId, line } to the working row: the latest non-empty reasoning message since the last user message, so a steer starts fresh.
  • LiveThoughtLine renders it above the working status in MessagesTimeline.tsx. It is hidden while compacting, like the rest of the status row.

Performance

  • Client-only. Nothing new goes over the websocket. It reads the thread detail the timeline already has.
  • The lookup walks backwards only through the current turn and stops at the last user message, so long threads cost nothing extra.
  • Row stability compares the derived line, not the message, so the working row stops re-rendering once a streaming thought's first sentence is complete. A test covers this.
  • No animation. Static icon and text, clamped to four lines.

Providers

Claude (including its between-step notes), Codex, and OpenCode emit reasoning, so they show the line. Cursor and Grok emit none, so the working row looks the same as before.

Left out

  • Mobile (desktop-only fork) and upstream's WorkLog.tsx wrapLabel alignment tweak (the fork has no WorkLog.tsx; the new line handles its own alignment).
  • Sidebars (v1 and SidebarV2). Upstream did not change them. Thread shells carry no thought data, so a sidebar line would need a new shell field broadcast to every client on every thought.
  • No upstream follow-ups touch this feature (git log 95ccbf4066..upstream/main finds none).

Verification

  • vp test run on liveThoughtLine.test.ts (4 passed), MessagesTimeline.logic.test.ts (50 passed), MessagesTimeline.test.tsx (23 passed). The render test fails when the line is removed.
  • vp lint and vp fmt --check on changed files: clean.
  • tsgo --noEmit -p apps/web/tsconfig.json: clean.
  • vp run check:avicode: pass. vp run test:avicode: 7 passed.

🤖 Generated with Claude Code

TheDarkPhantom and others added 3 commits October 9, 2026 13:53
Ports upstream's liveThoughtLine helper into a fork-owned file, since the
fork has no client-runtime work-log presentation module.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…tgg#16284)

The working indicator row now derives the first sentence of the latest
non-empty thought since the last user message. Row stability compares the
derived line, so a streaming thought stops re-rendering the row once its
first sentence is complete.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…g#16284)

While the agent works, the working row shows the first sentence of its
latest thought with a brain icon. Clicking it opens that thought; an
already open thought hides the preview.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M labels Oct 9, 2026
@TheDarkPhantom
TheDarkPhantom merged commit c6627a8 into main Oct 9, 2026
12 checks passed
@TheDarkPhantom
TheDarkPhantom deleted the feat/upstream-sidebar-latest-thought branch October 9, 2026 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant