feat(equations): edit an existing equation (double-click → reopen prefilled)#96
Merged
Conversation
…filled) Double-clicking a painted equation reopens the equation dialog prefilled with its LaTeX (wired through PagedEditor's dblclick handler via the math span's data-pm-start). Reopening via Insert -> Equation / Alt+= while a math node is selected also prefills. Inserting then REPLACES the selected math node in place instead of adding a new one. e2e: equation-edit.spec.ts (insert a/b -> double-click -> prefilled -> edit to x^2 -> replaces in place, still one equation). Typecheck + lint clean; demo + equation specs green.
schnsrw
added a commit
that referenced
this pull request
Jun 24, 2026
) * docs(roadmap): mark equations (Phase D) shipped + desktop folded; Phase A complete Equations: render (#92) / author round-trip (#94) / Insert UI (#95) / edit (#96) shipped — note the OMML→LaTeX import-edit gap. Desktop web-bridge folded into main (#93), offline-first; desktop CI builds from main. Recently-shipped summary + date bump. * fix(ci): format DocImage.tsx; correct backend docs (collab server is Node, not Go) Prettier format on DocImage.tsx fixes the failing 'Lint + format' CI job. Docs correction: the real-time collab/sync server is the shared Node/TypeScript server CasualOffice/collab (Hocuspocus + Yjs on Fastify), not a Go backend. The in-repo backend/ Go gateway is legacy and superseded. Updated CLAUDE.md (overview, architecture diagram, rules, where-things-live, status), CO-EDITING.md (diagram + rationale), ARCHITECTURE.md (gateway box header). --------- Co-authored-by: sachin sarwa <schnsrw@gmail.com>
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.
Completes the equation authoring UX — equations are now editable, not just insertable.
Double-click a rendered equation to reopen the equation dialog prefilled with its LaTeX; edit and Insert replaces it in place. Reopening via Insert → Equation / Alt+= while an equation is selected also prefills (vs. a blank new insert otherwise).
Wired through PagedEditor's existing dblclick handler (the painted math span carries
data-pm-start, mirroring the footnote-edit path);handleInsertEquationdoes a node replace when a mathNodeSelectionis active, else a fresh insert.Verified:
equation-edit.spec.ts— inserta/b→ double-click → input prefilled\frac{a}{b}→ edit tox^2→ fraction replaced by superscript, still exactly one equation. Typecheck + lint clean; demo-docx 44/44 + insert/render specs green.Equations arc: render (#92) → authoring round-trip (#94) → Insert UI (#95) → edit existing (this).