Skip to content

finding(plugin-gantt): GanttConfigRestated's “kept for ONE reason: their JSDoc” rationale does not hold for parentField, which has none #6563

Description

@claude

Measured while writing standalone prose for the flat gantt face (objectui#6547, PR objectui#6561). Filed unassigned, observational.

The fact

GanttConfigRestated in packages/plugin-gantt/src/ObjectGantt.tsx carries a docblock stating why its restated members are kept rather than deleted:

Ten are RESTATEMENTS: GanttConfig already declares them (nine of the ten arrive from the spec's GanttConfigSchema, which declares 19 keys), and the type written here is mutually assignable with the twin. They are kept, not deleted, for ONE reason — their JSDoc is the only prose in this repo describing what this renderer DOES with each key.

Measured against the type on main @ 0235ce7c1, four of its twelve members carry no JSDoc of their own:

memberprose?
parentFieldnone anywhere — bare parentField?: string;
baselineEndFieldcovered by baselineStartField's shared docblock
assigneeFielddescribed inside resourceView's docblock
effortFielddescribed inside resourceView's docblock

Three of those four are fine — the prose exists, it just lives on a neighbour. parentField is the real one: it has no prose in that type at all, so the stated sole rationale does not hold for it.

Why it is worth recording

The rationale is load-bearing for anyone deciding whether a restatement may be deleted, and it is incomplete in a way that reads as complete. There is a second reason those members exist, stated a few lines further down in the same docblock: naming the local half gives ObjectGantt.configPin.test.ts two independent operands, so a spec bump that re-types one of the ten breaks the build at the pin. parentField serves that pin purpose and only that one — it is not dead weight, but a reader applying the "ONE reason" test literally would conclude it is deletable, and deleting it would silently remove a pin operand.

The concrete cost is already recorded: objectui#6547 asserted, on the strength of this docblock, that the renderer prose for the spec-sourced keys "is in plugin-gantt's package-private GanttConfigEx (now GanttConfigRestated)". For three of the four keys that card turned out to be about, that was not so — colorField and tooltipFields are not members of GanttConfigRestated at all, and parentField is the bare one above. The prose had to be read off the renderer's actual read sites instead.

What a fix might look like

Deliberately left open, and it may well be "nothing":

  • reword the docblock so both reasons are stated as reasons (documentation and the pin operand), so the deletability test is the right one;
  • or give parentField its own one-liner there, which makes the stated rationale true as written.

Note that PR objectui#6561 has since written standalone prose for parentField in @object-ui/types, which is a consumer-visible face — so the documentation half of the rationale is now weaker for that key specifically, and the pin half is what actually keeps it.

No behaviour change either way, and no urgency.

Related: objectui#6471, objectui#6547.

Generated by Claude Code


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