feat: self-building widget shell with single-source theming - #86
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
adamstankiewicz
marked this pull request as ready for review
August 30, 2026 18:03
If the Vercel preview serves /widget-shell.html despite it being absent from git, output collection happens after the build command — and the committed artifact, the manual mcp:build step, and the CI staleness guard can all be deleted in favor of the build building the shell. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
mcp/shell.css imports the app's own globals.css and owns the few things next/font would have provided (every --font-* variable gets a real fallback stack — including the serif the warm-minimal branch needs — plus host transparency). build.mjs compiles it with the Tailwind CLI instead of lifting chunks out of .next, which: - breaks the circular next-build dependency, so the shell runs as predev/prebuild and is never committed (gitignored) or manually rebuilt, - is deterministic by construction — next/font never runs here, so there is no @font-face to strip and nothing environment-dependent to guard, - single-sources theming: a retheme of globals.css lands in the shell automatically, - and drops 20KB of CSS that was never reachable. Verified: builds in ~90ms with no .next present; two consecutive builds byte-identical; zero url() references; theme tokens, dark block, and focus styles present; full pnpm build green end-to-end. Supersedes the committed-artifact staleness guard (#73's CI step) once both merge — a build product can't go stale. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
adamstankiewicz
force-pushed
the
chore/shell-selfbuild
branch
from
August 30, 2026 18:09
d1410e2 to
a5a75e7
Compare
9 tasks
This was referenced Aug 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
The widget shell builds itself, themed from one source.
mcp/shell.cssimports the app's ownglobals.css— a retheme lands in the shell automatically — and defines the few thingsnext/fontwould have (every--font-*gets a real fallback stack, including the serif #77 needs).build.mjscompiles it with the Tailwind CLI, breaking the circular dependency on a finishednext build: the shell runs aspredev/prebuild, is gitignored, and cannot go stale because it cannot be forgotten.Deletes, in one move: the committed 860KB artifact, the manual
pnpm mcp:buildstep, the CI staleness guard (#73, closed as superseded), the@font-facedeterminism strip, and the hand-written font-override template block that had already drifted.Type of change
Breaking or contract changes
None on the wire — the served shell is byte-equivalent in behavior. Contributor-facing:
pnpm mcp:buildstill exists as an alias but nobody needs it;public/widget-shell.htmlleaves git.How it was verified
.nextpresent (independence proven, not claimed)url()references; tokens, dark block, and focus styles present in compiled CSSrm -rf .next && npx tsc --noEmit, fullpnpm build(prebuild → next build) greenpnpm test— 29/29 after rebasing onto the merged stack--card,--primary), utilities apply (card background/radius/padding, textarea border, meter track), fonts land on the intended system stack, zero console errorsAuthorship
package.json/pnpm-lock.yamlchanges are the feature's own dependency (@tailwindcss/cli) plus the script rewiring🤖 Generated with Claude Code