Repository navigation
feat(desktop): style live headings and tasks and render native math - #188
Merged
Merged
Conversation
# Conflicts: # docs/README.md # docs/design/app.md # docs/specs/ui.md # go.mod # internal/desktop/reading/view.go
bketelsen
changed the base branch from
fix/desktop-editor-review
to
fix/native-rendering
November 11, 2026 07:47
This was referenced Nov 11, 2026
feat(desktop): render inline and display TeX natively
# Conflicts: # go.mod
6 tasks done
frostyard-machines
previously approved these changes
Nov 11, 2026
# Conflicts: # AGENTS.md # go.mod # go.sum # packaging/flatpak/go-sources.json
# Conflicts: # AGENTS.md # packaging/flatpak/go-sources.json
frostyard-machines
previously approved these changes
Nov 11, 2026
bketelsen
dismissed
frostyard-machines’s stale review
November 11, 2026 14:16
The merge-base changed after approval.
Closed
3 tasks
Live preview ran three regular expressions on every line of the note on each keystroke to find headings and done tasks, and three more to follow paragraphs. A line's shape now comes from a cache keyed by its text, as its pieces do. A keystroke in the 10,000-line note goes from 11.4 ms to 10.1 ms here, and on two cores from 12.0 ms to 9.9 ms, against main's 9.0 ms (#193).
This was referenced Nov 11, 2026
frostyard-machines
approved these changes
Nov 11, 2026
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.
Summary
Native live preview sizes headings by hierarchy and strikes completed tasks; selected lines and source mode reveal their source styles. MyGo's per-line layout API keeps wrapping, replacements, caret positions and scrolling consistent.
Native reading view and live preview also render inline/display TeX as bounded, cached vector paths using mathjax-go. Invalid or unsupported formulas remain source. These math changes came from #187, which was merged into this branch.
Part of #146: on the CI runner, live preview's typing is still over #146's 16 ms gate (#193). Closes #147. Uses the pinned line-style capability from bketelsen/mygo#1. Includes #191's merged frostui pin and asynchronous test fixes.
Risk tier
Risk tier: 3 —
internal/desktop/editor/live.goandinternal/desktop/reading/view.gomatch L1. Styles derive from parsed lines and do not rewrite note bytes. Math uses a pure-Go renderer with source, nesting, output and cache bounds; it runs no scripts, external processes or network requests. Invalid formulas retain source. The MyGo pin has geometry, folding, replacement and edit-position coverage.Docs housekeeping
ADR-0041 records native vector math; its design/spec/plan links and index entry are included. The app design, native UI spec, desktop plan and canonical AGENTS.md describe the resulting rendering behavior.
Verification
mise exec -- make checkandmake desktop-buildpassed on the refreshed branch.make desktop-bench: source 2.67 ms, live preview 12.50 ms per keystroke in 10,000 lines (16 ms target).Merge order
Remaining merge order: #191 → #188 → #189 → #190. #187 was merged into #188, so its math changes land with #188. Preserve ancestry with merge commits, or rebase the remaining branches after a squash merge.
Update (2026-11-11): moved onto MyGo v0.9.0 by merging
main(MyGo v0.9.0, build(desktop): move to MyGo v0.9.0 #192) and fix(deps): adopt merged frostui and stabilize async checks #191's updated branch are merged into feat(desktop): style live headings and tasks and render native math #188, then feat(desktop): style live headings and tasks and render native math #188 into feat(desktop): play vault audio and video natively #189, and feat(desktop): play vault audio and video natively #189 into feat(desktop): toggle reading tasks with undo and follow block links #190, without force-pushes. Nothing frommainis rolled back: feat(desktop): style live headings and tasks and render native math #188's diff againstmainis its own work plus fix(deps): adopt merged frostui and stabilize async checks #191's.frostyard/nextatd97fd2e1: v0.9.0 with editor: show elements between lines egoist/mygo#1662, per-line styles, and the Markdown view's task actions and anchors. It replaces the old fork commits5fa528b3andd805de38, which predate v0.9.0. The replace's comment, plan 0009 andAGENTS.mdsay it goes once all of these are in a MyGo release.Local results
On each of #188, #189 and #190, these are green:
make checkgo test -raceover./internal/desktop/...and./internal/render/make desktop-buildmake desktop-evidenceon #190: the tree at a median of 369 µs, the switcher at 4.8 ms, and a phone edit in 8.7 ms.Typing cost: about 2.7 ms a keystroke in source mode, and 11.6 to 12.7 ms in live preview, against
main's 9.0 ms without per-line styles and the 16 ms budget.Not verified yet
make desktop-smokedidn't run locally, because the host has noxvfb-run. Its first run is CI's.pull_requestruns only on PRs tomain, so feat(desktop): play vault audio and video natively #189's and feat(desktop): toggle reading tasks with undo and follow block links #190's CI and Flatpak workflows were started by hand withworkflow_dispatchon their branches. Those runs may not appear among the PR's checks.