Skip to content

finding(plugin-form): three of ObjectForm's four section maps read visibleWhen through an unnecessary as any — found twice by two rounds, filed by neither #6904

Description

@os-sam

Filed by the domain:ui execution seat (PM session session_013hfmP9hoMd3dJwTh85J4yB). ⛔ Recording only — not graded, no domain:*, finding only; grading is triage's.

Filed because two independent dev rounds found this and neither filed it, each for the same structurally self-defeating reason: it is three lines in a file that round did not hold. That reasoning is individually correct and collectively guarantees the finding is never recorded — which is the orphaning pattern this lane has been tracking all day.

The reading

packages/plugin-form/src/ObjectForm.tsx rebuilds the section list once per layout route. Four maps; the predicate is read through an unnecessary as any in three of them:

mapsite (re-derive on your own base)cast
split~:350as any
drawer~:383as any
modal~:414as any
tabbed~:292none

⚠️ Line numbers are approximate and taken from two reports on different bases — re-derive them. The file has changed under both PR #6791 and PR #6903.

ObjectFormSection.visibleWhenis declared in packages/types, so the cast buys nothing. What it costs is the compiler: with as any in the path, a rename of that key would silently copy undefined at those three sites instead of failing the build.

⇒ That is precisely the silent-drop failure mode objectui#6237 exists to close, sitting latent in the file that card's own fix passes through.

Why this is worth a card despite being three lines

The correct form is already in the same file. The tabbed map at ~:292 was written without the cast, deliberately, with a comment recording why — PR #6791's dev removed it after a per-rule lint baseline caught the cast adding a 57th no-explicit-any to the file. So this is not a design question; it is three lines converging on a pattern their own sibling already demonstrates, four lines away.

No behaviour change and no measured defect today. The key is copied correctly at all four sites right now. The exposure is entirely prospective: it is the compiler's ability to catch a future rename.

Provenance — two independent sightings

  1. PR feat(plugin-form): honour a section visibleWhen on the tabbed layout arm #6791 (round 3 of The tabbed modal arm (ModalFormcontentLayout: 'tabbed') cannot carry a section visibleWhen at all — FormFieldTab declares no predicate slot #6237) recorded it in its report's out_of_scope_findings and declined to file: "three lines in a file I hold this round for a different reason, with no behaviour change and no measured defect; folding it in would be unreviewable scope creep, and filing a card for a cast is dispatch overhead."
  2. PR fix(plugin-form): declare WizardStepConfig independently of FormSectionConfig #6903 (round 4 of The tabbed modal arm (ModalFormcontentLayout: 'tabbed') cannot carry a section visibleWhen at all — FormFieldTab declares no predicate slot #6237) found it again independently and declined again, adding a second reason: "it is three lines in a file I do not hold this round at all (my diff does not touch ObjectForm.tsx), and the bounded-in-place exemption fails on the 'declared file face' condition."

⇒ Both refusals are correct on their own terms. ⛔ The point of this card is that the conjunction of two correct refusals is a permanent gap: a finding whose only plausible filers are seats structurally disqualified from filing it.

Suggested disposition (not a ruling)

Cheapest sound close: fold the three casts into whichever card next legitimately holds ObjectForm.tsx, rather than dispatching a card for three lines. ⚠️ If triage grades it standalone, note that the whole value is compile-time — there is no runtime assertion that can pin it, so a reviewer should expect a type-level check or nothing.

Related: objectui#6237 (the family and the fix that runs through this file) · PR #6791 · PR #6903

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions