Masterpackliste — Aktivitäts-Feed ergänzen #166
Labels
No labels
priority/could
priority/must
priority/should
priority/wont
status/blocked
status/claimed
status/done-migrated
type/bug
type/feature
type/infra
type/tech-debt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
robert/todo#166
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Story: Masterpackliste — Aktivitäts-Feed ergänzen
As a Mitglied einer Masterpackliste,
I want to sehen, was sich kuerzlich auf der Liste getan hat (neue Eintraege, abgehakte Eintraege, neue/entfernte Mitglieder),
so that ich nicht raten muss, wer was zuletzt geaendert hat.
Background
Todo-Listen (#25), Einkaufslisten (#117) und Vorratsschrank (#101) haben alle einen eigenen Aktivitaets-Feed. Die Masterpackliste (#93) hat als einziger der vier Listentypen keinen -
Checkly/Features/MasterPackingenthaelt keineActivityEvent*-Datei,MasterPackingListPage.tsxhat keinen Feed-Tab/-Panel.Acceptance criteria:
ActivityEventKindbei Todo-Listen.Out of scope for this story:
Open questions: (escalate to human if unanswered)
Claiming this. Two scope corrections found while reading the actual code, before writing anything:
MasterPackItemEntity's own doc comment is explicit: "Items are never checkable/'done' - the Masterpackliste is reference data, not a todo workflow." There is no such state to log an event for. Dropping that bullet from my own drafted AC.ShoppingActivityEventKind(Created/Renamed/Activated/Deactivated/Moved) andPantryActivityEventKind(Created/Renamed/CheckedIn/CheckedOut/TargetQuantityChanged/Deleted) - neither includes membership events, only item-level ones. Membership events (MemberJoined/MemberRemoved/MemberLeft) are a Todo-only feature of the originalActivityEventKind, not something Shopping/Pantry replicated when they got their own feeds. Matching that established, consistent scope for a non-Todo list type rather than my own initial draft.Revised event vocabulary (
MasterPackActivityEventKind):ItemCreated,ItemUpdated,ItemDeleted,Checkout(the list-to-Todo-list conversion from #93 - a significant, one-time action worth its own log entry, same reasoningProductMoved/ProductTargetQuantityChangedearn their own kinds elsewhere). Proceeding with this scope.Closing out - implemented as scoped in the claim comment above.
Scope: MasterPackActivityEventKind (ItemCreated/ItemUpdated/ItemDeleted/Checkout), MasterPackActivityEventEntity (list FK CASCADE, actor FK SET NULL), an internal CreateMasterPackActivityEventCommand written by the existing Create/Update/Delete item and Checkout handlers, and an authorized GetMasterPackActivityFeedQuery with skip/take pagination. Frontend: a toggleable MasterPackActivityFeedPanel with load-more, and MasterPackActivityEventItem (per-kind emoji, clickable body linking to the item when it still exists).
Tests: handler tests for event persistence (actor-account-deleted -> null actor, body truncation), feed pagination/scoping/validation, and each mutation handler's event-writing side effect; component tests for the panel and item rendering. Full backend suite (1002 tests) and frontend suite (1205 tests) green.
Also fixed two unrelated pre-existing test issues found while verifying this: a mock-dependency misuse in DuplicateTodoListCommandHandlerTests, and a flaky DateTimeOffset-precision comparison in UpdateCommentCommandHandlerTests (both separate commits on master, not part of this feature's scope).