Skip to content

chore: simplify Tauri relay — remove NotebookState, reduce sync client to pure relay #556

@rgbkrk

Description

@rgbkrk

Post-migration tech debt from #540. The local-first Automerge migration is complete, but the Tauri relay still carries weight from the old architecture.

Completed ✅

Follow-on issues

The remaining work has been broken into focused issues:

Issue Size Dependencies
#596 — remove dead get_preferred_kernelspec + format module XS none
#597 — remove NotebookState fallback in verify_notebook_trust XS soft dep on #596
#598 — replace NotebookState with lightweight InitialNotebookData M none
#599 — move initial doc population from relay to frontend WASM L none
#600 — reduce NotebookSyncClient to pure relay, drop AutoCommit L blocked on #599

See the dependency graph below for execution ordering.

Dependency graph

#596 (XS) ──→ #597 (XS)     ← can start now, serial
#598 (M)                      ← can start now, parallel with everything
#599 (L) ──→ #600 (L)        ← can start now, #600 blocked on #599

All three tracks (#596#597, #598, #599#600) are independent of each other and can run in parallel.

Audit snapshot (at close)

Metric Count
Dead Tauri metadata commands remaining 1 (get_preferred_kernelspec)
NotebookState fallback read sites 2 (get_preferred_kernelspec, verify_notebook_trust)
NotebookState construction/transport sites ~6 factory + 2 sync seed + 1 session + 1 ID derivation
Relay AutoCommit blockers 3 (initial population, get_doc_bytes, save_notebook_as cell read)
Dead modules 1 (format.rs, ~200 lines)

Context

The migration (PRs #542, #544, #545, #552#554, #558#559, #561#564, #566#569) moved cell mutations to local-first WASM Automerge, extracted the shared notebook-doc crate, moved formatting to the daemon, delegated save/clone to the daemon, consolidated metadata types, exposed typed metadata on the WASM handle, and migrated all metadata reads AND writes to the WASM doc with useSyncExternalStore.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions