Masterpackliste — Aktivitäts-Feed ergänzen #166

Closed
opened 2026-09-06 21:18:14 +02:00 by lena · 2 comments
Collaborator

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/MasterPacking enthaelt keine ActivityEvent*-Datei, MasterPackingListPage.tsx hat keinen Feed-Tab/-Panel.

Acceptance criteria:

  • Neue Eintraege, abgehakte/wieder-geoeffnete Eintraege sowie Mitglieder-beigetreten/-entfernt/-verlassen erzeugen einen Aktivitaets-Eintrag, analog zu ActivityEventKind bei Todo-Listen.
  • Ein Feed-Panel in der Masterpackliste-Ansicht zeigt die letzten Eintraege mit Akteur-Name und Zeitstempel, mit Pagination/„mehr laden" analog zu Shopping/Pantry.
  • Bestehende Mutationshandler (Create/Update/Delete Item, Checkout, Join/Leave/Remove Member) schreiben den passenden Event-Typ.

Out of scope for this story:

  • Ruecknachtraegliches Befuellen des Feeds fuer bereits existierende, vor dieser Story vorgenommene Aenderungen (Feed startet leer ab Einfuehrung, wie bei #25/#117/#101 auch).

Open questions: (escalate to human if unanswered)

  • Keine - reine Struktur-Kopie eines bereits dreimal etablierten Musters (Todo/Shopping/Pantry).
## 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/MasterPacking` enthaelt keine `ActivityEvent*`-Datei, `MasterPackingListPage.tsx` hat keinen Feed-Tab/-Panel. **Acceptance criteria:** - [ ] Neue Eintraege, abgehakte/wieder-geoeffnete Eintraege sowie Mitglieder-beigetreten/-entfernt/-verlassen erzeugen einen Aktivitaets-Eintrag, analog zu `ActivityEventKind` bei Todo-Listen. - [ ] Ein Feed-Panel in der Masterpackliste-Ansicht zeigt die letzten Eintraege mit Akteur-Name und Zeitstempel, mit Pagination/„mehr laden" analog zu Shopping/Pantry. - [ ] Bestehende Mutationshandler (Create/Update/Delete Item, Checkout, Join/Leave/Remove Member) schreiben den passenden Event-Typ. **Out of scope for this story:** - Ruecknachtraegliches Befuellen des Feeds fuer bereits existierende, vor dieser Story vorgenommene Aenderungen (Feed startet leer ab Einfuehrung, wie bei #25/#117/#101 auch). **Open questions:** (escalate to human if unanswered) - Keine - reine Struktur-Kopie eines bereits dreimal etablierten Musters (Todo/Shopping/Pantry).
lena self-assigned this 2026-09-06 22:03:02 +02:00
Author
Collaborator

Claiming this. Two scope corrections found while reading the actual code, before writing anything:

  1. No checked/unchecked event. 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.
  2. No member-joined/removed/left events either. Checked both sibling precedents this story is meant to mirror: ShoppingActivityEventKind (Created/Renamed/Activated/Deactivated/Moved) and PantryActivityEventKind (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 original ActivityEventKind, 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 reasoning ProductMoved/ProductTargetQuantityChanged earn their own kinds elsewhere). Proceeding with this scope.

Claiming this. Two scope corrections found while reading the actual code, before writing anything: 1. **No checked/unchecked event.** `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. 2. **No member-joined/removed/left events either.** Checked both sibling precedents this story is meant to mirror: `ShoppingActivityEventKind` (Created/Renamed/Activated/Deactivated/Moved) and `PantryActivityEventKind` (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 original `ActivityEventKind`, 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 reasoning `ProductMoved`/`ProductTargetQuantityChanged` earn their own kinds elsewhere). Proceeding with this scope.
Author
Collaborator

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).

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).
lena closed this issue 2026-09-07 09:48:48 +02:00
Sign in to join this conversation.
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
robert/todo#166
No description provided.