feat: Sleep Background Tabs from menus, multi-select, and Command Bar #4937
All Vouch review confidence checks passed
Residual risk 0.27 = Change Risk (0.48) × (1 − Review Confidence (0.43)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.48 · 501 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.372
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #4937"
general
weight: 0.35
mvanhorn
Problem
Putting tabs to sleep manually today works one tab at a time from a single tab's context menu. When a workspace accumulates dozens of idle tabs, there is no way to sleep all eligible background tabs at once or sleep a multi-selected group from the sidebar menus, the Tab menu, or the Command Bar.
Change
sleepableBackgroundTabIdsandsleepBackgroundTabsinapps/browser/src/state/tabs/manualSleep.tsto find and sleep eligible background tabs in the active window/workspace while skipping active, pinned, playing-audio, or already-sleeping tabs, surfacing a toast with slept and kept-awake counts.sleepBackgroundTabscommand throughcommandCatalog.ts,browserCommand.ts,CommandTable.swift,MainMenu.swift,appMenu.ts,commandInteraction.ts,automationCommands.ts,barActions.ts, andsidebar/commands.ts.background_sleeps_from_menuandselection_sleeps_from_menucounters intabSleepCounts.tsbehind telemetry consent, and updatedcopy.tsandconsent-reach-baseline.json.Verification (screenshots and videos)
pnpm typecheck: 11/11 packages passed (@ardia/browser,@ardia/desktoplinux/win/mac,@ardia/demo).@ardia/browsertests (sleepAsks.test.mjs,menus.test.mjs,barActions.test.mjs,commandCatalog.test.mjs,automationCommands.test.mjs,menuState.test.mjs,conventions.test.mjs,consentConventions.test.mjs,consentReach.test.mjs,pluginMarkdown.test.mjs,elementPicker.test.mjs): all passed.@ardia/desktophost tests:appMenu.test.mjsandhostSync.test.mjs42/42 passed;test:hostlinux 1415/1416 (1 pre-existing todo, 0 fail), win 1350/1351 (1 pre-existing todo, 0 fail).AI was used for assistance.
Demo
!demo
<video src="https://mvanhorn.github.io/pr-demo-assets/ardia/2026-11-29-110-feat-sleep-background-tabs/out.mp4" controls width="720"></video>
<!-- codesmith:footer -->
---
<a href="https://dashboardbackend.blacksmith.sh/track/run-proof?expires=1798587879&installation_model_id=450067&pr_number=4937&ref=codesmith_pr_footer&repository=ardia-browser%2Fardia&return_to=https%3A%2F%2Fgithub.com%2Fardia-browser%2Fardia%2Fpull%2F4937&variant=run_proof_on_this_pr&signature=b7952061519290ebf8e8e05ef801cdcaf7d9b621124a8963c980059d4a6aac8e"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/proof-run-proof-on-this-pr-v2-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/proof-run-proof-on-this-pr-v2-light.svg"><img alt="Run Proof on this PR" src="https://pr-comments-assets.blacksmith.sh/codesmith/proof-run-proof-on-this-pr-v2-dark-3x.png" width="168" height="28"></picture></a>
<sup><a href="https://app.blacksmith.sh/ardia-browser/codesmith/ardia/pr/4937?autoLogin=true&ref=codesmith_pr_footer">Open in [code]smith</a> · Need help on this PR? Tag <code>@codesmith-bot</code> with what you need.</sup>
<!-- codesmith:autofix:disabled -->
<!-- /codesmith:footer -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
New Features
Added “Sleep Background Tabs” to browser commands and File menus.
Added options to sleep eligible background tabs from the command bar, sidebar, and overflow menu, or sleep other and selected tabs from tab menus.
Sleep actions show how many tabs slept or stayed awake, with updated usage counts.
Documentation
Updated tab-discarding guidance with sleep behavior, settings, and bulk-sleep details.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->