Skip to content

refactor: split homepage component boundaries - #1358

Draft
jderochervlk wants to merge 2 commits into
test/homepage-performance-guardrailsfrom
refactor/homepage-components
Draft

jderochervlk wants to merge 2 commits into
test/homepage-performance-guardrailsfrom
refactor/homepage-components

Conversation

@jderochervlk

@jderochervlk jderochervlk commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Context

Make the homepage easier to optimize incrementally by giving each section a focused module and removing eager module work. This is the second PR in #1359 and depends on #1355.

Changes

  • split the seven homepage sections into private ReScript component modules
  • remove the unused MarkdownComponents prop and its homepage dependency edge
  • replace static useState and module-scope JSX with immutable data and render-time elements
  • ratchet the measured homepage budgets after the refactor

Measured impact

  • initial JavaScript requests: 21 to 20
  • initial JavaScript gzip: 284,515 to 279,510 bytes
  • initial CSS: 80,247 to 80,205 raw bytes
  • DOM and media counts unchanged

Raw JavaScript increases by 12,287 bytes because React Router expands its highly compressible generated manifest for the changed chunk graph; transferred gzip size falls by 5,005 bytes overall.

Relates to #1354.


Stack created with GitHub Stacks CLI

@jderochervlk
jderochervlk added this pull request to stack #1359 September 18, 2026 12:03
@jderochervlk jderochervlk changed the title refactor/homepage components refactor: split homepage component boundaries Sep 18, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 18, 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 c8614db Commit Preview URL

Branch Preview URL
Sep 18 2026, 02:20 PM

@jderochervlk

Copy link
Copy Markdown
Collaborator Author

@codex

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 18, 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-18T12:43:32.371671Z de5d1c9 Manual request
ℹ️ 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

Copy link
Copy Markdown

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

Reviewed commit: de5d1c9698

ℹ️ 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".

@github-actions

github-actions Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Lighthouse baseline

Compared with target branch test/homepage-performance-guardrails at commit 542a28f. Scores are the median of 3 runs against the deployed Cloudflare preview.

Category Target Current Change
Performance 83 80 -3
Accessibility 74 74 0
Best practices 100 100 0
SEO 50 50 0

Download the full Lighthouse reports and baseline

Commit 52169e7 · Cloudflare preview

@jderochervlk
jderochervlk force-pushed the refactor/homepage-components branch from 286611d to 5bf43c9 Compare September 18, 2026 13:51
@github-actions

Copy link
Copy Markdown
Contributor

Guide Cloudflare deployment

⛅️ wrangler 4.130.0
────────────────────
🌀 Building list of assets...
✨ Read 17 files from the assets directory /home/runner/work/rescript-lang.org/rescript-lang.org/apps/guide/build/client
🌀 Starting asset upload...
No updated asset files to upload. Proceeding with deployment...
Total Upload: 0.31 KiB / gzip: 0.22 KiB
Worker Startup Time: 0 ms
Uploaded guide (1.47 sec)
Worker Version ID: aee445b8-f049-4d91-8e65-57e3a7a6be56
Version Preview URL: https://aee445b8-guide.rescript.workers.dev
Version Preview Alias URL: https://refactor-homepage-components-guide.rescript.workers.dev

To deploy this version to production traffic use the command wrangler versions deploy

Changes to non-versioned settings (config properties 'logpush' or 'tail_consumers') take effect after your next deployment using the command wrangler versions deploy

Changes to triggers (routes, custom domains, cron schedules, etc) must be applied with the command wrangler triggers deploy

@github-actions

Copy link
Copy Markdown
Contributor

Cloudflare deployment

Deployement ID: 729b4da2-02d5-4a5a-86ac-f2d8348514e3
Deployment Environment: preview

⛅️ wrangler 4.130.0
────────────────────
✨ Compiled Worker successfully
Uploading... (8881/8882)
Uploading... (8882/8882)
✨ Success! Uploaded 1 files (8881 already uploaded) (1.38 sec)

✨ Uploading _redirects
✨ Uploading Functions bundle
🌎 Deploying...
✨ Deployment complete! Take a peek over at https://729b4da2.rescript-lang.pages.dev
✨ Deployment alias URL: https://refactor-homepage-components.rescript-lang.pages.dev

Extract each homepage section into a focused module, remove the unused MarkdownComponents dependency, and avoid eagerly creating static JSX at module initialization.
Record the component-boundary layer's lower initial request count, gzip payload, and CSS size while preserving the observed raw React Router manifest tradeoff.
@github-actions

Copy link
Copy Markdown
Contributor

Docs preview

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