Labels/Tags auf Einkaufslisten-Produkten #180
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#180
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: Labels/Tags auf Einkaufslisten-Produkten
As a Mitglied einer Einkaufsliste,
I want to ein Produkt mit einem oder mehreren Labels versehen (z. B. "Bio", "eilig", "teuer"),
so that ich Produkte quer �ber Kategorien hinweg gruppieren/erkennen kann, so wie ich das auf der Standard-To-Do-Liste, im Vorratsschrank und auf der Masterpackliste bereits kann.
Kontext (verifiziert im Code): Todo (LabelPicker.tsx), Speisekammer (PantryLabelPicker.tsx) und Masterpackliste (TagMasterPackItemCommand) haben je ein eigenes, listenspezifisches Label-System (eigene Label-Entity + Farbe, pro Liste verwaltet). ShoppingProductItem.tsx hat aktuell keine Labels - nur Kategorien (Regal-Bereiche), was ein anderes Konzept ist (ein Produkt hat genau eine Kategorie, aber potenziell mehrere Labels).
Acceptance criteria:
Out of scope for this story:
Open questions: (escalate to human if unanswered)
Claiming this one. Plan: PantryLabelEntity/PantryProductLabelEntity is the nearest template (per the story's own note) - new ShoppingProductLabelEntity + ShoppingProductProductLabelEntity join table, Create/Rename/Delete label commands plus Tag/Untag product commands, all scoped per shopping list. Frontend: a ShoppingLabelPicker mirroring PantryLabelPicker.tsx, chips on ShoppingProductItem.tsx.
Implemented and tested end-to-end (backend + frontend), pushed to master (
72b21d66).Scope: ShoppingLabelEntity (list-scoped name+color) and ShoppingProductLabelEntity (product<->label join) mirror the existing Pantry label pattern. Create/Rename/Delete label handlers plus Tag/Untag product handlers, all authorized via list access; Tag/Untag additionally verify the product and label both belong to the claimed list. GetShoppingProductsForListQuery now projects Labels alongside CommentCount. Frontend: ShoppingLabelPicker.tsx mirrors PantryLabelPicker.tsx, wired into ShoppingProductItem's inline chips and overflow menu.
Acceptance criteria: all four met - list-scoped label management (name+color) via a picker analogous to Pantry's, multi-label tagging shown as colored chips, tag/untag via the picker, rename/delete (delete removes the assignment from all products without deleting the products).
Tests: 14 new backend handler tests (Checkly.Tests, all passing, 882 total), 13 new frontend tests across ShoppingLabelPicker.test.tsx and ShoppingProductItem.test.tsx (all passing). Local review container rebuilt and healthy.
Key decisions: no WS change event for label mutations (same reasoning as comments/#179) - the picker patches local state directly from each command's response.
Note: local
dotnet build/dotnet test/npm run build/npx vitest runall green, but Forgejo Actions CI could not be verified this cycle - the runner appears offline (see team-coach memory entry from earlier this cycle,ai/roles/memory/07_team_coach_memory.md).