wealth/docs/decisions/0015-a-view-with-its-own-fr...

1.2 KiB

0015 A view with its own frame gets its own route

Status: Proposed · Area: architecture · Date: 2026-10-06 · Decided by: agent

Context

The suspended screen (S6 1.11, 2.1, 3.1) and the creator's end of registration (R2-CompleteProfile 1.8, 3.3) show a different header or card width than the step they follow. The frame renders on the server and can't know a browser-only state, so a view swap inside the step kept the wrong header and card.

Decision

  • When a login, registration or onboarding view needs a different frame than its step, serve it on its own route: /auth/login/suspended, /onboarding/creator-profile/done. The step sends the person there with router.replace.
  • What the view needs and the server can't give stays in memory (the flow store); a reload without it falls back to the step's start, as other flow steps do (0013). A view that can read its data from the API (the end of registration) reads it, so it survives a reload.

Alternatives

  • A client header that reads a store: rejected; the server frame and the skeleton would still differ from the view.

Consequences

  • Each such view has its own page, loading skeleton and metadata in both apps.