Skip to content

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

Open
chrisdeeming wants to merge 1 commit into
pingdotgg:mainfrom
chrisdeeming:feat/mute-browser-tab
Open

feat(desktop): mute a browser tab#7252
chrisdeeming wants to merge 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 tab lifecycle and state emission (race-sensitive); contract adds required audioMuted/audible fields on DesktopPreviewTabState for all consumers.

Overview
Adds Chromium-style mute for desktop preview tabs: users can silence a tab, see which tabs are playing audio, and toggle mute from the tab strip or context menu.

Desktop / contracts: DesktopPreviewTabState gains audioMuted (user intent, survives navigation and webview swaps) and audible (observed from Chromium). PreviewManager implements setAudioMuted, listens for audio-state-changed, reconciles audibility after attach, and uses emitIfCurrent in a few places so stale snapshots do not roll back live audio state. New IPC desktop:preview-set-audio-muted is wired through preload and DesktopPreviewBridge.

Web UI: RightPanelTabs shows a speaker control only while a tab is audible (muted tabs use a crossed-out icon). Mute/unmute in the tab context menu is always available for preview tabs. Desktop calls use previewRuntimeTabId (thread + server epoch + session tab id), not the raw server session id.

Tests: Extensive PreviewManager coverage for mute re-apply, audibility races, stale guests, and navigation; component tests for indicator visibility and runtime id routing.

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

Note

Add mute control for browser tabs in the desktop preview panel

  • Adds setAudioMuted(tabId, audioMuted) across the IPC bridge, PreviewManager, and preload layer to mute/unmute individual preview tabs.
  • Extends PreviewTabState and DesktopPreviewOverlay with audioMuted and audible fields; mute intent persists across webview swaps and navigation.
  • Adds an audio indicator button and context menu "toggle mute" action to RightPanelTabs, visible when a tab is producing sound, using a runtime tab ID resolver passed from ChatView.
  • Chromium audio-state-changed events are tracked per-tab with deduplication and reconciliation on webview attach.

Macroscope summarized d347f6f.

@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown

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: b4d0f06e-aac2-46d3-bf45-04d38b751a57

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 PR 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 Outdated
Comment thread apps/desktop/src/preview/Manager.ts
@macroscopeapp

macroscopeapp Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

...

You can customize Macroscope's approvability policy. 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
Comment thread apps/desktop/src/preview/Manager.ts Outdated
Comment thread apps/desktop/src/preview/Manager.ts
@chrisdeeming
chrisdeeming force-pushed the feat/mute-browser-tab branch from 1679e7b to a44b7c9 Compare August 16, 2026 20:54

@cursor cursor Bot 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 a44b7c9. Configure here.

Comment thread apps/desktop/src/preview/Manager.ts
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.
@chrisdeeming
chrisdeeming force-pushed the feat/mute-browser-tab branch from a44b7c9 to d347f6f Compare August 16, 2026 21:02

@t3-code t3-code Bot 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.

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 PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant