Skip to content

fix(ai): AI-authored views bind to their object + render (kanban as a board, not a list)#1563

Merged
xuyushun441-sys merged 1 commit into
mainfrom
fix/ai-view-shape-binds-and-renders
Jun 3, 2026
Merged

fix(ai): AI-authored views bind to their object + render (kanban as a board, not a list)#1563
xuyushun441-sys merged 1 commit into
mainfrom
fix/ai-view-shape-binds-and-renders

Conversation

@xuyushun441-sys
Copy link
Copy Markdown
Contributor

Problem

An AI-built app's views — including a "kanban by status" — never appeared as selectable view tabs and always rendered as the default list. The user pointed out the showcase's own kanban renders fine, which ruled out the renderer.

Diagnosis: metadata-shape bug in the blueprint's viewBody (not renderer, not skill)

Comparing the AI view to the working showcase view (showcase_project.by_status):

showcase (works) AI (broken)
name showcase_project.by_status missing
top-level object showcase_project missing
top-level viewKind list missing
config under config under list

viewBody emitted a bare { list: {…} } fragment. Three concrete failures:

  1. No top-level nameprotocol.getMetaItems only merges sys_metadata overlay rows whose body has name (protocol.ts ~L1188 'name' in data). Every AI view (always an overlay) was silently dropped from getMetaItems({type:'view'}) → the object page's view list was empty → no tabs.
  2. No top-level object / viewKind → the console can't bind the view to its object.
  3. Name not <object>.<key>-prefixed → the convention the console keys an object's view tabs off.

Fix

viewBody now emits the canonical view record (matching the showcase's own views):

{ name: '<object>.<key>', object, viewKind: 'list'|'form', config: <ListView|FormView> }

Validated against the real ViewSchema (getMetadataTypeSchema('view')).

Verification (end-to-end, browser)

Built a fresh AI app with a "kanban by stage" view → published → opened the object page:

  • getMetaItems({type:'view'}) now lists feature_req.feature_req_kanban + feature_req.feature_req_list (was empty).
  • The object page shows view tabs (需求看板 | 需求列表), and the kanban renders as a board grouped by stage (待评估/已排期/开发中/已上线/…) with cards — identical behaviour to the showcase kanban.

service-ai blueprint suite green (25).

🤖 Generated with Claude Code

… board)

AI-built app views (incl. kanban) only showed as the default list, never as
tabs. Root cause was the blueprint viewBody emitting a bare { list: {…} }
fragment instead of the canonical view record. Missing: top-level `name`
(getMetaItems only surfaces overlay rows whose body has name → AI views were
dropped from the object's view list), top-level `object`/`viewKind` (console
binds views to objects via these), and the `<object>.<key>` name prefix.

viewBody now emits { name:'<obj>.<key>', object, viewKind:'list'|'form', config }
matching the showcase's own views (validated vs the real ViewSchema). E2E
verified: AI kanban app surfaces view tabs + renders the board grouped by status.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jun 3, 2026 8:16am

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation tests tooling size/s labels Jun 3, 2026
@xuyushun441-sys xuyushun441-sys merged commit 328a7c4 into main Jun 3, 2026
12 checks passed
@xuyushun441-sys xuyushun441-sys deleted the fix/ai-view-shape-binds-and-renders branch June 3, 2026 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants