scalpel@labs: ~/glossary/selection-vs-filter-scope.mdx5 sections

Selection Scope Versus Filter Scope

Scope decides which tabs a bulk action changes. Selection scope acts only on the tabs you have ticked. Filter scope acts on every tab that matches the current search, ticked or not. A toggle switches between the two before you run an action.

extension: Scalpel Manage Tabsupdated: 2026-08-14read_time: 1 min
less selection-vs-filter-scope.mdx

Why it matters

When you've searched for "news" and found eighty tabs across all your windows, closing them one by one takes hours. The scope toggle lets you close all eighty in one click, or close just the three you ticked. You pick. The same choice applies to every action: muting, pinning, moving, grouping.

How it works

Selection scope is the safe default. You tick the tabs you want, then run an action, and only those tabs are affected. The count in the action bar shows exactly how many tabs you've ticked.

Filter scope is the speed mode. You search for something (say "news"), then flip the scope toggle to "filter," and the next action runs on every tab matching that search, whether you ticked them or not. The count shows how many tabs would be hit. This is fast but risky if you meant to close only the ones you selected.

What does not matter

The search and scope are independent. A search with selection scope still only acts on ticked tabs; a blank search with filter scope acts on every tab everywhere. And toggling scope doesn't run the action by itself: the toggle just changes what the next action will do.

Code example

// Selection scope: collect the tabs the user ticked
const selectedTabIds = userTickedTabs; // array of tab IDs

// Filter scope: collect tabs matching the current search
const searchTerm = "news";
chrome.tabs.query({}, (allTabs) => {
  const filteredTabIds = allTabs
    .filter((tab) => {
      const combined = (tab.title + " " + tab.url).toLowerCase();
      return combined.includes(searchTerm.toLowerCase());
    })
    .map((tab) => tab.id);
    
  // Apply action to either selectedTabIds or filteredTabIds
  // depending on current scope setting
});

How Scalpel Manage Tabs shows it

The scope toggle sits in the action bar, next to the action buttons (close, pin, mute, move, group). Selection mode shows a checkbox icon; filter mode shows a funnel. The count updates to show exactly how many tabs the next action will touch. Try it: search, toggle the scope, and watch the count change without running anything.

Sources