fix(admin,multitenancy): users/roles crash, health probes, toast, demo provisioning#1267
Merged
Conversation
…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
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>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bundles four fixes found while QA-ing the admin app.
1. Users page crash —
rolesQuery.data?.map is not a functionThe backend
GET /api/v1/identity/rolesreturns a pagedPagedResponse<RoleDto>({ items, … }), but the admin'slistRoles()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/liveand/health/readycorrectly, 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/healthto 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, soGetStatusAsync404s and the UI showed a red FAILURE. Both sides fixed:DemoSeedernow records a completedTenantProvisioningrow, 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 filesdotnet build✓ for the DbMigrator (DemoSeeder change)🤖 Generated with Claude Code