Summary
The word selection screen caches hook results based only on status transitions, so streak counters can go stale while a word remains in-progress.
Problem
BaseWordSelection rebuilds its cached status map only when the comma-joined status string changes. The rendered UI also reads streak from that cached hook result. If a word goes from 1/10 to 2/10 without changing status, the streak indicator can remain stale.
Impact
The UI can show the wrong current streak and mislead the user about actual progress.
Relevant code
src/components/BaseWordSelection.tsx:48-61
src/components/BaseWordSelection.tsx:241-258
Expected behavior
Streak indicators should update whenever the underlying streak changes.
Suggested direction
- Remove the manual cache, or key it on the fields that are actually rendered.
- Prefer deriving the rendered state directly from current hook results.
- Add a component test covering
in-progress streak increments without a status change.
Summary
The word selection screen caches hook results based only on status transitions, so streak counters can go stale while a word remains
in-progress.Problem
BaseWordSelectionrebuilds its cached status map only when the comma-joined status string changes. The rendered UI also readsstreakfrom that cached hook result. If a word goes from1/10to2/10without changing status, the streak indicator can remain stale.Impact
The UI can show the wrong current streak and mislead the user about actual progress.
Relevant code
src/components/BaseWordSelection.tsx:48-61src/components/BaseWordSelection.tsx:241-258Expected behavior
Streak indicators should update whenever the underlying streak changes.
Suggested direction
in-progressstreak increments without a status change.