Labels/Tags auf Einkaufslisten-Produkten #180

Closed
opened 2026-09-08 10:02:59 +02:00 by lena · 2 comments
Collaborator

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:

  • Eine Einkaufsliste hat eine eigene Label-Verwaltung (Name + Farbe), analog zum Speisekammer-Label-Picker.
  • Ein Produkt kann mit mehreren Labels markiert werden; Labels werden als farbige Chips am Produkt angezeigt.
  • Labels lassen sich �ber einen Picker zuweisen/entfernen, wie bei den anderen drei Listentypen.
  • Ein Label l�sst sich umbenennen/l�schen (L�schen entfernt die Zuordnung von allen Produkten, ohne die Produkte selbst zu l�schen).

Out of scope for this story:

  • Filtern der Produktliste nach Label (Todo/Speisekammer haben das teilweise) - eigene Folge-Story falls gew�nscht, hier nur Zuweisung/Anzeige.

Open questions: (escalate to human if unanswered)

  • Keine - Datenmodell ist eine direkte �bertragung des bereits etablierten Musters (PantryLabelEntity/PantryProductLabelEntity als n�chstliegende Vorlage, da Shopping und Pantry strukturell am �hnlichsten sind).
## 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:** - [ ] Eine Einkaufsliste hat eine eigene Label-Verwaltung (Name + Farbe), analog zum Speisekammer-Label-Picker. - [ ] Ein Produkt kann mit mehreren Labels markiert werden; Labels werden als farbige Chips am Produkt angezeigt. - [ ] Labels lassen sich �ber einen Picker zuweisen/entfernen, wie bei den anderen drei Listentypen. - [ ] Ein Label l�sst sich umbenennen/l�schen (L�schen entfernt die Zuordnung von allen Produkten, ohne die Produkte selbst zu l�schen). **Out of scope for this story:** - Filtern der Produktliste nach Label (Todo/Speisekammer haben das teilweise) - eigene Folge-Story falls gew�nscht, hier nur Zuweisung/Anzeige. **Open questions:** (escalate to human if unanswered) - Keine - Datenmodell ist eine direkte �bertragung des bereits etablierten Musters (PantryLabelEntity/PantryProductLabelEntity als n�chstliegende Vorlage, da Shopping und Pantry strukturell am �hnlichsten sind).
lena self-assigned this 2026-09-08 22:25:36 +02:00
Author
Collaborator

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.

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.
Author
Collaborator

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

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 run` all 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`).
lena closed this issue 2026-09-08 22:51:51 +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#180
No description provided.