Skip to content

feat!: Tauri rewrite — Rust backend, full frontend wiring, ship pipeline (M0–M5) - #25

Merged
yodeput merged 43 commits into
devfrom
feat/tauri-rewrite
Aug 28, 2026
Merged

feat!: Tauri rewrite — Rust backend, full frontend wiring, ship pipeline (M0–M5)#25
yodeput merged 43 commits into
devfrom
feat/tauri-rewrite

Conversation

@yodeput

@yodeput yodeput commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

The complete Tauri rewrite: the Electrobun shell is replaced by a Rust workspace on Tauri 2, with the React renderer preserved and every bridge method wired (167/167). Data opens in place from ~/.tide — same sessions-v2 schema, same RAG vectors (existing indexes valid, cross-verified cosine 1.0 vs the TS pipeline), same keychain entries.

Architecture

  • tide-engine — rig 0.42 behind a single-crate churn firewall; the quirk layer ports the TS protocol contracts exactly (budget carved within max_tokens, thinking allowlist strip, tool output floor, body-scoped SSE timeout, remend JSON repair). All 8 SSE fixture replays pass with request-body equality.
  • tide-tools — all 26 tools + the permission engine (plan/ask/edit/full, deny-wins, per-subcommand risk refinement; escalation containment test-proven for subagents).
  • tide-store — rusqlite sessions-v2 (read + write, TS-parity id schemes, frozen-message payloads for byte-identical reloads), lossless config round-trip, kcv2 keychain via the security CLI.
  • tide-rag — native tree-sitter (28/29 grammars) + ort with the same vendored ONNX model.
  • tide-mcp — rmcp 3.1.4 pool, crash backoff, OAuth PKCE, dynamic mcp__server__tool bridging.
  • Orchestrator (app crate) — TS-parity turn loop (10s-abortable retries, exhaustion-only error events), 50ms EventSink with live floors, 9-agent subagent catalog with parent_id sessions, 6-layer auto-compact, followup/exit-plan flows.

Ship pipeline (M5)

  • Consent-driven updater with dual channels (stable → releases/latest/latest.json, beta → moving beta tag), minisign-signed, wrong-key rejection covered by tests.
  • Autostart (LaunchAgent, settings reflect actual state), CI perf gates (500-message budgets; actuals orders of magnitude under), winget/homebrew rewired and secrets-gated, version-gate job, idempotent draft-first release publishing.
  • Window chrome: borderless (mac overlay traffic lights), hidden-until-painted splash (no white flash), working drag regions + capability grants, live fullscreen detection, window-state persistence.

Test & gates

17 cargo suites (incl. the perf gate) · clippy -D warnings · tsc -b · 60 vitest · oxlint — all green. The parity checklist (docs/parity-checklist.md) remains the release gate: tick by dogfooding.

Not in this PR

  • No release/tag yet (deliberate).
  • Before the first signed release: set TAURI_SIGNING_PRIVATE_KEY (key at ~/.tauri/tide-updater.key).
  • Known gaps tracked on the parity checklist: rich tool displays on reload (output text only), MCP tokens from the Electron era need one re-auth, git commit hooks don't run on agent commits.

🤖 Generated with ZCode

yodeput and others added 30 commits August 27, 2026 00:55
…ver (day-zero capture)

Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
…/plans/2026-08-27)

Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
…te screen in unwired Tauri webview

Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
…kflow dormant until M5

Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
…ers + bridge handshake

Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
…tore (M1 sidebar)

Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
…une (M2)

Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
…(M2)

Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
…mands (M2)

Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
…hannel event routing (M2)

Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
… share one clock (ordering flake)

Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
…get/set (froze at splash)

Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
…rmission inheritance (M3 T6)

Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
…iring (M3 T7)

Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
yodeput and others added 13 commits August 27, 2026 10:28
Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
… T1)

Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
…st (M4 T4)

Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
…ds (M4 T7)

Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
…tubs; 167/167 bridge methods wired (M4 T8)

Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
…posedPorts et al) — inspector crash

Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
…ine (M0–M5)

Replaces the Electrobun shell with a Rust workspace on Tauri 2; the React
renderer is preserved and fully wired (167/167 bridge methods).

Architecture:
- src-tauri workspace: tide-engine (rig 0.42, the only rig-dependent crate;
  quirk layer ports the TS protocol contracts — carve-within-max_tokens,
  thinking allowlist strip, tool floor, body-scoped SSE timeout, remend
  repair), tide-tools (26 tools + permission engine), tide-store (rusqlite
  sessions-v2 + config + kcv2 keychain via security CLI), tide-rag (native
  tree-sitter + ort same-model embeddings — existing indexes stay valid,
  cross-verified cosine 1.0 vs the TS pipeline), tide-mcp (rmcp 3.1.4 pool,
  OAuth PKCE, dynamic mcp__server__tool bridging)
- Orchestrator above the churn firewall: TS-parity turn loop (retry 10s
  abortable, exhaustion-only errors), EventSink (50ms batches, live floors),
  subagents (9-agent catalog, parent_id sessions, contained escalation),
  auto-compact (6-layer port), followup/exit-plan flows
- Renderer: __TIDE_BRIDGE__ handshake over invoke + ChatPush Channel; data
  opened in place from ~/.tide (same db schema, same vectors, same keychain
  entries); frozen-message payloads persist verbatim for byte-identical
  reloads

Ship pipeline (M5):
- Updater: consent-driven flow, dual channels (stable via releases/latest,
  beta via moving beta tag), minisign signing, wrong-key-verified tests
- Autostart (LaunchAgent, truth-telling settings), perf gates in CI
  (500-message budgets, actuals 2-3 orders under), winget/homebrew rewired
  + secrets-gated, version-gate job, idempotent draft-first publishing
- Chrome: borderless (mac overlay lights), hidden-until-painted splash,
  data-tauri-drag-region + capabilities, live fullscreen, window-state
  persistence, HMR-friendly CSP

Gates: 17 cargo suites (incl. perf gate), clippy -D warnings, tsc, 60
vitest, oxlint. Signed-off work of the 2026-08-27/28 rewrite sessions.

Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
…_dir'd it into zero matches (CI, rg-absent path); + direct fallback test

Co-authored-by: Tide <309788114+code-with-current@users.noreply.github.com>
… failed on Linux CI

The five write-side helpers (to_envelope, keychain_payload, assert_token_safe,
random_bytes, encrypt_handle_with) are reached only from #[cfg(target_os = "macos")]
code and the test module, so on the Linux runner's lib target they were dead code
under -D warnings. The needless_return hits were the mirror image: returns inside
#[cfg(not(target_os = "macos"))] blocks that never compile on the dev Mac.

- gate the four test-used helpers with #[cfg(any(target_os = "macos", test))];
  random_bytes (tests inject their own randomness) with macOS-only
- split encrypt_stored/real_keychain_get platform forks into per-platform fns
  ending in tail expressions instead of cfg-block returns
@yodeput
yodeput merged commit 9afdbd9 into dev Aug 28, 2026
3 checks passed
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