fix: add spec-compliant fields to all dashboard widgets in examples#825
Merged
fix: add spec-compliant fields to all dashboard widgets in examples#825
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Add id, title, object, categoryField, valueField, aggregate to CRM dashboard widgets - Add id, title, object, categoryField, valueField, aggregate to Todo dashboard widgets - Add id, title, object, categoryField, valueField, aggregate to Kitchen Sink dashboard widgets - Add spec compliance tests to CRM metadata test suite Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix dashboard and widget metadata to comply with spec
fix: add spec-compliant fields to all dashboard widgets in examples
Feb 24, 2026
Collaborator
|
@copilot 仔细检查确认已经完成任务要求的所有开发内容 |
Contributor
Author
已逐项核查确认所有任务要求均已完成: 3 个 example 项目的 dashboard widget 修正(共 23 个 widget):
测试覆盖:
ROADMAP 已更新,commit |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses spec compliance issues in dashboard widgets across example projects. Dashboard widgets were missing required DashboardWidgetSchema fields (id, title, object, and for chart widgets: categoryField, valueField, aggregate), which caused empty property panels and broken configuration workflows.
Changes:
- Added spec-compliant fields to all dashboard widgets in CRM, Todo, and Kitchen Sink examples
- Created comprehensive spec compliance tests for dashboard widgets
- Updated ROADMAP.md to track completion
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| examples/todo/objectstack.config.ts | Added id, title, object to 4 metric widgets and id, title, object, categoryField, valueField, aggregate to 2 chart widgets |
| examples/kitchen-sink/objectstack.config.ts | Added id, title, object to 4 metric widgets and id, title, object, categoryField, valueField, aggregate to 3 chart widgets |
| examples/crm/src/dashboards/crm.dashboard.ts | Added id, title, object to 4 metric widgets, id, title, object, categoryField, valueField, aggregate to 5 chart widgets, and id, title, object to 1 table widget |
| examples/crm/src/tests/crm-metadata.test.ts | Added 5 new tests validating widget spec compliance: unique IDs, titles, object binding, metric title-label consistency, and chart data binding fields |
| ROADMAP.md | Added completion entry documenting the dashboard widget spec alignment work |
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.
Dashboard widgets across all examples were missing required
DashboardWidgetSchemaspec fields (id,title,object,categoryField,valueField,aggregate), causing empty property panels and broken config workflows.Changes
examples/crm/src/dashboards/crm.dashboard.ts— 10 widgets: addedid,title,object; chart widgets getcategoryField/valueField/aggregateexamples/todo/objectstack.config.ts— 6 widgets: same treatmentexamples/kitchen-sink/objectstack.config.ts— 7 widgets: same treatmentexamples/crm/src/__tests__/crm-metadata.test.ts— 5 new spec compliance tests (unique ids, titles, object binding, metric title↔label consistency, chart data binding fields)ROADMAP.md— Added completion entryBefore → After
Chart widgets additionally get top-level data binding:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.