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): move the grid onto the v2 predicate grammar (Track C)
The grid was the last surface authoring the legacy `$`-grammar, which forced
views to downgrade on apply and upgrade on save, and kept five wire fields
legacy-only. Its runtime state, filter bar, and every request it makes now
speak `TablePredicate`/`SortSpec`.
Wire: the five grid-carrying fields (rows GET filter+sort, find filter+sort,
delete-async, cancel-runs, columns-run) accept a dual-grammar union — strict
predicate tree first, legacy fallback — so external v1 callers are untouched.
The rows read path takes predicates NATIVELY into queryRows (no downgrade);
the job/dispatch routes downgrade via predicateToFilter at entry, which throws
on any leaf the legacy compiler would silently discard, so persisted job
payloads stay legacy and the runners are untouched.
Grid: filter state is TablePredicate, the filter bar converts rules with
filterRulesToPredicate — now select-aware (a numeric-looking option id is no
longer scalar-coerced, matching filterRulesToFilter) — and stale-operator
pruning uses a new prunePredicateForColumns that fails CLOSED to "no filter"
on malformed values instead of taking the page down. The view apply/save
boundary conversions added earlier are deleted: views and grid now share one
grammar end to end.
isTablePredicate moved from a route-local into converters as the shared
dual-wire discriminator; toLegacyFilter/toLegacySort live there too (pure
grammar code — keeping them in app/api/table/utils broke every test that
wholesale-mocks that module).
Legacy converters now have exactly one live consumer: the v1 table block,
whose tools still speak the $-wire by contract.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011M563cbFy2S74GvSDf2C3R
0 commit comments