Skip to content

Add collaborative spreadsheet blocks inside documents - #357

Open
jjbaumert wants to merge 1 commit into
mainfrom
feat/embedded-spreadsheet-133
Open

jjbaumert wants to merge 1 commit into
mainfrom
feat/embedded-spreadsheet-133

Conversation

@jjbaumert

Copy link
Copy Markdown
Owner

Intent

Let authors keep live spreadsheet calculations inside ordinary document prose.

Closes #133.

What changed

Add editable, bounded grid blocks with raw formulas, number formats, multiple sheets, parent undo/redo and read-only controls. Extract the existing spreadsheet engine for browser/server reuse while preserving its frontend module paths and original test assertions.

Persist independent cell and format keys through Yrs. Keep active sheet, drafts and selection local; retain focused inputs across unrelated edits. Native snapshots preserve source, and HTML/Markdown/DOCX/PDF render computed tables. Schema validation and exports enforce documented size/evaluation limits.

How this was tested

  • Real browser red/green: insertion, formula calculation, focusout persistence, rejected-draft ownership, focused-workbook undo, multiple sheets/workbooks, history, concurrent WebSocket edits, viewer permissions and reload.
  • Actual persisted APIs after all clients close: HTML/Markdown/DOCX/PDF exports plus native download/upload into a separate document, preserving formulas, formats and identities.
  • 386 shared-engine, 676 collab/export, 1195 frontend library, 459 frontend binary and 14 collaboration tests passed. A 9000-cell regression proves one edit emits less than 256 bytes and converges on a fresh peer.
  • Strict shared/collab Clippy and new-module formatting pass. Full frontend Clippy retains 150 diagnostics on unchanged lines; none remain on changed lines. Broad pre-existing repository formatting drift remains.
  • Playwright CI runs both new edge regressions and full acceptance. Its established browser build omits PDF to avoid cold-build timeouts, so that invocation explicitly skips PDF; default local acceptance and regular backend CI cover PDF.

Evidence is retained locally in .ship/evidence-inline-spreadsheet.log. Full Playwright run: https://github.com/jjbaumert/OgreNotes/actions/runs/40799382414

Findings fixed during review

Fix draft persistence on leaving a grid, rejected-draft navigation writing the wrong cell, and cursor restoration after removing a focused workbook. Restore merge predicate grouping, bound INDEX offsets, and implement advertised numeric patterns. Align CI export checks with its intentionally reduced feature set. Follow-up fresh-context reviews have no outstanding findings.

Risk: high

Adds persisted node types and collaborative editing behavior. Existing old browser tabs must be refreshed before editing documents with the new block types. Formula/evaluation limits and export differences are documented in crates/spreadsheet/README.md.

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.

Support an inline embedded spreadsheet/grid block within documents

1 participant