Skip to content

Commit 978c4a3

Browse files
ralyodioclaude
andcommitted
fix(desktop): make tab audio indicator clickable to mute/unmute
The tab-strip speaker icon rendered but couldn't mute/unmute: the clickable control is gated by media::kEnableTabMuting, which is DISABLED_BY_DEFAULT in Chromium 131. Stock Chrome only enables it via Finch, which an ungoogled build never receives — so a muted tab was invisible and unrecoverable from the tab. Force it on with --enable-features=EnableTabMuting in all launch paths (tronbrowser POSIX shell, tronbrowser.cmd, chromium-flags.ts UX_FEATURE_FLAGS). Runtime flag — no Chromium rebuild; applies on Linux/KDE, macOS, Windows. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 09e3143 commit 978c4a3

4 files changed

Lines changed: 45 additions & 0 deletions

File tree

apps/desktop/launcher/tronbrowser

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,13 @@ fi
282282
MV2_KEEP="ExtensionManifestV2Disabled,ExtensionManifestV2Unsupported,ExtensionManifestV2DeprecationWarning,ExtensionManifestV2DeprecationUnsupported"
283283
FLAGS="--user-data-dir=$DATA --class=TronBrowser --no-first-run --no-default-browser-check --no-pings --disable-background-networking --disable-breakpad --disable-domain-reliability --disable-sync --disable-features=Translate,OptimizationHints,InterestFeedContentSuggestions,$MV2_KEEP --load-extension=$EXT"
284284

285+
# Make the tab-strip audio indicator a clickable mute/unmute control. Upstream
286+
# media::kEnableTabMuting is DISABLED_BY_DEFAULT and stock Chrome only turns it
287+
# on via Finch, so an ungoogled build ships it OFF — the speaker icon renders
288+
# but you cannot tell which tab is making sound or mute it from the tab. Force
289+
# it on to match stock Chrome (Linux/KDE, macOS, Windows).
290+
FLAGS="$FLAGS --enable-features=EnableTabMuting"
291+
285292
# Chromium spews benign ERROR/WARNING noise to stderr (EV cert OID, mojo
286293
# WidgetHost, GPU, etc.). Route it to a log so `tron <url>` returns clean;
287294
# set TRONBROWSER_VERBOSE=1 to see it inline. --log-level=2 trims the rest.

apps/desktop/launcher/tronbrowser.cmd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ if not defined BROWSER (
3939
exit /b 1
4040
)
4141

42+
rem --enable-features=EnableTabMuting makes the tab audio indicator a clickable
43+
rem mute/unmute control (media::kEnableTabMuting is DISABLED_BY_DEFAULT upstream;
44+
rem stock Chrome only enables it via Finch, which an ungoogled build never gets).
4245
"%BROWSER%" --user-data-dir="%DATA%" --no-first-run --no-default-browser-check --no-pings ^
4346
--disable-background-networking --disable-breakpad --disable-domain-reliability ^
4447
--disable-sync --disable-features=Translate,OptimizationHints,InterestFeedContentSuggestions ^
48+
--enable-features=EnableTabMuting ^
4549
--log-level=2 --load-extension="%EXT%" %*

apps/desktop/src/chromium-flags.test.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
torEnabled,
77
incognitoEnabled,
88
PRIVACY_FLAGS,
9+
UX_FEATURE_FLAGS,
910
DEFAULT_TOR_SOCKS_PORT,
1011
} from './chromium-flags.js';
1112

@@ -25,6 +26,20 @@ describe('chromium launch flags', () => {
2526
expect(flags).not.toContain('--disable-background-networking');
2627
});
2728

29+
it('enables clickable tab audio muting on every platform', () => {
30+
// media::kEnableTabMuting is DISABLED_BY_DEFAULT upstream; without this the
31+
// tab speaker icon is inert in an ungoogled build (no Finch to turn it on).
32+
expect(UX_FEATURE_FLAGS).toContain('--enable-features=EnableTabMuting');
33+
expect(buildLaunchFlags()).toContain('--enable-features=EnableTabMuting');
34+
});
35+
36+
it('keeps tab audio muting even when telemetry is opted in or under tor', () => {
37+
expect(buildLaunchFlags({ telemetry: true })).toContain(
38+
'--enable-features=EnableTabMuting',
39+
);
40+
expect(buildLaunchFlags({ tor: true })).toContain('--enable-features=EnableTabMuting');
41+
});
42+
2843
it('passes through the user data dir', () => {
2944
const flags = buildLaunchFlags({ userDataDir: '/home/u/.tronbrowser' });
3045
expect(flags).toContain('--user-data-dir=/home/u/.tronbrowser');

apps/desktop/src/chromium-flags.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,21 @@ export const PRIVACY_FLAGS = [
5252
'--disable-sync',
5353
] as const;
5454

55+
/**
56+
* Feature flags that restore standard Chromium UX which our fork does not get
57+
* because it never talks to Google's server-side field-trial (Finch) service.
58+
*
59+
* `EnableTabMuting` (`media::kEnableTabMuting`) makes the tab-strip audio
60+
* indicator a clickable mute/unmute control. Upstream the feature is
61+
* `FEATURE_DISABLED_BY_DEFAULT` and stock Chrome only turns it on via Finch, so
62+
* an ungoogled build ships it OFF: the speaker icon renders but the button is
63+
* disabled — you can neither tell which tab is making sound nor mute it from the
64+
* tab. Forcing it on here matches stock-Chrome behavior on every platform
65+
* (Linux/KDE, macOS, Windows). Applied even when telemetry is opted in — it is a
66+
* UI fix, not a phone-home surface.
67+
*/
68+
export const UX_FEATURE_FLAGS = ['--enable-features=EnableTabMuting'] as const;
69+
5570
/**
5671
* Builds the flags that route the browser through the local Tor SOCKS5 proxy.
5772
*
@@ -84,6 +99,10 @@ export const FORBIDDEN_FLAG_SUBSTRINGS = [
8499
export function buildLaunchFlags(opts: LaunchOptions = {}): string[] {
85100
const flags: string[] = [];
86101

102+
// Standard-UX feature flags first (e.g. clickable tab audio muting). Always
103+
// present — these are usability parity with stock Chrome, not telemetry.
104+
flags.push(...UX_FEATURE_FLAGS);
105+
87106
if (!opts.telemetry) {
88107
flags.push(...PRIVACY_FLAGS);
89108
}

0 commit comments

Comments
 (0)