feat: [ENG-2547] M2.17 WebUI numbered pagination + Filter dropdown + active filter tags#598
Conversation
|
Claude finished @ncnthien's task in 3m 23s —— View job PR Review: feat: [ENG-2547] M2.17 WebUI numbered pagination + Filter dropdown + active filter tags
SummaryScore: 4/5 A well-structured refactor that correctly migrates from There is one real bug and a few architectural concerns worth addressing before merge. Issues FoundBug
Architecture / Performance
Code Quality
Missing Test Coverage
Minor UX Note
What's Good
|
…edup useGetProviders + isDurationPreset, memo tags
|
Claude finished @ncnthien's task in 2m 30s —— View job PR Review: feat: [ENG-2547] M2.17 WebUI numbered pagination + Filter dropdown + active filter tags
SummaryScore: 4/5 The latest commit ( What Was Fixed ✅
Remaining IssuesMissing Test Coverage (Medium — CLAUDE.md violation)
CLAUDE.md mandates 80% coverage minimum and that critical paths must be covered. Add tests for this hook → Redundant Null Check (Nitpick)
const hasSelection = selected?.from !== undefined && selected?.from !== null
Unstable Ellipsis Keys (Nitpick)
<PaginationItem key={`ellipsis-${idx}`}>Array index as part of a key for items whose position can shift when the current page changes. Since there are at most two ellipsis items (left and right), stable string keys would be cleaner: <PaginationItem key={idx === 1 ? 'ellipsis-left' : 'ellipsis-right'}>Double-Fetch for Counts (Performance — Medium)
const {data: countsData} = useGetTasks({page: 1, pageSize: 1, ...nonStatusFilters})This fires a second request on every filter change purely to get stable per-status counts. If the server always returns aggregate counts in the If the two-request pattern is intentional (e.g. the server only returns counts for the filtered status bucket), add a comment explaining why — the coupling is non-obvious to future readers.
|
…eat/ENG-2547 # Conflicts: # src/webui/features/tasks/components/task-list-view.tsx
|
Claude finished @ncnthien's task in 3m 5s —— View job PR Review: feat: [ENG-2547] M2.17 WebUI numbered pagination + Filter dropdown + active filter tags
SummaryScore: 4/5 The latest push is a merge from Five issues from the previous review were fixed in What Was Fixed in This Iteration ✅Everything landed by
Remaining IssuesMissing Test Coverage (Medium — CLAUDE.md violation)
Untested boundary cases:
Redundant Null Check (Nitpick — third round)
Unstable Ellipsis Keys (Nitpick — third round)
|
Summary
useInfiniteQuerywith singleuseQuerynumbered pagination (page/pageSize); sharedPaginationprimitives + page-sizeSelect.task-filter-menu.tsx) with submenus: Type, Provider, Model, Time (Calendar viatask-date-filter-panel.tsx), Duration. Active dot indicator on the trigger.task-filter-tags.tsxrow renders each active filter as a removable sharedTagplus a "Clear filters" CTA.use-task-filter-params.ts(status/types/providers/models/from/to/duration/q/page/pageSize) — shareable URLs, browser back/forward work, and filter changes auto-reset to page 1.useGetTaskscall (no status filter) so per-status counts stay stable when the active filter has zero matches.task-subscription-initializer.tsxinvalidates['tasks', 'list']on the six task lifecycle events (CREATED / STARTED / COMPLETED / ERROR / CANCELLED / DELETED).ascasts),Record<…>-based status/duration lookups,useMemofor derived filter args / provider Maps / model options, andcn({…: cond})for conditional pagination classes.titletooltip on the truncated Input cell +leading-nonefix for theTYPEbadge optical centering.Test plan
?page=N; correct slice loads.?q=....npm run typecheck && npm run lintclean.npx mocha --forbid-only "test/unit/webui/features/tasks/**/*.test.ts"— all passing.