Repository navigation
Milestone 3: sizes, jump labels and :sym - #3
Merged
Merged
Conversation
- Shape::Text and Shape::Math carry a size (multiplier, default 1, 0.25..=16), refused out of range by the board and the reader. - The writer adds size= after x y only when it isn't 1, so boards without sizes write back byte-identical. - FixedMeasure scales with size; moving or typing into a block keeps its size. - format_proptest reads LAWH_PROPTEST_CASES. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LbT1KUQukgkZNgWh8f8U7i
… writes - <C-a>/<C-x> step a text or math block along SIZE_STEPS, with counts, . and one undo step; in Visual mode they resize the selection. - :si N, :si +N, :si -N on the current object or the selection; :set size for new blocks; :te/:ma ++size=N; o/O keep a block's size. - W B E in block-Normal mode. - write_done takes same_file, so a write the app finds is the board's own file saves it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LbT1KUQukgkZNgWh8f8U7i
- s in Normal mode, Visual mode and after d/y labels every object in view, nearest first, one character for the nearest and two for the rest, prefix-free. - A label moves the cursor, stretches a Visual rectangle, or acts remotely after d/y with the cursor staying put; . asks for a new label. - Label keys skip key maps; Esc, Backspace, an unmatched key and a click cancel. - :set jumplabels, Engine::set_view, measured LABEL_WORK and PICK_WORK. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LbT1KUQukgkZNgWh8f8U7i
- :sym query lists the best 8 matching symbols (nucleo-matcher), Tab/C-n and S-Tab/C-p cycle, Enter picks: the Typst name in math (spaced from names it would touch), the character in text, a new math block on the board. - Ctrl+K in Insert mode opens :sym and comes back after the pick; . types what was inserted. - The symbol list is passed in (Engine::set_symbols), so lawh-core stays free of Typst. Caps MAX_SYMBOLS, MAX_SYM_QUERY_CHARS, SYM_ROWS; measured work weights. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LbT1KUQukgkZNgWh8f8U7i
symbols() lists codex's names (pinned to Typst's version) with their values, marks which the bundled fonts can draw, and sorts them in the engine's order. A test compiles every name and checks the flag against the layout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LbT1KUQukgkZNgWh8f8U7i
- Text, math, bounds, carets and hit tests follow each block's size. - Math is drawn MATH_SCALE (1.2725, the fonts' x-height ratio) larger, its first baseline on the text baseline. - Jump labels: small boxes on object anchors, clamped to the window, nearest on top, the typed prefix dimmed. - :sym rows above the status line, the selected row highlighted; the status font falls back to Libertinus Math. - New goldens; regenerated goldens for the bigger math; bench cases for 500 labels and 8 completion rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LbT1KUQukgkZNgWh8f8U7i
… by identity - The engine gets the visible board area before every key and timeout, so jump labels cover what is on screen. - The drawable Typst symbols go to the engine once at start (not in the math worker). - After a good write, the app compares file identity (device and inode on Unix, canonical paths elsewhere), so :w ~/x.lawh of the board's own file saves it. - bench.yml runs the engine cost measurements and the symbol list measurement. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LbT1KUQukgkZNgWh8f8U7i
…ew findings - Measure::take_work reports layout work; the renderer converts its layout estimate for cache misses (KEY_WORK_PER_LAYOUT_NS) and the engine charges it after every measure. A mapping over a long text stopped after 2 to 6 s; it now stops in about 0.1 s (release). - :sym refuses an over-long query before copying it, and charges line copies. - Visual d/y/x/:si after a resize act on what is highlighted. - Board text falls back to Libertinus Math for characters Inter lacks (liga off), so symbols picked into text draw. - Calibrations re-measure a failing row before failing; bench.yml runs measure_cost. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LbT1KUQukgkZNgWh8f8U7i
…e characters Inter lacks - Each drawing row measures its empty frame once, so a re-measure can only lower the time taken, never the frame subtracted. - The math-symbol text kind and the fallback tests use U+27FC and other arrows Inter lacks (U+27F6 is in Inter). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LbT1KUQukgkZNgWh8f8U7i
- keys.md: size keys and commands, jump labels, :sym and Ctrl+K, W B E, new options. - architecture.md: size in the format and drawing, math scale and baseline, font fallback, the engine's labels and symbol search, measured layout work, same-file writes, overlay and limits. - testing.md, tech-stack.md, CLAUDE.md, README.md, SECURITY.md updated; new docs/research/m3-measurements.md; examples/lawhrc gets a jumplabels line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LbT1KUQukgkZNgWh8f8U7i
Measured run-out times per case, @: after a Visual :si, sources for the flash.nvim default, glosses, the baseline tolerance, and the worst open time since the font fallback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LbT1KUQukgkZNgWh8f8U7i
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
What
sizefrom 0.25 to 16.<C-a>and<C-x>step it,:si N,:si +Nand:si -Nset it,:set size=Nsizes new blocks, and:te ++size=N/:ma ++size=Nmake a sized block. Files get an optionalsize=, written only when not 1, so the header staysversion=1and M2 boards round-trip byte for byte.MATH_SCALE= 1.2725, so at the same size its x-height is within 3% of text's and a one-line formula sits on the text baseline.sputs a one- or two-character label on every other object in view. A label moves the cursor, stretches a Visual selection, or afterd/yacts on that object while the cursor stays..asks for a label again.:set jumplabels=sets the characters, and label keys skip mappings.:sym: fuzzy search over Typst's symbol names (nucleo-matcher), with the list built in lawh-math fromcodexand passed into the engine. 457 of 1,189 symbols are hidden because the bundled fonts can't draw them.<C-k>in Insert mode opens it: math gets the name, text gets the character, the board gets a new math block.W,BandEmove by space-separated words.:wto the board's own file under another path (~, absolute, a link) counts as saving it, checked by file identity.Measure::take_work). New limits are listed inCLAUDE.md.format_proptestreadsLAWH_PROPTEST_CASES;bench.ymlruns the key-cost measurements.docs/keys.md, the architecture, testing, tech-stack and security docs, and M3 measurements.Result
examples/area.lawhstill takes 62 keys, and its formula now matches the text.Checks
-D warnings, 834 tests, the Rust 1.95 check and cargo-deny all pass.🤖 Generated with Claude Code