feat(spec): gallery + gantt as first-class blueprint view kinds#2420
Merged
Conversation
The AI build agent's blueprint proposal could only express list/form/kanban/ calendar views — both the lenient schema and the strict mirror (the structured-output contract the model is validated against) capped `view.type` at those four. So a user asking for a 画廊/gallery or 甘特图/gantt could never get one from a blueprint: the closest allowed enum value (list) won and the view silently downgraded to a grid, even though the view spec (ListViewSchema) and the objectui renderers (ObjectGallery, plugin-gantt) fully support both. Widen BlueprintViewSchema.type and the StrictView mirror to include 'gallery' and 'gantt', with guidance in the field descriptions on when to pick each and which columns to include (the image field as the gallery cover; the start date before the end date for a gantt). No new blueprint slots — the cover image and the gantt date fields are inferred downstream from the object's fields, exactly as kanban's groupBy already is. Consumed by @objectstack/cloud's service-ai-studio (blueprint LIST_TYPE + viewBody honor the new kinds; the build skill teaches them). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 90 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
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.
Why
The AI magic-build agent could only express
list/form/kanban/calendarviews in a blueprint. Both the lenientBlueprintViewSchemaand theStrictViewmirror (the structured-output contract the model is validated against) cappedview.typeat those four.So when a user explicitly asked for a 画廊/gallery or 甘特图/gantt, the model literally could not emit it — the closest allowed enum value (
list) won and the view silently downgraded to a grid. Reproduced live: a build prompt asking for "活动海报的画廊视图" produced{ viewKind:'list', config:{ type:'grid' } }, and the agent self-narrated that gallery was "not currently available".This is not a renderer gap: the view spec (
ListViewSchema.type) already listsgallery/ganttwithGalleryConfigSchema/GanttConfigSchema, and objectui shipsObjectGallery+plugin-gantt. The gap was only in the simplified blueprint proposal enum.What
BlueprintViewSchema.typeand theStrictViewmirror to includegalleryandgantt.type/columns/groupByfield descriptions with when-to-use guidance (gallery for visual card/cover browse with an image field; gantt for a start+end date timeline; include the image field / order start-before-end incolumns).groupByalready is. Keeps the strict structured-output schema lean.gallery/ganttviews.Consumer
Paired with objectstack-ai/cloud
service-ai-studio: blueprintLIST_TYPE+viewBodyhonor the new kinds (cover/date inference + grid fallback when a gantt lacks two dates), and the build skill/prompt teach when to use them. That cloud PR depends on this one and will bump.framework-shaonce this merges.Test plan
pnpm --filter @objectstack/spec exec vitest run src/ai/solution-blueprint.test.ts— 25 passed (incl. 2 new gallery/gantt cases)view.test.tsunaffected (201 passed across blueprint+view)🤖 Generated with Claude Code