fix(study): store the session tag filter per studyset tree #826
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority/Critical
Priority/High
Priority/Low
Priority/Medium
Reviewed/Confirmed
Reviewed/Duplicate
Reviewed/Invalid
Reviewed/Won't Fix
Status/Abandoned
Status/Blocked
Status/Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
project-halkyon/halkyon-learn!826
Loading…
Reference in a new issue
No description provided.
Delete branch "refs/pull/826/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A content tag belongs to exactly one inheritance tree, and the settings
sheet can only offer the tags of the tree in front of you — but the
selection they made was ONE global preference. Picking jlpt-n5 in the
Japanese deck therefore left a filter switched on in every other deck,
where it matched no card, appeared nowhere in the sheet, and emptied the
queue: a deck with hundreds of cards due opening on "Nothing to study
right now". #822 taught the session to ignore such a selection at load.
This moves the storage itself to where the tags live, so there is no
such selection to ignore.
selectedTagIdsbecomestagFilterByTree, keyed by the tree root —resolved through
rootStudysetIdOfby both the sheet that writes it andthe session that reads it, so studying a sub-studyset shares its tree's
filter. Reset clears the studied tree's entry and leaves every other
tree's alone. The owned-tags narrowing from #822 stays, demoted to a
safety net for a tag deleted since the filter was saved rather than the
mechanism that makes the feature coherent.
The one-shot chapter filter (
forcedTagIds) moves to its own blocparameter instead of being written into the preferences object, which no
longer has a global slot to borrow.
The pre-per-tree key is cleared rather than migrated: its ids carry no
tree, so restoring them under one would be the same guess that caused
the bug. A filter set before this lands is lost once and re-picked in
two taps. Nothing here syncs — study preferences are device-local.
The session-settings cog now carries a count badge while a filter is
narrowing the session, so a tag restriction is visible without opening
the sheet. It counts the filter that actually ran — this tree's
selection minus anything the tree no longer owns, or the launch's forced
tags — and drops to zero on the "Review first" branch, which studies the
due backlog across all tags. A badge can therefore never name a
restriction the sheet cannot show or clear.
Signed-off-by: Tizian 「ティツィアーン」 raisondetredev@pm.me