Data Grid & Sidebar QA Fixes: Debounced Search, Unified Clear Filters, Boolean Filters
Executive summary
A round of QA fixes and UX polish for the admin data grids and the secondary (filter) sidebar. Search inputs now debounce before calling the server, a single "Clear All" control resets every active filter and search, the sidebar gains paging and clear controls, and column filters can now handle true/false fields. The change also removes several unused demo/placeholder pages.
Why this was needed
QA flagged a set of usability issues in the grid and sidebar: the search box outline was visually clipped, the "Clear All" button was duplicated and inconsistent, every keystroke in sidebar search fired an API call, long sidebar lists had no way to jump between pages, bulk-action bars overlapped the pagination row, and boolean columns rendered raw values in filters. These rough edges made filtering and search feel unpolished and could generate unnecessary backend load.
Client / user impact
- Typing in the inbox folder search and the documents document-type search no longer fires a request on every keystroke (350ms debounce), reducing server chatter and flicker.
- One clear, consistent "Clear All" button now resets column filters, the search box, and the sidebar's preset folder/status filters together.
- The grid search input outline is no longer cropped.
- The secondary sidebar supports page navigation (jump to page), clear controls, and tidier search affordances.
- Boolean filter values now read as True / False (and blank/null as N/A) instead of raw values.
- The bulk-selection action bar no longer sits on top of the pagination controls.
Technical scope
useDebounce(350ms) applied tofolderSearchininbox/page.tsxanddocumentTypeSearchindocuments/page.tsx; debounced value feeds the paginated query hooks.data-grid.tsx: newhandleClearAllclears column filters, search, and an optionalonClearAllFilters(external/preset) callback; single conditionalClear Allbutton; duplicate clear-all removed fromapplied-filters-display.tsx. Inbox/mail grids passonClearPresetFiltersto reset status + selected folder.- Grid containers across batches/documents pages switched from
overflow-hiddentooverflow-x-hidden(or removed) to stop clipping the search-input focus outline. column-filter-popover.tsx: addedformatFilterValuefor boolean (True/False) and null/empty (N/A) display.page-sidebar.tsx(+388/-72): pagination with page-jump viaonSelectPage/pageSize, clear buttons, route-aware inline search actions;usePaginatedFolders/usePaginatedDocumentTypesand folder/document-type queries exposesetPage.- Bulk action popup repositioned above pagination (
bottom-[6.5rem]) with newcontainerClassName; prop renamesonFilterChange->onFilterChangeActionandonClose->onCloseAction. - Cleanup: deleted unused
batches/[id],inbox/[id],settings/profilepages andsrc/reference_files/*(~740 deletions), removed profile/settings links from the user menu, and trimmedAGENTS.md.
Risk & mitigation
Low to moderate. Risk is mostly UI-layout regression: the broad overflow-hidden -> overflow-x-hidden changes could in theory affect scroll/clipping on grid pages, and the prop renames (onFilterChangeAction, onCloseAction) touch shared grid components. Deleting routes (inbox/[id], batches/[id], settings/profile) is safe only if nothing links to them. Mitigation: this shipped to the QA environment for verification before any production promotion; regression-test grid scrolling, filtering, and the removed routes.
QA validation focus
- Inbox and Documents sidebar search: confirm requests fire only after typing pauses (~350ms), not per keystroke.
- "Clear All" in the grid: verify it clears column filters, the search box, and the sidebar preset folder/status filters in one action.
- Confirm the grid search input outline is fully visible (not cropped) on batches, documents, and inbox pages.
- Sidebar pagination: page-jump, next/previous, and clear buttons behave correctly with and without an active search.
- Boolean columns in filters render as True/False; null/empty as N/A.
- Select rows and confirm the bulk-action bar sits above the pagination row without overlap.
- Verify removed routes (/inbox/[id], /batches/[id], /settings/profile) are not reachable from any link or menu.