Skip to content

M7 Phase 5: the app on Windows - #56

Merged
bketelsen merged 13 commits into
mainfrom
m7/phase5
Oct 16, 2026
Merged

bketelsen merged 13 commits into
mainfrom
m7/phase5

Conversation

@bketelsen

@bketelsen bketelsen commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Plan 0010, Phase 5: the app on Windows. Draft until CI's new Windows app job is green and the installer has been tried in the VM and on one of the user's machines.

What changes

  • maild's Windows data moves into %LOCALAPPDATA%\Frostmail\Data, out of the per-user install directory Tauri's installer uses (%LOCALAPPDATA%\Frostmail).
  • The app shell on Windows: the bridge over the named pipe (identification level, starting maild.exe beside the app when no pipe is there), Windows paths, a GUI-subsystem release build, the navigation guard admitting WebView2's http://tauri.localhost (Windows only), parts URLs in WebView2's http://mailpart.localhost form with a Windows CSP, Windows' runnable attachment types refused, and the WebKit workarounds behind cfg(target_os = "linux").
  • frostmail-notify.exe (app/notify): toasts under org.frostyard.Frostmail. A click, Snooze or Dismiss is a frostmail-toast: URI Windows hands back to the notifier, which opens the app or the message, or calls calendar.snooze / calendar.dismiss over the pipe. The trade-off (any program the user runs can send such a URI, with no more power than a click) is in ADR-0038.
  • The installer: tauri.windows.conf.json (per-user NSIS, sidecars) and windows/hooks.nsh, which move running sidecars aside before an upgrade copies over them, register the toast scheme and AppUserModelID, start maild at sign-in and now, and delete maild's data only with "Delete the application data".
  • Window commands are async: opening compose, an event, settings or the reminders was a synchronous command, which deadlocks the app on Windows (WebView2); found while testing in the VM.
  • CI: a Windows app job builds the sidecars, tests the notifier and the shell, builds the installer (artifact frostmail-windows-installer), and runs hostile, links, smoke and remote on WebView2. The harness starts the app with a DevTools port (FROSTMAIL_DEVTOOLS_PORT, added to every window's WebView2 arguments, since WebView2 lets an app's arguments override WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS) and attaches the runner's msedgedriver to it; FROSTMAIL_OPEN_LOG stands in for the Linux opener fakes. make app-check-windows type-checks the shell and notifier in nsl.
  • eventWindow.ts is now openEvent.ts: it differed from EventWindow.tsx only in case, which broke the build on Windows.

Checked

  • make check, make ui-check, make app-test, make app-check-windows.
  • make ui-e2e F="hostile links smoke remote" on Linux with the ported harness: 5 of 5.
  • In frostmail-win11, with a local (MinGW, not committed) build: toasts show, replace and go; a reminder carries Snooze and Dismiss; Windows hands frostmail-toast: URIs to the notifier verbatim; Dismiss reaches maild over the pipe; the app reads the Outlook.com test account over the pipe; the CSP admits http://mailpart.localhost and blocks loopback and mailpart:. That run found the navigation-guard bug fixed here (the window stayed blank).

Still to do before ready

  • The Windows app job green: the installer builds, and hostile (both tests: zero requests raw and through the sanitizer), remote, links and smoke pass on WebView2 154.
  • The installer in the VM (CI build, silent, in the desktop session): install puts the app and sidecars in %LOCALAPPDATA%\Frostmail, starts maild there, and registers the Run value, frostmail-toast:, the AppUserModelID and the shortcuts; upgrading over a running app and maild restarts maild with nothing left aside and the data kept; uninstall removes all of that and keeps Data and Cache.
  • Trial in the VM with the Outlook.com account (read-write): read; sent from the compose window; marked read, flagged and archived, all found on the server by mailctl verify; with the app closed, a new-mail toast whose click started the app on the message, and a Remind Me reminder's toast.
  • Graph consent for the VM account (its grant lacks the contacts and calendar scopes): then contacts and calendar edits, and a calendar reminder's toast with Snooze and Dismiss.
  • Gmail and iCloud signed in, and the clean install on one of the user's machines (SmartScreen's "Run anyway").

🤖 Generated with Claude Code

bketelsen and others added 13 commits October 16, 2026 15:05
Tauri's per-user installer uses %LOCALAPPDATA%\Frostmail as the install
directory, so maild's database, blobs, secrets and logs move into its Data
folder, apart from what an install replaces.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The bridge opens maild's named pipe at the identification level and
starts maild.exe from beside the app when no pipe is there; paths.rs
resolves the pipe and cache on Windows; a release build is a GUI program;
the navigation guard admits WebView2's http://tauri.localhost on Windows
only; parts URLs take WebView2's http://mailpart.localhost form in what
the app shows and maild's form in what it saves; Windows' runnable file
types never open; FROSTMAIL_OPEN_LOG logs what would open, for the
end-to-end tests; and the filter strip hides the scrollbar WebView2
draws.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
maild runs it once per change with one JSON operation, which shows or
removes a toast under Frostmail's AppUserModelID. Clicks, and a
reminder's Snooze and Dismiss, are frostmail-toast: URIs Windows hands
back to it: it opens the app or the message, or calls calendar.snooze
and calendar.dismiss over the pipe.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… tests

tauri.windows.conf.json sets the Windows CSP and a per-user NSIS bundle
with maild, mailctl and the notifier beside the app; hooks.nsh moves
running sidecars aside, registers the toast scheme and AppUserModelID,
and starts maild at sign-in and now. CI's Windows app job builds the
installer, uploads it, and runs hostile, links, smoke and remote on
WebView2 through tauri-driver; make app-check-windows type-checks the
shell and notifier in nsl.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
desktop.md, testing.md, overview.md, app.md, the protocol spec, ADR-0005
and ADR-0038 in place, and Phase 5's progress in plan 0010.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
It differed from EventWindow.tsx only in case, so on Windows' case-
insensitive file system "./EventWindow" resolved to it and the Windows
build's typecheck failed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
EDGEWEBDRIVER, which the image documents, is not in the job's
environment; fall back to the path it names.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…-driver

A session msedgedriver launched looked for the DevTools port in a data
folder of its own while Tauri gives WebView2 the app's, so every session
failed (DevToolsActivePort file doesn't exist). The harness now starts
the app with a DevTools port through WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS
and attaches msedgedriver to it with debuggerAddress, and stops what it
started when a launch fails, so a single-instance app left running cannot
take the next one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Report the app's exit code and output when its DevTools port never
opens, track the app as soon as it starts, and print the job's session
and whether it is interactive (WebView2 needs a window).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…he Windows tests

On Windows a window built in a synchronous command deadlocks the app
(WebView2), so opening compose, an event, settings or the reminders froze
Frostmail; those commands are now async. Every window comes from one
builder, so they share the WebView2 arguments their environment needs:
wry's defaults, plus a DevTools port when FROSTMAIL_DEVTOOLS_PORT names
one. The end-to-end harness uses that port, since the runner's WebView2
let the app's arguments override WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@bketelsen
bketelsen marked this pull request as ready for review October 16, 2026 22:28
@bketelsen
bketelsen merged commit c32ec33 into main Oct 16, 2026
6 checks passed
@bketelsen
bketelsen deleted the m7/phase5 branch October 16, 2026 22:28
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