mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-12-02 21:25:26 +09:00
Every page built its own "N of M" from its OWN array, which is only search-filtered -- the column rules are applied inside DataTable. So the bar read "4 of 4" while the table showed 2, on every page, the moment any rule was active. Moving filtering into the columns is what introduced it. useTableChrome now exposes `shownRows`/`shownCount`, computed with the same engine the table uses, so the two cannot disagree. Fifteen call sites moved onto it, plus the DataTableFooter counts that told the same lie. ResourceListPage had a worse version: it sliced `items` for the page size and DataTable filtered afterwards, so a page size of 25 took 25 UNFILTERED rows and then filtered them -- "show 25" could render three. It pages `chrome.shownRows` now, so the slice and the render agree. The Security tabs already computed this correctly by calling applyFilters themselves; they are left alone rather than churned. Guarded going forward: the preset prober now reads `.sk-viewbar__count` after selecting each view and fails on !BARCOUNT if the number disagrees with the rendered rows. 0 mismatches across 11 targets. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>