Skip to content

emrg: GUI WorkBuddy P1 — result panel (right artifacts column, rant 21:35) - #498

Merged
argszero merged 1 commit into
masterfrom
feature/gui-workbuddy-p1
Aug 6, 2026
Merged

emrg: GUI WorkBuddy P1 — result panel (right artifacts column, rant 21:35)#498
argszero merged 1 commit into
masterfrom
feature/gui-workbuddy-p1

Conversation

@argszero

@argszero argszero commented Aug 6, 2026

Copy link
Copy Markdown
Owner

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

  • renderer/index.html: #result-panel right column (~280px) with header (产物 + collapse toggle) + #result-list
  • renderer/js/result-panel.js (new): ResultPanel module
    • Listens to tool_finished events → registers artifact cards
    • Tool output (bash/read/write) → collapsible card, expandable preview (200 chars) + copy button
    • write/edit outputs → file entry (path extracted from output), click opens the file via new emrg:openFile IPC
    • Empty state: "还没有产物,对话中生成的文件会出现在这里"
    • Collapse (⌘\ or button, persisted to localStorage); auto-hidden on narrow screens (<900px)
  • main.js: emrg:openFile IPC (shell.openPath, path-resolved, file-exists check)
  • preload.js: expose openFile
  • layout.css: result panel styles (cards, file rows, empty state, collapse + media query)
  • app.js: ResultPanel.addToolResult on tool_finished; ResultPanel.init in bindUi

Verification

  • GUI tests: 60/60 pass (2 new: tool_finished→card registration incl. file entry; collapse toggle)
  • Python suite: 480 passed
  • All changed JS node --check clean

Rant 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.

…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 argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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 argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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 argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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.

@argszero
argszero merged commit 9f96290 into master Aug 6, 2026
1 check passed
argszero pushed a commit that referenced this pull request Aug 6, 2026
…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.
argszero added a commit that referenced this pull request Aug 6, 2026
…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>
@argszero
argszero deleted the feature/gui-workbuddy-p1 branch August 6, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant