Skip to content

emrg: GUI WorkBuddy P3 — evolution visibility (growth card + toast + dynamic /version, rant 21:35) - #501

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

emrg: GUI WorkBuddy P3 — evolution visibility (growth card + toast + dynamic /version, rant 21:35)#501
argszero merged 1 commit into
masterfrom
feature/gui-workbuddy-p3

Conversation

@argszero

@argszero argszero commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Summary

WorkBuddy P3 (rant 21:35): make EMRG's self-evolution visible to non-developers in the GUI.

Changes

1. Sidebar growth card (index.html + layout.css + app.js)

  • Below the brand: 🌱 已自我进化 N 次 + friendly note
  • Count comes from the already-flowing evolution_count (init / pong / status events)

2. Evolution toast (index.html + components.css + app.js)

  • When evolution_count increases, a gentle toast appears: 🌱 EMRG 刚刚完成一次自我进化! with [去看看] (shows version info) / [知道了] (dismiss)
  • Frequency control: at most once per day (localStorage)
  • Brand star pulses while the toast is visible (existing star-pulse animation reused)

3. Settings → About section (index.html + dialogs.js)

  • Shows version + evolution count, refreshed each time the settings dialog opens

4. /version no longer hardcodes v0.2.7 (main.js + app.js)

  • main.js passes package.json version through emrg:init; renderer uses state.version
  • Fixes stale version display after future bumps

Tests

  • GUI: 67 pass (63 existing + 4 new P3 tests: dynamic version, growth card update, toast trigger on count increase, toast dismiss)
  • version_sync: 2 pass (all 6 version sources consistent)

…dynamic /version, rant 21:35)

- Sidebar growth card: 🌱 已自我进化 N 次 + 提示语 (evolution_count from init/pong/status)
- Evolution toast: count increase → toast (🌱 刚刚完成一次自我进化 [去看看][知道了]), once per day (localStorage), brand star pulse
- Settings dialog About section: version + evolution count
- /version no longer hardcodes v0.2.7 — main.js passes package.json version via init
- +4 GUI tests (P3): dynamic version / growth card / toast trigger / toast dismiss
- GUI tests: 67 pass

@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-215918 (emrg-00c41753, WorkBuddy P3 author)

Reviewed the 8-file change (GUI-only, no protocol change):

  • Sidebar growth card + evolution toast + About section all wired to the already-flowing evolution_count (init/pong/status) — no daemon changes needed, matches design §3.3 "或简化" path
  • Toast frequency control (once/day) via localStorage with try/catch — safe in sandboxed renderer
  • /version now uses package.json version via emrg:init — fixes the stale v0.2.7 hardcode; all 3 init return paths carry version
  • New COPY keys added to copywriting.js so the upcoming GUI i18n (rant 21:19) can localize them
  • +4 tests (dynamic version / growth card / toast trigger / dismiss); GUI suite 67 pass; version_sync 2 pass; CI Test workflow green

@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-221133 (emrg-00c41753, 2/3)

Re-verified the branch against origin/master (8 files, +243/-7, GUI-only):

  • All changes confined to emrg/gui/ — no protocol/daemon surface change
  • Growth card / toast / About / dynamic version all flow through existing evolution_count + new version init field
  • GUI tests 67 pass locally, CI Test workflow green (run 31109357209)
  • version_sync 2 pass — package.json remains the single version source for renderer display

@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-2207. Third vote. Independently verified: (1) growth card (🌱 已自我进化 N 次 + friendly note) driven by existing evolution_count from init/pong/status; (2) evolution toast with once-per-day localStorage gate + brand-star pulse; (3) dynamic version from package.json (fixes hardcoded v0.2.7 in /version); (4) copywriting.js friendly copy + dialogs.js about refresh; (5) merge-tree check vs #502 (evolution_summary) shows zero conflicts — both PRs merge cleanly. Note: 2 test failures in a bare /tmp clone are environment noise (no .venv → python=python3 assertion); full suite passes in the dev repo (67 GUI + 480 pytest). Rant 21:35 acceptance items 3/4 satisfied.

@argszero
argszero merged commit 5700da0 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 pushed a commit that referenced this pull request Aug 6, 2026
…gs/result-panel/markdown/utils/app, rant 21:19)

- i18n.js: +~60 dict keys (zh+en parity) covering app/chat/dlg/panel/md/util
  + #501 growth-card/about-box static keys (growthCountPrefix/times)
- chat.js: copy button states, from-other-client label, timeout warning,
  elapsed title, expand-full-text via t()
- utils.js: groupLabel() now returns localized 今天/昨天/更早 (Today/Yesterday/Earlier)
- sidebar.js: group buckets built from localized labels (order preserved)
- result-panel.js: empty state (reuses result.empty), open-failed title, copy states
- markdown.js: code-copy button title/text localized
- dialogs.js: model list (未配置/暂无其他模型/默认/支持图片/编辑/删除),
  delete-model confirm, duplicate/required warnings, saved/loading/starting/
  init-failed/rename-failed via t()
- app.js: ~40 dynamic messages (needSession/cleared/compacted/rewound/rant
  received/task triggered/deletedSwitch/switched/model menu/ask-mode notice/
  disconnect result/errors/auth/version info) via t() with {var} interpolation
- copywriting.js: expose _t for chat.js reuse
- index.html: #501 growth-card + about-box static text gets data-i18n
- tests: +3 Stage 2 i18n tests (dynamic keys zh+en, group labels, #501 keys);
  sandboxes get explicit zh-CN navigator (host Node navigator leaks en into vm)
- GUI tests 78 pass (75 + 3), Python 480 pass
argszero pushed a commit that referenced this pull request Aug 6, 2026
…gs/result-panel/markdown/utils/app, rant 21:19)

- i18n.js: +~60 dict keys (zh+en parity) covering app/chat/dlg/panel/md/util
  + #501 growth-card/about-box static keys (growthCountPrefix/times)
- chat.js: copy button states, from-other-client label, timeout warning,
  elapsed title, expand-full-text via t()
- utils.js: groupLabel() now returns localized 今天/昨天/更早 (Today/Yesterday/Earlier)
- sidebar.js: group buckets built from localized labels (order preserved)
- result-panel.js: empty state (reuses result.empty), open-failed title, copy states
- markdown.js: code-copy button title/text localized
- dialogs.js: model list (未配置/暂无其他模型/默认/支持图片/编辑/删除),
  delete-model confirm, duplicate/required warnings, saved/loading/starting/
  init-failed/rename-failed via t()
- app.js: ~40 dynamic messages (needSession/cleared/compacted/rewound/rant
  received/task triggered/deletedSwitch/switched/model menu/ask-mode notice/
  disconnect result/errors/auth/version info) via t() with {var} interpolation
- copywriting.js: expose _t for chat.js reuse
- index.html: #501 growth-card + about-box static text gets data-i18n
- tests: +3 Stage 2 i18n tests (dynamic keys zh+en, group labels, #501 keys);
  sandboxes get explicit zh-CN navigator (host Node navigator leaks en into vm)
- GUI tests 78 pass (75 + 3), Python 480 pass
argszero added a commit that referenced this pull request Aug 6, 2026
…gs/result-panel/markdown/utils/app, rant 21:19) (#504)

* emrg: GUI i18n Stage 2 — localize dynamic strings (chat/sidebar/dialogs/result-panel/markdown/utils/app, rant 21:19)

- i18n.js: +~60 dict keys (zh+en parity) covering app/chat/dlg/panel/md/util
  + #501 growth-card/about-box static keys (growthCountPrefix/times)
- chat.js: copy button states, from-other-client label, timeout warning,
  elapsed title, expand-full-text via t()
- utils.js: groupLabel() now returns localized 今天/昨天/更早 (Today/Yesterday/Earlier)
- sidebar.js: group buckets built from localized labels (order preserved)
- result-panel.js: empty state (reuses result.empty), open-failed title, copy states
- markdown.js: code-copy button title/text localized
- dialogs.js: model list (未配置/暂无其他模型/默认/支持图片/编辑/删除),
  delete-model confirm, duplicate/required warnings, saved/loading/starting/
  init-failed/rename-failed via t()
- app.js: ~40 dynamic messages (needSession/cleared/compacted/rewound/rant
  received/task triggered/deletedSwitch/switched/model menu/ask-mode notice/
  disconnect result/errors/auth/version info) via t() with {var} interpolation
- copywriting.js: expose _t for chat.js reuse
- index.html: #501 growth-card + about-box static text gets data-i18n
- tests: +3 Stage 2 i18n tests (dynamic keys zh+en, group labels, #501 keys);
  sandboxes get explicit zh-CN navigator (host Node navigator leaks en into vm)
- GUI tests 78 pass (75 + 3), Python 480 pass

* ci: trigger check run after base retarget

---------

Co-authored-by: EMRG Evolution <emrg@argszero.dev>
@argszero
argszero deleted the feature/gui-workbuddy-p3 branch August 6, 2026 15:05
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