Skip to content

Build, test and ship DevNotes for macOS - #788

Closed
vmillet-dev wants to merge 8 commits into
mainfrom
macos-target
Closed

vmillet-dev wants to merge 8 commits into
mainfrom
macos-target

Conversation

@vmillet-dev

@vmillet-dev vmillet-dev commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

Closes #787.

macOS becomes the third platform: tested by CI, bundled by the release, offered by the updater. Nobody ran this on a Mac by hand — everything below was seen on GitHub's macos-latest runner, and what a runner cannot show is listed at the end.

What changes

  • CI — macos-latest joins test-rust and test-e2e. The macOS leg of test-rust also runs Clippy: the lint job is Linux's, and it never compiles what is #[cfg(target_os = "macos")].
  • E2E — e2e/support/profile.ts finds the profile under ~/Library/Application Support, where it only knew %APPDATA% and XDG. wdio.conf.ts brings the window forward before each file on macOS (setFocus, a permission only the e2e capability carries) and waits for document.hasFocus().
  • Release — two macOS legs, Apple Silicon and Intel, both from macos-latest. Each publishes a .dmg and the updater's .app.tar.gz, named after its architecture; latest.json gains darwin-aarch64 and darwin-x86_64.
  • Bundle — icons/icon.icns, from the same drawing as the others (npm run icons keeps it), and an ad-hoc signature (bundle.macOS.signingIdentity: "-").
  • Native — the Dock's icon brings back a window closed to the tray (RunEvent::Reopen). ⌘Q is the menu bar's « Quit », which ended the process with no CloseRequested: that one entry of Tauri's menu is replaced by ours, which goes through request_quit like the tray's and the close button's.
  • Docs — README (platforms, files, Gatekeeper, where the data is), docs/architecture.md, docs/releasing.md, CLAUDE.md.

What the runner showed

  • Rust — 1265 tests pass on macOS (the 1266th is Windows-only), Clippy included.
  • E2E — the first run passed 478 scenarios of 479. The one that failed, « says it has the caret, on the box the field sits in », was right: macOS does not bring forward an application another process started, and WebKit matches :focus in the active window only (document.hasFocus() read false before the first file, true after setFocus, and stayed so). With the window brought forward: 479 of 479, 30 spec files of 30, in 28 minutes on the last commit — the same count as Windows and Linux.
  • The bundle — a temporary workflow, removed from this branch since, ran the release's own steps on macos-latest for both architectures, with a signing key made for the run: .app, .dmg and .app.tar.gz built in 19 minutes each; the identity lists sit in Contents/Resources/identity/; codesign reads « adhoc, runtime » and « valid on disk »; spctl answers « rejected », as expected of a build that is not notarised.
  • The Dock and ⌘Q — the same workflow drove the bundled application through System Events: one window after launch; none after the close button, the process still running; one again after a second open, which is the event the Dock sends; and the process gone within a second of « Quit devnotes ». Its log file was there and empty — a menu left as Tauri built it would have been said in it.

⚠️ The first rehearsal run printed its signing key in its log (run 38266425717): a value put in the environment is echoed by every later step. It is the key made for that run — nothing trusts it, the release's own never left its environment — and the second run masked it. Deleting that run removes the log.

Decisions taken here, each one reversible

  • Two architectures, two builds, rather than one universal binary: each download is half the size and the two build side by side. Intel is cross-compiled and is the one nothing has started — the runner is Apple Silicon.
  • Ad hoc, not notarised. A Developer ID wants a paid Apple Developer account. Until then macOS refuses a downloaded copy until its reader allows it in System Settings → Privacy & Security; the README says how.
  • A macOS leg may fail without holding back the release (continue-on-error, on those two legs only): the tag is out by the time bundles are built, and a failed leg would skip publish and leave a tag without a release. So that it never reads as a pass, publish ends red on its last step — after publishing — and names the platforms latest.json lacks. ⚠️ That last step speaks for Linux too, which was a warning until now.
  • test-e2e on macOS blocks, like the other two: docs/architecture.md already says why a leg allowed to fail is worse than none. It costs 31 minutes against 22 for the slowest of the others.
  • No bare executable for macOS: outside its .app it has no resources.

Not seen, and why

  • A Mac in someone's hands. The Gatekeeper dialog, the look of the icon in the Dock, the tray icon in the menu bar, the feel of the window: no runner shows them.
  • The updater installing a release. The archive and its signature are built and named; an update only happens between two published versions.
  • The Intel build running. It is built, signed and gathered; it was not launched.
  • ⌘Q with something unsaved. The entry is ours and asks the page; the question the page then puts to its reader was not driven on macOS. No scenario can quit the one process the suite runs on, on any platform: the same question is covered where a library takes the page away (25-libraries, 30-http), which now runs on macOS too.
  • The release workflow itself. Its steps were rehearsed, by a copy on the runner and by running their text against a made-up build tree (latest.json with four, three and two platforms, and refused without Windows); release.yml only runs from main.

Left out

  • ⌘ in the shortcut labels: they read « Ctrl+N » everywhere but the search box. The keys answer to ⌘ and to Ctrl.
  • The menu bar is Tauri's, in English, whatever the interface language.

Tests — cargo fmt --check, cargo clippy --all-targets --all-features -- -D warnings and cargo test locally on Windows (1266 pass); npm run test:scripts (206 pass), ESLint, Prettier and tsc over e2e/. Everything else is the CI of this pull request: its twelve checks pass on the last commit, rebased on main after #790 — which had left this branch merging « cleanly » into a ci.yml that no longer parsed.

🤖 Generated with Claude Code

@vmillet-dev vmillet-dev added the enhancement New feature or request label Oct 12, 2026
@vmillet-dev vmillet-dev linked an issue Oct 12, 2026 that may be closed by this pull request
@vmillet-dev
vmillet-dev marked this pull request as ready for review October 12, 2026 16:48
@vmillet-dev
vmillet-dev marked this pull request as draft October 12, 2026 19:41
@vmillet-dev
vmillet-dev deleted the macos-target branch November 5, 2026 10:12
@vmillet-dev
vmillet-dev restored the macos-target branch November 5, 2026 10:12
@vmillet-dev
vmillet-dev deleted the macos-target branch November 5, 2026 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

macOS: CI, e2e and release builds for Apple Silicon and Intel

1 participant