Skip to content

chore(notebook): dead code removal from local-first migration#595

Merged
rgbkrk merged 2 commits intomainfrom
quill/remove-notebook-state-fallbacks
Mar 8, 2026
Merged

chore(notebook): dead code removal from local-first migration#595
rgbkrk merged 2 commits intomainfrom
quill/remove-notebook-state-fallbacks

Conversation

@rgbkrk
Copy link
Member

@rgbkrk rgbkrk commented Mar 8, 2026

Summary

Dead code cleanup from the local-first WASM migration. Addresses #596 and #597.

Removed fallback branches (#597)

  • verify_notebook_trust() - now requires daemon connection, no silent fallback

Deleted dead code (#596)

What was kept

  • NotebookState.path sync in save_notebook_as (required for session restore)
  • Mutation-based cell initialization in initialize_notebook_sync
  • Bootstrap sites in create_notebook_window() and run() startup

Closes #596
Closes #597

@rgbkrk rgbkrk marked this pull request as draft March 8, 2026 01:02
…tialization

This PR simplifies the Tauri relay architecture (issue #556):

Task 1: Remove NotebookState fallback branches
- Remove fallback in get_preferred_kernelspec() - now requires daemon
- Remove fallback in verify_notebook_trust() - now requires daemon

Keeps mutation-based cell initialization:
- The initial_cells via handshake approach was reverted because:
  1. Handshake has 64 KiB frame limit - large notebooks would fail
  2. Architecturally wrong - daemon should determine cell seeding
- Mutations (add_cell, update_source, set_metadata) remain for now
- NotebookState.path sync restored for session restore compatibility
@rgbkrk rgbkrk force-pushed the quill/remove-notebook-state-fallbacks branch from 9156f52 to cf05e5b Compare March 8, 2026 01:04
@rgbkrk rgbkrk changed the title refactor(notebook): remove fallback branches and seed cells via handshake refactor(notebook): remove NotebookState fallback branches Mar 8, 2026
@rgbkrk rgbkrk marked this pull request as ready for review March 8, 2026 01:13
Addresses #596:
- Delete get_preferred_kernelspec Tauri command (zero frontend callers)
- Delete format module (202 lines, zero callers after #563)

Frontend reads kernelspec from WASM doc via useSyncExternalStore.
Formatting now lives in daemon (format-on-execute).
@rgbkrk rgbkrk changed the title refactor(notebook): remove NotebookState fallback branches chore(notebook): dead code removal from local-first migration Mar 8, 2026
@rgbkrk rgbkrk enabled auto-merge (squash) March 8, 2026 01:31
@rgbkrk rgbkrk merged commit 172cfe1 into main Mar 8, 2026
10 checks passed
@rgbkrk rgbkrk deleted the quill/remove-notebook-state-fallbacks branch March 8, 2026 01:40
rgbkrk pushed a commit that referenced this pull request Mar 8, 2026
…601)

Update both audit documents to cover new protocol surfaces introduced
by the daemon-owned notebook loading infrastructure (OpenNotebook and
CreateNotebook handshakes) and dead code removal from the local-first
migration.

New findings:
- OpenNotebook accepts arbitrary file paths for reading (medium)
- Error paths drain unbounded reader data (medium)
- do_initial_sync uses 100ms timeout for convergence (medium)
- CreateNotebook runtime field not validated (low)
- load_notebook_from_disk has no file size limit (low)

Positive changes noted:
- Trust verification fallback branches removed (#595)
- Daemon-side doc population reduces CRDT merge complexity
- Atomic check-and-load prevents duplicate cell population
- Client-side protocol version validation in new handshakes

https://claude.ai/code/session_01ToG68d36uTowAeraL5CF7R
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.

chore: remove NotebookState fallback branch in verify_notebook_trust chore: remove dead get_preferred_kernelspec command and format module

1 participant