Repository navigation
feat(app): the desktop shell, its bridge to readd and the Tauri transport (plan 0002 3.2) - #35
Conversation
…port (plan 0002 3.2) web/src-tauri is the Tauri v2 shell: a line bridge to readd's private socket, the socket path from a table Go and Rust share, ADR-0008's CSP, a capability that grants the bridge's 2 commands alone, navigation within the app only, and links through the opener. The desktop entry uses the Tauri transport in the shell and the mock elsewhere. The Makefile gains app-check, app-test and app-build in the frostnotes nsl machine, with frostread's own CARGO_TARGET_DIR, and frostnotes becomes the default machine.
…en log and Go's path cleaning (cross-review)
|
Cross-review: openai/gpt-6.1-sol, coder deepseek/deepseek-flash (small edits claude-opus-5.5). Initial review at 5793a75: 5 blocking findings. 4 fixed in bc3cf5f (opener link interception off, a session closed during rpc.hello is never stored, the open log keeps only scheme and host, Go's path cleaning in paths.rs with 7 shared cases); re-review 1 of 3 at bc3cf5f: all 4 resolved, no new findings. Open, external: the frostnotes nsl machine's toolchain lacks rustfmt and clippy, so |
|
Re-review 2 of 3 (openai/gpt-6.1-sol) at bc3cf5f: Ready, Blocking: none. The frostnotes nsl machine now has rustfmt and clippy (Brian, T654a; provision script in frostyard/frostnotes#124), and the unchanged |
Plan 0002, step 3.2: the Rust shell, the bridge and the Tauri transport (plan, ADR-0008).
What
web/src-tauri/: Tauri v2, identifierorg.frostyard.Frostread,build/desktopas the frontend.bridge.rs: lines to readd's private socket and back, never parsed. A closed socket is aclosedmessage to the window. The longest line is(16 << 20) - 1bytes, as the kit'sjsonrpc.MaxMessageSizeadmits.paths.rs: the socket asconfig.DesktopSocketderives it. One table,internal/config/testdata/desktop-socket.json(10 cases), is read by a Go test and a Rust test.main.rs: single instance;on_navigationadmitstauri:,about:blankandabout:srcdoconly;on_new_windowopenshttp/httpswith a host andmailto(onlyto,cc,bcc,subject,bodykept) with the opener plugin, and always answers Deny; no downloads.tauri.conf.json: ADR-0008's CSP exactly (a test pins it).capabilities/default.jsongrantsallow-readd-connectandallow-readd-sendalone (a test pins it;build.rsputs the 2 commands in an app manifest).web/public/icon.svg; Phase 4 replaces them.web/src/rpc/transport/tauri.ts: lodge-client'sTransportover the bridge. It saysrpc.helloafter each connect, keeps its handlers over every connection, and the next call after a close connects again.desktop.tsxuses it under Tauri, the mock elsewhere.main.tsxand the lodge bundle do not change.NSL_MACHINEandAPP_NSL_MACHINEdefault tofrostnotes(nolodgemachine exists);app-check,app-test,app-buildwithCARGO_TARGET_DIR=/var/tmp/frostread/target;make cigainsapp-check app-build. AGENTS.md names the machine. CI does not change (step 3.5).Evidence (nsl machine
frostnotes, 2026-11-01)make check(host): pass, withTestDesktopSocketTable.make web-check: 19 files, 110 tests pass.make web-build: the same 12 files with the same hashes as main, no Tauri code in the lodge bundle.make app-test: 11 Rust tests pass (bridge both ways, a line of exactly the bound with quotes and backslashes, one byte over ends the connection, the shared path table, the navigation and new-window tables, the capability, the CSP).make app-build: pass,build/frostread-app.cargo fmt --checkandcargo clippy --all-targets -- -D warnings: pass, run with a scratchRUSTUP_HOMEunder/var/tmp/frostread.make app-checkstops atcargo fmtin the machine as it is: its toolchain has the minimal profile, with norustfmtand noclippycomponent. Duncan's machine needsrustup component add rustfmt clippy; thenmake app-checkruns whole.readd -desktopon a temporary XDG tree, underxvfb-run: the empty unread view, from readd (no sources; the mock has 3).