Skip to content

refactor(website): substrate migration batch 6b — remaining routes off inline styles - #857

Merged
blove merged 4 commits into
mainfrom
blove/style-substrate-batch-6b
Aug 29, 2026
Merged

refactor(website): substrate migration batch 6b — remaining routes off inline styles#857
blove merged 4 commits into
mainfrom
blove/style-substrate-batch-6b

Conversation

@blove

@blove blove commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

What

Batch 6b — the final migration batch (plan, Task 6b): the remaining 16 app/** routes move to src/styles/pages.css. After this PR, the only inline style={{}} left in apps/website/src is exactly the plan's completion definition: the two Satori OG-image files (inline-only by design), the dev-only primitives route, custom-property escape hatches, and documented unbounded-prop dynamics.

The bug the harness caught — and the tool bug that almost hid it

Three rules transcribed tokens.typography.h3.family as var(--font-garamond). h3 is Inter 600 in this type scale; only h1/h2 are Garamond. The per-page production signature comparison caught it precisely: /solutions, /solutions/[slug], and /pilot-to-prod each mismatched on exactly their card-title elements (3 of 92 elements on /solutions — same hash, same position in each card).

Why the text checker missed it: its token-path regex excluded digits, so every h1/h2/h3 path was unresolvable and triaged as a documented false positive — the tool's known blind spot masked a real defect of the same shape. This PR fixes both checker bugs (digit regex + asymmetric quote-strip); the full-branch run drops from ~50 flags to 7, all genuinely opaque shapes, and every font-family now resolves and matches.

Verified: 15 pages signature-identical to production

/, /langgraph, /ag-ui, /render, /chat, /pricing, /blog, /contact, /solutions, /solutions/customer-support, /pilot-to-prod, /about, /thanks, a blog post, and the 404 page — each hashed element-by-element (element count + tag order + 26 computed properties per element, pinned 1280×900) against the live site. All identical after the fix. The homepage required settling past the hero clip's lazy mount; dev and prod converge to the same settled signature.

Plus nx test website fully green (347), 0 lint errors, prod build green (294 pages).

Excluded, restated

opengraph-image.tsx ×2 (Satori — inline styles are the only mechanism), dev/primitives (slated for deletion), emails/**.

🤖 Generated with Claude Code

blove and others added 4 commits August 29, 2026 15:58
Batch 6b commit 1/3: solutions/[slug], pilot-to-prod, about, and the
solutions index move their static presentation into src/styles/pages.css
as page-prefixed classes (.sol-page-*, .sol-index-*, .pilot-*, .about-*).
Values move verbatim; the per-solution accent color (an unbounded prop)
stays inline as style={{ color: accent }} split from the static
declarations that used to share its object. Architecture's role paragraph
(marginBottom: href ? 16 : 0) becomes a bounded className switch
(.sol-page-role / .sol-page-role-linked), same shape as batch 6a's
.docs-index-cta / .docs-index-cta-block. Raw font-stack values
(fontSerif/fontSans/fontMono) stay verbatim literals per the FONT
EXCEPTION; sites already on a `.family` value use the var.
Batch 6b commit 2/3: render, chat, ag-ui, and langgraph landing pages
move their static presentation into src/styles/pages.css as
page-prefixed classes (.render-page-*, .chat-page-*, .ag-ui-page-*,
.langgraph-page-*). Values move verbatim, including the raw code-block
literals (hex colors, JetBrains Mono stack) that were never token-backed.
Each page keeps its own class set even where hero shapes are identical
across pages, matching the per-page-file scoping used elsewhere in this
batch.
Batch 6b commit 3/3 — final commit of the inline-style substrate
migration: blog index, blog post, thanks, error boundary, pricing, home,
contact, and not-found move their static presentation into
src/styles/pages.css as page-prefixed classes (.blog-index-*,
.blog-post-*, .thanks-*, .error-page-*, .pricing-page-*, .home-*,
.contact-page-*, .nf-*). Values move verbatim; error.tsx keeps its
'use client' directive (it is a client-only error boundary). Duplicate
inline `<code>` styles (thanks, home) collapse onto one shared class per
page since they were byte-identical style objects.

This closes out app/** — every route file in apps/website/src/app is now
off inline style props except the two Satori opengraph-image.tsx files
and the dev-only dev/primitives/page.tsx, both excluded per the migration
plan.
…er bugs that hid it

Three 6b rules transcribed tokens.typography.h3.family as var(--font-garamond).
h3 is Inter 600 in this type scale; only h1/h2 are Garamond. Caught by the
per-page production signature comparison: /solutions, /solutions/[slug], and
/pilot-to-prod each mismatched on exactly the card-title elements.

The reason the text checker missed it: its token-path regex excluded digits,
so every h1/h2/h3 path was unresolvable and got triaged as a known false
positive - the tool's documented blind spot masked a real defect of the same
shape. Fixed the regex ([a-zA-Z.] -> [a-zA-Z0-9.]) and the asymmetric
quote-strip that mangled internally-quoted font stacks. With both fixes the
full-branch run drops from ~50 flags to 7, all genuinely opaque shapes, and
every font-family now resolves and matches.

After the fix all 15 verified pages hash-identical to production.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@blove
blove enabled auto-merge (squash) August 29, 2026 23:17
@vercel

vercel Bot commented Aug 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
threadplane Ready Ready Preview Aug 29, 2026 11:20pm

Request Review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated approval: this PR received an intelligent (AI) code review. See the review comments on this PR.

@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Claude finished @blove's task in 0s —— View job


I'll analyze this and get back to you.

@blove
blove merged commit bb95afc into main Aug 29, 2026
24 checks passed
blove added a commit that referenced this pull request Aug 29, 2026
Lands only now that all seven migration batches (#848-#857) are merged, so it
never sees legacy code. Flags identifier-keyed members of a style object
literal in apps/website/src; the style={{ '--x': value }} escape hatch uses
string-literal keys and passes. Excluded: the two Satori OG-image files
(inline-only by design - note the [slug] segment must be matched by wildcard,
brackets are a glob character class), the dev-only primitives route, and specs.

Verified with raw eslint: fires on an identifier-key probe, silent on a
custom-property probe, zero hits on the OG file. Baseline is 18 warnings -
exactly the documented dynamic-value sites from the batch reports - and 0
errors, so CI (which fails on errors only) stays green. Ships as 'warn'; the
escalation to 'error' is a deliberate follow-up one release later.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant