Skip to content

perf(web): keep the app's providers off the marketing site (#1122) - #1327

Merged
athvin merged 1 commit into
mainfrom
fix/1122-marketing-providers
Nov 27, 2026
Merged

athvin merged 1 commit into
mainfrom
fix/1122-marketing-providers

Conversation

@athvin

@athvin athvin commented Nov 27, 2026 •

Copy link
Copy Markdown
Owner

Closes #1122

Post-merge is part of this pull request. The ledger below records whether
the follow-up work actually happened. /land-pr closes it.

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 to AppProviders, which the (tenant)/[org] and (admin)/admin layouts 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 paused failed on all three attempts on fd8c72a3. 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 pinned playwright:v1.63.0-jammy image: 30/30.

  • JS shipped, gzip of the scripts each prerendered page references, same image, pnpm build:

    page main this PR
    / 287 KB 238 KB
    /blog 248 KB 199 KB
    /pricing 261 KB 212 KB
    /product 248 KB 199 KB
  • Every provider consumer is still wrapped. No file under app/(auth), app/(marketing), app/widget, app/app, the root layout or components/marketing imports a useQuery/useMutation/useToast consumer, checked against all 45 consumer files.

  • pnpm check: exit 0. The full functional tier ran locally. Its WebKit mobile-menu failures appear on main too: 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 to fd8c72a3's versions, because main has 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-8809abfc82fe on brians-MacBook-Pro · 2026-11-27T10:46:24Z

  • main is green with this change on it — the merge SHA, and the run
    that 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.
  • images built, or correctly never ran because nothing that goes into
    an image changed: built, run 45983078750 success.
  • deploy converged — proved by a line the running process emitted, not
    by the image digest and not by the workflow conclusion: converged: deploy 45983377220 at 7216054, success; its smoke test logged er-web-preview /api/healthz -> 200 against the new colour.
  • the push-only surface no pull request can pre-test (deploy, drift,
    kind's nightly leg) is green, or knowingly red for a reason that is not
    this 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.
  • the board card reached Done through the automation rather than by
    hand, and the issue closed: Marketing pages load the signed-in app's providers #1122 closed by the merge.
  • follow-ups are open for everything deferred here — numbers: none. The WebKit mobile-menu flake under heavy local load predates this change and is tracked with Frontend gate: WebKit-only marketing flakes (the story/docs axe test, the /docs walkthrough poster) #1281's done-when watch.
  • what was learned is written down where the next session will find it
    (a skill, a reference, memory) — or nothing new was learned: the stale-tree guard needs revert-ok for 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

  • The WebKit shards stay first-attempt clean on main after the merge, with no new mobile-menu (marketing-pages dropdown, 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

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]>
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

The marketing preview was removed because this PR is closed or merged.

@athvin athvin added the revert-ok Deliberate revert or re-land: exempts the stale tree guard label Nov 27, 2026
@athvin
athvin merged commit 7216054 into main Nov 27, 2026
63 of 65 checks passed
@athvin
athvin temporarily deployed to marketing-preview November 27, 2026 10:33 — with GitHub Actions Inactive
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

1 inactive deployment
marketing-preview — ba81db42 Deployed Nov 27, 2026 by athvin via remove closed PR previews #109
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

revert-ok Deliberate revert or re-land: exempts the stale tree guard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Marketing pages load the signed-in app's providers

2 participants