-
Notifications
You must be signed in to change notification settings - Fork 1
Description
The Tauri app currently loads .ipynb files, parses them into NotebookState, and populates the daemon's Automerge room via mutations. This is backwards — saving is already daemon-delegated, loading should be too.
Status
Completed ✅ (merged to main)
- Phases 1-3: Protocol extension (
OpenNotebook/CreateNotebookhandshake +NotebookConnectionInforesponse), daemon-side loading (load_notebook_from_disk,create_empty_notebook), connection handlers with race condition fix and trust check — PR feat(runtimed): daemon-owned notebook loading infrastructure (#598) #601 - Phase 5:
NotebookSyncClientmethods (connect_open_split,connect_create_split,do_initial_sync) — PR feat(runtimed): daemon-owned notebook loading infrastructure (#598) #601
In review: Phase 4 + 6 + 7 — PR #602
- Phase 4: All notebook creation/opening entry points converted to daemon requests
- Phase 6: Session save reads from
Arcfields instead ofNotebookState - Phase 7:
notebook_statefield removed fromWindowNotebookContext,FrontendCellremoved fromlib.rs, dead code deleted (-513 lines) - Bug fixes: placeholder_id for Restore variant, persisted Automerge doc preservation for untitled notebooks
Remaining (minor follow-up)
notebook_state.rsmodule file still declared — can be deleted once no external crate references it
Target flow
Tauri sends OpenNotebook { path } to daemon
→ daemon loads .ipynb, derives notebook_id, creates room, populates doc
→ daemon returns NotebookConnectionInfo { notebook_id, cell_count, needs_trust_approval }
→ Automerge sync → relay forwards bytes → frontend WASM
→ frontend shows loading state until cells arrive (#599)
What gets eliminated
NotebookStatestruct usage fromlib.rsandsession.rsinitialize_notebook_sync's cell/metadata population through the relayload_notebook_state_for_path,create_new_notebook_statefactory functions- All
new_empty_with_*constructor usage derive_notebook_idin Tauri (daemon owns this now)FrontendCellusage inlib.rsget_cells()call insave_notebook_as(daemon has the cells)
Dependencies
- Unblocks feat: notebook loading state for daemon-owned doc population #599 (loading state UX) and refactor: reduce
NotebookSyncClientto pure relay — dropAutoCommit#600 (pure relay — dropAutoCommit) - Known limitations tracked in fix: canonical document resolution on room creation (saved edits + trust) #604 (canonical document resolution)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels