Skip to content

feat(web): Chat mode shows a floating Working line - #245

Merged
orbitingflea merged 1 commit into
mainfrom
feat/chat-working-indicator
Nov 21, 2026
Merged

orbitingflea merged 1 commit into
mainfrom
feat/chat-working-indicator

Conversation

@orbitingflea

Copy link
Copy Markdown
Owner

This pull request adds a "Working for" line with a running time to Chat mode. It floats just above the message box while the agent works.

改了什么行为

Behaviour change: yes, users of a thread in Chat mode see "Working for " above the message box while the agent works, in the main list or in the Reply sub-thread where the run answers.

The line shows in one place only. It shows in a sub-thread when the latest message the user typed in that run is a reply there. In all other cases it shows in the main list, for example when the user wrote in the main list, or when another agent, a scheduled task or a wake started the run. If the user writes somewhere else during the run, the line moves there after the server accepts the message. Closing the sub-thread does not move the line to the main list. Normal mode does not change.

Why

Chat mode hides Normal's Working row, so a user could not see that the agent was still busy, or for how long.

Checks

  • Unit tests cover the place of the line in each case above, with real turn items.
  • A browser test checks that the line does not overlap Scroll to end with a long summary, at phone and desktop width, and that clicks go through it.
  • In a dev server with a real agent, the line showed in one view only for each case above. When it went away, no message moved. Normal mode still showed its own row.

How to undo

Revert the commit. No stored data changes.

Details

How it works:

  • The line is on its own layer and takes no clicks. Chat mode always keeps a fixed blank space below the last message for it, so showing or hiding the line moves no message. At the end of the list the line sits in that space and covers no text.
  • In Chat mode the Scroll to end button sits above that space, so the two never overlap, at any width.
  • The run cards and the line use one rule, runPlaces, to find where a run answers. A run that only a notification started now has a place in the main list too. Cards keep their old place.
  • Before the server places a new run, only the view whose own send waits shows the line. A queued run shows no line until it starts.

Accepted tradeoffs:

  • Chat mode has 28 px more blank space below the last message, also when idle.
  • If the user sends in two views before the server answers, both views show the line until it does.
  • A /compact sent from a sub-thread shows the line there until the server answers, then in the main list. During a compaction the line says "Working for", not "Compacting".
  • Page Up and Page Down still pad by the message box height only.
  • The line's words and time are English only, like other fork UI strings.

Surfaces not changed:

  • Mobile has no Chat mode, so it has no line.

Upstream hooks:

  • ChatView.tsx: +24 lines, -3 lines. They add two imports, the reserved space for the follow logic and the list, the Scroll to end height, and the line element.
  • All other changes are in fork files, the README and tests.

Chat mode hides Normal's in-list Working row. It now shows "Working for
<time>" on its own layer just above the composer, in the view where the
active run answers: the Reply sub-thread of the run's latest typed
message, else the main list. Chat mode keeps a fixed space for the line
below the last message, so showing or hiding it moves nothing, and the
Scroll to end button sits above that space.

The run cards and the line share one placement rule, runPlaces.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:L labels Nov 21, 2026
@github-actions

Copy link
Copy Markdown

This PR changes the test suite by +7 test cases (browser +1, unit +6, server 0).

New browser test files: apps/web/src/fork/displayMode/chatWorkingIndicator.browser.test.tsx.
Each browser test file costs CI seconds of module loading before its first test runs; a unit test costs milliseconds.

Keep tests that would fail for a real reason, and test logic below the UI where it can be. See Testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted 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