wealth/docs/decisions/0017-each-step-owns-its-loa...

17 lines
893 B
Markdown

# 0017 Each step owns its loading skeleton
Status: Proposed · Area: architecture · Date: 2026-10-06 · Decided by: agent
## Context
A route group's `loading.tsx` showed one frame for every step under it, so navigating to a step with another header or card width moved the page when it arrived. Next.js also shows the loading of the first new segment, so a parent step's `loading.tsx` covers its nested steps.
## Decision
- Every login, registration and onboarding route has its own `loading.tsx` with its page's frame and fallback skeleton; the route groups have none.
- A route whose page has nested steps puts its page and loading in a route group of its own: `login/(number)`, `register/(type)`, `creator-profile/(form)`.
## Alternatives
- One loading per group: rejected; its frame matches only some steps.
## Consequences
- Page and loading repeat the frame; change them together.