feat(loading) show route specific skeleton UI by adithyaakrishna · Pull Request #3671 · simstudioai/sim
Greptile Summary
This PR adds 36 new loading.tsx files across the Next.js App Router to replace blank/inconsistent intermediate states with route-specific skeleton UIs. It is a quality-of-life improvement that significantly enhances the perceived performance and visual consistency of the application during navigation.
Key changes:
- Auth routes (
login,signup,sso,reset-password,verify,oauth/consent): Skeleton UIs matching each form's field layout, buttons, and social auth section. - Workspace feature routes (
files,tables,knowledge,logs,scheduled-tasks): Table skeleton UIs with header toolbars, column headers, and row placeholders matching the real column counts. - Workflow routes (
w/,w/[workflowId]/): Intentionally use aLoader2spinner instead of a skeleton — appropriate since the workflow canvas cannot be meaningfully mocked with static shapes. - Landing/public routes (
studio,privacy,terms,changelog,templates): Full-page skeletons matching article/blog and card grid layouts. - Misc routes (
chat,form,invite,unsubscribe,resume,credential-account): Skeleton or spinner UIs matching the initial content shape.
Minor concern: privacy/loading.tsx and terms/loading.tsx wrap skeleton content in prose prose-gray (Tailwind Typography). These classes target semantic HTML children and have no effect on div/Skeleton nodes, and may cause a visual inconsistency vs. the real page layout if the actual pages don't also use a prose wrapper.
Confidence Score: 5/5
- This PR is safe to merge — it only adds new presentational loading skeleton components with no logic, state, or API changes.
- All 36 added files are purely presentational Next.js
loading.tsxServer Components with no hooks, side-effects, or data fetching. They use the existingSkeletoncomponent from@/components/emcnand follow established import path conventions. The only minor concern is the unusedprose prose-graywrapper in two files, which is cosmetic and does not affect functionality. - apps/sim/app/(landing)/privacy/loading.tsx and apps/sim/app/(landing)/terms/loading.tsx contain a cosmetic
prose prose-graywrapper that has no effect on the skeleton elements inside it.
Important Files Changed
| Filename | Overview |
|---|---|
| apps/sim/app/(auth)/login/loading.tsx | New skeleton loading UI for the login page; accurately mirrors the form structure with email/password fields, submit button, divider, and social buttons. |
| apps/sim/app/(auth)/signup/loading.tsx | New skeleton loading UI for the signup page; mirrors 3 input fields, a submit button, divider, and social auth buttons. |
| apps/sim/app/(landing)/privacy/loading.tsx | Skeleton for the privacy policy page; wraps repeated skeleton paragraphs in prose prose-gray which adds typography styles not applicable to skeleton elements — minor layout mismatch. |
| apps/sim/app/(landing)/terms/loading.tsx | Same pattern as privacy/loading.tsx; identical prose prose-gray wrapper concern. |
| apps/sim/app/workspace/[workspaceId]/w/[workflowId]/loading.tsx | Uses a Loader2 spinner instead of a skeleton — appropriate given the complexity of the workflow canvas that cannot be meaningfully skeleton-mocked. |
| apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/loading.tsx | Detailed table skeleton for document view with breadcrumb, toolbar, and table rows; well-structured with named constants for row/column counts. |
| apps/sim/app/workspace/[workspaceId]/logs/loading.tsx | Table skeleton for logs page with header toolbar, filter bar, and table rows; mirrors the actual logs view layout accurately. |
| apps/sim/app/chat/[identifier]/loading.tsx | Full-screen chat loading skeleton with header, centered form area, and bottom input bar; accurately mirrors the initial chat rendering. |
| apps/sim/app/workspace/[workspaceId]/settings/[section]/loading.tsx | Simple settings section skeleton with a title and three input field placeholders; appropriately minimal. |
| apps/sim/app/resume/[workflowId]/[executionId]/loading.tsx | Two-column skeleton for the workflow execution resume page with a sidebar list and main form panel. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Next.js Route Navigation] --> B{Route Loading?}
B -->|Yes| C[loading.tsx shown]
B -->|No| D[page.tsx shown]
C --> E{Route Type}
E -->|Auth routes| F["Skeleton: form fields,\nbuttons, dividers\n(login, signup, sso, verify, reset)"]
E -->|Workspace routes| G{Workspace Feature}
E -->|Public/Landing routes| H["Skeleton: article/blog layout\n(studio, privacy, terms, changelog)"]
E -->|Standalone pages| I["Skeleton or Spinner\n(chat, form, invite, unsubscribe)"]
G -->|Home| J["Skeleton: AI chat\ninput + lines"]
G -->|Workflows| K["Loader2 Spinner\n(w/ + w/workflowId)"]
G -->|Files, Tables,\nKnowledge, Logs,\nScheduled Tasks| L["Skeleton: table\nwith header+rows"]
G -->|Settings| M["Skeleton:\ntitle + form fields"]
G -->|Templates| N["Skeleton:\ncard grid"]
D --> O[Page fully rendered]
F --> O
H --> O
I --> O
J --> O
K --> O
L --> O
M --> O
N --> O
Last reviewed commit: "feat: add loading st..."