Repository navigation
feat(essays): hover definitions on technical terms, and hold Alt for exact values - #1188
Conversation
…exact values A technical word in a /garage or /lwe essay now carries a one-sentence definition and a link to the best source for it. Hovering draws the shell's infotip (term, definition, source name); clicking goes to the source. The first pass marks 427 terms across 38 essays from a 301-entry registry in src/content/terms.json, and docs/TERMS.md is the rulebook for marking future essays before they publish. The markup is a plain link with a title, so it works with no script and on touch. contract-essay-terms-match-their-registry holds every page's copy to the registry, and fails if a term lands inside a page's JSON data. Holding Alt (Option) swaps any <data value> on the page to its exact value in Courier New until release. The homepage photo tooltip is the first user: its rounded file size and minute-trimmed capture time both carry their exact forms.
Wire-size diff vs merge base
Brotli q11, the quality the edge serves. Every number here is deterministic: Client assetsTotal Brotli: 193.59 KiB → 194.23 KiB (+0.63 KiB, +0.3%) across 37 files, 5 changed.
PagesTotal Brotli: 566.65 KiB → 594.35 KiB (+27.70 KiB, +4.9%) across 70 files, 65 changed.
Plus 27 files under the 0.13 KiB floor, net +0.02 KiB — usually content-hash churn in Worker bundle268.88 KiB → 268.86 KiB gzip (-0.02 KiB, -0.0%) Dictionary transportFamily dictionary acquisition: no change, 14.41 KiB q11.
|
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
aadhar-sh | 7e4f497 | Commit Preview URL Branch Preview URL |
Oct 06 2026, 07:08 PM |
# Conflicts: # pipelines/garage/specs/av2.json # pipelines/garage/specs/dictionary.json # pipelines/garage/specs/hidden-flags.json # pipelines/garage/specs/htmx.json # pipelines/garage/specs/ig-prep.json # pipelines/garage/specs/octane.json # pipelines/garage/specs/pqc.json # pipelines/garage/specs/resample.json # pipelines/garage/specs/typed-config.json # pipelines/garage/specs/useragent.json
Wraps rounded figures in eight /garage essays in <data value>, so holding Alt shows the exact value. A figure is wrapped only when its exact value is known for the same measurement: the 19 encoding figcaptions take the byte size of the sample file each card loads (checked against public/garage/enc on disk), and the rest read off the page's own tables and data blocks. A check refused any pair whose exact value would not round to the shown text. The surveys skipped every figure whose exact form would have needed new arithmetic, or whose nearest exact number came from a different run. contract-exact-figures-are-honest-wraps holds the shape: a non-empty value that differs from the text, never in a heading or in JSON data.
# Conflicts: # pipelines/garage/specs/av2.json # pipelines/garage/specs/dictionary.json # pipelines/garage/specs/hidden-flags.json # pipelines/garage/specs/htmx.json # pipelines/garage/specs/ig-prep.json # pipelines/garage/specs/octane.json # pipelines/garage/specs/pqc.json # pipelines/garage/specs/resample.json # pipelines/garage/specs/typed-config.json # pipelines/garage/specs/useragent.json
Technical words in the /garage and /lwe essays now explain themselves on hover, and holding Alt shows the exact value behind a rounded figure. Both ideas came out of a sweep of the 79 galleries on designeer.xyz, filtered for what Luna could have shipped.
Hover definitions
A marked term gets a dotted underline (the convention
a.car-linkalready uses). Hovering draws the shell infotip: the term, a one-sentence definition, and a "Read more" row naming the source. Clicking goes to the source.src/content/terms.json, each with a source: Wikipedia by default, or the RFC, MDN page, NIST FIPS, paper or Cloudflare doc when that's better. Every link was checked to resolve.<a class="term" data-t href title rel="external">. It works with no JS and on touch through the native tooltip, and the card never fetches.nav.jsdoesn't change, because its[title]rule already routes these toinfotip.js, which gains onetermTipbranch.pipelines/*/specsand were regenerated. Stripping the marks from all 38 pages gives back the bytes onmain, so the marks are the whole diff.docs/TERMS.mdcovers what to mark, what to skip, how to write a definition, and how to pick a source, so future essays get marked before they publish.contract-essay-terms-match-their-registryholds every page'shrefandtitleto the registry byte for byte. It also checks one mark per page, no orphaned entries, and the house voice. It fails if a term lands inside a page's JSON data, which happened once in this pass (a quizwhyon /lwe/drivers). Both failure modes were controlled: a corrupted title and a planted escaped mark each fail the test with a message naming the page.Hold Alt
Holding Alt (Option on a Mac) swaps every
<data value>on the page to its exact form in Courier New until the key comes back up.nav.js(initExact) does the swap, and a MutationObserver covers tooltips that render mid-hold; it exists only for the length of the hold. The Firefox menu-bar keyup is swallowed only when something was actually shown. The markup is the opt-in, so nothing is computed or guessed.The first user is the homepage photo tooltip. Measured in the browser, "18.5 MB" becomes "19,408,694 bytes", and "03-08-2026, 09:33" becomes "2026-03-08 09:33:02". 37 rounded figures across eight /garage essays now carry their exact values (
ad216faf). The 19 encoding figcaptions take the byte size of the sample each card loads, checked againstpublic/garage/encon disk; the rest read off the page's own tables and data blocks. A figure was wrapped only when its exact value describes the same measurement, and a rounding check refused any pair that didn't round to the shown text.contract-exact-figures-are-honest-wrapsholds the shape.Checks
Run locally after rebasing on
e428ed03:derive:check,routes:checkandpages:check.The perf budget's 4 advisories (worker bundle, worker source, nav-tips.js, lens.js) are all files this PR doesn't touch. The page-family dictionary drifts 6.7%, inside its 10% line.
Re-mints
/a/URLs fornav.js,infotip.js,tooltip.js,luna.cssandinfotip.css(hashed-asset).