Skip to content

[codex] add browser tab grouping toggle#2169

Open
Daily-AC wants to merge 2 commits into
jackwener:mainfrom
Daily-AC:codex/browser-tab-group-toggle
Open

[codex] add browser tab grouping toggle#2169
Daily-AC wants to merge 2 commits into
jackwener:mainfrom
Daily-AC:codex/browser-tab-group-toggle

Conversation

@Daily-AC

@Daily-AC Daily-AC commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Description

Chrome automatically preserves named tab groups in its Saved Tab Groups bar. When OpenCLI browser windows are closed or recreated across browser or extension lifecycles, closed OpenCLI Browser entries can accumulate even though the live-group convergence logic from #2098 correctly keeps one active group.

The extensions API can query and mutate live chrome.tabGroups, but it has no API for deleting Chrome saved-group entries. This change therefore prevents new saved entries at the source by adding a Group browser tabs toggle to the extension popup.

The setting defaults to enabled, preserving current behavior. When disabled:

  • live OpenCLI Browser tabs are ungrouped;
  • the in-session group cache and ledger are cleared;
  • future browser sessions stay ungrouped;
  • owned window and lease tracking continue unchanged.

The preference is loaded before startup reconciliation and stored in chrome.storage.local. Active adapter grouping is unaffected because visible adapter groups were removed in #1925. Existing profiles can still contain legacy saved OpenCLI Adapter entries created by older releases; like previously saved OpenCLI Browser entries, Chrome requires users to remove them once from the saved tab groups bar.

This revisits the approach from closed PR #1463 after the explicit user scenario requested in #2069. Unlike that older PR, the setting is exposed in the extension popup, is scoped to the remaining browser group path, and cleans up live groups when switched off.

Related issue: Closes #2069

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Refactor
  • Performance improvement
  • Test update

Checklist

  • My code follows the existing project style
  • I have performed a self-review
  • I have added or updated tests
  • New and existing targeted tests pass locally
  • The extension production build succeeds
  • I have tested the change with a real Chrome extension session

Screenshots / Output

npx vitest run --project extension extension/src/background.test.ts
Test Files  1 passed (1)
Tests       73 passed (73)

npm run build
dist/background.js  94.49 kB
built successfully

node --check extension/popup.js
passed

Manual verification with Chrome 150 on macOS 26.5.2:

  • Disabled Group browser tabs from the real extension popup.
  • Opened two named browser sessions into one owned window.
  • Both tabs remained ungrouped.
  • The Saved Tab Groups count did not increase.
  • Reloaded the extension and confirmed the toggle remained disabled.
  • The daemon reconnected successfully after reload.

npm run typecheck reports seven errors in existing test code. The same seven errors are present on a clean upstream/main worktree; this PR adds no typecheck failures.

@Daily-AC
Daily-AC marked this pull request as ready for review July 23, 2026 07:51
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.

[Feature]: Option to disable Chrome tab group creation ("OpenCLI Browser" orange group)

1 participant