Phase 3 — Cruising the Strip: kontent in-body render
23 JUL AT 10:52 PM

Phase 3 — Cruising the Strip: kontent in-body render

0 LOVES 1 VIEWS
Seen on the boulevard: the tag block renders on the public post — compact grey chips, group-only path (Origin › Nicaragua). One eager-load, one partial, one dispatch line, the mockup CSS lifted verbatim. Shipped 2026-06-10.

Cruising is the point of the strip: being seen. Phase 2 let editors build tag blocks; Phase 3 puts them on the boulevard — the public kontent post view renders each one as a compact wrapping row of grey chips, every chip carrying the group-only path: Origin › Nicaragua, Wrapper › Maduro. A deliberately small, deterministic phase: one read-path eager-load, one display partial, one dispatch line, and the mockup's CSS lifted verbatim. No schema change, no mutation, no cache work.

The chips, as designed

Kontent mockup: a post detail page with a Tags block of grey group-only chips like Wrapper > Maduro and Origin > Nicaragua

The locked mockup, rendered with the live kontent CSS: the Tags block under the post body — compact grey chips, group-only path, wrapping row. The markup and CSS shipped verbatim from this design.

The read contract, web half

GetPostDetail is the only path that loads content blocks — so one eager-load covers everything: tag_items (ordered) → tag → group. Drafts render through the same method for logged-in editors, so they get the chips for free; preview tokens were already dead code. The partial renders plain <span> chips — group facet, then name — with Go-template auto-escaping doing the XSS work.

Two notes from later in the program: the standalone partial was subsequently inlined into the post-detail dispatch so the chips could become BasePath links (no generic-map helper, per CLAUDE.md), and those links shipped early once /tags/{slug} existed — the render itself never changed, only where it lives and where it points.

The safety rails

  • One dispatch line at a no-default point. The per-block type dispatch is an if/else-if chain with no else — the classic silent-miss. The tag case was added under the maximum-safety checklist: a render-assert test proves chips actually emit, not just that the code compiles.
  • The empty-block guard. Heading and divider render before the type dispatch, so a zero-item block would leave chrome floating over nothing. The partial guards on items — and the FK chain makes a truly empty tag block unreachable anyway.
  • Hidden handling came free. The generic wrapper already skips hidden blocks for the public and wraps them for editors; tag inherited it with zero work.
  • Proof: the render-assert matrix (chips render · order respected · group facet correct · hidden respected · zero-item safe) plus a live kontent smoke. Cache was a non-issue — kontent HTML is uncached.
American Graffiti — Tags as a Content Block (master)
American Graffiti — Tags as a Content Block (master)
Jul 23, 2026 American Graffiti
← Back to American Graffiti