#66
fix(media): prioritize music apps over browser sessions
Summary
- Rank Windows SMTC browser sessions below music apps so paused songs keep selection and launch-time browser sessions yield to music apps.
- Prefer scriptable Music/Spotify state over stale macOS browser now-playing slot via
scripted_override. - Route adapter transport controls to the AppleScript player the overlay is following when overridden.
- Add unit coverage for Windows AppUserModelId and macOS bundle-id browser detection.
Testing
- Not run:
cargo testforis_browser_appandis_browserunits. - Not run: manual handoff with browser playing then Music/Spotify starting and transport controls.
Activity
15opencode-agent[bot]reviewed1mo ago
opencode-agent[bot]reviewed1mo ago
opencode-agent[bot]reviewed1mo ago
opencode-agent[bot]reviewed1mo ago
opencode-agent[bot]reviewed1mo ago
opencode-agent[bot]reviewed1mo ago
opencode-agent[bot]reviewed1mo ago
opencode-agent[bot]reviewed1mo ago
opencode-agent[bot]reviewed1mo ago
opencode-agent[bot]reviewed1mo ago
Review · 56072b2
✅ No blocking issues
Ranks browser sessions below music apps on Windows via AppUserModelId and on macOS via scripted override, routing transport to the followed player. The biggest remaining risk is unlisted browser IDs still ranking as music, with head CI still in progress.
Confidence: 4/5 — All three prior findings verified fixed in code, but CI is still running and cargo test plus manual handoff were not run.
| Finding | Location | |
|---|---|---|
| ✅ Fixed | Chromium never classified as browser on Windows | src-tauri/src/lib.rs:1278 |
| ✅ Fixed | LibreWolf never classified as browser on macOS | src-tauri/src/media_macos.rs:313 |
| ✅ Fixed | Overridden transport press dropped when scripted player exits | src-tauri/src/media_macos.rs:447 |
Review · b64ca0c
⚠️ 3 open findings
Ranks browser sessions below music apps on Windows/macOS and routes transport to the overridden scripted player; the biggest risk is incomplete browser fragment lists letting Chromium/LibreWolf masquerade as music.
Confidence: 3/5 — Selection and override logic match intent but browser coverage is asymmetric, the transport race drops presses, and CI is still in progress with
cargo testnot run.src-tauri/src/lib.rs:1277src-tauri/src/media_macos.rs:312src-tauri/src/media_macos.rs:444Prompt for all open findings
src-tauri/src/lib.rsaround lines 1274-1290,is_browser_applacks"chromium"(macOS has it;"chromium".contains("chrome")is false), so add"chromium"to rank Chromium as a browser.src-tauri/src/media_macos.rsaround lines 300-316,is_browserlacks"librewolf"(Windows has it), so add"librewolf"so LibreWolf bundle IDs override to Music/Spotify like other browsers.src-tauri/src/media_macos.rsaround lines 441-444 and 566-590, thescripted_overridetransport branch returns early without adapter fallback when the target'sscripted_player_stateisNone; only return early onOk(true)/error and otherwise fall through toadapter_command(paths, ["send", command]).