feat(console): add user schema list and detail screens - #762
Open
bastionstack wants to merge 8 commits into
Open
feat(console): add user schema list and detail screens#762bastionstack wants to merge 8 commits into
bastionstack wants to merge 8 commits into
Conversation
Builds the `/schemas` list and `/schemas/{id}` detail from the Figma
design system: a row per schema with its attributes and sign-in methods,
and a detail with a Fields table that drills into nested objects beside a
JSON/YAML view of the document.
Read-only throughout (decisions log D0b) — the viewer names the CLI
command that applies a change instead.
Closes #712
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
🦋 Changeset detectedLatest commit: 38202da The changes in this PR will be included in the next version bump. This PR includes changesets to release 20 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR replaces the console’s /schemas placeholder and raw JSON detail view with read-only “User schemas” list + detail screens, adds nested sidebar navigation under “Users”, and introduces on-demand syntax highlighting + YAML rendering for schema documents.
Changes:
- Implemented user schema list rows (name, attribute chips, enabled auth methods, created date + id) and a schema detail view with Fields drill-in and Authentication tab.
- Added schema utilities for property table rows, drill-in path resolution, and
x-auth-methodsdisplay ordering; added YAML formatting and Shiki-based highlighting. - Updated console navigation metadata to support nested sidebar items; added
min-w-0to the sidebar inset to prevent overflow.
Reviewed changes
Copilot reviewed 21 out of 22 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pnpm-workspace.yaml | Adds yaml to the workspace catalog for YAML rendering support. |
| pnpm-lock.yaml | Locks new dependency versions (yaml, shiki) used by the console. |
| apps/console/src/styles.css | Adds CSS variable aliases to map Shiki token roles onto console syntax/* tokens. |
| apps/console/src/routes/auth-guard.spec.tsx | Updates guard test to handle redirected-to schemas loader via MSW; heading assertion updated. |
| apps/console/src/routes/_authed/schemas/schemas.spec.tsx | Adds/expands tests for schemas list + detail behavior (drill-in, auth tab, JSON/YAML, read-only affordances). |
| apps/console/src/routes/_authed/schemas/index.tsx | Implements the User schemas list route, loader, and row UI. |
| apps/console/src/routes/_authed/schemas/$schemaId.tsx | Implements the schema detail screen (Fields + Authentication tabs) using new components. |
| apps/console/src/nav.ts | Extends NavMeta to support nested nav via optional parent and optional icon. |
| apps/console/src/lib/schema.ts | Adds helpers for property-table rows, drill-in path resolution, and ordered auth method extraction. |
| apps/console/src/lib/highlight.ts | Introduces lazy-loaded Shiki highlighting producing token streams (no dangerouslySetInnerHTML). |
| apps/console/src/lib/date.ts | Adds localized Created date formatting used in list rows. |
| apps/console/src/components/ui/sidebar.tsx | Adds min-w-0 to prevent flex overflow pushing the sidebar off-screen. |
| apps/console/src/components/ui/inline-code.tsx | Adds InlineCode UI primitive used for attribute chips and CLI hint styling. |
| apps/console/src/components/ui/card.tsx | Adds Card UI primitive used as the screen content panel. |
| apps/console/src/components/schema-fields-panel.tsx | Adds drill-in field table + breadcrumb path component for schema detail. |
| apps/console/src/components/schema-document-viewer.tsx | Adds JSON/YAML document viewer with copy-to-clipboard and CLI hint footer. |
| apps/console/src/components/app-shell/use-nav-items.ts | Builds hierarchical sidebar items using nav.parent. |
| apps/console/src/components/app-shell/AppShell.tsx | Renders nested sidebar rows via SidebarMenuSub* components. |
| apps/console/src/components/app-shell/app-shell.spec.tsx | Updates/extends sidebar tests for nested “User schemas” under “Users”. |
| apps/console/package.json | Adds shiki and yaml dependencies used by schema detail viewer. |
| apps/console/docs/styling.md | Documents Card and InlineCode as canonical UI building blocks. |
| .changeset/console-user-schema-screens.md | Adds a changeset bumping @zitadel/server minor for the embedded console change. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
…ma and user screens
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.
Summary
Builds the user schema screens from the design system.
/schemaswas a placeholder and/schemas/{id}printed the raw JSON document.InlineCodechips, its enabled sign-in methods, and the id and creation date that identify it (decisions log D10). The whole row opens the detail; the row menu carriesView schema.Fieldsshows aFIELD | TYPE | REQ.table where object-typed rows drill into the next level behind a breadcrumb, beside the document as JSON or YAML with a copy button and the CLI hint.Authenticationlists every method the document'sx-auth-methodsdeclares, enabled or disabled.User schemasnests underUsersviaSidebarMenuSub;NavMetagained an optionalparent.Read-only throughout (D0b). Versions,
In usestate andLast changedare left out — the backend models none of them (#445, and the open "Schema status & versions" question), so the screens show what exists rather than an empty control.Try it locally
moon run console:dev-real # seeded instance + dev server on :5174Sign in with the credentials in the boot banner (
dev@zitadel.local/Console-dev-1).zitadel setupcreates one schema, which shows the two-method chip and both methodsEnabled.To see the rest — nested drill-in, the elided breadcrumb, a
Disabledmethod, non-string types and a block scalar in the YAML view — add a second schema, using theprojectid from the same banner:Open that schema and walk
address→geo→datum→reference; the path elides toSCHEMA › … › DATUM › REFERENCEat the last level.AuthenticationshowsPasskeyenabled andPassworddisabled, and the YAML tab renders the multi-linedescriptionas a block scalar.There is no
DELETE /schemas, so seeded schemas persist until the nextdev:realboot.Validation
Both screens were checked against their Figma nodes in light and dark at 1280 and 390, including the drill-in at every level.
Release notes / changeset
.changeset/console-user-schema-screens.md,@zitadel/server: minor— the console ships inside the server container, so the screens reach a user.Notes
GET /schemas/{id}serialisespropertiesfrom a Go map, so the response order is randomised between identical requests; sorting is what stops the table reshuffling between loads. The note to drop the sort is already inlib/schema.ts.