Drive the composer from one shell run phase #40

Merged
weichen merged 2 commits from feature/runstate-shell into main 2026-10-03 16:41:39 +00:00
Owner

Why: The send button, stop button, and queued sends each looked at a different slice of run state.

Evidence: A depth-4 walk keeps busy aligned with an in-flight run. The listener list includes run.check.

Impact: A disconnected stream shows 重连中. The live bubble still waits for an assistant message.

Refs: feature/runstate-shell

Why: The send button, stop button, and queued sends each looked at a different slice of run state. Evidence: A depth-4 walk keeps busy aligned with an in-flight run. The listener list includes run.check. Impact: A disconnected stream shows 重连中. The live bubble still waits for an assistant message. Refs: feature/runstate-shell
weichen added 2 commits 2026-10-03 16:41:17 +00:00
Why: The send button, stop button, and queued sends each looked at a different slice of run state, so a reconnect or a late assistant message could disagree.
Evidence: A depth-4 walk of send, HTTP results, SSE, reconnect, conversation switch, and flush keeps busy aligned with an in-flight run, hides the live bubble once an assistant message exists, and keeps one user message per request id.
Impact: The event listener list is exhaustive over the stream contract, including run.check. A disconnected stream shows 重连中.
Refs: feature/runstate-shell
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: The phase type has to be consumed by the screen that branches on it, or the unused-export ratchet fails.
Evidence: knip stays at the existing baseline after the conversation annotates ShellPhase.
Impact: No behavior change.
Refs: feature/runstate-shell
Co-authored-by: Cursor <cursoragent@cursor.com>
weichen merged commit 3edae0212c into main 2026-10-03 16:41:39 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weichen/Agent-System-Frontend#40