Skip to content

finding(types): the flat gantt face's See {@link GanttConfig} pointers lead to a type that documents none of those keys #6547

Description

@os-support-ai

Measured while pinning GanttConfigEx's restatements (objectui#6471, PR objectui#6546). Filed unassigned, observational.

The fact

ObjectGanttSchema's flattened gantt face in packages/types/src/objectql.ts documents its members with a one-line summary plus a pointer, e.g.:

/** Single-parent pointer field building the task tree. See {@link GanttConfig}. */
parentField?: GanttConfig['parentField'];/** Record field mapping onto a node kind (task/summary/milestone/group). */
typeField?: GanttConfig['typeField'];

For the members GanttConfig declares itself (lockField, objectField, summaryExtent, defaultCollapsedDepth, borderColorField, dependencyTypes, timeZone, exportFileName, interactions, timeSegments) the pointer resolves to real prose.

For the members that arrive from the spec it does not. GanttConfig is SpecGanttConfig & { … }, and SpecGanttConfig is z.input<typeof GanttConfigSchema> — a type from @objectstack/spec whose emitted .d.ts carries no per-member JSDoc (verified in dist/view.zod-*.d.ts: the schema's 19 members are bare z.ZodOptional<z.ZodString> entries with no doc comments). So for parentField, typeField, baselineStartField, baselineEndField, groupByField, resourceView, assigneeField, effortField, capacity, quickFilters and autoZoomToFilter, following the pointer lands on a type that says nothing about the key.

The prose describing what the renderer actually does with those keys exists — it is in plugin-gantt's package-private GanttConfigEx (now GanttConfigRestated), in a different package, one a consumer of @object-ui/types need not have installed and cannot import.

Why it is worth a card

The pointer is not merely unhelpful; it is misdirecting. Someone following it concludes the key is undocumented, and the natural repair — writing the prose onto GanttConfig — means re-declaring those members inside the intersection in the published @object-ui/types, which is a widened published surface and a different review tier (measured on the built dist/index.d.ts in PR objectui#6546, where it was the reason that route was rejected).

So the cheap-looking fix is the expensive one, and that is worth recording before someone attempts it.

What a fix might look like

Not obvious, deliberately left open:

  • point at the renderer instead (See \plugin-gantt`'s `GanttConfigRestated``), which is honest but points out of the package;
  • expand the flat face's own one-liners so they stand alone and drop the pointer for the eleven spec-sourced keys;
  • or push the documentation upstream into @objectstack/spec's GanttConfigSchema via .describe(), so both faces inherit it from the one source — the only route that ends with the key documented where it is declared.

No behaviour change either way, and no urgency.

Related: objectui#6471, objectui#6051.

Generated by Claude Code

Metadata

Metadata

Assignees

Labels

domain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatpm:dispatched

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions