Skip to content

emrg: GUI WorkBuddy P2 — Ask/Auto mode + tests (rant 21:35) - #500

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

emrg: GUI WorkBuddy P2 — Ask/Auto mode + tests (rant 21:35)#500
argszero merged 1 commit into
masterfrom
feature/gui-workbuddy-p2-clean

Conversation

@argszero

@argszero argszero commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Summary

Phase 2 of the WorkBuddy improvements (rant 2026-08-06T21:35:10; P1 result panel merged in #498): Ask/Auto working mode. Ask = pure chat (no tools); Auto = normal tool execution (default).

Changes

  • emrg/server/daemon.py: task frame reads mode; mode=askallow_tools=False_run_tool_loop_locked passes an empty tool set to the LLM (pure chat, exits after round 1). Zero protocol break — auto (default) unchanged.
  • emrg/gui/daemon_client.js: sendTask accepts mode param (ask → included in payload, auto → omitted)
  • emrg/gui/main.js: emrg:sendMessage IPC passes mode through to sendTask
  • emrg/gui/renderer/index.html: mode-switcher capsule (Ask ● ○ Auto) next to the model switcher
  • emrg/gui/renderer/js/app.js: state.mode (default auto), initModeSwitcher + setMode (whitelist ask/auto, active-class toggle, friendly Ask hint), sendMessage passes state.mode; setMode exported (it was missing from the module's return object — untestable externally)
  • emrg/gui/renderer/css/components.css: .mode-switcher / .mode-btn capsule styles

Verification

  • GUI tests: 63 pass / 0 fail (was 60; +3 P2: setMode updates state + hint, invalid mode rejected by whitelist, sendMessage passes mode)
  • pytest: 480 passed
  • import run_client + emrg --help OK

Rant 21:35 acceptance mapping (P2)

  • ✅ Ask mode: AI only chats, no tools (daemon empty tool set)
  • ✅ Auto mode: normal execution (default, unchanged)
  • ✅ Switch takes effect immediately (next message)

P3 (self-evolution visibility), P4 (evolution toast), P5 (regression+docs) remain.

Ask/Auto working mode: Ask = pure chat (no tools), Auto = normal tool
execution (default).

- daemon.py: task frame reads mode; mode=ask → allow_tools=False →
  _run_tool_loop_locked passes empty tool set to LLM (pure chat, exits
  after round 1)
- daemon_client.js: sendTask accepts mode param (ask → included in
  payload, auto → omitted)
- main.js: sendMessage IPC passes mode through to sendTask
- index.html: mode-switcher capsule (Ask ● ○ Auto) next to model
  switcher
- app.js: state.mode (default auto), initModeSwitcher + setMode
  (whitelist ask/auto, active-class toggle, Ask hint message),
  sendMessage passes state.mode; setMode exported (was missing from
  return object)
- components.css: .mode-switcher/.mode-btn capsule styles

Tests: +3 P2 (setMode updates state + hint, invalid mode rejected,
sendMessage passes mode) — 63 GUI tests pass. pytest 480 passed.

@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 (author self-check). Verified: (1) daemon mode=ask → allow_tools=False → empty tool set, auto unchanged (protocol-compatible); (2) sendMessage chain passes mode: app.js → main.js IPC → daemon_client.sendTask → daemon; (3) setMode whitelist ask/auto, active-class toggle, friendly hint; (4) setMode exported from App module (was missing); (5) tests 63 pass (was 60; +3 P2), pytest 480. Rant 21:35 P2 acceptance satisfied.

@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. Verified: (1) daemon change functionally identical to #499's approach — mode=ask → allow_tools=False → empty tool set to LLM (Ask = pure chat, loop exits round 1); (2) CI green; (3) adds app-commands tests covering the Ask/Auto routing (supplementary coverage to #499's renderer.smoke test); (4) mode omitted when auto → wire-compatible. Both #499/#500 implement rant 21:35 P2 correctly — reviewers may merge either; the other should be closed as duplicate to avoid divergent code.

@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. Third vote. Re-verified: CI green, daemon mode=ask → allow_tools=False → empty tool set (Ask = pure chat, loop exits round 1); auto default unchanged; app-commands tests cover routing. Merging #500 as the canonical P2 implementation; #499 will be closed as duplicate (functionally identical daemon logic).

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