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(view): remove ObjectView's filter/sort bar, which was never connected (#3087)
`ObjectView` carried its own filter and sort bar: `filterValues` / `sortConfig`
state, a `filter-ui` schema and a `sort-ui` schema, ~80 lines of field
introspection to build them. None of it was wired. No setter was ever called and
neither schema was ever rendered — both states sat at their initial empty value
for the component's entire life.
Removed rather than wired, because the real filter and sort UI belongs to the
renderer this component delegates to. `showFilters`, `showSort` and
`filterableFields` are forwarded downstream and `ListView` implements them for
real (its own filter panel, and a `filterableFields` whitelist). Connecting the
local copy would have produced a SECOND filter bar competing with that one.
The dead state was not inert, though — it left a branch in every merge path that
could never run, and those branches read as live code:
- the fetch path merged `baseFilter` with a `userFilter` that was always `[]`;
- `mergedFilters` (what the `renderListView` slot receives, used by the Studio
design surface) opened with a branch that REPLACED the view's filter with the
user's instead of combining them — a real bug, had the state ever been written.
CORRECTION TO #3081. That PR reported two ObjectView defects. Only the first was
live: the object `table.defaultFilters` drop sat on the always-taken path. The
second — rule objects spread into the `and` — required a non-empty user filter,
so it could not run here. The shape is genuinely broken (a live server answers
it with a 400, measured) and the adapter-level defence added alongside is still
warranted for any producer that emits it, but that site was dead code, not a
live defect. #3081's changeset is unreleased and now carries the correction.
Keeping code that looks live and cannot run is what made that misreading
possible — twice in one session — which is the argument for deleting it rather
than leaving it for the next reader.
No behaviour change: every removed branch was unreachable. Net -85 lines. The
surviving paths are pinned by 4 new tests covering what the component hands the
delegated renderer, alongside the 5 from #3081 covering what it queries with.
Full suite 763 files / 8915 tests green; tsc clean; eslint 0 errors.
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
0 commit comments