[WIP] Update specification documentation for clarity#417
Merged
hotlong merged 2 commits intocopilot/update-action-run-outputfrom Jan 31, 2026
Merged
[WIP] Update specification documentation for clarity#417hotlong merged 2 commits intocopilot/update-action-run-outputfrom
hotlong merged 2 commits intocopilot/update-action-run-outputfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot stopped work on behalf of
hotlong due to an error
January 31, 2026 01:57
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes TypeScript build failures caused by Zod .optional().default() fields (e.g., showDataLabels) being required in z.infer<> output types, by introducing explicit z.input<> “configuration” types for reports and updating the CRM example to use them.
Changes:
- Added
ReportInput(and related input types) usingz.input<>inpackages/spec/src/ui/report.zod.ts. - Updated
examples/crm/src/ui/reports.tsto type report definitions asReportInputinstead ofReport.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/spec/src/ui/report.zod.ts | Introduces ReportInput/related input types to represent configuration-friendly (pre-parse) shapes while keeping Report as the parsed/output type. |
| examples/crm/src/ui/reports.ts | Switches CRM report definitions to ReportInput so defaulted chart fields (like showDataLabels) can be omitted without TS errors. |
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.
Fix missing showDataLabels in chart configurations
Problem
Build failing in GitHub Actions (run #21536535900) due to TypeScript errors:
ChartConfigSchemadefinesshowDataLabelswith.optional().default(false)Reporttypeexamples/crm/src/ui/reports.tswere missing theshowDataLabelspropertyRoot Cause
Zod's type inference behavior with
.optional().default():z.input<>) - can be omittedz.infer<>) - always has value after parsingReporttype was usingz.infer<>, making it the output typeSolution
Following the pattern established by
defineStackand API request types:ReportInput,ReportColumnInput,ReportGroupingInput,ReportChartInputz.input<>instead ofz.infer<>to allow optional fields with defaultsReportInputinstead ofReportChanges
ReportInputand related input types inpackages/spec/src/ui/report.zod.tsReportInputtype inexamples/crm/src/ui/reports.tsPattern Established
Configuration types should use Input types to allow optional fields with defaults:
defineStack()usesz.input<>for configurationz.input<>z.infer<>Security Summary
No security vulnerabilities found in the changes.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.