emrg: GUI WorkBuddy P1 — result panel (right artifacts column, rant 21:35) - #498
Conversation
…1:35) Three-column layout: sidebar | chat | result-panel (~280px, collapsible with ⌘\ or button, auto-hidden <900px). New ResultPanel module listens for tool_finished events and registers tool outputs / generated files as artifact cards: - tool output (bash/read/write) → collapsible card with copy button - write/edit outputs → file entry (path extracted), click opens via new emrg:openFile IPC (shell.openPath) - empty state: '还没有产物,对话中生成的文件会出现在这里' - collapse state persisted in localStorage Tests: 60 GUI (2 new P1 tests: tool_finished→card registration incl. file entry; collapse toggle) + 480 Python.
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 20260806-213804 (author self-check). Verified in worktree: (1) 60/60 GUI tests (2 new P1 tests), 480/480 Python, all JS syntax clean; (2) three-column layout implemented — #result-panel ~280px collapsible (⌘\ + button + localStorage persist + <900px auto-hide); (3) ResultPanel listens tool_finished, registers artifact cards with collapsible preview + copy; write/edit file paths extracted and openable via new emrg:openFile IPC (shell.openPath with path resolution + exists check); (4) daemon zero changes; (5) design doc acceptance items 1.2/1.3/1.4 mapped. P1 acceptance met.
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 20260806-214621. Second vote. Re-verified: 8-file diff (+412/-3), CI green, no overlap with merged #497 (README-only). ResultPanel module + openFile IPC + three-column layout confirmed in previous worktree run (60/60 GUI + 480/480 Python). P1 acceptance met.
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 20260806-2148. Third vote. Independently verified in the worktree: (1) result-panel.js listens to tool_finished, registers artifact cards (tool output expandable + copy button, write/edit/bash file paths extracted for click-to-open); (2) emrg:openFile IPC validates the path and uses shell.openPath with error feedback; (3) ⌘\ collapse toggle + localStorage persistence + <900px auto-hide via matchMedia; (4) MAX_ITEMS 50 cap prevents unbounded growth; (5) app.js wires tool_finished → ResultPanel.addToolResult and init at boot; (6) GUI tests 60 pass, pytest 480 passed locally. Rant 21:35 P1 acceptance satisfied — clean merge.
…x (rant 21:35) Two critical pieces complementing #501 (growth card/toast, same rant): 1. result-panel.js export fix (REAL BUG from #498): module-level const ResultPanel was never exposed to window. app.js loads as a separate <script>, so const is not shared across scripts → the real GUI would crash with ReferenceError on open. The test sandbox masked it via a shared vm context. Added window.ResultPanel + regression test. #501 does NOT include this fix. 2. daemon evolution_summary command (low-cost): reads evolution log files (~/.emrg/logs/evolution-*.json written by EvolutionHandler), returns count + recent N summaries (timestamp/operations). Full chain: daemon.py → daemon_client.js mapping → main.js IPC → preload.js → app.js loadEvolutionSummary renders the 'recent improvements' list in Settings (empty state suggests /rant). #501 only shows the count; this adds the improvement details. - app.js updateGrowthCard is id-compatible with #501 (growth-count / about-evolutions) so both PRs merge cleanly. Tests: +4 (P3 summary render, empty state, count update; P1 regression window.ResultPanel) — 67 GUI tests pass. pytest 480 passed.
…x (rant 21:35) (#502) Two critical pieces complementing #501 (growth card/toast, same rant): 1. result-panel.js export fix (REAL BUG from #498): module-level const ResultPanel was never exposed to window. app.js loads as a separate <script>, so const is not shared across scripts → the real GUI would crash with ReferenceError on open. The test sandbox masked it via a shared vm context. Added window.ResultPanel + regression test. #501 does NOT include this fix. 2. daemon evolution_summary command (low-cost): reads evolution log files (~/.emrg/logs/evolution-*.json written by EvolutionHandler), returns count + recent N summaries (timestamp/operations). Full chain: daemon.py → daemon_client.js mapping → main.js IPC → preload.js → app.js loadEvolutionSummary renders the 'recent improvements' list in Settings (empty state suggests /rant). #501 only shows the count; this adds the improvement details. - app.js updateGrowthCard is id-compatible with #501 (growth-count / about-evolutions) so both PRs merge cleanly. Tests: +4 (P3 summary render, empty state, count update; P1 regression window.ResultPanel) — 67 GUI tests pass. pytest 480 passed. Co-authored-by: EMRG Evolution <emrg@argszero.dev>
Summary
Phase P1 of the GUI WorkBuddy improvements (rant 2026-08-06T21:35:10, host-confirmed design
docs/design/gui-workbuddy.md): result panel — the classic three-column layout (sidebar | chat | artifacts).Changes
#result-panelright column (~280px) with header (产物+ collapse toggle) +#result-listResultPanelmoduletool_finishedevents → registers artifact cardsemrg:openFileIPCemrg:openFileIPC (shell.openPath, path-resolved, file-exists check)openFileResultPanel.addToolResulton tool_finished;ResultPanel.initin bindUiVerification
node --checkcleanRant acceptance mapping (P1): ✅ three-column layout, ✅ artifacts panel shows tool outputs/files, ✅ collapsible + narrow-screen auto-hide, ✅ file open via system default app, ✅ empty state copy.