Skip to content
This repository was archived by the owner on Nov 15, 2026. It is now read-only.

feat(app): the desktop shell, its bridge to readd and the Tauri transport (plan 0002 3.2) - #35

Merged
bketelsen merged 2 commits into
mainfrom
irulan/plan-0002-3.2-shell
Nov 1, 2026
Merged

bketelsen merged 2 commits into
mainfrom
irulan/plan-0002-3.2-shell

Conversation

@frostyard-machines

Copy link
Copy Markdown
Contributor

Plan 0002, step 3.2: the Rust shell, the bridge and the Tauri transport (plan, ADR-0008).

What

  • web/src-tauri/: Tauri v2, identifier org.frostyard.Frostread, build/desktop as the frontend.
    • bridge.rs: lines to readd's private socket and back, never parsed. A closed socket is a closed message to the window. The longest line is (16 << 20) - 1 bytes, as the kit's jsonrpc.MaxMessageSize admits.
    • paths.rs: the socket as config.DesktopSocket derives 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_navigation admits tauri:, about:blank and about:srcdoc only; on_new_window opens http/https with a host and mailto (only to, cc, bcc, subject, body kept) with the opener plugin, and always answers Deny; no downloads.
    • tauri.conf.json: ADR-0008's CSP exactly (a test pins it). capabilities/default.json grants allow-readd-connect and allow-readd-send alone (a test pins it; build.rs puts the 2 commands in an app manifest).
    • Placeholder icons from web/public/icon.svg; Phase 4 replaces them.
  • web/src/rpc/transport/tauri.ts: lodge-client's Transport over the bridge. It says rpc.hello after each connect, keeps its handlers over every connection, and the next call after a close connects again. desktop.tsx uses it under Tauri, the mock elsewhere. main.tsx and the lodge bundle do not change.
  • Makefile: NSL_MACHINE and APP_NSL_MACHINE default to frostnotes (no lodge machine exists); app-check, app-test, app-build with CARGO_TARGET_DIR=/var/tmp/frostread/target; make ci gains app-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, with TestDesktopSocketTable.
  • 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 --check and cargo clippy --all-targets -- -D warnings: pass, run with a scratch RUSTUP_HOME under /var/tmp/frostread. make app-check stops at cargo fmt in the machine as it is: its toolchain has the minimal profile, with no rustfmt and no clippy component. Duncan's machine needs rustup component add rustfmt clippy; then make app-check runs whole.
  • The built app against readd -desktop on a temporary XDG tree, under xvfb-run: the empty unread view, from readd (no sources; the mock has 3).

The desktop app's empty unread view

…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)
@frostyard-machines

Copy link
Copy Markdown
Contributor Author

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 make app-check stops at cargo fmt. Both pass with a scratch toolchain. Not ready until rustup component add rustfmt clippy lands in the machine and make app-check passes as it is. CI green.

@frostyard-machines

Copy link
Copy Markdown
Contributor Author

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 make app-check passes there: Vitest 19 files / 111 tests, cargo fmt --check, cargo clippy --all-targets -- -D warnings, cargo test 11 passed. CI green.

@bketelsen
bketelsen merged commit 83650c5 into main Nov 1, 2026
5 checks passed
@bketelsen
bketelsen deleted the irulan/plan-0002-3.2-shell branch November 1, 2026 20:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

ready-for-human Reviewed, CI green: ready for Brian to review and merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants