feat: add macOS support alongside Windows#27
Open
script8888 wants to merge 2 commits into
Open
Conversation
Adds first-class macOS support while keeping every Windows path untouched behind its existing cfg(windows) gates. - Native titlebar: tauri.macos.conf.json platform overlay enables decorations with overlay traffic lights; the custom min/max/close cluster renders only off-mac (new src/lib/platform.ts IS_MAC gate) - Cookie encryption: secure_store gains a macOS branch — random 32-byte key in the login Keychain, jars framed as YTBC1 + nonce + AES-256-GCM; unframed (pre-existing plaintext) jars pass through and re-encrypt on next write. Unit-tested with a fixed key so CI never touches the Keychain - Google sign-in: YT_LOGIN_UA is now platform-specific — WKWebView presents a Safari UA (a Chrome UA on a WebKit engine trips Google's "browser not secure" block); WebView2 keeps the Chrome UA - Dock/menu-bar semantics: RunEvent::Reopen restores the hidden main window on Dock click; tray menu opens on left-click on mac; Settings copy reads "menu bar" instead of "tray" on mac - Media controls: souvlaki's hwnd-less macOS path documented (drives Now Playing / media keys as-is); Manager import cfg-gated - Distribution: app+dmg bundle targets (min macOS 10.15), release workflow becomes a macos-universal + windows matrix with APPLE_* signing secrets pre-wired (unsigned until secrets are set), CI rust job runs on ubuntu + macos, README documents the Gatekeeper first-launch workaround Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ylist The Songs tab fetched the auto-generated LM "Your Likes" playlist, which is the cross-YouTube likes bucket — thumbing up a Short or any regular video in the YouTube app made it show up as a "song". The dedicated library feed (browse FEmusic_liked_videos) is music-only server-side and is what the official client's Songs tab reads. - library.ts: fetchLibrarySongsFirstPage / fetchLibrarySongsContinuation reusing the shared row mapper and continuation machinery - library.tsx: Songs tab switches to the new feed (queryKey ["library","songs-pages"]) - like-buttons.tsx: like/unlike invalidates the renamed key; the heart-fill cache and the Liked Music playlist page still read LM, which genuinely is the likes bucket Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds first-class macOS support (Apple Silicon + Intel) while keeping Windows fully intact — all Windows code stays behind its existing
cfg(windows)gates, NSIS keeps building, and the release workflow becomes a two-platform matrix.Tested end-to-end on an Apple Silicon Mac (macOS 15): build, sign-in, playback, session persistence across restart,
.app/.dmgbundling.Native window chrome
src-tauri/tauri.macos.conf.jsonplatform overlay: native decorations withtitleBarStyle: Overlay+ hidden title. The base config (and Windows behavior) is unchanged.src/lib/platform.ts(IS_MAC); the top bar skips the custom min/max/close cluster on mac and pads the left nav past the traffic lights. Drag region, close-to-tray routing, and the floating player are unchanged.Cookie encryption (macOS counterpart of DPAPI)
secure_storegains a macOS branch: a random 32-byte data key stored in the login Keychain (keyringcrate,apple-native), cookie jars framed asYTBC1 ++ 12-byte nonce ++ AES-256-GCM(aes-gcm).Google sign-in on WKWebView
YT_LOGIN_UAis now platform-specific. Presenting the Chrome UA from WKWebView trips Google's "This browser or app may not be secure" block (UA contradicts the engine fingerprint); a Safari 17.6 UA matches the engine and signs in fine. Applies to both the login window and the session-keeper so the issued session is renewed under the same UA. WebView2 keeps the Chrome UA.Dock / menu-bar semantics
RunEvent::Reopenhandler restores the hidden main window on Dock-icon click (builder now goes through.build(...)+.run(closure)).Media controls
PlatformConfig, so the existinghwnd: Nonepath drives Now Playing / media keys. Comments updated,Managerimport cfg-gated.Distribution
app+dmg(minimumSystemVersion: 10.15);createUpdaterArtifactsalready yields.app.tar.gz+.sig.release.yml: matrix ofmacos-latest(--target universal-apple-darwin) +windows-latest; tauri-action merges both into onelatest.json.APPLE_*signing/notarization secrets are pre-wired — while unset the build ships unsigned, adding them later activates signing with no workflow change.ci.yml: rust job runs on ubuntu + macos.xattr -cr).yt-dlp_macosis now a universal binary, so no Rosetta requirement on Apple Silicon.Library → Songs fix (platform-independent bug found while testing)
LM"Your Likes" playlist — the cross-YouTube likes bucket — so Shorts and regular videos liked in the YouTube app appeared in the library as songs (on Windows too).browse FEmusic_liked_videos), which is music-only server-side and is what the official client's Songs tab reads. NewfetchLibrarySongsFirstPage/fetchLibrarySongsContinuationreuse the shared row mapper and continuation machinery.LM, which genuinely is the likes bucket.Test plan
cargo test --lib(12/12, incl. new AEAD round-trip/tamper/nonce/passthrough tests),cargo checkclean on macOSpnpm build(tsc + vite), eslint (no new warnings), vitest 51/51pnpm tauri devon Apple Silicon: sign-in (Safari UA), playback via yt-dlp → local stream server, session persists across restartpnpm tauri build:.app+.dmg+.app.tar.gzproduced and the bundled app runs (updater signature step needs theTAURI_SIGNING_PRIVATE_KEYsecret, as on Windows)latest.json🤖 Generated with Claude Code