Skip to content

feat(desktop): mute a browser tab - #7252

Merged
maria-rcks merged 1 commit into
pingdotgg:mainfrom
chrisdeeming:feat/mute-browser-tab
Aug 18, 2026
Merged

maria-rcks merged 1 commit into
pingdotgg:mainfrom
chrisdeeming:feat/mute-browser-tab

Conversation

@chrisdeeming

@chrisdeeming chrisdeeming commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

What Changed

Preview tabs can now be muted, modelled on Chromium's behaviour.

  • Mute tab / Unmute tab in the tab's right-click menu.
  • A speaker icon appears in the tab while it's playing sound, and shows as
    crossed-out when muted.
  • Clicking the icon toggles mute.

Why

There was no way to silence a preview tab, or to tell which of several open
tabs was making noise.

UI Changes

CleanShot.2026-08-16.at.20.31.49-small.mp4

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • Video included
  • I included a video for animation/interaction changes

Note

Medium Risk
Touches preview lifecycle, IPC state publishing, and race-prone audibility/mute reconciliation; behavior is heavily tested but errors from mute failures are still swallowed in the UI.

Overview
Adds per-tab mute for desktop preview webviews, wired end-to-end from contracts through IPC/preload to PreviewManager.setAudioMuted, with audioMuted (user intent) and audible (Chromium observation) on preview tab state and the web overlay.

The manager re-applies mute on webview attach/swap (like zoom), listens to audio-state-changed, reconciles audibility after attach, rolls back failed mutes, and uses emitIfCurrent so concurrent audio updates are not overwritten.

In the UI, RightPanelTabs shows a volume control only while a tab is audible, adds mute/unmute to the tab context menu, and routes desktop calls through previewRuntimeTabId so actions use the Electron runtime tab id, not the server session id.

Reviewed by Cursor Bugbot for commit 0a2a3f4. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Add browser tab mute controls to desktop preview tabs

  • Adds setAudioMuted(tabId, audioMuted) across the IPC stack: contracts, preload bridge, IPC channel, and PreviewManager in Manager.ts.
  • PreviewTabState gains audioMuted (user intent) and audible (Chromium-reported) fields, persisted across navigation and webview swaps, with rollback on failure.
  • Audible tabs show a volume icon button in RightPanelTabs that toggles mute; a "toggle-mute" item is also added to the tab context menu.
  • Audio state is projected through usePreviewBridge into DesktopPreviewOverlay so the web UI can reflect mute and audibility.

Macroscope summarized 0a2a3f4.

@coderabbitai

ghost commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e7ab370d-71e9-4f3a-9f83-ba0424ad8016

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Aug 16, 2026
Comment thread apps/desktop/src/preview/Manager.ts Resolved
Comment thread apps/desktop/src/preview/Manager.ts Resolved
@macroscopeapp

ghost commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR introduces a new user-facing feature: mute/unmute controls for browser tabs with audio indicators. It adds new IPC methods, new state fields, new UI components, and significant new logic in the preview manager. New features with user-facing behavior changes warrant human review.

You can add or adjust custom eligibility rules. Learn more.

@chrisdeeming
chrisdeeming force-pushed the feat/mute-browser-tab branch from 869c01c to 1679e7b Compare August 16, 2026 20:44
Comment thread apps/desktop/src/preview/Manager.ts Resolved
Comment thread apps/desktop/src/preview/Manager.ts Resolved
Comment thread apps/desktop/src/preview/Manager.ts Resolved
@chrisdeeming
chrisdeeming force-pushed the feat/mute-browser-tab branch from 1679e7b to a44b7c9 Compare August 16, 2026 20:54
Comment thread apps/desktop/src/preview/Manager.ts Resolved
@chrisdeeming
chrisdeeming force-pushed the feat/mute-browser-tab branch from a44b7c9 to d347f6f Compare August 16, 2026 21:02

ghost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewed at d347f6f. the desktop mute lifecycle, audibility reconciliation, runtime tab routing, ipc contract, and ui interactions look sound. targeted, desktop, and web test suites pass, all required checks pass, and i found no remaining blockers.

@chrisdeeming
chrisdeeming force-pushed the feat/mute-browser-tab branch from d347f6f to 861ea9e Compare August 18, 2026 20:34

ghost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 861ea9ef18f09d8aeff6fb63e09db054b039cd79. Configure here.

@chrisdeeming
chrisdeeming force-pushed the feat/mute-browser-tab branch from 861ea9e to 08405c5 Compare August 18, 2026 21:44
Comment thread apps/desktop/src/preview/Manager.ts Resolved
There was no way to silence a preview tab, or to tell which of several open
tabs was making noise.

Adds per-tab muting modelled on Chromium: "Mute tab"/"Unmute tab" in the tab's
right-click menu, a speaker icon while a tab is playing sound that shows as
crossed-out when muted, and click-to-toggle on that icon.

Model: Claude Opus 4.5. Harness: T3 Code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants