Skip to content

fix(admin,multitenancy): users/roles crash, health probes, toast, demo provisioning#1267

Merged
iammukeshm merged 1 commit into
mainfrom
fix/admin-app-issues
May 27, 2026
Merged

fix(admin,multitenancy): users/roles crash, health probes, toast, demo provisioning#1267
iammukeshm merged 1 commit into
mainfrom
fix/admin-app-issues

Conversation

@iammukeshm
Copy link
Copy Markdown
Member

Bundles four fixes found while QA-ing the admin app.

1. Users page crash — rolesQuery.data?.map is not a function

The backend GET /api/v1/identity/roles returns a paged PagedResponse<RoleDto> ({ items, … }), but the admin's listRoles() still typed it as a bare array. The Users role-filter and the Roles registry ([...items]) both threw. listRoles() now unwraps .items (mirroring the dashboard). Playwright mocks updated to the real paged shape so the drift is caught next time.

2. Health page probes 404

The backend maps /health/live and /health/ready correctly, but the Vite dev proxy only forwarded /api, /openapi, /scalar. The Health page fetches /health/* relative, so they hit the Vite dev server → 404. Added /health to the proxy.

3. Toast readability + style

The bare admin toast rendered its description in low-contrast gray. Ported the dashboard's FshToaster (per-type tinted icon chip, accent stripe, slide-in) and lifted the description color toward the foreground for legibility.

4. Provisioning "FAILURE … not found for tenant acme"

Demo tenants (acme/globex) are seeded directly, bypassing the provisioning pipeline, so GetStatusAsync 404s and the UI showed a red FAILURE. Both sides fixed: DemoSeeder now records a completed TenantProvisioning row, and the tenant detail page treats a 404 as a neutral "Not tracked" state (no retry/poll storm).

Verification

  • tsc -b ✓, eslint ✓ on changed admin files
  • dotnet build ✓ for the DbMigrator (DemoSeeder change)

🤖 Generated with Claude Code

…o provisioning

- admin: unwrap the now-paged roles response in listRoles so the Users role
  filter and the Roles registry stop throwing "data?.map is not a function".
  Update Playwright mocks to the real paged shape so the drift is caught.
- admin: proxy /health in the Vite dev server so the Health page's
  /health/live and /health/ready probes reach the API instead of 404ing.
- admin: replace the bare toast with a dashboard-aligned FshToaster (tinted
  icon, accent stripe, animation) and lift the description color toward the
  foreground for readability.
- multitenancy: DemoSeeder records a completed TenantProvisioning row for demo
  tenants (acme/globex); the tenant detail page now treats a 404 provisioning
  status as a neutral "Not tracked" state instead of a red FAILURE.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@iammukeshm iammukeshm merged commit 8e39104 into main May 27, 2026
11 of 13 checks passed
iammukeshm added a commit that referenced this pull request May 27, 2026
Restyle every admin page onto the dashboard's section/field/page-header
vocabulary (EntityPageHeader, SettingsSection, Field, list cards), retiring the
FormShell/FormSection 18rem rail, `\ SECTION` markers, and console classes:
- settings/* (profile now uses the presigned ImageInput — fixes the data-URL
  avatar bug), roles/*, users/*, tenants/* (list now matches the users/roles
  card-table + mobile-card pattern), billing/*, webhooks/*, audits/*,
  notifications, health, impersonation, auth/*, login, not-found, dashboard.

Also re-applies the PR #1267 fixes that this branch (cut from main) was missing:
- listRoles() unwraps the paged response (fixes the users/roles `.map` crash).
- /health added to the Vite dev proxy.
- tenant detail treats a 404 provisioning status as a neutral "Not tracked"
  state (no retry/poll storm) instead of a red FAILURE.

Part of the admin → dashboard design unification (PR #1268).
Build: admin `npm run build` ✓, `eslint` ✓ (0 errors).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant