Archivieren fuer Einkaufsliste, Vorratsschrank und Masterpackliste ergaenzen #162
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#162
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: Archivieren fuer Einkaufsliste, Vorratsschrank und Masterpackliste ergaenzen
As a Listen-Owner,
I want to eine fertige Einkaufsliste, einen Vorratsschrank oder eine Masterpackliste genauso archivieren koennen wie ich es fuer Todo-Listen bereits kann,
so that ich meine Seitenleiste aufraeumen kann, ohne den Verlauf/die Daten zu loeschen.
Background
ArchiveTodoListCommand/UnarchiveTodoListCommandexistieren nur unterCheckly/Features/TodoLists- fuer Shopping, Pantry und MasterPacking gibt es kein Aequivalent, obwohl alle vier Listentypen inzwischen ansonsten (Umbenennen, Loeschen, seit #159 auch Duplizieren) denselben Funktionsumfang im "..."-Menue haben.Acceptance criteria:
Archive*Command/Unarchive*Command, das dem bestehenden Todo-Verhalten entspricht (nur der Owner darf archivieren, archivierte Listen verschwinden aus der normalen Seitenleisten-Ansicht, sind aber jederzeit reversibel).ListActionsMenu.tsxs bestehendem Todo-Muster.Out of scope for this story:
Open questions: (escalate to human if unanswered)
Claimed. Starting implementation.
Decision on the open question (should archiving a Pantry couple to archiving its linked Shopping list): independent archiving, no coupling. Reasoning: archiving is a pure visibility toggle (not an access/ownership change, unlike deletion), so there's no data-integrity reason to cascade it the way #94's access-derivation works for membership. A household might genuinely want to archive just one side (e.g. stop tracking pantry inventory for a while but keep the shopping list active, or vice versa) - coupling them would remove that flexibility for no real benefit and add cross-entity special-casing to what should stay a simple per-list flag, mirroring exactly how Todo's own Archive/Unarchive already works with zero coupling to anything else.
Planned shape: mirror
ArchiveTodoListCommand/UnarchiveTodoListCommandexactly for Shopping, Pantry, and MasterPacking - anIsArchivedbool on each entity, owner-only authorization, excluded from the default "my lists" query the sidebar renders from, with Archive/Unarchive items added to each type's "..." menu.Implemented and merged in commits
fd1b37f(backend) andb88c327(frontend) on master.Scope: Extended the existing Todo List Archive/Unarchive feature to Shopping Lists, Pantries, and Master Packing Lists. Archiving is a pure visibility toggle (hidden from the default sidebar view under a collapsible "Archived" section, fully reversible) — not an access-control change — and is independent per list type (archiving a Pantry does not affect its target Shopping List's own archived state, and vice versa).
Backend:
IsArchived(defaultfalse) toShoppingListEntity,PantryEntity,MasterPackingListEntityvia 3 separate single-table EF migrations.Archive/UnarchiveShoppingListCommandHandler,...PantryCommandHandler,...MasterPackingListCommandHandler— each owner-only via the sameAuthorizeXOwnerAccessForCurrentUserQuerypattern already used by that list type's Rename/Delete handlers.ShoppingListBroadcastDtogainedIsArchived); also fixedRenameShoppingListCommandHandlerto carry the realIsArchivedthrough instead of implicitly resetting it tofalseon every rename. Pantry and MasterPacking have no WS channel (matching their existing Rename/Delete), so the frontend refetches after the mutation instead.EntityNotFoundExceptionfor a missing id).Frontend:
ShoppingListItem,PantryItem, andMasterPackingListItem's dropdown menus, gating Rename/Invite alongside it the same wayTodoListMenualready gated Todo's.TodoListMenu's active/archived sidebar split from Todo-only to all 4 list types, and the archived section now renders the correct item component per type instead of alwaysTodoListItem.TodoListMenu(archived-section filtering per type).Verification:
dotnet buildclean; new backend tests reach the expectedDockerUnavailableException(Docker's daemon isn't reachable in this sandbox), confirming DI/authorization wiring; full frontend suite green (1175 tests, up from 1160);tsc -bandnpm run buildclean. A dedicated security-review pass confirmed all 6 new handlers correctly mirror their sibling Rename/Delete handlers' owner-only authorization — no IDOR, injection, or data-exposure findings.Closing as done.