feat(console): add user schema list and detail screens - #762
Merged
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: bef6655 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
bastionstack
enabled auto-merge (squash)
August 9, 2026 19:19
fforootd
added a commit
that referenced
this pull request
Aug 13, 2026
…#866) ## Summary Part 2 of the five-slice docs refresh (slice 1 is #865, slice 5 is #856; merge order 1→5). ADR statuses caught up with reality, and the drift class that let them lag is now CI-gated: - **`scripts/check-adrs-index.mjs` now compares each index row's status against the ADR body's `> **Status:**` line.** It parses the body status (previously it only read the body *heading*), normalizes to the leading canonical token ({Draft, Proposed, Accepted, Implemented, Withdrawn, Superseded} — suffixes like dates or "superseded in part" parentheticals are ignored), and fails on missing/nonstandard lines or row↔body mismatches. Covered by 5 new cases in the existing `check-adrs-index.test.ts` (13 total) and mutation-tested both directions. - **Status flips, each with acceptance evidence and a dated amendment** (bodies stay historical records — only the Status line changes in place, plus amendment blocks): 021 → Accepted (arrays shipped for fields/actions; gates still keyed — noted), 027 → Implemented (POST-query endpoints + users on `limit`/`page_token`), 028 → Implemented (v1 removed, v2 flattened, #790), 030 → Accepted (#777/#799 shipped; Implemented deferred until every decision item is code-verified), 046 → Implemented (claim endpoints + CLI + doctor + team attachment). - **Mismatches the checker itself surfaced**: the ADR 022 row said Proposed while the file said Accepted, and ADR 007's row compressed "Proposed (superseded in part by ADR 035)" to "Superseded" — both aligned. - **Format normalization**: four ADRs (014/015/018/025) used an `## Status` section instead of the blockquote; converted so one parser format suffices. - **storage/v2 navigational repoints inside ADR files** (links and path code-spans only; decision prose untouched), and ADR 003 gets a dated correction note for its now-false "claim endpoints are not in the spec" sentence. - **Console ADR tree**: the index gains a Status column (0004's standalone slice is implemented per its own block), and ADR 0001's route sketch gets a dated amendment (`_authed/` layout per ADR 0003, schemas shipped in #762, no teams route, sessions on `POST /sessions/query`). ## Validation - `node scripts/check-adrs-index.mjs` → ok (50 records) — including on the merged tree, where it validated main's independent ADR 026 flip (#829) against my flips row-by-row: the exact drift class it now gates. - Mutation test both directions: flipping one index row fails the checker; restoring passes. - `moon run cli:test -- tests/unit/scripts/check-adrs-index.test.ts` → 13/13 green. - `moon run workspace:check-adrs` → ok. ## Release notes / changeset - No changeset required — ADR docs and a repo-only CI script; no shipped behavior changed. ## Notes - ADR 030 stays **Accepted** deliberately; upgrading to Implemented is a later evidence-backed change once every decision item in its body is verified against code. - Merge-with-main note for the reviewer: #845 modernized ADRs 011/028 (SQLite dialect, flattened paths) in parallel — resolutions take main's modernized text and keep this branch's status flips + amendments; the checker passing on the result is the proof of consistency. - Two audit claims were disproven before editing (recorded to keep the review honest): ADR 014's `scripts/build.ts` exists at `packages/design-tokens/scripts/build.ts`, and `internal/storage/AGENTS.md`'s `#788` reference is correct (#795 closes #788).
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.