What
On /classify/done, filtering down to zero results makes the Result, FP types, Smoke types and Certainty filters disappear from the FilterPopover — the four filters most likely to have caused the empty list. There's no way to loosen the filter that emptied the page except "Reset all" or reloading.
The popover header reads More filters (2) on the empty state and More filters (6) when rows are present.
Why
SequencesPage renders two FilterPopovers, and they gate those four props differently:
src/pages/SequencesPage.tsx:304-307 (empty-state branch) — showModelAccuracy={defaultProcessingStage === 'annotated'}, same for the other three.
src/pages/SequencesPage.tsx:452-455 (populated branch) — showModelAccuracy={isAnnotatedView}, same for the other three.
isAnnotatedView is stageFilterIncludes(defaultProcessingStage, 'annotated') (:53), which handles both a bare stage and an array. The raw === 'annotated' comparison does not: SequencesPageWrapper passes ALL_CLASSIFIED_STAGES — the array ['seq_annotation_done', 'annotated'] (src/utils/processingStage.ts:184) — so the comparison is always false on the Done list and the four filters never render there.
The prop is typed ProcessingStageFilter (:40), i.e. it legitimately holds a stage or an array, so === 'annotated' is a type-safe expression that is simply wrong for half the domain. TypeScript won't catch it.
Repro
- Go to
/classify/done with rows present, open Filters → More filters — six widgets, including Result.
- Set Result to one with no matches (or any filter combination yielding zero rows).
- The empty state renders; reopen Filters → More filters — two widgets. Result is gone, and so is the way to undo the filter that emptied the list.
Fix
Use isAnnotatedView in the empty-state branch too (:304-307), matching :452-455. The two FilterPopover call sites have drifted; passing one shared props object would stop them drifting again.
Notes
Pre-existing and independent of #270 (which restyles the Result filter) — the old <select> disappeared the same way. Found while verifying #270 in a browser.
What
On
/classify/done, filtering down to zero results makes the Result, FP types, Smoke types and Certainty filters disappear from the FilterPopover — the four filters most likely to have caused the empty list. There's no way to loosen the filter that emptied the page except "Reset all" or reloading.The popover header reads
More filters (2)on the empty state andMore filters (6)when rows are present.Why
SequencesPagerenders twoFilterPopovers, and they gate those four props differently:src/pages/SequencesPage.tsx:304-307(empty-state branch) —showModelAccuracy={defaultProcessingStage === 'annotated'}, same for the other three.src/pages/SequencesPage.tsx:452-455(populated branch) —showModelAccuracy={isAnnotatedView}, same for the other three.isAnnotatedViewisstageFilterIncludes(defaultProcessingStage, 'annotated')(:53), which handles both a bare stage and an array. The raw=== 'annotated'comparison does not:SequencesPageWrapperpassesALL_CLASSIFIED_STAGES— the array['seq_annotation_done', 'annotated'](src/utils/processingStage.ts:184) — so the comparison is alwaysfalseon the Done list and the four filters never render there.The prop is typed
ProcessingStageFilter(:40), i.e. it legitimately holds a stage or an array, so=== 'annotated'is a type-safe expression that is simply wrong for half the domain. TypeScript won't catch it.Repro
/classify/donewith rows present, open Filters → More filters — six widgets, including Result.Fix
Use
isAnnotatedViewin the empty-state branch too (:304-307), matching:452-455. The twoFilterPopovercall sites have drifted; passing one shared props object would stop them drifting again.Notes
Pre-existing and independent of #270 (which restyles the Result filter) — the old
<select>disappeared the same way. Found while verifying #270 in a browser.