Repository navigation
feat(styles): Tailwind content from an app's import graph, and the stylesheet inside each page CU-17tkuw617h7 - #2855
Merged
Merged
Conversation
…app's import graph appStyleSources (./style-sources) lists the files an App Router app's served routes import, its own and this library's per-module ESM build, tree-shaken, for Tailwind's content: never the whole dist again. firstPaint leaves the lazily loaded chat panel out, and EmbeddableChat's new loadStyles prop loads the host's full stylesheet when the chat starts loading. esbuild moves to dependencies: consumers run the scan. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
Contributor
🦩 Flamingo Code Review✅ No findings on the current head. Advisory: findings do not block the merge.
✅ What this change does well
1 possible problem checked and ruled out, 1 after reading more of the repository
Review again. New commits are not reviewed until you ask:
Or comment Started 2026-10-29 13:18 UTC · updated 2026-10-29 13:19 UTC · workflow run |
…page's HTML and its size gate withInlineStyles turns on Next's inlineCss for any app that uses the library; measureStylesheet and the budget command build the app's stylesheet as its build does and hold its brotli size to a budget. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… arguments Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…onfig measureStylesheet wrote the resolved copy into a temporary folder, so a relative @config (the hub's app/full.css) no longer resolved and Tailwind failed. The copy now sits beside the input and is removed afterwards. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… state the import condition Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
@flamingo-review full |
…build when LAZY_STYLED drifts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
michaelassraf
commented
Oct 29, 2026
…ist; next-styles is a command The walk loads every non-code import as an empty module instead of naming each asset extension. `next-styles budget` is a package bin that finds the app's stylesheet and Tailwind config itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… a stylesheet Google's fonts stylesheet was the page's one blocking request; its @font-face rules now sit in the page's own inline CSS, with the body font preloaded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
michaelassraf
commented
Oct 29, 2026
…m's own fonts The auth server packages openframe-frontend-core's fonts.css and woff2 files (one source, no copy) and the page links them, in place of Google Fonts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
oleksandr-blip
added a commit
that referenced
this pull request
Oct 29, 2026
…0.0.815) into feature/directory-connection-customers. CU-17tkuw5z06b
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
@flamingo-stack/openframe-frontend-core/style-sourcesexportsappStyleSources: the files an App Router app's served routes import (its own and this library's per-module ESM build, tree-shaken like the app's bundle), for Tailwind'scontent. Consumers stop listing this library's wholedist, which put every component's classes in the stylesheet every page blocks on (on the hub, ~299 KB of a 366 KB sheet).routesasks the app which routes the build serves (a dynamic route counts when its static prefix is served).firstPaint: trueleaves the lazily loaded chat panel (LAZY_STYLED) out of the page's sheet.EmbeddableChatgainsloadStyles, called once when the chat's module starts loading, so a host loads its full stylesheet with the chat.esbuildmoves from devDependencies to dependencies: consumers run the scan.Tests
src/__tests__/style-sources.test.ts: route rules and an end-to-end walk on a fixture app.embeddable-chat-loading.test.tsx:loadStylesruns when, and only when, the chat loads.Measured (hub, consuming this through yalc)
No class lost its rule on 36 flamingo pages and 20 openmsp pages (two widths, chat open and closed) or 62 product-hub screens signed in.
Also:
next-styles, the stylesheet inside each page's HTML@flamingo-stack/openframe-frontend-core/next-styles(scripts/next-styles.cjs):withInlineStyles(nextConfig)turns on Next'sexperimental.inlineCss(a config object or a config function). Every route's stylesheet is written into its HTML, the static export included, so a page paints without a second request.measureStylesheet({ root, input, config, env })builds the app's stylesheet the way its build does (Tailwind, minified) and reports raw and brotli bytes. Thebudgetcommand (node .../dist/build/next-styles.cjs budget --input … --config … --budget …) fails past a stated size: every page now carries the sheet, so it has a ceiling.src/__tests__/next-styles.test.ts.Change-Set: refactor-per-page-css
ClickUp task: CU-17tkuw617h7 Refactor all CSS so every page ships only the styles it uses, by default
🤖 Generated with Claude Code
Change set
flamingo-stack/openframe-oss-lib#2855: these pull requests are one change, reviewed together.Linked work
Linked by the
Depends-On/Change-Setlines in these descriptions; this block is maintained by the hub.