[P1] Single-process streaming is fragile — global stream target, remount flicker, flush races #37
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_shrimp#37
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Problem
The live-streaming layer relies on a single global
currentStreamingId, which is nulled the instant the dispatch RPC returns (so background-job tokens get dropped), plusmessagesis acreateSignal<Msg[]>so anysetMessagesremounts theLiveJobPanel(the "card keeps refreshing" flicker), plus a 60ms flush timer that can clobber the final reply. We've band-aided each of these repeatedly this session.Evidence
crates/hero_shrimp_web/ui/src/store.ts—currentStreamingId,jobStreamJobId,flushStreamBuffer,trackJobUntilDone(non-terminal must NOT setMessages, by comment).Proposed fix
Re-architect to a per-session typed event channel (cf. kimi-cli's "wire" SPMC protocol / Qwen-Code's typed event generator): events scoped by session, UI subscribes per conversation, message body updated via fine-grained store paths (not array replacement). Depends on the session_id fix.
Related: this is the root behind #29 and #31.
Filed from a comparative audit of Hero Shrimp vs Qwen-Code / kimi-cli / picoclaw (2026-05-23). Severity in title: P0=correctness/trust, P1=reliability/UX, P2=cleanup.