Merged
Conversation
66a2177 to
10fd534
Compare
…ming Phase 2D cleanup after Automerge migration. Frontend: - Wire onOutput: appendOutput in App.tsx — broadcast outputs give instant feedback, Automerge sync is the eventual-consistency backstop. Fixes output streaming latency regression. Rust dead code removal (-217 lines): - Remove cell_snapshot_to_frontend helper (only caller was dead commands) - Remove load_notebook command (frontend bootstraps via WASM) - Remove update_cell_source command (WASM handle.update_source + sync) - Remove add_cell command (WASM handle.add_cell + sync) - Remove delete_cell command (WASM handle.delete_cell + sync) - Remove refresh_from_automerge command (frontend uses get_automerge_doc_bytes) - Remove notebook:updated cell emissions (frontend uses automerge:from-daemon) - Keep notebook:metadata_updated emission (3 active listeners)
10fd534 to
9dc881c
Compare
rgbkrk
added a commit
that referenced
this pull request
Mar 6, 2026
45 tasks
rgbkrk
added a commit
that referenced
this pull request
Mar 6, 2026
…e architecture Update 12 files across AGENTS.md, README, contributing/, and docs/ to reflect the local-first Automerge migration (PRs #542-#554): - AGENTS.md: add Notebook Document Architecture section (WASM peers, mutation flow, sync flow), update key files table, add runtimed-wasm build note - README.md: add runtimed-wasm to project structure - contributing/architecture.md: conformance table now fully Conformant - contributing/build-dependencies.md: add runtimed-wasm to all three Mermaid diagrams and key points table - contributing/development.md: add wasm-pack manual build note - contributing/runtimed.md: cross-reference runtimed-wasm shared code - docs/runtimed.md: rewrite Phase 5 for actual local-first architecture, fix stale Known Limitations, update summary table - docs/python-bindings.md + python/runtimed/README.md: add session.save() - docs/logging.md: fix stale log prefixes - useDaemonKernel.ts: fix stale comment (notebook:updated → automerge:from-daemon)
rgbkrk
added a commit
that referenced
this pull request
Mar 6, 2026
…e architecture (#560) Update 12 files across AGENTS.md, README, contributing/, and docs/ to reflect the local-first Automerge migration (PRs #542-#554): - AGENTS.md: add Notebook Document Architecture section (WASM peers, mutation flow, sync flow), update key files table, add runtimed-wasm build note - README.md: add runtimed-wasm to project structure - contributing/architecture.md: conformance table now fully Conformant - contributing/build-dependencies.md: add runtimed-wasm to all three Mermaid diagrams and key points table - contributing/development.md: add wasm-pack manual build note - contributing/runtimed.md: cross-reference runtimed-wasm shared code - docs/runtimed.md: rewrite Phase 5 for actual local-first architecture, fix stale Known Limitations, update summary table - docs/python-bindings.md + python/runtimed/README.md: add session.save() - docs/logging.md: fix stale log prefixes - useDaemonKernel.ts: fix stale comment (notebook:updated → automerge:from-daemon)
rgbkrk
added a commit
that referenced
this pull request
Mar 6, 2026
After PR #554 (dead command removal) and #566 (metadata fallback migration), NotebookState is only used in 4 functions. This PR removes those usages by: 1. Add dirty flag to WindowNotebookContext - tracks unsaved changes in context instead of NotebookState 2. Migrate clone_notebook_to_path to daemon - daemon reads from Automerge, clears outputs, generates fresh env_id 3. Decouple initialize_notebook_sync from NotebookState - daemon is source of truth; pass explicit notebook_id and cells rather than NotebookState Step 4 (removing notebook_state field from WindowNotebookContext) is deferred because fallback usages (get_kernelspec, get_dependencies, etc.) read from NotebookState when daemon isn't connected. Removing these requires either removing fallbacks or finding alternative sources. The daemon now owns notebook content via Automerge; NotebookState remains only as a local window cache and for fallback cases.
8 tasks
rgbkrk
added a commit
that referenced
this pull request
Mar 6, 2026
* refactor: eliminate NotebookState from save, clone, and reconnect After PR #554 (dead command removal) and #566 (metadata fallback migration), NotebookState is only used in 4 functions. This PR removes those usages by: 1. Add dirty flag to WindowNotebookContext - tracks unsaved changes in context instead of NotebookState 2. Migrate clone_notebook_to_path to daemon - daemon reads from Automerge, clears outputs, generates fresh env_id 3. Decouple initialize_notebook_sync from NotebookState - daemon is source of truth; pass explicit notebook_id and cells rather than NotebookState Step 4 (removing notebook_state field from WindowNotebookContext) is deferred because fallback usages (get_kernelspec, get_dependencies, etc.) read from NotebookState when daemon isn't connected. Removing these requires either removing fallbacks or finding alternative sources. The daemon now owns notebook content via Automerge; NotebookState remains only as a local window cache and for fallback cases. * fix: address reviewer feedback on save-as and clone 1. Fix save_notebook_as data loss risk: Read cells and metadata from the old room BEFORE disconnecting. The new room won't have them since it's a different notebook_id, so we need to carry them across to populate the new room if it's empty. 2. Fix clone_notebook_to_disk dropping metadata: Read existing notebook to preserve cell metadata, attachments, and non-snapshot notebook metadata fields. Use split_inclusive for cleaner source line splitting.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 2D cleanup after the Automerge migration (#553).
Dead code removal (−216 lines Rust)
These Tauri commands are no longer called by the frontend — all cell mutations go through the WASM
NotebookHandle+ Automerge sync relay:load_notebookget_automerge_doc_bytes+ WASMNotebookHandle.load()update_cell_sourcehandle.update_source()+ syncadd_cellhandle.add_cell()+ syncdelete_cellhandle.delete_cell()+ syncrefresh_from_automergeget_automerge_doc_bytesbootstrapAlso removed:
cell_snapshot_to_frontendhelper (only used by dead commands)notebook:updatedcell emissions from init and receiver loop (frontend usesautomerge:from-daemon)Kept:
notebook:metadata_updatedemission — 3 active frontend listeners (useDependencies, useCondaDependencies, useDenoDependencies)cell:source_updatedemission — active listener in useAutomergeNotebook for format feedbackonOutput: () => {}— wiringappendOutputcauses duplicate outputs (broadcast appends, then Automerge sync replaces with doc state; if React batches both setCells, the functional update runs against the already-replaced state → double output). Sync latency is imperceptible. Future fix: dedup viaheader.msg_id.Also gitignores
apps/notebook/package-lock.json(project uses pnpm).