You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Measured while implementing #5874 (converging this face's private copy of the reference-bearing field family). Out of that card's fence — that card converges a forked table, this is a redundant guard, a different defect class — so it is filed rather than fixed in passing.
What is there
resolveDisplay in packages/plugin-kanban/src/ObjectKanban.tsx (the card-description helper, inside the legacy semantic heuristic) ends:
constisLookup=isExpandableFieldType(def);// was an inline disjunction before #5874if(isLookup&&isOpaqueId(raw))returnundefined;if(isOpaqueId(raw))returnundefined;returnraw;
The second line subsumes the first for every input: whenever the first return fires, the second would have fired too. So isLookup cannot change any outcome of this function — it is computed, branched on, and discarded.
Why it matters rather than being a tidy-up
It cost #5874 a real verification hole, and hid it in the shape that reads like success.
The guard also reads as live capability: it names the reference-bearing rule and appears to suppress un-expanded foreign-key ids from card descriptions, which is a real thing the function does — just not through this line.
Two readings, and the choice is behavioural, so it should be made deliberately rather than by whoever tidies first:
A. The guard is redundant — delete it.isOpaqueId(raw) already suppresses every opaque-looking id regardless of field type. Removes the dead branch and the @object-ui/core read on this path. Cost: the file stops declaring that relation columns are the reason ids get suppressed here.
B. The unconditional line is the mistake — narrow it. If the intent was that only relation columns suppress opaque ids (a non-relation text column holding an id-shaped string would then still render), the second return is over-broad and the guard was meant to gate it. This changes what cards show, so it wants a read of the original intent rather than an inference from the code.
Related: #5874, #5692, #3463 (two earlier dead-code sites in this same file).
Measured while implementing #5874 (converging this face's private copy of the reference-bearing field family). Out of that card's fence — that card converges a forked table, this is a redundant guard, a different defect class — so it is filed rather than fixed in passing.
What is there
resolveDisplayinpackages/plugin-kanban/src/ObjectKanban.tsx(the card-description helper, inside the legacy semantic heuristic) ends:The second line subsumes the first for every input: whenever the first
returnfires, the second would have fired too. SoisLookupcannot change any outcome of this function — it is computed, branched on, and discarded.Why it matters rather than being a tidy-up
It cost #5874 a real verification hole, and hid it in the shape that reads like success.
user/treeand each carrying the undeclarablereference#5874's required counter-probe — "auserfield is now treated as reference-bearing here" — cannot be written againstObjectKanban's rendered output, in either direction. finding: four more private copies of the reference-bearing field family (kanban, detail x2, resolveActionParams) — each missinguser/treeand each carrying the undeclarablereference#5874 records that absence in its test docblock rather than writing an assertion that cannot fail.ObjectKanban.tsxalso importsbuildExpandFields, which consults the same sharedEXPANDABLE_FIELD_TYPESobject once per schema field on every render, so a barevi.spyOn(EXPANDABLE_FIELD_TYPES, 'has').mock.callspin stayed green with the private copy restored. Measured, not feared. finding: four more private copies of the reference-bearing field family (kanban, detail x2, resolveActionParams) — each missinguser/treeand each carrying the undeclarablereference#5874's pin now filters recorded calls by the calling stack frame, and goes red as designed — but the reason a frame filter was needed at all is that this guard has no behaviour of its own to assert against.The guard also reads as live capability: it names the reference-bearing rule and appears to suppress un-expanded foreign-key ids from card descriptions, which is a real thing the function does — just not through this line.
Deliberately NOT this issue
user/treeand each carrying the undeclarablereference#5874, landed with this face converged and pinned. Converging it stays correct on its own terms: the day the guard is made live, it reads the shared family rather than a stale literal.Fix — needs a decision, not just a deletion
Two readings, and the choice is behavioural, so it should be made deliberately rather than by whoever tidies first:
isOpaqueId(raw)already suppresses every opaque-looking id regardless of field type. Removes the dead branch and the@object-ui/coreread on this path. Cost: the file stops declaring that relation columns are the reason ids get suppressed here.textcolumn holding an id-shaped string would then still render), the secondreturnis over-broad and the guard was meant to gate it. This changes what cards show, so it wants a read of the original intent rather than an inference from the code.Related: #5874, #5692, #3463 (two earlier dead-code sites in this same file).