Skip to content

feat(equations): edit an existing equation (double-click → reopen prefilled)#96

Merged
schnsrw merged 1 commit into
mainfrom
feat/equation-edit
Jun 24, 2026
Merged

feat(equations): edit an existing equation (double-click → reopen prefilled)#96
schnsrw merged 1 commit into
mainfrom
feat/equation-edit

Conversation

@schnsrw

@schnsrw schnsrw commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

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); handleInsertEquation does a node replace when a math NodeSelection is active, else a fresh insert.

Verified: equation-edit.spec.ts — insert a/b → double-click → input prefilled \frac{a}{b} → edit to x^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).

…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 schnsrw merged commit 6cdb5ad into main Jun 24, 2026
5 of 7 checks passed
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>
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.

1 participant