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
refactor(table): store saved views in the v2 predicate grammar
Views shipped (#5961) storing the legacy `$`-object filter and `{col: dir}`
sort record — a brand-new persistent store of the grammar this branch is
retiring, created days before the wire moved to predicates. The feature is
still dark (`table-views` is UI-only and off), so the stored shape can change
now without a data migration; once the flag flips, it cannot.
`TableViewConfig` now carries `TablePredicate` + `SortSpec`. The wire contract
uses `predicateSchema`/`sortSpecSchema`, which also brings the strict-object
node shapes and depth/size bounds to the view routes — previously a view's
filter was accepted as an arbitrary domain object.
The grid still runs on the legacy pair internally; translation happens at the
view boundary. Apply: `predicateToFilter` (total here — stored predicates are
builder-authored). Save: `filterToRules ∘ filterRulesToPredicate`, the
builder round-trip. SortSpec keeps priority order the record never could.
Dev-era rows written before the switch are normalized on read: legacy filters
convert through the builder round-trip and are dropped if the result's leaf
fields fail the column-name pattern — the rule converters accept garbage
(`{$bogus: …}` becomes a rule on a column literally named `$bogus`), so the
conversion is validated rather than trusted.
Also folds `sortQuery`'s single-entry record out of the save path in favour of
the sort params directly, so a saved view records the same thing the URL says.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011M563cbFy2S74GvSDf2C3R
0 commit comments