fix(canvas-chat): thinking indicator frozen at 0s on currentTask (core#2697) #2720

Merged
devops-engineer merged 1 commits from fix/chat-thinking-indicator-currenttask into main 2026-06-13 07:24:05 +00:00
Member

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 on sending alone. So on the data.currentTask path (agent busy, user's own send not in flight), the indicator shows but the timer never ticks (thinkingElapsed stuck 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 of 0s forever.

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

## 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 on `sending` alone. So on the `data.currentTask` path (agent busy, user's own send not in flight), the indicator shows but the timer never ticks (`thinkingElapsed` stuck 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 of `0s` forever. 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](https://claude.com/claude-code)
core-devops added 1 commit 2026-06-13 07:19:32 +00:00
fix(canvas-chat): thinking indicator ticks + shows live tools on currentTask (core#2697)
CI / Python Lint & Test (pull_request) Successful in 4s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 7s
sop-checklist / review-refire (pull_request_target) Has been skipped
Lint forbidden tenant-env keys / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 5s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 6s
Harness Replays / detect-changes (pull_request) Successful in 6s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 7s
E2E Peer Visibility (literal MCP list_peers) / detect-changes (pull_request) Successful in 10s
reserved-path-review / reserved-path-review (pull_request_target) Successful in 7s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 10s
Harness Replays / Harness Replays (pull_request) Successful in 2s
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (local) (pull_request) Has been skipped
sop-checklist / all-items-acked (pull_request_target) Successful in 10s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 3s
E2E API Smoke Test / detect-changes (pull_request) Successful in 17s
gate-check-v3 / gate-check (pull_request_target) Failing after 13s
E2E Chat / detect-changes (pull_request) Successful in 17s
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (pull_request) Successful in 4s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 17s
CI / Detect changes (pull_request) Successful in 20s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 3s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 18s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 2s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 1s
E2E Chat / E2E Chat (pull_request) Successful in 3s
CI / Platform (Go) (pull_request) Successful in 2s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (stub) (pull_request) Successful in 27s
reserved-path-review / reserved-path-review (pull_request_review) Successful in 7s
qa-review / approved (pull_request_target) Approved via pull_request_review trigger
security-review / approved (pull_request_target) Approved via pull_request_review trigger
qa-review / approved (pull_request_review) Successful in 9s
security-review / approved (pull_request_review) Successful in 10s
CI / Canvas (Next.js) (pull_request) Successful in 3m44s
CI / Canvas Deploy Status (pull_request) Successful in 1s
CI / all-required (pull_request) Successful in 4s
sop-checklist / all-items-acked (pull_request) acked: 7/7 — body-unfilled: comprehensive-testing, local-postgres-e2e, staging-smoke, +4
sop-checklist / na-declarations (pull_request) N/A: (none)
audit-force-merge / audit (pull_request_target) Successful in 6s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (real image + MiniMax LLM, advisory) (pull_request) Failing after 4m33s
bfd5750ca8
The thinking indicator renders on `(sending || data.currentTask)`, but the
elapsed timer, the activity-log seed, and the onActivityLog handler all
gated on `sending` alone. So when the agent is busy on its own task
(data.currentTask set) but the user's send isn't in flight, the indicator
showed "●●● 0s" frozen with no live tool calls — even though the agent was
plainly working (left activity panel streaming).

Introduce a unified `thinking = sending || !!data.currentTask` and gate the
render, the timer, the seed, and the live-activity handler on it. Now the
timer ticks and the live tool-call feed populates whenever the agent works,
matching the indicator's visibility.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
agent-reviewer-cr2 approved these changes 2026-06-13 07:22:51 +00:00
agent-reviewer-cr2 left a comment
Member

APPROVED on head bfd5750ca8.

Reviewed with the 5-axis lens. The fix correctly defines one thinking = sending || !!data.currentTask flag 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 for currentTask but the timer/feed stayed gated on sending, causing the frozen 0s state.

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.

APPROVED on head bfd5750ca8438f4c017a3977f563b7c14b9db2a0. Reviewed with the 5-axis lens. The fix correctly defines one `thinking = sending || !!data.currentTask` flag 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 for `currentTask` but the timer/feed stayed gated on `sending`, causing the frozen `0s` state. 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.
Member

/sop-ack

/sop-ack
Member

/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

/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
devops-engineer merged commit 714ed320a0 into main 2026-06-13 07:24:05 +00:00
Member

Code review is approved, explicit SOP acks are posted (acked: 7/7), and CI/all-required is green, but merge is still blocked by sop-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, and 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 by `sop-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`, and `Memory consulted`.
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#2720