Phase 4a — The Blonde in the T-Bird: /tags/{slug} browse
23 JUL AT 10:52 PM

Phase 4a — The Blonde in the T-Bird: /tags/{slug} browse

0 LOVES 0 VIEWS
The search across town: a minimal, real /tags/{slug} page listing every published post carrying the tag — through the block chain, never the legacy edge. First the hard part: tag slugs went unique per site, after de-duping two real collisions. Shipped 2026-06-10.

Curt spends the whole movie chasing the blonde in the white T-Bird — a search with no destination page. Phase 4a builds the destination: a minimal, real public route, /tags/{slug}, listing every published post that carries the tag. Destinations before links — the CEWL Browse action (4b) and the chip links both point here, and Track B expands this same handler rather than replacing it. Nothing throwaway.

The list reads through the block chaintag → block_items → block → post — never the legacy Post.tags M2M, which block-authored tags never populate. Site-scoped, published-only, the same pagination the category listing uses, plus a tag-scoped pagination fragment for infinite scroll.

Slugs went site-unique first

For /tags/{slug} to resolve unambiguously, a slug has to mean one thing per site — so the Tag unique index tightened from (site, group, slug) to (site, slug). A unique-index tighten is not safely additive over duplicate data: auto-migrate would fail if collisions exist. They did — measured across all 582 tags: exactly two CWC collisions, each the same slug in two groups.

  • martini — kept in Cocktail Family; the Brand tag renamed to martini-brand.
  • non-alcoholic — kept in Base Spirit; the Strength tag renamed to non-alcoholic-strength.

Distinct concepts, so rename, never merge — applied in the seed files and as a targeted live fix on dev + dogfood, in strict order: rename the live rows → fix the seeds → regenerate the schema → restart so auto-migrate builds the now-safe unique index.

The route, mirrored not invented

TagPosts() is the category listing's B.V.S.R. skeleton with a tag filter: bind the page request, resolve the tag by (site, slug), filter published PostI18n rows through the block chain, render the same content_posts_list the category page uses — plus a TagHeader naming the tag and its group. The pagination fragment (/fragments/tags/{slug}/posts) mirrors the category fragment for infinite scroll.

Proof: 13 tests — route resolution, unknown slug, foreign-site slug, visibility filtering, block-chain correctness (a legacy-M2M-only post does NOT appear), pagination, fragment — plus a full live smoke. The unknown-slug case renders the friendly empty state, not a 500.

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