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
{{ message }}
Repository navigation
Commit e058ce5
Browse filesBrowse the repository at this point in the historyBrowse files
feat(spec/ui): navItemVisibleDataNeedsDataSource reads an authored bare-string visible too
The export now normalises a bare-string visible through
EvaluatedExpressionInputSchema, the slot's own schema, so a mirror whose
visible stays the authored string chains it as it is. NavigationItemSchema
accepts and refuses exactly what it did: its own check only ever sees the
parsed envelope.
Claude-Session: https://claude.ai/code/session_019oFY6Hi35J7atvgVFnmoaK
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: .changeset/24534-export-nav-visible-data-check.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,4 +8,8 @@ Clause-②: yes (widening)
8
8
9
9
-**What is added.** One function export, `navItemVisibleDataNeedsDataSource(item, ctx)`: the refinement `NavigationItemSchema` already runs, which refuses a navigation entry with no `dataSource` whose `visible` reads `data`. It is exported the way `objectNavTargetExclusivity`, `checkPageRegionPlacement` and `checkPageMainRegionWidth` are, so a hand-written mirror of the navigation item can chain the same function in its own `superRefine` instead of restating the rule.
10
10
-**What does not change.** No schema accepts or refuses anything new. The issue is the same: one `custom` issue at `visible`, with the same message. `NavigationItemSchema` still attaches the same function, once, by name.
11
-
-**What the function reads.** It judges the entry after the spec's parse, where `visible` is the `{ dialect, source }` envelope. A bare-string `visible` (`'data.total == 1'`, the shorthand an author writes before the spec normalises it) is not read and raises nothing. So a mirror whose own `visible` stays the authored string must hand the function the parsed `{ dialect: 'cel', source }` form, or it refuses nothing.
11
+
-**What the function reads.** Both spellings of `visible`, so it answers the same on an entry as authored and as parsed:
12
+
- the authored bare string (`'data.total == 1'`), normalised by `EvaluatedExpressionInputSchema`, the slot's own schema, exactly as the spec's parse normalises it;
13
+
- the parsed `{ dialect: 'cel', source }` envelope.
14
+
15
+
A boolean or absent `visible` judges nothing. So a mirror whose own `visible` stays the authored string chains the function as it is and refuses what the spec refuses.
0 commit comments