feat(extension): add popup toggle to hide Agent control hints - #81
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
lib/instance-id.ts): newbsk_control_hints_hiddenkey inchrome.storage.localwithget/setControlHintsHiddenhelpers, following the existingconnection_enabledpattern. Defaults to shown when unset or non-boolean — no behavior change for existing users.content/overlay-controller.ts): newcontrolHintsHiddenstate;shouldShowAgentControlOverlayreturns 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 survivesresetAgentOverlays.entrypoints/content.ts): loads the preference before the shadow UI mounts (no flash of the pill for active sessions) and live-applies toggles viachrome.storage.onChanged.entrypoints/popup/App.tsx+use-control-hints-hidden.ts): new "Control hints" switch on the main view, mirroring the connection toggle's style.Help / record / borrow overlays are unaffected — they are interactive requests, not passive hints.
Tests
pnpm lint,tsc --noEmit,wxt buildclean; full vitest 624 passed (the tsxReact.actfailures 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
en-US