Skip to content

feat(chat): live working line at the end of a run, done steps as one grey line - #2476

Merged
gkhngyk merged 4 commits into
ansvisor:mainfrom
cihan-gyk:feat/chat-live-status
Nov 17, 2026
Merged

gkhngyk merged 4 commits into
ansvisor:mainfrom
cihan-gyk:feat/chat-live-status

Conversation

@cihan-gyk

Copy link
Copy Markdown
Collaborator

Summary

While Chat reads data, pauses before the answer and then writes, nothing moved on screen, so people thought it had frozen. Now a grey live line sits at the very end of the answer while Chat works. It has a pulsing dot, a soft shimmer across the words ("Thinking…", "Reading Citations…", "Writing the answer…") and, from 2 s, a counter for how long Chat has been on those words ("Thinking… · 6s"). The finished steps become one grey line above the answer ("✓ Read 3 sources ›") that opens the list of steps. Both lines are grey, so they stay apart from the white answer text.

It works the same in both places runs show: the Chat page and the side panel on other pages, including the editor's chat panel. All of them render runs through the same RunAnswer (ChatThreadView → Answer → RunAnswer).

Changes

  • Live line (run/run-live-line.tsx): reuses the app's agent-sweep keyframes for the shimmer and the menu's menu-dot-pulse for the dot, both behind motion-safe:. With reduced motion the line is plain grey text. The counter starts again each time the words change. It is aria-hidden, and a separate polite live region announces only the words, then how the run ended (never every second). The line shows while the run is queued or running, or while the stream reconnects ("Reconnecting…"). It goes when the run is done, failed or stopped, or is waiting on the person. A split step's parts show under it.

  • Steps line (run/run-steps-line.tsx): replaces both the ✓ pills and the RunSteps header and list inside RunAnswer, so each step shows only once. The wording comes from the step kinds:

    • one step in its own words: "Read Citations"
    • only reads: "Read 3 sources", "Read 2 sources and 1 page", plus "· checked facts" after a fact check
    • anything else: "4 steps"
    • "· 1 step failed" when a step failed
    • "Waiting for your OK", "Stopped after 41s · 4 steps" and "Stopped: something went wrong" for those states

    It is a button with aria-expanded. The list it opens is grey. A done step's detail is a click away, failed and skipped steps say why, and the list ends with "Worked for 23s" once the run is done. Row counts never show; memory items and parts are still counted.

  • Order in RunAnswer: steps line → "Thought for N s" → answer text → error box → cards → Data used → stamp → live line (while working) → footer. While Chat works, the steps line already says what it read, so "Data used" now shows once the run stops working.

  • RunSteps itself is unchanged for its other users (preview cards, result card).

  • New strings in en.json under chatRun.live and chatRun.stepsLine.

  • Help: updated "Watch the work", "Big requests in parts" and "When something goes wrong" in help/chat/chat.md. Added a short "Data used and action links" section to keep each section under 150 words, and regenerated approved-articles.json.

  • No server, migration, dependency or lockfile change. chat-thread-view.tsx, page-pane.tsx, page-open.ts and the editor folder are untouched (only chat-thread-view.test.tsx changed: two assertions now look at the live line instead of the old steps header).

How to test

  1. Ask Chat something that reads data, such as "Why did our citations drop last week?".
  2. While it reads: "✓ Read Citations ›" is on top, and at the bottom "● Reading Mentions… · 3s" shimmers, with the counter showing from 2 s.
  3. In the pause after the reads: "Thinking… · 6s" keeps counting at the bottom.
  4. While text streams: "Writing the answer… · Ns" stays under the text.
  5. When it finishes: the live line is gone. Click "✓ Read 2 sources and 1 page ›" (or press Enter on it) to see the steps, then click a step to see its detail.
  6. Repeat in the side panel on any page (Ask Chat / Ctrl J). It looks the same and wraps cleanly at 420 px and at phone width.
  7. With an approval card: the top line says "Waiting for your OK" and there is no shimmer.
  8. Turn on reduced motion in the OS: nothing moves.

Checks


Generated by Claude Code

… line

While Chat works, a grey live line now sits at the very end of the answer
(under the steps and under the streaming text): a pulsing dot, the words
with a soft shimmer ("Thinking…", "Reading Citations…", "Writing the
answer…") and, from 2 s, the seconds spent on those words, counted afresh
when they change. Motion is motion-safe only; the counter is aria-hidden
and a separate polite live region says only the words, then how the run
ended. The line goes once the run is done, failed, stopped or waiting on
the person; a split step's parts show under it.

The ✓ pills and the RunSteps header/list in RunAnswer are merged into one
grey, collapsible steps line above the answer ("✓ Read 3 sources",
"✓ Read Citations · checked facts", "✓ 4 steps", "Waiting for your OK",
"Stopped after 41s · 4 steps"). It opens a grey list of the steps; a done
step's detail is a click away, failed and skipped steps say why, and the
list ends with "Worked for …" once done. Data used shows once the run
stops working. RunSteps itself is unchanged for its other users.

The Chat page and the side panel (and the editor's chat panel) render runs
through the same RunAnswer, so both get it. Help updated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
The steps line is listed through run-answer.tsx already; leaving the line
alone keeps it from clashing with the open Chat branches that add to it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
gkhngyk
gkhngyk previously approved these changes Nov 17, 2026

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Minor: stepsSummary (run-view.ts) gives 'Opened 0 pages · checked facts' when every done step is a fact check.

@gkhngyk

gkhngyk commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Approved, but it now conflicts with main after today's merges. Please merge main in and I'll merge it.

Conflict in help/chat/chat.md: kept this branch's blank line after the
front matter and main's opening paragraph (Prompts as home).
approved-articles.json taken from main and regenerated with the help tests.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
When every finished step is a check, the line read "Opened 0 pages ·
checked facts". A count of 0 is now left out, so that case reads
"Checked facts"; sources without pages and pages without sources say
only the count that isn't 0, as before. Tests for checks alone (done,
waiting, with a failed step) and the mixed cases.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approving: the main merge keeps the PR's changes, and 1fbdb55 fixes the 'Opened 0 pages' case. Thanks.

@gkhngyk
gkhngyk merged commit 4bf3f28 into ansvisor:main Nov 17, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants