Repository navigation
perf(web): keep the app's providers off the marketing site (#1122) - #1327
Merged
Merged
Conversation
The root layout wrapped every page in React Query, the toaster and BFF error handling, so a static blog post shipped 247 KB gzip of JavaScript. The root keeps only the theme provider; AppProviders wraps the tenant and admin shells. Measured on a production build: /blog, /product and /features/review 247 -> 198 KB gzip, / 278 -> 229, /pricing 257 -> 208. What remains is mostly React and the Next runtime (~150 KB). Closes 1122 Co-authored-by: Claude Opus 5.5 <[email protected]>
Contributor
|
The marketing preview was removed because this PR is closed or merged. |
athvin
temporarily deployed
to
marketing-preview
November 27, 2026 10:33 — with
GitHub Actions
Inactive
8 tasks done
athvin
added a commit
that referenced
this pull request
Nov 27, 2026
The guard has reported on 14 pull-request runs: 11 passes with no false positive, one true finding (#1327's deliberate re-land, exempted by revert-ok), and two failures on branches cut before its script existed. The skill section and the workflow header now say it is required; branch protection gains the context once this merges. Co-authored-by: bmoore813 <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This branch was previously deployed
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.
Closes #1122
What
This re-lands #1123, which #1124 reverted, rebased onto today's
main. The root layout keeps only the theme provider. React Query, the toaster and BFF error handling move toAppProviders, which the(tenant)/[org]and(admin)/adminlayouts mount.Why
Every marketing page downloads the signed-in app's providers. #1124 reverted the first landing because desktop-chromium
audit holds its clock while pausedfailed on all three attempts onfd8c72a3. That test has since been rewritten (the audit film moved on, #1297/#1298), and it now passes against this change.Proof
The test behind the revert:
audit holds its clock while paused, waits for the call, and plays through, desktop-chromium ×30 in the pinnedplaywright:v1.63.0-jammyimage: 30/30.JS shipped, gzip of the scripts each prerendered page references, same image,
pnpm build:main//blog/pricing/productEvery provider consumer is still wrapped. No file under
app/(auth),app/(marketing),app/widget,app/app, the root layout orcomponents/marketingimports auseQuery/useMutation/useToastconsumer, checked against all 45 consumer files.pnpm check: exit 0. The full functional tier ran locally. Its WebKit mobile-menu failures appear onmaintoo: the URL commits late while WebKit's frame clock stalls under container CPU load, with 5–8 frames in the 5 s after the click. CI's WebKit shards, rerun on this PR, are the arbiter; see the ledger.revert-ok: this undoes the revert #1124 on purpose. The stale-tree guard rightly reports that all four files return tofd8c72a3's versions, becausemainhas not touched them since.Risk & rollback
A page outside the two app layouts that starts using React Query or toasts would throw for a missing provider. CI's app tiers cover today's pages. Rollback is
git revert <merge-sha>.Post-merge ledger
Closed by: agent · session
Claude Code:871c2645-29b1-4996-bd69-8809abfc82feonbrians-MacBook-Pro· 2026-11-27T10:46:24Zmainis green with this change on it — the merge SHA, and the runthat proves it. A later head SHA with this commit as an ancestor counts;
a cancelled run with zero jobs does not: 7216054: rust 45983078751, frontend 45983078667, images 45983078750, infra 45983078656, devcontainer 45983078729, marketing preview 45983078709, all success.
imagesbuilt, or correctly never ran because nothing that goes intoan image changed: built, run 45983078750 success.
deployconverged — proved by a line the running process emitted, notby the image digest and not by the workflow conclusion: converged: deploy 45983377220 at 7216054, success; its smoke test logged
er-web-preview /api/healthz -> 200against the new colour.deploy,drift,kind's nightly leg) is green, or knowingly red for a reason that is notthis change: deploy green. drift is red on The er-alerts SNS email subscription has never been confirmed — 19 armed alarms reach nobody #1107's unconfirmed SNS subscriber, not this change. kind is scheduled only, and this frontend-only change does not touch it.
Donethrough the automation rather than byhand, and the issue closed: Marketing pages load the signed-in app's providers #1122 closed by the merge.
(a skill, a reference, memory) — or nothing new was learned: the stale-tree guard needs
revert-okfor a deliberate re-land, so I created the label, and chore(ci): make stale tree guard a required check (#1318) #1328 records it in the CI skill.Specific to this change
mainafter the merge, with no new mobile-menu (marketing-pagesdropdown,Pricing is in the main navigation) flakes. frontend 45983078667 on 7216054: webkit shards clean on the first attempt, with no mobile-menu flakes.🤖 Generated with Claude Code