fix(canvas-chat): thinking indicator frozen at 0s on currentTask (core#2697) #2720
Reference in New Issue
Block a user
Delete Branch "fix/chat-thinking-indicator-currenttask"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug (CTO-reported, screenshot)
When the agent is busy on its own task, the chat shows "●●● 0s" frozen with no live tool calls — even though the agent is plainly working (the left RECENT ACTIVITY panel streams the tool calls).
Root cause — gate mismatch
The indicator renders on
(sending || data.currentTask)(line 733), but the elapsed timer, the activity-log seed, and the onActivityLog handler all gate onsendingalone. So on thedata.currentTaskpath (agent busy, user's own send not in flight), the indicator shows but the timer never ticks (thinkingElapsedstuck at 0) and the live feed is a no-op.Fix
Unified
thinking = sending || !!data.currentTask; the render, timer, seed, and live-activity handler all key off it. Now the timer ticks and the live tool-call feed populates whenever the agent works — "re-syncs to the actual tool calls" instead of0sforever.ChatTab tests green (11/11). 3rd #2700 chat-UX rough edge (after dup #2715, textarea #2718) — recommend a full review pass of the chat-UX surface.
🤖 Generated with Claude Code
APPROVED on head
bfd5750ca8.Reviewed with the 5-axis lens. The fix correctly defines one
thinking = sending || !!data.currentTaskflag and uses it consistently for visibility, elapsed timer lifecycle, activity-log seeding, and live activity-log ingestion. That addresses the gate mismatch where the indicator rendered forcurrentTaskbut the timer/feed stayed gated onsending, causing the frozen0sstate.Scope is a narrow ChatTab UI state fix; no server, auth, persistence, or data-flow changes. The change does not lock the Send button or alter send semantics. Targeted chat/canvas E2E checks are green;
CI / Canvas (Next.js)was still pending at review time, so merge should wait for required CI/all-required to finish green./sop-ack
/sop-ack comprehensive-testing
/sop-ack local-postgres-e2e
/sop-ack staging-smoke
/sop-ack root-cause
/sop-ack five-axis-review
/sop-ack no-backwards-compat
/sop-ack memory-consulted
Code review is approved, explicit SOP acks are posted (
acked: 7/7), and CI/all-required is green, but merge is still blocked bysop-checklist / all-items-acked: the PR body is missing the required filled SOP checklist sections (body-unfilled). Please add/fill the 7 body markers:Comprehensive testing performed,Local-postgres E2E run,Staging-smoke verified or pending,Root-cause not symptom,Five-Axis review walked,No backwards-compat shim / dead code added, andMemory consulted.