Skip to content

perf(homepage): load DocSearch on demand [Codex] - #1363

Open
jderochervlk wants to merge 6 commits into
refactor/homepage-interactionsfrom
perf/lazy-docsearch
Open

jderochervlk wants to merge 6 commits into
refactor/homepage-interactionsfrom
perf/lazy-docsearch

Conversation

@jderochervlk

@jderochervlk jderochervlk commented Sep 19, 2026

Copy link
Copy Markdown
Collaborator

Search currently contributes its modal, result rendering, analytics, and styling to every initial homepage load. This layer of #1354 moves those dependencies behind search activation.

The search button and shortcuts remain immediately available. A small loading/error boundary supports closing pending or failed downloads, restores focus, and preserves search-result navigation. The modal stylesheet loads with its component; the unused global utilities stylesheet is removed.

Initial compressed JavaScript falls from 273,627 to 164,222 bytes (40%), and CSS from 14,906 to 13,086 bytes (12%). Vite extracts three additional shared JavaScript chunks, increasing initial JS requests from 20 to 23; CSS requests fall from three to two. The asset budgets record these exact measured tradeoffs, with the homepage DOM unchanged at 409 elements.

Stacked on #1362. Lighthouse remains informational and compares the deployed preview with its target branch.

@jderochervlk
jderochervlk added this pull request to stack #1359 September 19, 2026 17:47
@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 dfbf20e Commit Preview URL

Branch Preview URL
Sep 20 2026, 02:45 PM

@jderochervlk jderochervlk changed the title perf(homepage): load DocSearch on demand perf(homepage): load DocSearch on demand [Codex] Sep 19, 2026
@github-actions

github-actions Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Lighthouse baseline

Compared with target branch refactor/homepage-interactions at commit 404bcde. Scores are the median of 3 runs against the deployed Cloudflare preview.

Category Target Current Change
Performance 79 87 +8
Accessibility 74 74 0
Best practices 100 100 0
SEO 50 50 0

Download the full Lighthouse reports and baseline

Commit 7875b5b · Cloudflare preview

@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:04:55.448473Z dfbf20e 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.

@jderochervlk
jderochervlk marked this pull request as draft September 19, 2026 23:02
@jderochervlk

Copy link
Copy Markdown
Collaborator Author

@codex

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 9e8f73d4c6

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

Defer search implementation, insights, and CSS until activation while preserving keyboard navigation, focus restoration, and error recovery. Cover the production loading boundaries and record the lower initial asset byte budgets with three additional shared JavaScript requests.
Keep asset, keyboard, result navigation, pending cancellation, and failed-chunk recovery assertions. Accept only the explicitly expected lazy-import console error. Addresses PR #1355 comment 4054821928.
Return a deterministic empty search response for the keyboard-only Cypress scenario and await it before closing the modal. Keep uncaught errors fatal and all interaction assertions unchanged.
Use the supported Array.join API under warning-as-error compilation.
The lazy search flow can navigate from the homepage to documentation containing YAML fences before the later highlighting-boundary refactor. Register the existing YAML grammar at the current root boundary so this PR and its immediate descendant remain independently valid.
Replace the JavaScript search spec and fixture with typed ReScript, parsed JSON fixtures, and shared ReScript helpers.
@github-actions

Copy link
Copy Markdown
Contributor

Docs preview

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