fix(spec): declare extended Gantt config fields the renderer reads#2030
Merged
Conversation
GanttConfigSchema only declared the 5 core timeline fields (no passthrough), so parentField/typeField/colorField/groupByField/tooltipFields/baseline*/ resourceView/assignee*/quickFilters/autoZoomToFilter were stripped by parse() at compile time and on the runtime /meta/view re-validation, degrading the Gantt to a flat list. Declare them explicitly so the renderer contract round-trips through the spec.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 89 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.
Problem
GanttConfigSchema(packages/spec/src/ui/view.zod.ts) declared only the 5 core timeline fields as a plainz.objectwith no.passthrough():The Gantt renderer (
@object-ui/plugin-gantt), however, reads many more fields —parentField/typeField(the two-level summary→step hierarchy),colorField,groupByField,tooltipFields,baselineStartField/baselineEndField,resourceView/assigneeField/effortField/capacity,quickFilters,autoZoomToFilter.Because zod strips undeclared keys on
.parse(), those fields were dropped on both seams this schema guards:objectstack compileprotocol validation before writing the dist artifact, andGET /api/v1/meta/view/:object.Net effect: the API data and view config were correct, but the renderer received
parentField/typeField === undefinedand the Gantt degraded to a flat list (no parent/child rows, no summary bars, no expand/collapse). Downstream apps had to patch the bundled spec copy to work around it.Fix
Declare the fields the renderer actually consumes, explicitly and with
.describe()annotations (matching the surrounding*ConfigSchemaidiom — none of them usepassthrough). Also adds a smallGanttQuickFilterSchemafor thequickFiltersentries. Core-field validation is unchanged.Test
packages/spec/src/ui/view.test.ts— added a case asserting a full extended config (hierarchy, baseline, grouping, resource view, tooltip fields, quick filters) parses and round-tripsparentField/typeField. Full spec suite: 179 passed.A changeset is included (
@objectstack/specpatch).