Repository navigation
feat(builder): show page skeletons instantly on workspace navigation - #1574
Merged
Merged
Conversation
Clicking a sidebar item, a tab, or an edit/create action used to leave the old page frozen until the server finished compiling and rendering the next route. The workspace shell now swaps the content area for a skeleton shaped like the destination as soon as the navigation starts. - NavigationPendingProvider tracks in-app link clicks and router.push/replace (re-provided AppRouterContext, push/replace run in a transition) - AppTab keeps its tab strip and only skeletons the content below it - Route-shaped skeletons: inbox, analytics, tabbed lists, forms, flow editor - dashboard/loading.tsx keeps the inbox cards while switching analytics tabs Co-Authored-By: Claude Opus 5.5 <[email protected]>
3 of 6 tasks
hello-jackytruong
referenced
this pull request
in hello-jackytruong/ChatWorkAI
Nov 22, 2026
…(#1574) Clicking a sidebar item, a tab, or an edit/create action used to leave the old page frozen until the server finished compiling and rendering the next route. The workspace shell now swaps the content area for a skeleton shaped like the destination as soon as the navigation starts. - NavigationPendingProvider tracks in-app link clicks and router.push/replace (re-provided AppRouterContext, push/replace run in a transition) - AppTab keeps its tab strip and only skeletons the content below it - Route-shaped skeletons: inbox, analytics, tabbed lists, forms, flow editor - dashboard/loading.tsx keeps the inbox cards while switching analytics tabs Co-authored-by: Deathgiver <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
Summary
Clicking a sidebar item (Analytics, Inbox, Flows, Contacts…), a tab (Flows / Tags / Custom fields…), a Tools card, or an edit/create action used to leave the old page frozen while the server compiled and rendered the next route. Now the content area switches straight to a skeleton shaped like the destination, the same way the
/shoppages already behave.NavigationPendingProvider(components/navigation-pending.tsx) in the workspace layout tracks:<a>/<Link>clicks (plain left click, same origin, under/space/, different pathname).router.push/router.replace, by re-providingAppRouterContextwithpush/replacerun in a transition, so the skeleton stays until the new route commits. This covers all ~145 call sites (edit buttons, create-then-redirect) with no per-feature edits.NavigationPendingBoundaryhides the current page (it stays mounted) and renders the destination skeleton.AppTabkeeps its real tab strip and only skeletons the content below it. Re-clicking the open tab does nothing.components/workspace-skeletons.tsx): inbox, analytics, tabbed list (including every/settings/*page), form (create/edit/record id), flow editor (/flows/<id>), and a plain list page. Route → skeleton mapping is a pureresolveWorkspaceSkeletonKind.dashboard/loading.tsxkeeps the inbox cards while switching analytics sub-pages. No workspace-levelloading.tsx, sonotFound()from section layouts still returns HTTP 404.Note on
AppRouterContextThis imports
next/dist/shared/lib/app-router-context.shared-runtime, which is an internal Next export. Verified on Next 16.4.3: router methods are plain functions (nothis), and<Link>only null-checks the context.__tests__/navigation-pending.test.tsxuses Next's realuseRouter(), so a Next upgrade that breaks this fails CI instead of silently.Public API
Exempt from invariant 23: this is UI-only plumbing (navigation loading state) with no operation or result to expose.
Test plan
pnpm lintpnpm --filter builder check-typesvitest runinapps/builder: 1028 files pass, including the newworkspace-route-skeleton.test.tsandnavigation-pending.test.tsx🤖 Generated with Claude Code