Skip to content

feat(extension): add popup toggle to hide Agent control hints - #81

Merged
BB-fat merged 4 commits into
mainfrom
feat/62-hide-control-hints-toggle
Aug 13, 2026
Merged

feat(extension): add popup toggle to hide Agent control hints#81
BB-fat merged 4 commits into
mainfrom
feat/62-hide-control-hints-toggle

Conversation

@BB-fat

@BB-fat BB-fat commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Motivation

Refs #62 — while the Agent controls a tab, the extension shows in-page hints (the bottom status pill and the breathing orange glow). Some users do not want these visuals. This PR adds an opt-out switch.

Changes

  • Preference storage (lib/instance-id.ts): new bsk_control_hints_hidden key in chrome.storage.local with get/setControlHintsHidden helpers, following the existing connection_enabled pattern. Defaults to shown when unset or non-boolean — no behavior change for existing users.
  • Overlay gating (content/overlay-controller.ts): new controlHintsHidden state; shouldShowAgentControlOverlay returns false when set. Hiding the hints also skips the overlay's input blocker, so the page stays usable (an invisible click-blocker would be confusing). The preference is user-level, not session-level: it survives resetAgentOverlays.
  • Content script (entrypoints/content.ts): loads the preference before the shadow UI mounts (no flash of the pill for active sessions) and live-applies toggles via chrome.storage.onChanged.
  • Popup (entrypoints/popup/App.tsx + use-control-hints-hidden.ts): new "Control hints" switch on the main view, mirroring the connection toggle's style.
  • i18n: en-US / zh-CN strings.

Help / record / borrow overlays are unaffected — they are interactive requests, not passive hints.

Tests

  • New vitest cases: overlay-controller (hidden gate, preference survives session reset), storage helpers (default/persisted/non-boolean/set), popup toggle (default on, reflects stored preference, persists on click).
  • Local: pnpm lint, tsc --noEmit, wxt build clean; full vitest 624 passed (the tsx React.act failures seen with production React are a pre-existing local-env issue, identical on main).

Screenshots

Popup UI: the control hints toggle next to the connection toggle (both rows use the same shared Switch component; the hint copy lives in the ⓘ tooltip).

zh-CN

Popup UI — control hints toggle (zh-CN)

en-US

Popup UI — control hints toggle (en-US)

BB-fat and others added 4 commits August 12, 2026 11:08
Add a per-browser preference (chrome.storage.local, default: hints
shown) that hides the in-page control overlay — the status pill and
breathing orange glow shown while the Agent controls a tab, along with
the input blocker that comes with them so the page stays usable.

- lib/instance-id: bsk_control_hints_hidden key with get/set helpers
- overlay-controller: controlHintsHidden state gates
  shouldShowAgentControlOverlay; preference survives session resets
- content script: load preference before first mount and live-apply
  changes via chrome.storage.onChanged
- popup: new "Control hints" switch on the main view
- i18n: en-US / zh-CN strings

Refs #62
Follow-up to the control-hints toggle: collapse the card to one line so
it matches the connection card's height, demote the switch to a smaller
secondary size, and move the description into an info-icon tooltip
(hover/focus, keyboard reachable, role=tooltip) using existing design
tokens. Behavior and the bsk_control_hints_hidden key are unchanged.
…nent

Extract the hand-written connection/hints switches into a single Switch
component (h-5 w-9, size-4 knob) used by both settings rows — the
smaller secondary variant is dropped; hierarchy between primary and
secondary settings is conveyed by the info icon and copy only. No
behavior, layout, or storage changes.
@BB-fat
BB-fat merged commit 37fbaac into main Aug 13, 2026
4 checks passed
@BB-fat
BB-fat deleted the feat/62-hide-control-hints-toggle branch August 13, 2026 02:24
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