feat(study): offer Delete and More info on the studied card #830

Merged
raisondetredev merged 1 commit from refs/pull/830/head into main 2026-08-08 20:34:13 +02:00
raisondetredev commented 2026-08-08 20:33:37 +02:00 (Migrated from codeberg.org)

The per-card kebab in a session offered Add tags, Edit, Report and Bury,
while the same card in the browse list also offered Delete and More info.
A card you have just failed and can see is broken is exactly the card you
want to throw away or look up, and having to leave the session, find it in
the studyset, and act on it there is the long way round to a decision you
already made.

Both join the kebab, in the browse tile's order and — for the destructive
one — its error colouring, so the same card offers the same actions in the
same shape wherever you meet it.

Delete confirms first: unlike burying, it is permanent once the undo
window closes. It then soft-deletes, pushes sync, and drops the card from
the queue, with a snackbar whose UNDO restores the row and the card's
session slot together.

Dropping a deleted card from the queue is the same surgery burying already
did — remove every queued occurrence (a learning-step card can sit in the
queue more than once), advance without a history entry, complete the
session if nothing is left, wrap the cycle in cram — and re-admitting one
is the same too: back to the front if nothing has happened since,
otherwise behind the current card so it can't swap under an in-flight
rating. So the handlers are shared, renamed to _onCardWithdrawn /
_onCardReinstated for what they now cover, with the snapshot they use
renamed to match. The events stay distinct: StudySessionCardDeleted and
StudySessionCardBuried mean different things to a reader of the bloc's
event log even where they mean the same thing to its queue.

Signed-off-by: Tizian 「ティツィアーン」 raisondetredev@pm.me

The per-card kebab in a session offered Add tags, Edit, Report and Bury, while the same card in the browse list also offered Delete and More info. A card you have just failed and can see is broken is exactly the card you want to throw away or look up, and having to leave the session, find it in the studyset, and act on it there is the long way round to a decision you already made. Both join the kebab, in the browse tile's order and — for the destructive one — its error colouring, so the same card offers the same actions in the same shape wherever you meet it. Delete confirms first: unlike burying, it is permanent once the undo window closes. It then soft-deletes, pushes sync, and drops the card from the queue, with a snackbar whose UNDO restores the row and the card's session slot together. Dropping a deleted card from the queue is the same surgery burying already did — remove every queued occurrence (a learning-step card can sit in the queue more than once), advance without a history entry, complete the session if nothing is left, wrap the cycle in cram — and re-admitting one is the same too: back to the front if nothing has happened since, otherwise behind the current card so it can't swap under an in-flight rating. So the handlers are shared, renamed to `_onCardWithdrawn` / `_onCardReinstated` for what they now cover, with the snapshot they use renamed to match. The events stay distinct: `StudySessionCardDeleted` and `StudySessionCardBuried` mean different things to a reader of the bloc's event log even where they mean the same thing to its queue. Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
project-halkyon/halkyon-learn!830
No description provided.