Skip to content

feat(essays): hover definitions on technical terms, and hold Alt for exact values - #1188

Merged
oddharsh merged 5 commits into
mainfrom
claude/term-tips
Oct 6, 2026
Merged

oddharsh merged 5 commits into
mainfrom
claude/term-tips

Conversation

@oddharsh

@oddharsh oddharsh commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

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-link already 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.

  • Registry: 301 definitions in 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.
  • First pass: 427 marks across 38 essays, on the first use per page, 4 to 15 per essay.
  • Markup: <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.js doesn't change, because its [title] rule already routes these to infotip.js, which gains one termTip branch.
  • Spec-backed pages: the 16 spec-backed pages took their marks in pipelines/*/specs and were regenerated. Stripping the marks from all 38 pages gives back the bytes on main, so the marks are the whole diff.
  • Rulebook: docs/TERMS.md covers 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-registry holds every page's href and title to 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 quiz why on /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 against public/garage/enc on 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-wraps holds the shape.

Checks

Run locally after rebasing on e428ed03:

  • lint, typecheck, and the contract suite (1,234 pass);
  • build, perf-budget, derive:check, routes:check and pages: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 for nav.js, infotip.js, tooltip.js, luna.css and infotip.css (hashed-asset).

…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.
@oddharsh oddharsh added the hashed-asset Remints an /a/ URL, so every page and page dictionary rebuilds label Oct 6, 2026
@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Wire-size diff vs merge base

a0e4103a432f87648c3409e473ece75feb36479a → e447b87014662b22c2cd58299626c51481cf45dc

Brotli q11, the quality the edge serves. Every number here is deterministic:
an unchanged file produces no row. Advisory — this check fails on nothing.

Client assets

Total Brotli: 193.59 KiB → 194.23 KiB (+0.63 KiB, +0.3%) across 37 files, 5 changed.

file base head Δ
nav.js 5.81 KiB 6.12 KiB +0.31 KiB (+5.3%)
infotip.js 2.40 KiB 2.61 KiB +0.21 KiB (+8.7%)
tooltip.js 2.78 KiB 2.86 KiB +0.08 KiB (+2.9%)
luna.css 7.79 KiB 7.82 KiB +0.03 KiB (+0.4%)
infotip.css 0.67 KiB 0.67 KiB +0.01 KiB (+0.9%)

Pages

Total Brotli: 566.65 KiB → 594.35 KiB (+27.70 KiB, +4.9%) across 70 files, 65 changed.

file base head Δ
garage/encoding.html 13.93 KiB 15.06 KiB +1.13 KiB (+8.1%)
garage/pqc.html 10.63 KiB 11.65 KiB +1.02 KiB (+9.6%)
garage/blueprint.html 8.49 KiB 9.49 KiB +1.00 KiB (+11.8%)
garage/teardown.html 6.70 KiB 7.67 KiB +0.97 KiB (+14.5%)
garage/horizon.html 64.63 KiB 65.60 KiB +0.97 KiB (+1.5%)
garage/wire.html 11.88 KiB 12.84 KiB +0.97 KiB (+8.1%)
garage/resample.html 6.87 KiB 7.79 KiB +0.93 KiB (+13.5%)
garage/chunks.html 6.82 KiB 7.74 KiB +0.92 KiB (+13.5%)
garage/safari27.html 6.47 KiB 7.35 KiB +0.88 KiB (+13.6%)
garage/octane.html 6.45 KiB 7.32 KiB +0.88 KiB (+13.6%)
garage/cloudflare.html 5.48 KiB 6.35 KiB +0.87 KiB (+15.9%)
garage/gpt56.html 5.85 KiB 6.71 KiB +0.86 KiB (+14.7%)
lwe/lean.html 16.64 KiB 17.50 KiB +0.86 KiB (+5.1%)
garage/pretext.html 7.30 KiB 8.15 KiB +0.84 KiB (+11.5%)
garage/useragent.html 11.17 KiB 12.01 KiB +0.84 KiB (+7.5%)
garage/compression.html 6.14 KiB 6.98 KiB +0.84 KiB (+13.6%)
garage/typed-config.html 10.47 KiB 11.30 KiB +0.83 KiB (+7.9%)
garage/htmx.html 6.74 KiB 7.57 KiB +0.83 KiB (+12.3%)
garage/dictionary.html 6.88 KiB 7.70 KiB +0.82 KiB (+11.9%)
garage/workers.html 6.33 KiB 7.12 KiB +0.79 KiB (+12.5%)
… 18 more

Plus 27 files under the 0.13 KiB floor, net +0.02 KiB — usually content-hash churn in /a/ references, counted in the total above.

Worker bundle

268.88 KiB → 268.86 KiB gzip (-0.02 KiB, -0.0%)

Dictionary transport

Family dictionary acquisition: no change, 14.41 KiB q11.

pd/: 344 → 344 deltas, 518.27 KiB → 696.65 KiB (+178.38 KiB).

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

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

oddharsh and others added 4 commits October 6, 2026 15:13
# 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
@oddharsh
oddharsh enabled auto-merge (squash) October 6, 2026 19:19
@oddharsh
oddharsh merged commit a8af9d5 into main Oct 6, 2026
7 checks passed
@oddharsh
oddharsh deleted the claude/term-tips branch October 6, 2026 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hashed-asset Remints an /a/ URL, so every page and page dictionary rebuilds

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant