Repository navigation
perf(web): keep the app's providers off the marketing site - #1123
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]>
7 tasks
danielgerhart
added a commit
that referenced
this pull request
Nov 20, 2026
…1123)" (#1124) This reverts commit fd8c72a. On main it fails the desktop-chromium "audit holds its clock while paused" test on every attempt (run 44837410412); that test passed on main before the merge and on every other recent merge, so the change is the likely cause. One diagnosis pass did not produce an obvious fix, so per land-pr this reverts rather than leaving main red. The speed fix will be re-landed with a root cause. Co-authored-by: Claude Opus 5.5 <[email protected]>
8 tasks done
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
The root layout keeps only the theme provider; React Query, the toaster and BFF error handling move to
AppProviders, mounted by the(tenant)/[org]and(admin)/adminlayouts around their shells.Why
Marketing pages downloaded the signed-in app's machinery. Production build, gzip: /blog, /product, /features/review 247 → 198 KB; / 278 → 229; /pricing 257 → 208. The remaining ~150 KB is React and the Next runtime.
Proof
tsc,eslintclean;next buildsucceeds; sizes above measured from the build's own chunks. EveryuseQuery/useToastconsumer is under the two wrapped layouts (login, reset, invite and the widget use neither). Full unit, component and Playwright tiers run in CI.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:
git revert <merge-sha>.Post-merge ledger
Closed by: agent · session
Claude Code:3e3bc06b-d81e-4190-ac2b-57548484e1b3on6384b48a4e71· 2026-11-21T00:05:39Z — reverted by #1124 (99b0d1a9).mainis 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: blocked — merge
fd8c72a3turnedfrontendred (run 44837410412: desktop-chromiumaudit holds its clock while pausedfailed all three attempts). Reverted by Revert "perf(web): keep the app's providers off the marketing site (#1123)" #1124; main green again on99b0d1a9(frontend 44840266590 success).imagesbuilt, or correctly never ran because nothing that goes intoan image changed: images built for
fd8c72a3; superseded by the revert.deployconverged — proved by a line the running process emitted, notby the image digest and not by the workflow conclusion: deploy 44837596912 success; the live site served 198 KB gzip JS on /blog and /product (was 247) until the revert deployed (deploy 44840462339).
deploy,drift,kind's nightly leg) is green, or knowingly red for a reason that is notthis change: blocked — change reverted before the nightly legs ran.
Donethrough the automation rather than byhand, and the issue closed: Marketing pages load the signed-in app's providers #1122 reopened after the revert; it tracks the re-land.
(a skill, a reference, memory) — or nothing new was learned: recorded here: the audit lock test is timing-sensitive; re-landing needs a local browser run of
marketing-interactions.spec.tsbefore merge.Specific to this change
Context — plan, discoveries, measurements, files
Plan
Discoveries
Measurements
Files
🤖 Generated with Claude Code