Skip to content

The fault diagnostic tells hidden / hiddenOn authors the gate did NOT bite — on those two legs it did, and the node vanished #6503

Description

@os-support-ai

Found while wiring the disabled / disabledOn gate to the same reporter (#6445). Filed unassigned, outside that card's face — it moves bytes on a shipped visibility surface #6487 landed on hours ago, which is a copy decision of its own.

The site

packages/react/src/utils/visibilityDiagnostic.ts, the consequence paragraph every unresolvable-predicate report prints:

The node was treated as its safe default, which on this surface means the
gate did NOT bite - a predicate that cannot be evaluated reads on screen
exactly like one that said yes.

That is true of the four negated legs (visibleWhen / visible / visibleOn / visibility): evaluateCondition answers an unevaluable predicate with true, the leg negates it, the node is SHOWN.

It is false of the other two. SchemaRenderer.tsx returns evaluateVisibilityPredicate(newSchema.hidden, 'hidden')un-negated, so the same true means HIDE — shouldHide sets _hidden and SchemaRenderer returns null. The gate bit, hard: the node is not on screen at all. The author is told the opposite, in the one line that exists to tell them the truth.

The file already knows this. Its own module docblock says the fail-soft true reaches hidden / hiddenOn "where the same true means HIDE", and #6038's suite pins the 'hidden' leg — the NON-negated polarity — reports too, and still hides — it pins that the line is emitted, never what it says, which is why nothing went red.

Why it matters more here than on the negated legs

This is the polarity SchemaRenderer.tsx's own #3862/#3955 comment calls the harder one: "a greyed-out control is still on screen, a node that never rendered is indistinguishable from metadata that meant it." An author whose block vanished and who is then told the gate did not bite has been sent to look for a rendering bug — the console line is actively pointing away from their predicate.

The shape of the fix (already prepared, not applied)

#6445 landed PredicateGateKind + the GATE_KIND_COPY table in this module: the opening line and the consequence paragraph are now table-driven, indexed with no ?? fallback, and every in-repo call site states its value. Fixing this leg is a third table entry — visibility prefix, vanishing consequence — passed by the two hidden / hiddenOn call sites in SchemaRenderer.tsx. No signature change, no new reporter, no verdict change.

Left undone deliberately: it changes bytes an author reads on a surface #6487 just landed, which wants its own copy decision rather than a rider on a disabled card.

Related: #6445 (the gate this table came from), #6487 / #6038 / #5454 (the reporter), #3955 (the hidden polarity ruling).

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