Skip to content

feat(FR-2521): add Suspense skeleton fallback to lazy-loaded pages#6596

Merged
graphite-app[bot] merged 1 commit intomainfrom
04-10-feat_fr-2521_add_suspense_skeleton_fallback_to_15_lazy-loaded_pages
Apr 13, 2026
Merged

feat(FR-2521): add Suspense skeleton fallback to lazy-loaded pages#6596
graphite-app[bot] merged 1 commit intomainfrom
04-10-feat_fr-2521_add_suspense_skeleton_fallback_to_15_lazy-loaded_pages

Conversation

@yomybaby
Copy link
Copy Markdown
Member

@yomybaby yomybaby commented Apr 10, 2026

Resolves #6595(FR-2521)

Summary

  • Wrap all 20 lazy-loaded pages in routes.tsx with <Suspense fallback={<Skeleton active />}> that were missing loading indicators
  • Users now see an in-place skeleton instead of a blank screen during code-split chunk loading
  • Consistent with the pattern already used by DashboardPage, ComputeSessionListPage, etc.

Main layout pages (15): StartPage, MyEnvironmentPage, AgentSummaryPage, AdminSessionPage, EnvironmentPage, ResourcesPage, ResourcePolicyPage, ConfigurationsPage, MaintenancePage, DiagnosticsPage, BrandingPage, StorageHostSettingPage, Information, UserSettingsPage, UserCredentialsPage

Root-level pages (5): InteractiveLoginPage, EmailVerificationPage, ChangePasswordPage, EduAppLauncherPage (×2 routes)

Verification

=== ALL PASS ===

Test plan

  • Navigate to each affected page and verify skeleton appears during lazy load
  • Verify no regressions on pages that already had Suspense boundaries
  • verify.sh passes (Relay, Lint, Format, TypeScript)

🤖 Generated with Claude Code

@github-actions github-actions Bot added the size:M 30~100 LoC label Apr 10, 2026
Copy link
Copy Markdown
Member Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent changes, fast-track this PR to the front of the merge queue

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@yomybaby yomybaby changed the title feat(FR-2521): add Suspense skeleton fallback to 15 lazy-loaded pages feat(FR-2521): add Suspense skeleton fallback to lazy-loaded pages Apr 10, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 10, 2026

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements 8.87% 1735/19570
🔴 Branches 8.04% 1097/13651
🔴 Functions 5.31% 283/5328
🔴 Lines 8.56% 1627/19009

Test suite run success

847 tests passing in 38 suites.

Report generated by 🧪jest coverage report action from 7b40b51

@yomybaby yomybaby force-pushed the 04-10-feat_fr-2521_add_suspense_skeleton_fallback_to_15_lazy-loaded_pages branch from f05d8d2 to 59ae223 Compare April 10, 2026 07:34
@github-actions github-actions Bot added size:L 100~500 LoC and removed size:M 30~100 LoC labels Apr 10, 2026
@yomybaby yomybaby force-pushed the 04-10-feat_fr-2521_add_suspense_skeleton_fallback_to_15_lazy-loaded_pages branch from 59ae223 to eb3196f Compare April 13, 2026 10:21
@yomybaby yomybaby marked this pull request as ready for review April 13, 2026 10:21
Copilot AI review requested due to automatic review settings April 13, 2026 10:21
@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Apr 13, 2026

Merge activity

…6596)

Resolves #6595(FR-2521)

## Summary
- Wrap all 20 lazy-loaded pages in `routes.tsx` with `<Suspense fallback={<Skeleton active />}>` that were missing loading indicators
- Users now see an in-place skeleton instead of a blank screen during code-split chunk loading
- Consistent with the pattern already used by DashboardPage, ComputeSessionListPage, etc.

**Main layout pages (15)**: StartPage, MyEnvironmentPage, AgentSummaryPage, AdminSessionPage, EnvironmentPage, ResourcesPage, ResourcePolicyPage, ConfigurationsPage, MaintenancePage, DiagnosticsPage, BrandingPage, StorageHostSettingPage, Information, UserSettingsPage, UserCredentialsPage

**Root-level pages (5)**: InteractiveLoginPage, EmailVerificationPage, ChangePasswordPage, EduAppLauncherPage (×2 routes)

## Verification
```
=== ALL PASS ===
```

## Test plan
- [ ] Navigate to each affected page and verify skeleton appears during lazy load
- [ ] Verify no regressions on pages that already had Suspense boundaries
- [ ] `verify.sh` passes (Relay, Lint, Format, TypeScript)

🤖 Generated with [Claude Code](https://claude.ai/code)
@graphite-app graphite-app Bot force-pushed the 04-10-feat_fr-2521_add_suspense_skeleton_fallback_to_15_lazy-loaded_pages branch from eb3196f to 7b40b51 Compare April 13, 2026 10:23
@graphite-app graphite-app Bot merged commit 7b40b51 into main Apr 13, 2026
11 checks passed
@graphite-app graphite-app Bot deleted the 04-10-feat_fr-2521_add_suspense_skeleton_fallback_to_15_lazy-loaded_pages branch April 13, 2026 10:24
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds consistent in-place loading indicators for code-split route components by wrapping previously-unwrapped lazy-loaded pages in routes.tsx with React.Suspense using an Ant Design <Skeleton active /> fallback, reducing “blank screen” time on first navigation.

Changes:

  • Wrapped multiple mainLayoutChildRoutes lazy pages with <Suspense fallback={<Skeleton active />}>.
  • Wrapped several root-level lazy routes (/interactive-login, /verify-email, /change-password, launcher routes) with the same skeleton fallback.
  • Simplified the existing /model-store Suspense fallback to a plain <Skeleton active />.

Comment thread react/src/routes.tsx
Comment on lines 151 to +155
path: '/start',
element: <StartPage />,
element: (
<Suspense fallback={<Skeleton active />}>
<StartPage />
</Suspense>
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new route entries repeat the same <Suspense fallback={<Skeleton active />}>…</Suspense> wrapper many times. Consider extracting a small helper (e.g., a SuspenseSkeleton component or withSkeleton(element) function) so future fallback/style changes are centralized and route definitions stay compact.

Copilot uses AI. Check for mistakes.
Comment thread react/src/routes.tsx
Comment on lines 319 to 326
path: '/model-store',
handle: { labelKey: 'data.ModelStore' },
Component: () => {
const baiClient = useSuspendedBackendaiClient();
return (
<Suspense
fallback={
<BAIFlex direction="column" style={{ maxWidth: 700 }}>
<Skeleton active />
</BAIFlex>
}
>
<Suspense fallback={<Skeleton active />}>
{baiClient?.supports('model-card-v2') ? (
<ModelStoreListPageV2 />
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This hunk also changes the existing /model-store Suspense fallback from a constrained layout (used in several other fallbacks in this file) to a plain <Skeleton />. If the width constraint was intentional to match the page’s content/container, consider keeping the same constrained wrapper here or standardizing via a shared fallback component.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100~500 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(FR-2521): Add Suspense skeleton fallback to lazy-loaded pages missing loading indicators

2 participants