Skip to content

perf(homepage): split CSS by route group [Codex] - #1367

Open
jderochervlk wants to merge 6 commits into
perf/homepage-responsive-imagesfrom
perf/route-css-boundaries
Open

jderochervlk wants to merge 6 commits into
perf/homepage-responsive-imagesfrom
perf/route-css-boundaries

Conversation

@jderochervlk

@jderochervlk jderochervlk commented Sep 19, 2026

Copy link
Copy Markdown
Collaborator

Continue #1354 on top of #1366 by keeping documentation and playground styles out of the initial homepage stylesheet. Tailwind source detection is explicit for each route group; a wrapper-free homepage layout and the existing content/playground routes own their stylesheet links.

Fonts, preflight and custom theme tokens remain shared. Default Tailwind values are inlined so route-only utilities do not depend on unused root tokens. Each route includes the shared navbar utility sources to preserve responsive cascade ordering. Documentation prefetch now starts on hover or focus intent instead of immediately entering the viewport.

Remove the legacy document-wide opacity gate and rely on normal head stylesheet blocking. Server-rendered content stays readable if the shared stylesheet fails, and homepage paragraphs render with fallback fonts without JavaScript.

Initial CSS falls from 71,764 to 45,161 raw bytes and from 13,099 to 10,362 gzip bytes. The route boundary adds one JavaScript request, one stylesheet request and 241 gzip bytes of JavaScript; the 415-element homepage DOM is unchanged. Lighthouse remains informational, with no score threshold.

@jderochervlk
jderochervlk added this pull request to stack #1359 September 19, 2026 19:10
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 19, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
guide 9604ead Commit Preview URL

Branch Preview URL
Sep 20 2026, 02:45 PM

@jderochervlk jderochervlk changed the title perf(homepage): load CSS by route group perf(homepage): split CSS by route group [Codex] Sep 19, 2026
@github-actions

github-actions Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Lighthouse baseline

Compared with target branch perf/homepage-responsive-images at commit 0a3deea. Scores are the median of 3 runs against the deployed Cloudflare preview.

Category Target Current Change
Performance 86 84 -2
Accessibility 80 80 0
Best practices 100 100 0
SEO 58 58 0

Download the full Lighthouse reports and baseline

Commit 919941c · Cloudflare preview

@jderochervlk
jderochervlk marked this pull request as ready for review September 19, 2026 19:20
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 19, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-20T16:22:50.595263Z 9604ead Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3c5e8546e6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/docs/styles/homepage.css

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b209ae3cb3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/docs/styles/_theme.css
@jderochervlk

Copy link
Copy Markdown
Collaborator Author

@codex

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 2c309ca345

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Keep fonts, preflight and custom tokens shared while loading homepage, content and playground utilities through route links. Preserve responsive cascade ordering with shared shell sources, and prefetch documentation only on navigation intent.

Reduce initial CSS from 71,764 to 45,176 raw bytes and from 13,099 to 10,366 gzip bytes. Record the deliberate additional stylesheet and 252-byte gzip route-module overhead. Cover cold routes, navigation, fonts, prefetch and playground themes without changing visual baselines.
Let head stylesheet links handle render blocking without hiding the entire document. Keep fallback content readable when fonts or shared CSS fail, and assert real applied styles in navigation coverage.
Preserve route stylesheet isolation, typography, navigation, foundation deduplication, and readable prerendered content without app hydration or available fonts/styles. Addresses PR #1355 comment 4054821928.
Include src/components/LandingPage modules in homepage utilities and exclude them from content utilities. Add emitted-CSS assertions covering the misplaced layout classes without changing component locations.
Point contributors to the route-shared Tailwind token and utility file introduced by the CSS boundary split.
Move the no-hydration and route stylesheet coverage into typed ReScript specs. Restrict the homepage Cypress config to generated .cy.jsx specs now that the JavaScript tests are gone.
@github-actions

Copy link
Copy Markdown
Contributor

Docs preview

@jderochervlk
jderochervlk marked this pull request as ready for review September 20, 2026 16:18
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