#66

fix(media): prioritize music apps over browser sessions

OpenJustMarkDevwants to merge intofrom

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 test for is_browser_app and is_browser units.
  • Not run: manual handoff with browser playing then Music/Spotify starting and transport controls.

Activity

15
opencode-agent[bot]reviewed1mo ago
opencode-agent[bot]reviewed1mo ago
opencode-agent[bot]reviewed1mo ago
opencode-agent[bot]reviewed1mo ago
opencode-agent[bot]1mo ago

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 test not run.

FindingLocation
🆕 🟡 MediumChromium never classified as browser on Windowssrc-tauri/src/lib.rs:1277
🆕 🟡 MediumLibreWolf never classified as browser on macOSsrc-tauri/src/media_macos.rs:312
🆕 🔵 LowOverridden transport press dropped when scripted player exitssrc-tauri/src/media_macos.rs:444
Prompt for all open findings
  • In src-tauri/src/lib.rs around lines 1274-1290, is_browser_app lacks "chromium" (macOS has it; "chromium".contains("chrome") is false), so add "chromium" to rank Chromium as a browser.
  • In src-tauri/src/media_macos.rs around lines 300-316, is_browser lacks "librewolf" (Windows has it), so add "librewolf" so LibreWolf bundle IDs override to Music/Spotify like other browsers.
  • In src-tauri/src/media_macos.rs around lines 441-444 and 566-590, the scripted_override transport branch returns early without adapter fallback when the target's scripted_player_state is None; only return early on Ok(true)/error and otherwise fall through to adapter_command(paths, ["send", command]).
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]1mo 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.

FindingLocation
✅ FixedChromium never classified as browser on Windowssrc-tauri/src/lib.rs:1278
✅ FixedLibreWolf never classified as browser on macOSsrc-tauri/src/media_macos.rs:313
✅ FixedOverridden transport press dropped when scripted player exitssrc-tauri/src/media_macos.rs:447