unsloth/studio/frontend/src/app
Daniel Han 7b9fcf8cbc
studio/frontend: show Loading fallback instead of blank pane on lazy route navigation (#5568)
* studio/frontend: show Loading fallback instead of blank pane on lazy route navigation

Closes #5567.

Train, Recipes and Export pages are imported via React.lazy() in their
respective createRoute calls, and the Suspense boundary around <Outlet />
in __root.tsx passes fallback={null}. The result is a 1-3 second
completely white pane between sidebar click and content paint, which is
the exact failure mode behind reports that those pages look broken or
stuck. /chat does not suffer from this because chat.tsx imports its
ChatPage synchronously.

Replace fallback={null} on both Suspense boundaries (hideNavbar and
sidebar layouts) with a small centered 'Loading...' label using the
same muted-foreground style as elsewhere in the app. Synchronous routes
(/chat) never suspend so they are unaffected; lazy routes now have a
visible terminal-state placeholder while their chunk loads.

* studio/frontend: also apply RouteFallback to the sidebar Suspense

The first revision only replaced the fallback={null} inside the
hideNavbar branch (used for onboarding / login). The primary lazy
boundary that wraps Train / Recipes / Export is inside the SidebarInset
branch at the other Suspense site, which kept rendering null and made
the page look stuck for the same window the original bug describes
(per bot review feedback on #5568).

Replace both Suspense fallbacks with RouteFallback so the "Loading..."
placeholder fires on every lazy route, not just on the auth flows.

* studio/frontend: shorten RouteFallback comment

---------

Co-authored-by: danielhanchen <michaelhan2050@gmail.com>
2026-05-19 06:56:20 -07:00
..
routes studio/frontend: show Loading fallback instead of blank pane on lazy route navigation (#5568) 2026-05-19 06:56:20 -07:00
app.tsx Update license headers 2026-03-12 17:23:10 +00:00
auth-guards.ts studio/frontend: reconcile stale must_change_password localStorage flag (#5576) 2026-05-19 05:48:46 -07:00
provider.tsx studio: add dismissable toasts with corner close button (#5509) 2026-05-18 03:47:36 -07:00
router.tsx studio: fix Connections dialog UX issues surfaced by image-gate probe (#5518) 2026-05-18 02:23:16 -07:00