Skip to content

perf(homepage): load syntax grammars at content boundaries [Codex] - #1365

Open
jderochervlk wants to merge 4 commits into
perf/prerender-homepage-highlightingfrom
perf/content-highlighting-boundary
Open

jderochervlk wants to merge 4 commits into
perf/prerender-homepage-highlightingfrom
perf/content-highlighting-boundary

Conversation

@jderochervlk

@jderochervlk jderochervlk commented Sep 19, 2026

Copy link
Copy Markdown
Collaborator

The homepage renders prehighlighted examples, but the shared root still downloads Highlight.js and every content grammar. This layer in #1354 moves those runtime imports out of the homepage graph.

A pathless content layout registers the existing languages before documentation, blog, community, and package routes render. The lazy playground registers only JavaScript through the shared package, so direct visits keep highlighted compiler output without relying on an earlier documentation visit. Both boundaries preserve existing language aliases and avoid effects, loaders, and extra DOM.

Initial homepage JavaScript drops from 161,623 to 143,792 gzipped bytes in the production asset report. CSS and DOM counts are unchanged. Builds on #1364.

@jderochervlk
jderochervlk added this pull request to stack #1359 September 19, 2026 18:18
@jderochervlk jderochervlk changed the title perf(homepage): scope syntax grammars to content routes perf(homepage): load syntax grammars at content boundaries [Codex] Sep 19, 2026
@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 f4c30a5 Commit Preview URL

Branch Preview URL
Sep 20 2026, 02:45 PM

@github-actions

github-actions Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Lighthouse baseline

Compared with target branch perf/prerender-homepage-highlighting at commit 6019f95. Scores are the median of 3 runs against the deployed Cloudflare preview.

Category Target Current Change
Performance 87 88 +1
Accessibility 74 74 0
Best practices 100 100 0
SEO 50 50 0

Download the full Lighthouse reports and baseline

Commit 59b3ead · Cloudflare preview

@jderochervlk
jderochervlk marked this pull request as ready for review September 19, 2026 18:28
@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:12:26.353067Z f4c30a5 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: f78be30277

ℹ️ 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/src/common/ContentHighlighting.res Outdated
@jderochervlk

Copy link
Copy Markdown
Collaborator Author

@codex

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 1fc62813fb

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

Remove runtime grammar registration from the shared root. Register content languages at a pathless layout boundary and JavaScript at the lazy playground boundary, with cold-navigation and direct-load coverage.
Keep syntax-runtime bundle exclusion and direct/cold-navigation JSON highlighting coverage for PR #1355 comment 4054821928.
Load the existing YAML grammar at the content boundary and verify YAML/yml aliases and installation-example highlighting. This removes application console errors exposed by the strict Cypress navigation tests.
Keep npm language imports in the dedicated Highlight.js binding module and leave content highlighting responsible only for registration policy.
@github-actions

Copy link
Copy Markdown
Contributor

Docs preview

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