perf: lazy-load settings page content to reduce first-load JS (#952)#955
Conversation
Co-authored-by: Ona <no-reply@ona.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Reviewed the diff — clean code-splitting refactor following the established Merging. |
|
✅ UI verification passed — design spec compliance confirmed. Summary:
|
|
✅ Post-merge verification passed. Settings page targeted smoke test (affected area):
Ad-hoc smoke tests:
E2E suite against production (304 passed, 19 failed, 14 did not run):
Skipped:
No interaction smoke test needed — this is a |
Closes #952
What
Applies the same "thin client wrapper +
next/dynamic" pattern already used by the workspace home and members pages to the settings page. This movesWorkspaceSettingsForm,ChangePasswordSection, andDangerZoneSettingsout of the settings route's first-load JS bundle.How
settings-page-client.tsx— thin"use client"wrapper that dynamically importsSettingsPageContent.settings-page-content.tsx— contains the settings page layout (heading, form, change password, danger zone). Additionally lazy-loadsChangePasswordSectionandDangerZoneSettingsvianext/dynamicsince they're conditional (personal workspace only).settings/page.tsx— simplified server component that fetches data and rendersSettingsPageClient.Bundle size results
/[workspaceSlug]/settings/[workspaceSlug]/settings/members/[workspaceSlug]All three routes are now well under the 200kB gzipped budget.
Testing
pnpm lint— 0 errors (pre-existing warnings only)pnpm typecheck— cleanpnpm test— 1818 tests passed (133 files)pnpm test:e2e— workspace-settings E2E: 2/3 passed; 1 pre-existing flaky failure (delete non-personal workspace with confirmation) confirmed on main