fix(spec): make dashboard widget layout optional (auto-flowed when omitted)#2247
Merged
Conversation
…omitted)
`DashboardWidgetSchema.layout` was required, but the entire runtime treats it
as optional: objectui's DashboardGridLayout auto-flows any widget without a
layout, and the Studio dashboard designer adds widgets WITHOUT a layout by
design.
The mismatch meant every dashboard authored in the Studio designer failed spec
validation the moment a widget was added — the draft PUT /meta/dashboard/...
returned 422 ("widgets: Invalid type: expected object, received undefined"), so
the draft never saved and Publish stayed disabled, even though the widget
rendered. Found by dogfooding the dashboard designer in the browser; verified
the fix end-to-end (422 -> 200, Publish enabled, 10-widget dashboard published).
layout is now optional; absence means "auto-place". Backward-compatible —
existing dashboards that specify layout are unaffected. Adds two regression
tests + a changeset.
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): 91 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
os-zhuang
added a commit
that referenced
this pull request
Jun 24, 2026
…hes (#2260) Golden regression for the P1 found dogfooding the Studio dashboard designer: the designer's addWidget creates widgets WITHOUT a `layout`, but the spec required it, so every designer-authored dashboard returned 422 on draft save and Publish stayed disabled — yet it passed every static gate because code-authored example dashboards always specify a layout. Boots the real showcase stack and drives the actual create -> save -> publish metadata path with a layout-less, designer-shaped dashboard: - PUT /meta/dashboard/:name?mode=draft -> 200 (was 422) - POST /meta/dashboard/:name/publish -> 200 - GET /meta/dashboard/:name -> widgets persisted, layout-less Closes the "renders at design time != persists" coverage gap that hid the bug. Pairs with the spec fix (#2247) that made DashboardWidget.layout optional. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jun 24, 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.
Problem
Found by dogfooding the Studio dashboard designer in the browser: you could not save or publish any dashboard authored in the designer.
DashboardWidgetSchema.layoutwas required, but the entire runtime treats it as optional:DashboardGridLayoutauto-flows any widget without a layout (x: (i%4)*3, y: ⌊i/4⌋*4, w: 3, h: 4).addWidgetcreates widgets without a layout by design.So every designer-authored dashboard failed spec validation the moment a widget was added — the draft
PUT /api/v1/meta/dashboard/<name>?mode=draftreturned 422 (widgets: Invalid type: expected object, received undefined), the draft never saved (stuck "Unsaved"), and Publish stayed disabled — even though the widget rendered correctly in the canvas.Fix
Make
layoutoptional; absence means "auto-place". Authors may still pin an explicit grid position.layoutare unaffected.Verification
Pairs with objectui
fix(dashboard): auto-flow layout-less widgets in the positioned gridso layout-less dashboards also render as a clean grid.🤖 Generated with Claude Code