fix(browser): honor active=false for browser_open_tab - #89
Open
zzalancelot wants to merge 1 commit into
Open
zzalancelot wants to merge 1 commit into
zzalancelot wants to merge 1 commit into
Conversation
| (prompt) => authorizeToolCall(prompt, controller.signal, target.windowId, call.sessionId, unrestrictedAccess), | ||
| controller.signal, | ||
| (tab) => bindOpenedTab(tab, call.sessionId), | ||
| (tab) => bindOpenedTab(tab, call.sessionId, { active: call.args.active !== false }), |
There was a problem hiding this comment.
The new background-open binding branch is not exercised by the added tests. The test in background-tools.spec.ts replaces bindCreatedTab with a mock, so it verifies background tab creation but not that routeToolCall selects rebindControlled and makes the new tab the target of later browser tools. A route-level test should cover active:false through the real affinity binding; otherwise, a wiring regression could make later tools target the wrong tab while the current tests still pass.
Open background tabs without activating them, rebind controlled affinity, and cover the binding path so later tools target the new tab.
zzalancelot
force-pushed
the
feat/browser-open-tab-active
branch
3 times, most recently
from
September 14, 2026 06:35
61ff43a to
6d6ce25
Compare
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
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.
Summary
browser_open_tabso callers can passactive(defaulttrue);active:falseopens in the background and keeps the current visible tab in front.activethrough tochrome.tabs.createand bind background opens withrebindControlledinstead of always forcing the new tab forward.Test plan
pnpm --filter @yuxianglin/dsh-bridge-browser testpnpm --filter dsh-browser-extension testbrowser_open_tab({ url, active: false })keeps the current tab focused while the new tab becomes controlledbrowser_open_tab({ url })still activates the new tabThe implementation appears safe to merge, though the non-blocking route-level coverage gap remains.
Findings
Summary
activeargument to the bridge tool schema and forwards it through tab creation.Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD A[browser_open_tab] --> B{active is false?} B -- No --> C[Create active tab] C --> D[rebindActive] B -- Yes --> E[Create background tab] E --> F[rebindControlled] D --> G[Later tools target new tab] F --> GReviews (4) · Last reviewed commit: "fix(browser): honor active:false for bro..."