Classify Done: the annotated-only filters vanish when the list is empty, trapping the user
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- frontend
Research direction
Start in src/pages/SequencesPage.tsx by comparing the empty-state FilterPopover props at lines 304-307 with the populated branch at 452-455, and inspect isAnnotatedView at line 53. Check src/utils/processingStage.ts:184 for the array-valued Done stage. Done means /classify/done still shows all six widgets after filters produce zero rows, allowing the emptying filter to be loosened.
Written by the indexing model from the issue text.
Description
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/donewith 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.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 1
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pyronear/pyro-annotator
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
pyronear/pyro-annotator#349 ·
-
type: enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
pyronear/pyro-annotator#322 ·
-
feat(scripts): read-only clone mode — add --skip-source-stage-update to import.py (pull-sequences) Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
pyronear/pyro-annotator#152 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
pyronear/pyro-annotator#68 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
pyronear/pyro-annotator#387 ·
All issues in pyronear/pyro-annotator
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
fullcalendar/fullcalendar#8106 ·