Skip to content

fix: read breakpoint via cached GetBreakpoint partial instead of page Scratch (render-once D3)#2037

Merged
markdumay merged 1 commit into
mainfrom
perf/render-once-d3-breakpoint-descratch
Jul 16, 2026
Merged

fix: read breakpoint via cached GetBreakpoint partial instead of page Scratch (render-once D3)#2037
markdumay merged 1 commit into
mainfrom
perf/render-once-d3-breakpoint-descratch

Conversation

@markdumay

Copy link
Copy Markdown
Collaborator

Render-once program — slice D3 (HELD for maintainer review)

Part of the Hinode render-once implementation program (design:
gethinode.com docs/superpowers/specs/2026-07-15-content-render-once-design.md, §4.1/§6-D3).

Changes

All 10 readers of Scratch.Get "breakpoint" now call
partialCached "utilities/GetBreakpoint.html" site directly (single, list, tags/list,
header, docs/header, docs/all, minimal/header, page/taxonomy-tag, assets/links,
assets/breadcrumb). GetBreakpoint is a pure function of site.Params.main.breakpoint, so the
cached call is context-free; cache behavior is identical (one entry per language). The seed at
baseof.html:24 stays until D9 (mod-blocks ≤ current release still reads the Scratch key).

Gate evidence (byte-diff, exampleSite @ 50b5612, hugo v0.164.0)

  • Stock ×2 + candidate ×2: 0 ERROR, 98/26/24 pages, WARN set byte-identical.
  • Run-vs-run: clean on both sides (allowlisted RSS files only).
  • Candidate-vs-stock: allowlist plus one deliberate diff, accepted by the maintainer
    (2026-07-16): en/docs/components/breadcrumb/index.html — two attribute values change from the
    malformed d--none/d--block (stock deterministically hits the documented breakpoint-Scratch
    bug when the breadcrumb demo renders a foreign page via .Site.GetPage) to the correct
    d-sm-none/d-sm-block. This PR fixes that bug at the source; grep -rl 'd--none' over the
    candidate output is empty.
  • pnpm test clean.

🤖 Generated with Claude Code

… Scratch

All ten readers of the baseof-seeded Scratch key 'breakpoint' now call
partialCached "utilities/GetBreakpoint.html" site directly. The partial is a
pure function of site.Params.main.breakpoint and never reads its context, so
the shared per-language cache entry is unchanged. This removes the render-
context timing dependency in content-reachable partials (assets/links.html,
assets/breadcrumb.html) and fixes the malformed 'd--none' class emitted when
the breadcrumb shortcode resolves a foreign page via its 'path' argument.
The seed at baseof.html:24 stays until mod-blocks stops reading the key.

Part of the render-once program (slice D3).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@netlify

netlify Bot commented Jul 16, 2026

Copy link
Copy Markdown

Deploy Preview for gethinode-demo ready!

Name Link
🔨 Latest commit f7e23ad
🔍 Latest deploy log https://app.netlify.com/projects/gethinode-demo/deploys/6a589224e825a10008ee8345
😎 Deploy Preview https://deploy-preview-2037--gethinode-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@markdumay
markdumay merged commit 1bfdcc9 into main Jul 16, 2026
16 checks passed
@markdumay

Copy link
Copy Markdown
Collaborator Author

🎉 This PR is included in version 3.2.8 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@markdumay
markdumay deleted the perf/render-once-d3-breakpoint-descratch branch July 16, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant