Repository navigation
feat(extension): allow opening background Agent Windows minimized - #748
Merged
NianJiuZst merged 1 commit intoNov 20, 2026
Merged
NianJiuZst merged 1 commit into
NianJiuZst merged 1 commit into
Conversation
NianJiuZst
approved these changes
Nov 20, 2026
NianJiuZst
left a comment
Collaborator
There was a problem hiding this comment.
Nice, well-thought-out implementation for #649! Keeping openAgentWindowMinimized opt-in (default false), handling Chromium's windows.create constraint by passing state: "minimized" only when unsized and falling back to windows.update with rollback when sized, preserving visible --focus / recording sessions, and avoiding redundant session.interaction_changed broadcasts for extension-local preferences are all clean touches. Full i18n and bilingual changelogs look good and all 12 CI checks are green. LGTM — merging now.
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.
Fixes #649.
Summary
Even when
focusAgentWindowOnOpenisfalse,chrome.windows.create({ focused: false })creates a visible window on desktop platforms, flashing into view when new sessions start. This PR adds an opt-in extension preference (openAgentWindowMinimized, defaultfalse) to open newly created background Agent Windows in a minimized state while keeping explicit--focusand recording sessions visible.Changes
openAgentWindowMinimized: boolean(defaultfalse) toInteractionPreferencesininteraction-preferences.ts, expose a third toggle and scope tooltip under Automation settings ininteraction-settings.tsx, and add localized strings across all 10 locales inpackages/i18n/src/locales/*/extension.json.session.interaction_changeddaemon events inbackground.tswhen only extension-local window creation preferences change and the daemon-facingInteractionPolicy(cooperationMode/autoOpenConsoleOnPause) is unchanged.minimized?: booleanthroughhandleSessionStart->SessionManager.start->chromeAgentWindowApi.create:focusedistrue(for example explicit--focusorrecord start),minimizedis ignored so the window opens visibly.state: "minimized"directly tochrome.windows.create.windows.createAPI rejects combiningstate: "minimized"with explicitwidth/heightbounds, sized unfocused windows create the window with the requested dimensions first and immediately transition it viachrome.windows.update(win.id, { state: "minimized" }), rolling back withchrome.windows.remove(win.id)if the state update fails.daemon-preferences.test.ts,interaction-settings.test.tsx,agent-window.test.ts,window.test.ts, andhuman-loop.test.ts, and updateCHANGELOG.mdandCHANGELOG.zh-CN.md.Validation
pnpm lintpnpm --filter @browser-skill/extension compilepnpm --filter @browser-skill/i18n testpnpm ext:testpnpm ext:buildpython3 scripts/check-changelog-sync.py "$(git merge-base origin/main HEAD)"