feat(spec): add element:metadata_viewer component (ADR-0051 P1)#1942
Merged
Conversation
Read-only SDUI component a ```metadata doc fence compiles to — the inline form of ADR-0046 §3.5 "derived content is rendered, never written". Renders a state_machine | flow | permission view live and permission-projected at read time; the props carry no expressions or actions, so the embed stays on the data side of the §3.4 trust boundary (embeddableInDoc). - New ElementMetadataViewerPropsSchema placed in Content Elements (read-only), not Interactive — reinforces the content-embeddable vs interactive-not boundary. - Registered as 'element:metadata_viewer' in ComponentPropsMap. - `detail` is the authored altitude (business collapses technical flow nodes); permission projection is automatic and render-time, not here. - `object` embeds deferred (ADR-0051 §5). Spec-only; the fence parser, resolver, publish lint and console render land in follow-ups. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 89 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
This was referenced Jun 16, 2026
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.
Implements the P1 spec slice of ADR-0051 — the read-only SDUI component that a
```metadatadoc fence compiles to.Change
ElementMetadataViewerPropsSchemaincomponent.zod.ts, placed in Content Elements (read-only), not Interactive — reinforcing the content-embeddable vs interactive-not boundary.'element:metadata_viewer'inComponentPropsMap.Why this is the safe shape
The props are a declarative reference — no expressions, no action bindings. The view is drawn by the platform's own viewer over the package's own already-governed metadata, so the embed stays on the data side of the ADR-0046 §3.4 / ADR-0025 trust boundary that banned MDX. (A general component embed could carry CEL/actions = code; that's deferred to a future
objectuifence — see ADR-0051 §4.)detailis the authored altitude (businesscollapses technical flow nodes to business steps + approvals). Permission projection — stripping what a reader may not see — is automatic and render-time, never authored here, and deliberately not namedaudienceto avoid colliding withbook.audience(access tier).Scope
Spec-only.
objectembeds are deferred (ADR-0051 §5). The fence parser, the live-transclusion resolver, publish lint (parse + validate + reference-liveness), and the console render all land in follow-ups.Verification
vitest run src/ui/component.test.ts→ 91/91 passtsc --noEmit→ cleandist/is gitignored; no committed generated artifacts to regenerate.🤖 Generated with Claude Code