Skip to content

macOS port follow-ups + deep-review fix sweep - #8

Merged
df49b9cd merged 9 commits into
mainfrom
df49b9cd/macos-port
Oct 5, 2026
Merged

df49b9cd merged 9 commits into
mainfrom
df49b9cd/macos-port

Conversation

@df49b9cd

@df49b9cd df49b9cd commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

What

Post-merge follow-ups on the macOS port, ending in a full multi-agent deep review whose findings are all resolved in the final commit.

Earlier commits on this branch (since PR #6)

  • PL-97/99/100/101: in-player subtitle toggle bound to S, sub-visibility observed prop, off-page Space/K/M keyboard routing to /player, fresh profiles default player.subsEnabled=true, smoke GPU check uses the live recording.
  • Keychain: friendly locked-keychain message (PL-98); macOS keychain round-trip verified (PL-75).
  • Headless macOS: scripts/headless-macos.sh end-to-end dev harness; default muted, --interactive keeps sound.
  • macOS devtools: /eval + /eval-ready endpoints with host/origin gating.

Final commit — deep-review fix sweep (9216d54)

A six-dimension deep review (correctness, tests, consistency, ux, performance, docs) over the whole branch diff found 40 issues (7 P1, 11 P2, 20 P3, 2 P4); a 15-agent fix workflow applied and adversarially verified every one. Highlights:

  • P1s fixed: macOS mpv render context now freed on window close (was a per-process leak with a live update callback); secrets password fidelity (switched to security -w raw stdout); locked-keychain detection no longer swallows generic errors and silently keeps plaintext; probe HDR gamma_deadline no longer misreports slow streams; /eval JS retry loop bounded; dev-run.sh hardcoded user path removed; build-media.sh libplacebo "$@" splice fixed.
  • P2s: TMDB changes watermark only advances on success (was skipping up to 14 days of updates); identify() batch flush + outage bail-out; tmdb remap gated on fitting metadata (test updated to corrected semantics); setSubsEnabled cache rollback on failure; S key cycles tracks with >1, toggles with 1; build fails loudly on missing Homebrew prefix; headless-macos.sh keychain scrub scoped to its own profile.

Gate: cargo test 87/87 · vitest 43/43 · tsc clean · cargo fmt --check clean.

Follow-ups filed in planned (not blockers)

  • PL-110 — bundle/static-link Homebrew dylibs (ass/lcms2/uchardet) before any release .dmg (release-blocker when we get there).
  • PL-111 — wire macos_keychain_roundtrip (or a Command-trait mock) into CI.
  • PL-112 — per-window player surfaces if a second WebviewWindow ever attaches (second attach currently refused loudly).

Reviewer notes

  • One test change is intentional: tmdb_map_roundtrip asserted the old buggy remap-without-metadata; it now asserts remap only once a fitting TMDB row exists.
  • THIRD_PARTY_NOTICES.md regenerated against Cargo.lock (counts, version bumps, section renumbering verified).

df49b9cd and others added 9 commits October 3, 2026 12:21
- devtools.rs: macOS /eval returns over a devtools-only Tauri IPC channel
  (__devtools_eval_result) instead of eval_with_callback's completion value,
  which WKWebView delivers empty here; GET /eval-ready for the harness probe.
  Unblocks scripts/headless-macos.sh and the smoke suite on macOS.
- secrets.rs: locked keychain (exit 128 with empty stderr) maps to the
  friendly message; new #[ignore] macos_keychain_roundtrip test (thrown-away
  keychain via TP_TEST_KEYCHAIN), which the PL-75 workflow ran green.
- .mcp.json + WORKLOG.md: track testpattern work in the planned tracker
  (project testpattern-app, team PL); T-028 updated — smoke 29/29 on macOS,
  keychain round-trip and .dmg build verified.
The macOS 'headless' session opens a visible interactive window (unlike the
Linux nested compositor), so default start stays muted (TP_DEV_MUTE=1,
TP_DEV_AO=null) for automated runs, and start --interactive / restart-app
--interactive drops both for by-hand checks.
- media_macos/…/MpvOpenGLView.swift: the GL video surface now refuses first
  responder (acceptsFirstResponder = false) and forwards key/mouse up the
  responder chain, so a click on the video no longer steals Space/K/arrows
  from the webview's hotkeys.
- Player.tsx: keydown 'volume' and 'seek' steps read back the applied value
  and show a transient OSD chip (Volume N / Muted / » +30 s / « −10 s) —
  arrow keys used to only poke the seek bar with no feedback.
…PU check

- PL-101: Layout-level Space/K/M while playback runs off-page — Space/K
  routes to /player (input/focus-guarded), M mutes. Fixes "Space does
  nothing on Home while something plays" for script/bridge/autoplay starts.
- PL-99: player chrome has a real Subtitles on/off row (S key) that drives
  the persisted player.subsEnabled setting, plus picking a track while subs
  are hidden re-enables them; the store now observes mpv sub-visibility so
  the menu and Settings stay in sync.
- PL-100: fresh profiles default player.subsEnabled=true so mpv's slang
  auto-pick actually shows (was: track auto-selected, sub-visibility=no);
  one-time "Subtitles are off — press S" hint when a track got picked with
  subs off, remembered via ui.subHintSeen.
- PL-97: smoke.sh GPU check is cross-platform — Linux still VP9+vaapi, on
  macOS it replays the live recording and expects videotoolbox; when the
  GPU pipeline can't engage in the session (no /dev/dri, no window-server)
  the check skips instead of failing.
Six-agent deep review of df49b9cd/macos-port found 40 issues
(7 P1, 11 P2, 20 P3, 2 P4); a 15-agent fix workflow applied and
adversarially verified them, batch by batch:

- scripts: dev-run.sh repo-relative TP_APP_BIN default; build-media.sh
  libplacebo "$@" splice, rc capture, JOBS/libtool hardening;
  headless-macos.sh keychain scrub scoped to the profile, pgrep matched
  to the resolved binary, :1420 fingerprint; ubuntu-build.sh engine/bun
  guards, arm64 platform for podman; smoke.sh hwclip gating
- tmdb: changes watermark only advances on success; identify() batch
  flush + outage bail-out; unmapped count scoped to searchable kinds;
  changes() paging bounded; store_map transactional; details() shares
  json() retry logic
- player/macos: render-context teardown on window close (P1 leak);
  single-SURFACE guard; OnceLock GL library cache; Swift draw locking
  order + cglContextObj guard
- secrets: -w stdout parsing (password fidelity); locked-keychain
  detection no longer swallows generic errors; stdin handling;
  unlock-keychain only after an actual locked failure; tests exercise
  the real backend fns
- probe: HDR gamma wait no longer short-circuits on slow streams
- devtools: /eval JS retry loop bounded; eval_bus unit tests
- build.rs: fail loudly on missing Homebrew prefix; swift build honors
  CARGO_BUILD_TARGET; macos-private-api rationale documented
- works/db/settings: tmdb remap gated on fitting metadata (test updated
  to the corrected semantics); v9 migration upgrade test; subsEnabled
  apply test
- frontend: S cycles subs with >1 track, toggles with 1; setSubsEnabled
  cache rollback on failure; volume 0 floor restored; sub-hint baselined
  on persisted setting; TrackMenu toggle restores a track; off-page M
  gets feedback; test coverage for the new paths

Gate: cargo test 87/87, vitest 43/43, tsc clean, bash -n clean,
cargo fmt clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Conflicts resolved by keeping this branch's reviewed versions (the
deep-review fix sweep's settings/player/Layout/Player/smoke.sh changes)
over main's identical-feature baseline from PR #6; no intent lost —
both sides implemented the same PL-97/99/100/101 work, this side adds
the review fixes on top.

Also clippy: needless-borrow in devtools.rs eval_with_callback call
surfaced by CI's scripts/check.sh.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@df49b9cd
df49b9cd merged commit 1cc66eb into main Oct 5, 2026
2 checks passed
df49b9cd added a commit that referenced this pull request Nov 2, 2026
Conflicts:
- .github/workflows/ci.yml: kept main's tag-only `release` job (version
  gate, SHA256SUMS, Sigstore attestation, draft release). The `flatpak`
  job no longer publishes on its own; it uploads its bundle as the
  `testpattern-flatpak-x86_64` artifact, which `release` now needs,
  checksums and attaches. Release notes gain a Flatpak install line.
- WORKLOG.md: kept both sides. Main took T-057 for the release pipeline,
  so the Flatpak work is renumbered T-059 (T-058 is the Chromecast work
  in progress) here, in the manifest, scripts/flatpak.sh and ci.yml.

Checked: scripts/check.sh green on the merged tree (81 Rust tests,
clippy, tsc, 43 vitest, notices), actionlint clean, flatpak.sh pins ok.

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant