Skip to content

feat(site): landing links, what's new, shared tokens, CI guardrails - #302

Merged
TMHSDigital merged 5 commits into
mainfrom
feat/site-landing-qol
Sep 27, 2026
Merged

TMHSDigital merged 5 commits into
mainfrom
feat/site-landing-qol

Conversation

@TMHSDigital

@TMHSDigital TMHSDigital commented Sep 27, 2026 •

Copy link
Copy Markdown
Owner

Summary

PR 3 of 3 in the website QoL pass. Merge after #303 (the replacement for #301; #300 is already on main). Retargeted to main so it survives the #303 branch deletion; until #303 lands, this diff also shows #303's changes.

Landing (scripts/site/)

  • Skill names link to their SKILL.md; each skill has a "When to use (N)" disclosure listing its ## Trigger bullets (already parsed, never rendered before). Rule names link to their .mdc.
  • Skills and Rules panels each get a filter box (rendered hidden, revealed by JS; the count reads "N of M"; an empty-state line appears when nothing matches).
  • What's new panel (between Showcase and Skills): the latest release + release-notes/changelog links, and the 6 most recently added examples/showcase pieces dated by the commit that first added each dir. Gallery JSON order is not add order (gn-sim-fountain is newest but not last). A shallow clone returns [] and the panel shows only the release line.
  • Removed: six no-op collapse carets, two inline style= attributes. Blender versions come from a new site.json blender block instead of four hardcoded strings. HUD corners' opacity:0 is gated on html.js. The copy button has an execCommand fallback and a failure state. The showcase CTA uses gallery/#k=showcase.
  • Mobile: long code tokens in skill descriptions no longer widen the 1fr column past the panel (0 overflowing rows at 375px).

Shared tokens

  • scripts/site/tokens.css was a dead fleet leftover (GitHub palette, unused). It is now the single :root palette, included by template.html.j2 and 404.html.j2, and inlined by build_gallery.py (tokens_css()). The gallery's values are byte-identical to before (aliases --surface, --text-dim and --font-sans map onto the shared names). The 404 page's --panel moves from #232428 to the shared #222327.

CI

  • New validate-site job: setup-python, pinned requirements.txt, build the landing page into docs/, then run tests/check_site_links.py.
  • pages.yml: fetch-depth: 0, pip install -r scripts/site/requirements.txt (the pin was previously ignored), and the same link check before upload.
  • tests/check_site_links.py (stdlib): walks docs/index.html, docs/404.html and docs/gallery/**/index.html. It resolves every relative or site-absolute href/src, checks that each #anchor exists on its target page, skips gallery filter-state fragments containing =, and requires alt on every <img>.

Evidence

Proven by live run:

  • check_site_links.py: 91 pages, 2593 internal references, 0 failures.
  • Falsification: in docs/gallery/bmesh-gear/index.html I changed ../driver-wave/ to ../driver-wav/, #run to #runx, and one alt= to data-alt=. Result: exit 1 with 3 failures (missing file, missing id runx, <img> without alt). Restored via regeneration: exit 0.
  • recent_additions() returns gn-sim-fountain, book-trolley, bookshelf, butter-churn, wooden-yoke, apothecary-shelf, which matches the merge history (feat(examples): add gn-sim-fountain #299, feat(showcase): add book-trolley #284, feat(showcase): add bookshelf #283).
  • Playwright at 1440px:
    • The skills filter "bmesh" gives "1 of 16"; "zzzz" shows the empty state; clearing restores "16 loaded".
    • The rules filter "export" leaves 2 rows. There are 16 trigger disclosures and 9 rule links.
    • HUD opacity is 1 after boot. This caught and fixed a specificity bug where html.js .hud-corner outranked .booted .hud-corner.
  • Playwright at 375px: no horizontal overflow, 0 overflowing skill rows.
  • The gallery build is deterministic after the tokens change (two runs, diff -rq clean).

By inspection only: the validate-site and pages.yml changes will first run in CI on this PR once it targets main. The shallow-clone fallback was not exercised live.

🤖 Generated with Claude Code

TMHSDigital and others added 3 commits September 27, 2026 09:19
Detail pages were dead ends: a reader who finished one example had to go
back to the grid to find the next. They now page within their own kind
(prev/next, arrow keys), list their tags as links back to the filtered
index, and end with three related entries chosen by shared topic tags.

Source listings gain a line-number gutter and collapse past 120 lines;
every code block gets a copy button with a non-secure-context fallback
and a visible failure state; README headings get stable anchors.

Card images carry intrinsic dimensions so the grid no longer shifts as
they load, and the lightbox only closes on backdrop, button or Esc --
clicking the image toggles native size instead.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: TMHSDigital <[email protected]>
Showcase pieces were reachable only through a "showcase" topic chip, one
tag could be active at a time, and the grid had one fixed order. The
index now has an All / Examples / Showcase switch, AND-combined topic
chips, and a Gallery order / Name A-Z sort, all mirrored in the URL hash
(k=, tag=a,b, s=). Legacy #tag=showcase links, the landing page's among
them, resolve to the Showcase switch so no inbound link breaks.

Search no longer rewrites the hash on every keystroke, card renders fade
in once decoded, hover gets a restrained zoom that reduced-motion turns
off (replacing a rule that disabled a transform nobody set), focus rings
sit inside segmented controls instead of being clipped, README prose is
capped at a readable measure, and the sticky bar packs tighter on phones.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: TMHSDigital <[email protected]>
The landing page listed skills and rules as bare slugs a reader could not
open, carried six collapse carets that collapsed nothing, and hardcoded
the Blender versions in four places. Skills and rules now link to their
files, each skill shows its trigger list on demand, both panels get a
filter, versions come from site.json, and the HUD corners no longer stay
invisible when scripts are off.

A "What's new" panel shows the latest release and the six most recently
added examples and showcase pieces, dated by the commit that first added
each directory -- gallery JSON order is not add order. Deploy fetches
full history for it; a shallow clone hides the strip rather than lying.

scripts/site/tokens.css was a dead fleet leftover with a GitHub palette
nobody used, while the real palette was hand-copied into three pages.
It is now the single :root both builds inline.

Nothing checked the landing page before it deployed. A validate-site job
builds it and tests/check_site_links.py resolves every internal href,
src and #anchor across all 91 pages and requires alt on every <img>;
the deploy runs the same check, and installs the pinned requirements.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: TMHSDigital <[email protected]>
@github-actions github-actions Bot added documentation Improvements or additions to documentation ci labels Sep 27, 2026
@TMHSDigital
TMHSDigital changed the base branch from feat/gallery-browse-controls to main September 27, 2026 13:41
Signed-off-by: TMHSDigital <[email protected]>

# Conflicts:
#	docs/gallery/anvil/index.html
#	docs/gallery/apothecary-shelf/index.html
#	docs/gallery/armature-bend/index.html
#	docs/gallery/attribute-domain-shear/index.html
#	docs/gallery/bake-normal-high-to-low/index.html
#	docs/gallery/bmesh-gear/index.html
#	docs/gallery/book-trolley/index.html
#	docs/gallery/bookshelf/index.html
#	docs/gallery/brazier/index.html
#	docs/gallery/butter-churn/index.html
#	docs/gallery/campfire/index.html
#	docs/gallery/car-mirror-symmetry/index.html
#	docs/gallery/cart/index.html
#	docs/gallery/chopping-block/index.html
#	docs/gallery/collision-hull-proxy/index.html
#	docs/gallery/color-attribute-wheel/index.html
#	docs/gallery/compositor-glare/index.html
#	docs/gallery/crate-stack/index.html
#	docs/gallery/cross-version-property-delete/index.html
#	docs/gallery/curve-bevel-arc/index.html
#	docs/gallery/custom-normals-shade/index.html
#	docs/gallery/damped-track-aim/index.html
#	docs/gallery/degenerate-bevel-weld/index.html
#	docs/gallery/depsgraph-export/index.html
#	docs/gallery/driver-wave/index.html
#	docs/gallery/export-preset-axis/index.html
#	docs/gallery/fence-kit/index.html
#	docs/gallery/gltf-export-roundtrip/index.html
#	docs/gallery/gltf-skin-roundtrip/index.html
#	docs/gallery/gn-instance-grid/index.html
#	docs/gallery/gn-modifier-inputs/index.html
#	docs/gallery/gn-sdf-remesh/index.html
#	docs/gallery/gn-sim-fountain/index.html
#	docs/gallery/gn-socket-rename/index.html
#	docs/gallery/gn-zone-iterate/index.html
#	docs/gallery/gp-lineart-contour/index.html
#	docs/gallery/grain-sacks/index.html
#	docs/gallery/grease-pencil-rosette/index.html
#	docs/gallery/grindstone/index.html
#	docs/gallery/hand-pump/index.html
#	docs/gallery/hay-bale/index.html
#	docs/gallery/hitching-post/index.html
#	docs/gallery/image-pixels-testcard/index.html
#	docs/gallery/index.html
#	docs/gallery/iron-cauldron/index.html
#	docs/gallery/light-link-studio/index.html
#	docs/gallery/lightmap-uv-channel/index.html
#	docs/gallery/lod-decimate-chain/index.html
#	docs/gallery/market-stall/index.html
#	docs/gallery/mesh-hygiene-audit/index.html
#	docs/gallery/modular-kit-snap/index.html
#	docs/gallery/parent-inverse-orrery/index.html
#	docs/gallery/park-bench/index.html
#	docs/gallery/png-exr-alpha/index.html
#	docs/gallery/prop-origin-transform/index.html
#	docs/gallery/rope-bridge/index.html
#	docs/gallery/shader-node-group/index.html
#	docs/gallery/shape-key-blend/index.html
#	docs/gallery/shipping-crate/index.html
#	docs/gallery/signpost/index.html
#	docs/gallery/sky-texture-sun-elevation/index.html
#	docs/gallery/soccer-ball-goldberg/index.html
#	docs/gallery/socket-attach-points/index.html
#	docs/gallery/stone-archway/index.html
#	docs/gallery/stone-well/index.html
#	docs/gallery/street-lantern/index.html
#	docs/gallery/swatch-grid/index.html
#	docs/gallery/tavern-stool/index.html
#	docs/gallery/temp-override-join/index.html
#	docs/gallery/terrain-scatter/index.html
#	docs/gallery/text-version-stamp/index.html
#	docs/gallery/treasure-chest/index.html
#	docs/gallery/triangulate-tangents/index.html
#	docs/gallery/turntable/index.html
#	docs/gallery/usd-export-evaluation-mode/index.html
#	docs/gallery/uv-layer-grid/index.html
#	docs/gallery/vertex-color-ao/index.html
#	docs/gallery/vertex-weight-limit/index.html
#	docs/gallery/vse-cut-list/index.html
#	docs/gallery/vse-gamma-cross/index.html
#	docs/gallery/wall-torch/index.html
#	docs/gallery/watchtower/index.html
#	docs/gallery/water-trough/index.html
#	docs/gallery/wave-displace/index.html
#	docs/gallery/wheelbarrow/index.html
#	docs/gallery/wooden-barrel/index.html
#	docs/gallery/wooden-bucket/index.html
#	docs/gallery/wooden-ladder/index.html
#	docs/gallery/wooden-yoke/index.html
#	scripts/build_gallery.py
@github-actions github-actions Bot added the examples Runnable smoke-gated examples under examples/ label Sep 27, 2026
@TMHSDigital
TMHSDigital merged commit 70ca92f into main Sep 27, 2026
12 checks passed
@TMHSDigital
TMHSDigital deleted the feat/site-landing-qol branch September 27, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci documentation Improvements or additions to documentation examples Runnable smoke-gated examples under examples/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant