-
Notifications
You must be signed in to change notification settings - Fork 1
Description
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 ✅
- Remove dead
NotebookStatecell mutation methods — PR refactor(notebook): remove dead NotebookState cell mutation methods #558 - Remove dead
NotebookStatemethods (new_empty,get_code_cell_ids,serialize) — PR refactor(notebook): remove more dead code from NotebookState and lib.rs #559 - Remove dead debug commands (
debug_get_automerge_state,debug_get_local_state) — PR refactor(notebook): remove more dead code from NotebookState and lib.rs #559 - Extract shared
notebook-doccrate — PR refactor: extract shared notebook-doc crate, eliminate WASM copy drift #562 - Move
format_cellto daemon (format-on-execute) — PR feat(runtimed): format-on-execute, remove Tauri format_cell command #563 - Move notebook metadata types to shared
notebook-doccrate — PR refactor: move notebook metadata types to shared notebook-doc crate #566 - Eliminate
NotebookStatefrom save, clone, and reconnect — PR refactor: eliminate NotebookState from save, clone, and reconnect #567 - Expose typed metadata and runtime detection on WASM handle — PR feat(runtimed-wasm): expose typed metadata and runtime detection on WASM handle #568
- Migrate frontend metadata reads to WASM doc with
useSyncExternalStore— PR feat(notebook): reactive metadata via useSyncExternalStore, migrate reads+writes to WASM doc #569 - Migrate frontend metadata writes to WASM doc — PR feat(notebook): reactive metadata via useSyncExternalStore, migrate reads+writes to WASM doc #569
- Remove 12 of 13 dead metadata Tauri commands (all except
get_preferred_kernelspec)
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.