Skip to content

fix(desktop): label yolo approval bypass control - #46405

Closed
wgu9 wants to merge 1 commit into
NousResearch:mainfrom
wgu9:fix-desktop-yolo-statusbar-label
Closed

fix(desktop): label yolo approval bypass control#46405
wgu9 wants to merge 1 commit into
NousResearch:mainfrom
wgu9:fix-desktop-yolo-statusbar-label

Conversation

@wgu9

@wgu9 wgu9 commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Makes the Desktop statusbar YOLO approval-bypass control explicit instead of icon-only. The control still uses the existing per-session/global YOLO behavior, but now renders a visible approval state and exposes the existing explanatory title to hover and assistive technologies.

This keeps the fix at the UI affordance layer: no approval policy, config, or backend behavior changes.

Related Issue

Fixes #46371

Related: #43071, #43077

Duplicate check

#43077 covers the generic statusbar tooltip bug by passing title through to statusbar render paths. This PR is focused on the separate #46371 safety affordance: the YOLO approval-bypass control should not be an icon-only lightning bolt. It adds the visible Approvals Manual/Bypassed state and keeps the title/aria propagation in this branch so the new control is accessible on current main.

If #43077 lands first, I can rebase this PR and keep the non-duplicate visible-label portion.

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • apps/desktop/src/app/shell/statusbar-controls.tsx: passes title through to statusbar buttons/links/menu triggers and uses it as an accessible label for interactive controls.
  • apps/desktop/src/app/shell/hooks/use-statusbar-items.tsx: changes the YOLO statusbar item from an unlabeled bolt to Approvals Manual/Bypassed while preserving the full explanatory title.
  • apps/desktop/src/i18n/*: adds short localized labels for the visible approval state.
  • apps/desktop/src/app/shell/statusbar-controls.test.tsx: regression coverage for title/aria label propagation and visible status text.

How to Test

  1. npm --workspace apps/desktop run test:ui -- statusbar-controls.test.tsx
  2. npm --workspace apps/desktop run typecheck
  3. git diff --check main..HEAD

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run the focused Desktop UI test and typecheck; this PR does not touch Python paths
  • I've added tests for my changes
  • I've tested on my platform: macOS

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — N/A
  • I've considered cross-platform impact (Windows, macOS) — DOM/accessibility-only renderer change
  • I've updated tool descriptions/schemas if I changed tool behavior — N/A

Screenshots / Logs

Focused UI test:

npm --workspace apps/desktop run test:ui -- statusbar-controls.test.tsx
Test Files  1 passed (1)
Tests       1 passed (1)

Typecheck:

npm --workspace apps/desktop run typecheck
# passed

Whitespace:

git diff --check main..HEAD
# clean

@alt-glitch alt-glitch added type/bug Something isn't working comp/tui Terminal UI (ui-tui/ + tui_gateway/) P3 Low — cosmetic, nice to have labels Jun 15, 2026
@alt-glitch alt-glitch added comp/desktop Electron desktop app (apps/desktop/*) and removed comp/tui Terminal UI (ui-tui/ + tui_gateway/) labels Jun 26, 2026
@wgu9
wgu9 force-pushed the fix-desktop-yolo-statusbar-label branch from 2c1ddef to e660718 Compare June 28, 2026 18:38
@wgu9

wgu9 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

I checked the failing Build&Test Docker image / build-arm64 job. The Docker build reaches cache export and then fails with denied: installation not allowed to Write organization package while writing a GHCR cache layer. The amd64 Docker job and the required-check aggregate are green, so this looks like a workflow/package-permission issue rather than a code failure in this PR.

@wgu9
wgu9 force-pushed the fix-desktop-yolo-statusbar-label branch from e660718 to 96e9544 Compare July 3, 2026 10:31
@wgu9

wgu9 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

Rebased this on current main and resolved the statusbar conflict by keeping the upstream manual Tooltip + Dropdown trigger composition while preserving this PR's aria-label / title labels for the YOLO approval control and menu entries.

Validation:

  • npm run test:ui -- src/app/shell/statusbar-controls.test.tsx -> 1 passed
  • npm run typecheck
  • npx eslint src/app/shell/statusbar-controls.tsx src/app/shell/statusbar-controls.test.tsx src/app/shell/hooks/use-statusbar-items.tsx src/i18n/en.ts src/i18n/ja.ts src/i18n/types.ts src/i18n/zh-hant.ts src/i18n/zh.ts
  • git diff --check upstream/main...HEAD

The prior failing Build&Test Docker image / build-arm64 job was a GHCR cache/package permission failure, not a code failure; this branch is now conflict-free from my side.

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the focused Desktop safety-affordance improvement. Current main still renders the YOLO item as an unlabeled Zap/ZapFilled action at apps/desktop/src/app/shell/hooks/use-statusbar-items.tsx:432-442; the proposed Approvals plus Manual/Bypassed text directly addresses that verified state.

The change remains at the renderer/i18n layer and preserves the existing toggleYolo path, including its session/global scope behavior (apps/desktop/src/app/shell/hooks/use-statusbar-items.tsx:105-140). The added test exercises the visible state and accessible action name.

Automated hermes-sweeper review.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 14, 2026
@wgu9

wgu9 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

Closing as superseded by current main. The desktop now uses the shared useApprovalModeStatusbarItem with visible Manual/Smart/Off labels, localized descriptions, accessible trigger names, and dedicated interaction/locale tests. Rebasing this older YOLO-toggle implementation would replace the newer three-mode approval UI rather than add missing coverage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/desktop Electron desktop app (apps/desktop/*) P3 Low — cosmetic, nice to have sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Desktop YOLO bolt is an unlabeled safety-critical approval-bypass toggle

3 participants