emrg: GUI disconnected event per-sid isolation — P3 finalize (GUI multi-session rant P3) - #636
Conversation
…ti-session rant P3)
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 20260810-173604 (author). P3 finalize: disconnected per-sid isolation; 156 GUI + 680 pytest green.
|
Tested this PR end-to-end on Windows — P3 finalize (disconnected event per-sid isolation) verified. |
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 20260810-174555
Verified on head b006aed: GUI suite 156/156 (renderer smoke 46 — bg session disconnect no global banner/red dot + container .disconnected marker via hasContainer guard; reconnect clears all disconnected flags + container classes; unregistered-sid disconnect doesn't mislabel active container; switch-to-disconnected shows i18n notice while input stays usable G89), 680 pytest green, CLI OK, node --check clean. Doc-count guard synced (156 = 43+17+22+46+15+7+3+3).
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 20260810-174109
Verified locally on the PR head: GUI suite 156/156 (46 renderer smoke — bg session disconnect no global banner/red dot + container .disconnected marker via hasContainer guard; reconnect clears all disconnected flags + container classes; unregistered-sid disconnect doesn't mislabel the active container (fallback chain guard); switch-to-disconnected shows the i18n notice while keeping input usable), 680 pytest green, doc-count guard passes (156 = 43 dc + 17 cm + 46 renderer smoke + 22 + 15 + 7 + 3 + 3 synced in Agent.md/README/README.cn), node --check clean.
Code review: sidState entries gain disconnected flag (cleared on status connected); global banner + red dot only for active (or sid-less legacy) session; container marked only when Chat.hasContainer(sid) — correctly guards against the chatContainer fallback chain mislabeling; switchSession shows app.sessionDisconnected zh/en notice with G89 input restore; CSS .session-view.disconnected dimmed + hatch overlay. Completes the P3 event-routing spec cleanly on top of #630/#632/#634.
… 7 gui-state) after #636 merge
…ce 1 entries (#638) Co-authored-by: EMRG Evolution <emrg@argszero.dev>
Summary
P3 finalize of the GUI multi-session rant (2026-08-10T15:07:19): make the
disconnectedevent fully per-sid — a background session's connection drop must not disturb the global UI (no banner/red dot), while the active session's disconnect keeps the global banner. Completes the P3 event-routing spec after slices 0-2 (#630 chat isolation, #632 sessionsBySid, #634 per-session containers).Changes
renderer/js/app.js
sidStateentries gaindisconnected: false(per-sid disconnect flag, cleared on reconnect).disconnectedhandler: marks the event-sid entrydisconnected; global banner + red dot only when the disconnected session is the active one (or sid-less single-session transition — legacy behavior preserved, G89 input restore kept); adds.disconnectedto the session's registered container only (guarded byChat.hasContainerso the fallback chain can't mislabel the active container).statusconnected: clears alldisconnectedflags and removes.disconnectedclasses from containers.switchSession: switching into a disconnected session shows an i18n notice ("connection lost — reconnecting automatically") while keeping input usable (G89).renderer/js/chat.js — new
hasContainer(sid)API (registered-container check distinct fromchatContainer's fallback chain).renderer/js/i18n.js —
app.sessionDisconnectedzh/en.renderer/css/layout.css —
.session-view.disconnectedvisual (dimmed + hatch overlay).test/renderer.smoke.test.js — +3 tests (bg disconnect no global banner + container marked; reconnect clears flags/classes; unregistered-sid disconnect doesn't mislabel + switch-to-disconnected notice). GUI 153→156 (renderer smoke 43→46); README/README.cn/Agent.md counts synced; 680 pytest green; node --check clean.
Verification
node --checkclean on touched JS