fix(studio): Preview tab renders interface pages via InterfaceListPage#1691
Merged
Conversation
The metadata page editor's Preview tab rendered every page through the generic SchemaRenderer. For ADR-0047 interface pages (config-driven, `regions: []`, list generated from `interfaceConfig`) that produced only a bare list shell — no source binding, no user-filter chips, no data — so authors could not see their interfaceConfig (source view, userFilters, visualizations) reflected in the preview. PagePreview now mirrors the runtime PageView: when the draft is an interface page (`interfaceConfig.source`) and not in design mode, it renders InterfaceListPage with the live draft — exactly what end users see. Design mode still shows the canvas (the 'configured in Properties' hint). The interface branch sits AFTER all hooks (Rules of Hooks). Browser-verified on the showcase Task Workbench: the Preview tab now shows the status/priority filter dropdowns + the bound data table (10 records), matching the runtime page; previously empty. Locked by PagePreview.test.tsx (interface→InterfaceListPage, design→canvas, region page→SchemaRenderer). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
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.
The bug (real — code-level root cause)
The metadata page editor's Preview tab rendered every page through the generic
SchemaRenderer. For ADR-0047 interface pages (config-driven,regions: [], list generated frominterfaceConfig), that produced only a bare list shell — no source binding, no user-filter chips, no data. So an author'sinterfaceConfig(source view, userFilters, visualizations) was not reflected in the preview, even though the actual runtime page renders it correctly.Root cause:
PagePreviewlacked theinterfaceConfig?.source → InterfaceListPagebranch that the runtimePageViewalready has.Fix
PagePreviewnow mirrorsPageView: when the draft is an interface page and not in design mode, it rendersInterfaceListPagewith the live draft — exactly what end-users see. Design mode keeps the canvas (the "configured in Properties" hint). The new branch sits after all hooks (Rules of Hooks — an earlier placement crashed with "rendered more hooks than during the previous render").Verification
PagePreview.test.tsx(3 cases): interface page → InterfaceListPage; design mode → canvas; region-composed page → SchemaRenderer.🤖 Generated with Claude Code