emrg: gui renderer Batch 5 slice 3 — Shell chat wiring (transcript + composer + session switching) - #1018
Conversation
…cript + composer + session switching)
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle cyc20260827-011518 (1/3)
Independent re-review of the full diff on head 3aa1ca4:
- Shell.tsx: clean chat-loop wiring — TranscriptView consumes the shared TranscriptStore sliced by activeSid (sid-keyed, #977 cross-wiring protection); Composer gets controlled busy from daemon-broadcast busyBySid (done/cancelled/error release, #655 queue protocol preserved); Sidebar activeSid + onSelect with auto-select-first on open_sessions (mirrors vanilla app.js); ResultPanel bound to activeSid (per-session isolation). Header connection indicator (dot + model) and per-session disconnected banner are minimal and i18n-driven.
- Degradation path (no window.emrg) stays functional: provider still creates the stores, Composer shows need-session hint — covered by tests.
- shell.css: main area flex-column layout (scrollable transcript + composer pinned) is appropriately scoped under .react-shell-main; conn-dot/conn-banner styles added.
- Tests (6): degradation render, auto-select + broadcast rendering, sid-scoped switching, status broadcast, disconnected banner, need-session hint. Agent.md renderer count 360→366 matches +6 exactly.
- CI: run 32993067416 (pull_request, head 3aa1ca4) — test ✓ / test-windows ✓ (dispatch run 32992223530 on same head also green).
Vote 1/3.
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle cyc20260827-012450 (2/3)
Re-verified on unchanged head 3aa1ca4: CI still double-green (pull_request run 32993067416 — test ✓ / test-windows ✓), MERGEABLE/CLEAN, no reviewer requests. The full diff was independently reviewed in cycle 011518 (chat-loop wiring: sid-scoped transcript, controlled busy, session auto-select/switch, conn indicator, disconnect banner; 6 tests; Agent.md 360→366 exact). 2 consecutive LGTMs (011518 → 012450, no ❌) — one more vote needed.
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle cyc20260827-013138 (3/3)
Re-verified on unchanged head 3aa1ca4: diff still the same 4 files (+223/−14: Shell.tsx chat-loop wiring, 6 new tests, shell.css, Agent.md 360→366), CI double-green (pull_request run 32993067416 — test ✓ / test-windows ✓), MERGEABLE/CLEAN, no reviewer requests, no ❌ between the two prior LGTMs (011518 → 012450). 3 consecutive LGTMs from different cycles — ready to merge.
Uh oh!
There was an error while loading. Please reload this page.
Batch 5 slice 3: wire the core chat loop into the React Shell, completing the daemon-event integration started in #1016 (daemonBridge lib) + #1017 (DaemonBridgeProvider context).
Changes
Shell.tsx — real chat UX on top of the bridge:
TranscriptViewconsumes the shared TranscriptStore (bridge.transcript), sliced byactiveSid(all stores stay sid-keyed — emrg: fix GUI session cross-wiring / empty history (session-cwd resolution, ghost-session rejection, cwd-scoped broadcasts) #977 cross-wiring protection).Composerwired with the transcript store + sid + controlledbusyfrom daemon-broadcastbusyBySid(done/cancelled/error release the lock, emrg: queue messages sent while tool loop busy — inject at round boundary (P1, rant 2026-08-10T21:55:37) #655 queue-injection protocol preserved).SidebargetsactiveSid+onSelect→ clicking a session switches the transcript; auto-selects the first open session whenopen_sessionsarrives (mirrors vanilla app.js).ResultPanelbound toactiveSid(per-session tab/artifact isolation).status/pong broadcasts.disconnectedevents (i18napp.sessionDisconnected).shell.css — main area becomes a flex column: scrollable transcript + composer pinned at the bottom; conn-dot styles.
Shell.test.tsx (6 tests) — degradation without window.emrg; auto-select first session + transcript from broadcasts; sid-scoped switching on sidebar click; connection status/model; disconnected banner; need-session hint when sending with no active session.
Verification
npm run typecheckcleannpm run buildOKnpm test: 257 pass / 0 fail / 8 skippedRenderer count line updated to match (+6 Shell).