Skip to content

macOS port (T-028) + PL-97/99/100/101 - #6

Merged
df49b9cd merged 7 commits into
mainfrom
df49b9cd/macos-port
Oct 4, 2026
Merged

df49b9cd merged 7 commits into
mainfrom
df49b9cd/macos-port

Conversation

@df49b9cd

@df49b9cd df49b9cd commented Oct 3, 2026

Copy link
Copy Markdown
Owner

What

First-class macOS port of testpattern, plus the first round of app-fitting fixes it unblocked from the planned tracker (PL-97/99/100/101 — all marked Done there).

macOS port (T-028)

  • WKWebView transparent/macOSPrivateApi; video underneath via a raw NSOpenGLView (CGL); FFmpeg VideoToolbox; mpv OpenGL render API; passwords in the macOS keychain (security(1)-backed, friendly message when locked — PL-98)
  • scripts/build-media.sh is now dual-platform (-Dgl-cocoa=enabled -Dcoreaudio=enabled -Davfoundation=enabled on Darwin; mpv's archive re-linked with libtool -static because mpv's Swift step already ships swift.o as an archive)
  • Linux unchanged: every new piece is cfg(target_os = "macos"), and the Fedora CI still covers it
  • scripts/headless-macos.sh drives the app in an isolated profile (muted by default, --interactive for a visible/audible window); headless devtools /eval returns results over a devtools-only IPC channel
  • Verification: 78 Rust unit tests + 35 vitest + clippy clean; scripts/smoke.sh 29/29 in the headless session (GPU check previously Linux-only, now covered by PL-97); .dmg built and opened on this machine (PL-76); the T-047 replay passed (PL-77)

Follow-ups from the planned tracker

  • PL-101 — Space/K no longer silently does nothing on Home while audio plays (the hotkeys used to live only on /player); off-page Space/K routes to /player and M still mutes; input-focused controls keep Space for themselves
  • PL-99 — the player's Subtitles menu has an on/off entry; selecting a track while subs are hidden re-enables them; the store observes sub-visibility so player and Settings can't drift apart
  • PL-100 — fresh profiles default player.subsEnabled=true so mpv's language auto-pick actually shows; one-time "Subs available — press S" hint when a track got auto-selected while subs were off, remembered via ui.subHintSeen
  • PL-97 — the smoke GPU check is now cross-platform: Linux keeps the VP9/VA-API path, macOS replays the live recording and expects VideoToolbox, and in sessions where the GPU pipeline can't engage (headless, no window server) the check skips instead of failing

Notes for review

  • No build-media.sh flag changes — same set as the (merged) PR macOS port (T-028) + TMDB refresh/search (T-055) + HDR in track probes (T-056) #4 forward port
  • The one commit-signing caveat: the agent shells can't reach GPG pinentry, so the last two commits are unsigned; happy to re-sign if you want
  • New project memory lives at ~/.claude/projects/-Users-smolesen-Dev-testpattern-app/memory/ (tracker API shape, working rules) — not part of the repo

Refs: PR #4 (merged — the original port CI); planned: PL-75..PL-101.

- 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.
@df49b9cd
df49b9cd merged commit 3816376 into main Oct 4, 2026
2 checks passed
df49b9cd added a commit that referenced this pull request Oct 5, 2026
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>
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