Skip to content

Follow the browser's real active tab in web_scan - #807

Open
gyanu2507 wants to merge 1 commit into
lsdefine:mainfrom
gyanu2507:fix/web-scan-real-active-tab
Open

gyanu2507 wants to merge 1 commit into
lsdefine:mainfrom
gyanu2507:fix/web-scan-real-active-tab

Conversation

@gyanu2507

@gyanu2507 gyanu2507 commented Sep 11, 2026

Copy link
Copy Markdown

Fixes #793.

web_scan reported active_tab as the last tab the agent touched. If the user switched tabs in Chrome, the scan still read the old page.

The MV3 bridge now includes active / windowId and listens for tabs.onActivated and windows.onFocusChanged. TMWebDriver updates default_session_id from that, and web_scan marks the matching tab.

Tested with frontends/tests/test_web_scan_active_tab.py.

The bridge now reports tab activation, and web_scan uses that instead
of the last tab the agent operated on.
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.

[Bug] web_scan 的 active_tab 是"上次操作的tab"而非真实活跃tab(桥接扩展未上报 active 状态)

1 participant