Skip to content

feat(group-preservation): add toggle to protect existing groups and add autostack caution tooltip - #2

Merged
YarooqH merged 3 commits into
masterfrom
feat/preserve-existing-groups
Oct 9, 2026
Merged

YarooqH merged 3 commits into
masterfrom
feat/preserve-existing-groups

Conversation

@YarooqH

@YarooqH YarooqH commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Overview

This PR resolves an issue where automatic domain clustering reorganized existing or custom user groups (for example, consolidating separate YouTube groups like Group 1 with 2 tabs and Group 3 with 4 tabs into a single generic stack).

It introduces a Preserve Existing Groups toggle directly accessible and clearly explained on the extension dashboard and options page, and adds a caution indicator (i) alongside the Auto-Stack toggle to forewarn users about real-time background reorganization.


Key Changes

  1. Preserve Existing Groups Toggle (preserveExistingGroups):

    • Added preserveExistingGroups: true default setting in DEFAULT_SETTINGS.
    • When active, groupTabsInWindow ignores any tab with an existing group ID (tab.groupId > 0). It strictly clusters ungrouped tabs, ensuring custom groups, manual titles, and distinct same-domain groupings remain completely intact.
    • When toggled off, allows users to opt into full cross-group consolidation if desired.
  2. Dashboard UI & Clear Descriptions:

    • Added a dedicated Group Protection card in popup.html directly under the quick toggles with a shield icon, live status badge (Protected / Off), and an explicit description:
      "Only clusters ungrouped tabs. Existing or custom groups are protected and will never be modified or merged."
    • Added a matching toggle with recommendation badge in options.html and wired auto-save in options.js.
  3. Auto-Stack Caution Tooltip (i):

    • Added an info icon (i) adjacent to the Auto-Stack toggle in both the popup dashboard and options page.
    • Displays a caution popover forewarning users:
      "Caution: When Auto-Stack is enabled, TabStack automatically reorganizes and groups tabs in real time as you browse or open new tabs."
    • Fully accessible with hover, focus, and toggle-on-click interactions that do not accidentally trigger the switch.
  4. Version Bump:

    • Bumped version from 1.1.0 to 1.2.0 in manifest.json per repository guidelines.

Verification Checklist

  • Syntax checked across all modified JS files (grouper.js, constants.js, popup.js, options.js).
  • Tested default behavior: tabs already in groups are skipped during clustering.
  • Verified dashboard toggle synchronization between popup and options page.
  • Verified popup layout and height responsiveness in dark/light themes.

YarooqH and others added 3 commits September 4, 2026 08:56
Resolve conflicts with session snapshots: bump version to 1.4.0 (master
shipped 1.3.0) and register the preserve-groups toggle alongside the
snapshot settings in the options auto-save list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With Preserve Existing Groups on, the grouper skipped every grouped tab,
including stacks TabStack made itself. A new same-site tab then stayed
loose (below minTabsToGroup) or formed a duplicate stack, and tab counts
in titles went stale.

Treat a group as TabStack's when its title is the stack name for one of
its tabs' domains (with an optional " (n)" count). Titles survive browser
restarts, and groups the user creates or renames still never match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@YarooqH
YarooqH merged commit bc5db71 into master Oct 9, 2026
2 checks passed
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.

1 participant