Repository navigation
fix(extension): stop creating synced task tab groups - #532
Merged
Merged
Conversation
iuyo5678
force-pushed
the
fix/remove-agent-tab-groups
branch
from
October 31, 2026 04:33
fc8072d to
761aed1
Compare
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.
Chrome 会自动保存原生标签页组,并在开启相关同步时将它们同步到同一 Google 账号的其他浏览器。BrowserSkill 为每个任务窗口创建同名分组,反复执行任务后,其他浏览器的书签栏可能累积大量
BrowserSkill分组,持续打扰用户。Chrome 的公开扩展 API 没有为单个分组关闭保存或同步的选项;任务结束后清理也无法阻止运行期间的同步。因此移除自动创建原生任务分组的功能,从源头停止产生这些分组,保留现有的页面内控制提示。
改动范围
AgentWindowTabGroups模块及其后台调用点,移除tabGroups权限和中英文权限说明。background-overlays.test.ts增加默认 CI 会执行的回归:真实标签页创建处理逻辑及后台回调保留控制提示,同时不调用tabs.group、tabs.ungroup或tabGroups.update。CHANGELOG.md的Unreleased / Removed中记录功能和权限移除,保留已发布的 0.4.0 历史说明。已有行为保障
窗口创建、焦点管理、
AgentWindowRouting、弹窗归属、会话生命周期、标签页借用/归还以及后台执行的实现文件均与main一致。后台事件接线只移除分组调用,保留原有路由、协作和页面控制提示。真实浏览器回归已验证:
验证
window-routing.browser.test.ts和tab-detachment.browser.test.ts:2 项全部通过。git diff --check通过。tabGroups权限。本地浏览器验证证据
验证版本:
761aed14,2026-10-31,macOS arm64、Node.js 22、Chrome for Testing 145.0.7632.6。覆盖范围明确区分:现有 CI 会执行标签页拖出浏览器测试,以及新增的不自动分组单元回归;
window-routing.browser.test.ts仍是显式启用的本地有窗口浏览器测试。下面附实际运行命令和输出,不将本地结果计为 CI 覆盖。将
/path/to/chrome替换为支持加载测试扩展的 Chrome for Testing 可执行文件:BSK_BACKGROUND_CHROME=/path/to/chrome \ BSK_TAB_DETACH_CHROME=/path/to/chrome \ BSK_BACKGROUND_REPORT=/tmp/window-routing.json \ BSK_TAB_DETACH_REPORT=/tmp/tab-detachment.json \ pnpm --filter @browser-skill/extension exec vitest run \ src/session-manager/__tests__/window-routing.browser.test.ts \ src/session-manager/__tests__/tab-detachment.browser.test.ts \ --no-file-parallelism实际测试输出:
窗口路由报告中的关键结果:
{ "states": [ { "label": "background" }, { "label": "covered" }, { "label": "minimized" } ], "backgroundFocusEvents": [], "nativeExternal": true, "closedSourcePopup": true, "humanAssistancePopupChain": true, "defaultTargetProtected": true, "defaultCooperation": true }标签页拖出报告中通过的场景:
{ "completed": [ "created-tab", "borrowed-tab", "observed-tab", "whole-group", "last-tab", "same-window-reorder", "unrelated-tab", "programmatic-return", "ordinary-stop" ] }新增单元回归还做了反向验证:临时恢复旧自动分组模块和后台调用后,测试在
expect(chrome.tabs.group).not.toHaveBeenCalled()处失败,实际检测到两次分组调用;恢复当前实现后通过。旧实现只用于本地验证,未包含在提交中。