feat: add real account workspace controls

This commit is contained in:
2026-07-02 19:52:29 -07:00
parent 1b8fae0116
commit 1cdf89c608
12 changed files with 759 additions and 203 deletions

View File

@@ -200,6 +200,23 @@ When a module becomes real, replace the placeholder with a Server Component that
data from the server boundary and pass only persisted, permission-filtered data into
client components.
### App Shell Tenant and Account Menu Contract
The desktop app shell footer is the tenant/account workspace control, not only a sign-out
surface.
- Show a compact organization switcher above the account card.
- Display both organization name and non-empty `slug`; do not hide or fabricate missing
tenant identifiers.
- Switch organizations by calling `POST /api/auth/organization` and then `router.refresh()`;
do not store the active organization in localStorage.
- The account card menu opens a user settings dialog for the current account. Profile edits
call `PATCH /api/account/profile`.
- OIDC binding UI must reflect real backend capability. If binding records/callbacks are not
implemented, show an honest not-connected state instead of fake provider accounts.
- The sidebar nav selected state belongs in a small client component using `usePathname()`;
keep the rest of `AppShell` server-rendered.
### Business Form Defaults Contract
Create forms for persisted business records must not prefill required domain fields with