Skip to content

feat(desktop): YOLO toggle in the status bar (per-session, TUI parity) - #38517

Merged
OutThisLife merged 10 commits into
mainfrom
bb/desktop-yolo-statusbar-toggle
Jun 3, 2026
Merged

feat(desktop): YOLO toggle in the status bar (per-session, TUI parity)#38517
OutThisLife merged 10 commits into
mainfrom
bb/desktop-yolo-statusbar-toggle

Conversation

@OutThisLife

@OutThisLife OutThisLife commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a clickable YOLO control to the desktop status bar (right group, just before the model selector): an icon-only lightning bolt — outline/dimmed when off, filled on a #f4e381 fill when on.
  • It toggles per-session approval bypass via the existing config.set yolo gateway RPC — the exact same session-scoped flag as the TUI's Shift+Tab / /yolo. It does not write the global approvals.mode, so it can never change CLI / TUI / cron behavior.
  • /yolo now works in the desktop too: it maps to this control (and is listed in the slash palette) instead of returning "not available".
  • On a brand-new chat draft (no runtime session yet) the toggle arms locally; the session-create path applies it once the backend session exists.

Honest status display

The bolt previously only reflected the per-session flag, so it lied when a global policy already auto-approved commands (e.g. approvals.mode: off in config.yaml). Now:

  • Gateway _session_info reports the effective bypass state — the same condition the approval guard ORs together: per-session yolo OR approvals.mode == "off" OR HERMES_YOLO_MODE.
  • The desktop $yoloActive atom is a plain reflection of that, hydrated from session.info events and applyRuntimeInfo on session create/resume. Persistence lives in the backend (config / per-session), not in the client.

Files

  • tui_gateway/server.py_session_info reports effective yolo; config.set yolo stays per-session-scoped
  • apps/desktop/src/store/session.ts$yoloActive atom + setYoloActive
  • apps/desktop/src/types/hermes.ts, src/lib/chat-messages.tsyolo?: boolean on runtime-info / event payloads
  • apps/desktop/src/app/session/hooks/use-message-stream.ts, use-session-actions.ts — hydrate the atom + arm-on-create
  • apps/desktop/src/app/session/hooks/use-prompt-actions.ts/yolo handler
  • apps/desktop/src/lib/desktop-slash-commands.ts (+ test) — make /yolo discoverable and routable
  • apps/desktop/src/app/shell/hooks/use-statusbar-items.tsx — the clickable bolt + toggle
  • apps/desktop/src/app/desktop-controller.tsx — pass freshDraftReady / requestGateway into the hook
  • apps/desktop/src/lib/yolo-session.tssetSessionYolo helper
  • apps/desktop/src/lib/icons.tsZap (outline) + ZapFilled

Test plan

  • npm run type-check (apps/desktop) passes
  • eslint on changed files introduces no new errors (one pre-existing perfectionist import-sort error in use-session-actions.ts confirmed present on main)
  • vitest desktop slash-command suite passes
  • tests/test_tui_gateway_server.py passes (the lone test_browser_manage_connect_default_local_reports_launch_hint failure is environment-dependent — local machine has Chrome installed — and unrelated)
  • Manual: start a session, click the bolt → fills, dangerous commands auto-approve; click again → outline. With approvals.mode: off in config, the bolt correctly shows on. /yolo toggles the same state.

Adds a clickable "YOLO" item to the desktop status bar that flips
per-session approval bypass via the existing `config.set yolo` gateway
RPC (the same one the TUI uses). It reads as normal gray when off and
amber/yellow when on, tracking the dark/light theme.

To keep the indicator honest across resume/session-switch, the gateway
now reports the live per-session yolo flag in `_session_info`, which the
desktop hydrates into a new `$yoloActive` atom on `session.info` events
and on session create/resume.
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

🔎 Lint report: bb/desktop-yolo-statusbar-toggle vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 9744 on HEAD, 9744 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 5047 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

Relocates the status-bar YOLO item from the left group to the right
group, immediately before the model summary/picker.
The status bar could show YOLO "on" while approvals still ran because
_session_info mirrored HERMES_YOLO_MODE (process env), not the per-session
flag that config.set yolo actually toggles.

- Report only session-scoped yolo in session.info
- config.set yolo accepts value=1|0 and emits session.info after change
- Desktop uses explicit set (not blind toggle); arms on new-chat draft and
  applies after session.create
- Yellow background when on, normal text (not yellow text)
Use a light amber wash with primary body text and a darker bolt icon
instead of yellow-on-yellow. Armed new-chat state gets a subtle inset ring.
Drop the YOLO label; show only the bolt with a bit more horizontal
padding. Active state uses background #f4e381.
@alt-glitch alt-glitch added type/feature New feature or request comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have labels Jun 3, 2026
YOLO is now a desktop preference that survives restart: turning it on
keeps every new and resumed session in YOLO until the user turns it off,
instead of resetting per session. The gateway clears per-session yolo on
resume, so the persisted preference is re-applied on create/resume.

Also fixes the status-bar active fill to use the --chrome-action-hover
CSS var (correct Tailwind arbitrary-property syntax).
Swap the outline bolt for IconBoltFilled when YOLO is on so the active
state reads as a solid lightning glyph.
Instead of showing "not available in the desktop palette", /yolo now
flips the same per-session/sticky YOLO state as the status-bar control
(arming the preference when there's no active session yet) and is listed
in the desktop slash palette.
Reverts the global approvals.mode write — the desktop bolt is now a pure
per-session toggle, identical in scope to the TUI's Shift+Tab, so it can
never change CLI/TUI/cron behavior. The status bar still reads the
*effective* bypass state in session.info (per-session OR approvals.mode=off
OR HERMES_YOLO_MODE), so it stops lying when a global policy already
auto-approves commands.
@OutThisLife OutThisLife changed the title feat(desktop): add YOLO toggle to the status bar feat(desktop): YOLO toggle in the status bar (per-session, TUI parity) Jun 3, 2026
@OutThisLife
OutThisLife enabled auto-merge (squash) June 3, 2026 23:28
@OutThisLife
OutThisLife merged commit 1927ff2 into main Jun 3, 2026
22 checks passed
@OutThisLife
OutThisLife deleted the bb/desktop-yolo-statusbar-toggle branch June 3, 2026 23:33
Yuki-14544869 pushed a commit to Yuki-14544869/hermes-agent that referenced this pull request Jun 4, 2026
…lo-statusbar-toggle

feat(desktop): YOLO toggle in the status bar (per-session, TUI parity)
davidgut1982 pushed a commit to davidgut1982/hermes-agent that referenced this pull request Jun 5, 2026
…lo-statusbar-toggle

feat(desktop): YOLO toggle in the status bar (per-session, TUI parity)
changman pushed a commit to changman/hermes-agent that referenced this pull request Jun 10, 2026
…lo-statusbar-toggle

feat(desktop): YOLO toggle in the status bar (per-session, TUI parity)
alt-glitch pushed a commit that referenced this pull request Jun 14, 2026
…-toggle

feat(desktop): YOLO toggle in the status bar (per-session, TUI parity)
kossteg pushed a commit to kossteg/hermes-agent that referenced this pull request Jun 16, 2026
…lo-statusbar-toggle

feat(desktop): YOLO toggle in the status bar (per-session, TUI parity)
T02200059 pushed a commit to T02200059/hermes-agent that referenced this pull request Jun 18, 2026
…lo-statusbar-toggle

feat(desktop): YOLO toggle in the status bar (per-session, TUI parity)
waefrebeorn pushed a commit to waefrebeorn/slermes that referenced this pull request Jul 2, 2026
…lo-statusbar-toggle

feat(desktop): YOLO toggle in the status bar (per-session, TUI parity)
santhreal pushed a commit to santhreal/hermes-agent that referenced this pull request Jul 13, 2026
…lo-statusbar-toggle

feat(desktop): YOLO toggle in the status bar (per-session, TUI parity)
donbowman pushed a commit to donbowman/hermes-agent that referenced this pull request Jul 13, 2026
…lo-statusbar-toggle

feat(desktop): YOLO toggle in the status bar (per-session, TUI parity)
Gravezzz pushed a commit to Gravezzz/hermes-agent that referenced this pull request Jul 21, 2026
…lo-statusbar-toggle

feat(desktop): YOLO toggle in the status bar (per-session, TUI parity)
leewenjie pushed a commit to leewenjie/hermes-agent that referenced this pull request Aug 7, 2026
…lo-statusbar-toggle

feat(desktop): YOLO toggle in the status bar (per-session, TUI parity)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants