Repository navigation
Rebuild the vendored highlight.js bundle at 11.12.0 - #31
Conversation
The pin lives in scripts/vendor-highlight.sh as a shell variable, so dependabot cannot see it; the weekly sweep is what catches the drift. The bundle is a function of the pin and the registry's $languages.names, and rerunning the script is how those two stay unable to disagree: all fifteen declared names still register under leaf's own spelling, html and toml through the xml and ini aliases. 11.12.0 is grammar work. Among the languages leaf carries: a ReDoS fix in xml removing recursive sublanguage references, a markdown fix that stops a `***` thematic break reading as the start of bold, rust char escapes no longer leaking their highlight, and additions to css, go, java, javascript, python, and shell.
leaf-agent
left a comment
There was a problem hiding this comment.
Reviewed the bump; nothing to change in the diff. Rebuilding from scripts/vendor-highlight.sh at HLJS_VERSION=11.12.0 reproduces the committed bundle byte-for-byte, so the artifact is a function of the pin and the registry as the script's header claims, not a hand-edited blob.
One observation, not about this diff: the weekly step names two bundles, and only one moved here. scripts/vendor-marked.sh still holds MARKED_VERSION=18.0.7 while upstream is at 18.0.10 — 18.0.8 published 2026-08-04 and 18.0.10 on 2026-08-18, so both predate this sweep. Nothing else on the branch or in the open PRs covers it, and dependabot can't see that pin either, so it stays invisible until the next weekly reading. Separate concern, separate PR — noting it here because this is where the sweep's other half would have been.
What I checked
- Reproducible: reran
scripts/vendor-highlight.shon the merged tree;cmpagainst the committedhighlight.esm.jsis identical (77602 bytes).versionStringin the bundle reads11.12.0, andnpm view highlight.js dist-tagsconfirms that islatest. - The two lists still agree: the bundle's
registerLanguagecalls are exactly the fifteen names inregistry.json's$languages.names— none missing, none extra — withhtml/tomlarriving through thexml/inialiases. - Round trip: drove both bundles over the fifteen languages × nine samples, including the cases 11.12.0's grammar work touches (a markdown
***thematic break, a rust'a\n'char literal,<script>/<style>nested in html — the ReDoS fix that removedxml's recursive sublanguage references). Zero round-trip failures against the new bundle, so thesyntaxpartition promise andUNREAD_SYNTAXhold. - No role silently lost: compared the
hljs-*scope set each language emits, old against new. Nothing dropped — which is the failureSYNTAX_ROLE's fall-back-to-plain design would have absorbed without an error. The one change isdiffhunk headers now emittinghljs-meta(@@ -1 +1 @@was bare before), which maps to the existingfnrole, so it colours rather than reading wrong. - No other consumer:
11.11.1appeared only in the script and the bundle; nothing pins a size, hash, or version elsewhere. The hljs surfaceleaf.jsuses —getLanguage,highlight, thehljs-class prefix — is unchanged in 11.12.0. - CI: every gating check on
6e8367dsettled green.
|
The review asks for no change to this diff, and the sweep's other half is already covered: #32 rebuilds Nothing further to do here. Every gating check on State of the other half#32's |
Update Mermaid from 12.1.0 to 12.2.0 and rebuild its committed browser bundle. Mermaid now resolves KaTeX 0.18.10, above the 0.18.2 patched floor in [security alert #31](https://github.com/max-sixty/leaf/security/dependabot/31). The previous lock resolved KaTeX 0.16.47. Verification: `pnpm run check:browser` and three focused browser tests for diagram rendering, SVG references, and label markup passed. The dependency update leaves the rest of the graph unchanged except KaTeX's Commander dependency. Dependabot's [uv update run](https://github.com/max-sixty/leaf/actions/runs/38195723509) failed while resolving the Python workspace, but this alert is in the npm lock. This PR updates the npm path directly. Co-authored-by: leaf-agent <[email protected]>
Replace the diagram package's Mermaid renderer with Pele 1.6.0 while retaining Mermaid source syntax and threads attached to individual shapes. Leaf registers the same `node:<authored id>` anchors from Pele's parsed models and rendered boxes across flowcharts, state, class, entity-relationship and sequence diagrams, including containers and nested states. Pele supplies parsing, layout and SVG generation in one lazy, offline-capable module. The renderer is 666 KB uncompressed (246 KB gzip), down from 5.25 MB (1.49 MB gzip). Leaf supplies its fonts and live light/dark palette, disables source links and images, and updates authored selectors and measured diagram heights in the examples and documentation. One vendoring adaptation preserves unsupported HTML-looking tags as escaped label text instead of silently dropping them; the upstream request is [Pele #31](obsidianmd/pele#31), also reproduced on 1.7.0. Validation: focused browser/model checks cover shape-thread submission, source revision and reload, keyboard and touch selection, all supported diagram families, duplicate identities, hostile labels, fonts, scheme changes, SVG definitions and lazy loading. `pnpm run check` covers reproducible bundles, framework, runtime and Worker tests. Independent code review and a fresh browser user verified shape-thread behavior; before/after light and dark views were inspected. > _This was written by Codex on behalf of max-sixty_
A new nightly test, `test_presses_and_fills_leave_no_element_naming_stale_keys` in `tests/journeys/test_render_navigation.py`, holds the rule `keyboard/scopes.js` states: a module's own state that a row's `when` reads must be a signal. Before this change nothing enforced it, and #3342 found four rows that read plain variables and left `aria-keyshortcuts` or `aria-disabled` stale. The test runs the probe #3342 used. For each public example and developer page, it makes 40 random presses and fills on visible controls, in an order seeded by the example's name. After each step it waits for the page's readiness, for every send to come back, and for rendering. It then reads every element's `aria-keyshortcuts` and `aria-disabled`, forces a full key repaint (`paintKeys()`), and reads them again. It fails on any attribute the repaint changed, naming the step, the control pressed and the element. The keys themselves still work when a row is stale, since a press reads the rows afresh, so no other test catches this. ## The stale row it found On this PR's first CI run the sweep failed on `code-comparison`. After a press on a closed tab, the tab strip still named Enter and Space. The strip's "open the tab" row read `aria-selected` on the focused tab, which no signal tracks. A person's press focuses the tab on mousedown and opens it on click, a few frames later. So the strip read the focused tab while it was still closed, and nothing told it to read again once the tab opened. `lf-tabs` now holds the open panel in a signal (`#active`), and the row compares the focused tab with the open one. A new browser-tier test, `test_a_pressed_tab_stops_naming_the_key_that_opens_it`, holds the mouse down for a frame before releasing. It fails on the previous `lf-tabs` and passes now. I also put #3342's diff-filter fix back (`lf-diff.js` asking `:focus-within` directly), and the sweep failed on `diff-thread-gallery`, naming the diff whose `aria-keyshortcuts` kept or lost `Escape`. ## Waits instead of the probe's fixed delay The probe waited a fixed 400 ms. Two of its findings were readings taken mid-operation rather than stale rows. A live sample's Reset is `aria-disabled` while its child loads, and the child finished loading between the two readings. A playground's Build query was `aria-disabled` until its send came back. The test waits for page readiness, which counts each sample's arrival, and for `round_trip`, so neither reads as stale. ## Write-watch findings on the sweep's path The random presses also met three findings from the write watch, which this change fixes so the test passes: - **The merge film** (`examples/wt-merge.page/film.js`) removed every annotation note and drew it again on each paint. The painter dropped unseen parts before `#paintNotes` marked the notes as seen; it now drops them after every layer has painted. The corpus copy is regenerated. - **The playground's Copy button** wrote the same `data-copy-state` again when pressed twice within two seconds. It now writes through `keeps`. - **Sortable** sets a card's `draggable` to false on every release of its grip, whether or not the press became a drag. It is vendored, so `write_watch.js` lists that write in `EXPECTED`. ## Cost Locally, under load from other sessions, the 28 cases take 202–306 worker-seconds in total over seven runs (about 3.5–5 worker-minutes), and 70–78 s of wall time on 4 workers. The slowest are `wt-merge` and `pr-walkthrough`, each up to about 40 s. It runs one seed; the decision estimated about 6 worker-minutes per seed. This is Max's decision #31 (option C) on the overnight report. > _This was written by Claude Code on behalf of max-sixty_ Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
… signal (#3456) A new nightly test, `test_presses_and_fills_leave_no_element_naming_stale_keys` in `tests/journeys/test_render_navigation.py`, holds the rule `keyboard/scopes.js` states: a module's own state that a row's `when` reads must be a signal. Before this change nothing enforced it, and #3342 found four rows that read plain variables and left `aria-keyshortcuts` or `aria-disabled` stale. The test runs the probe #3342 used. For each public example and developer page, it makes 40 random presses and fills on visible controls, in an order seeded by the example's name. After each step it waits for the page's readiness, for every send to come back, and for rendering. It then reads every element's `aria-keyshortcuts` and `aria-disabled`, forces a full key repaint (`paintKeys()`), and reads them again. It fails on any attribute the repaint changed, naming the step, the control pressed and the element. The keys themselves still work when a row is stale, since a press reads the rows afresh, so no other test catches this. ## The stale row it found On this PR's first CI run the sweep failed on `code-comparison`. After a press on a closed tab, the tab strip still named Enter and Space. The strip's "open the tab" row read `aria-selected` on the focused tab, which no signal tracks. A person's press focuses the tab on mousedown and opens it on click, a few frames later. So the strip read the focused tab while it was still closed, and nothing told it to read again once the tab opened. `lf-tabs` now holds the open panel in a signal (`#active`), and the row compares the focused tab with the open one. A new browser-tier test, `test_a_pressed_tab_stops_naming_the_key_that_opens_it`, holds the mouse down for a frame before releasing. It fails on the previous `lf-tabs` and passes now. I also put #3342's diff-filter fix back (`lf-diff.js` asking `:focus-within` directly), and the sweep failed on `diff-thread-gallery`, naming the diff whose `aria-keyshortcuts` kept or lost `Escape`. ## Waits instead of the probe's fixed delay The probe waited a fixed 400 ms. Two of its findings were readings taken mid-operation rather than stale rows. A live sample's Reset is `aria-disabled` while its child loads, and the child finished loading between the two readings. A playground's Build query was `aria-disabled` until its send came back. The test waits for page readiness, which counts each sample's arrival, and for `round_trip`, so neither reads as stale. ## Write-watch findings on the sweep's path The random presses also met three findings from the write watch, which this change fixes so the test passes: - **The merge film** (`examples/wt-merge.page/film.js`) removed every annotation note and drew it again on each paint. The painter dropped unseen parts before `#paintNotes` marked the notes as seen; it now drops them after every layer has painted. The corpus copy is regenerated. - **The playground's Copy button** wrote the same `data-copy-state` again when pressed twice within two seconds. It now writes through `keeps`. - **Sortable** sets a card's `draggable` to false on every release of its grip, whether or not the press became a drag. It is vendored, so `write_watch.js` lists that write in `EXPECTED`. ## Cost Locally, under load from other sessions, the 28 cases take 202–306 worker-seconds in total over eight runs (about 3.5–5 worker-minutes), and 66–78 s of wall time on 4 workers. The slowest are `wt-merge` and `pr-walkthrough`, each up to about 40 s. On this PR's CI run, the 23 cases among the job's 25 slowest tests took 510 worker-seconds, `file-tree` the longest at 85 s, so the sweep costs about 9 worker-minutes there. It runs one seed; the decision estimated about 6 worker-minutes per seed. This is Max's decision #31 (option C) on the overnight report. > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
The user judged focus rings too central to Leaf for another per-case fix. This reverts the branch's two ring commits: the ring room shared by every sticking block (647ef69) and the Web Awesome host margin at Tab arrival (4eb1eef). Main keeps #3939's track-only room and #3916's Copy-only margin. notes/focus-ring-room.md lists the six cases found so far, with their measurements and reproductions, the two mechanisms behind them, and the two candidate fixes tried. TODO #31 asks for one mechanism once the list shows its shape. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Weekly vendored-bundle sweep.
scripts/vendor-highlight.shheldHLJS_VERSION=11.11.1while upstream is at 11.12.0 — the pin is a shell variable rather than a manifest entry, so dependabot cannot see it and the drift is silent until this step reads it. Bumped the variable and reran the script; the rebuilt bundle is the change, not the version string.The bundle is a function of both the pin and the registry, since the script reads
$languages.namesout ofregistry.jsonto decide what to bundle. All fifteen declared names still register under leaf's own spelling, withhtmlandtomlresolving through thexmlandinialiases — so the page's vocabulary and the tokenizer's remain unable to disagree.11.12.0 is grammar work, no API change. Among the languages leaf carries: a ReDoS fix in
xmlremoving recursive sublanguage references, amarkdownfix that stops a***thematic break reading as the start of bold text,rustchar-literal escapes no longer leaking their highlight past the literal, and keyword or literal additions tocss,go,java,javascript,python, andshell.Verification
hljs.listLanguages()against the new bundle returns exactly the registry's fifteen names, none missing and none extra, andhljs.versionStringreports11.12.0.Tokenizing round-trips the source words for each of the sampled languages — the
UNREAD_SYNTAXcontract, checked properly across the corpus by the browser gate below.Full suite green on this branch —
uv run pytest tests --run-nightlygave1011 passed, 6 skipped in 615.23s. The targeted readings, run first:test_every_path_a_diff_resolves_names_a_language_the_bundle_carriesandtest_every_language_returns_the_source_it_was_givenare the two that would catch a bundle built from a different list than the registry states.