WIP: fix(shopping-list) keep item reasons and ticks of deleted users, shown as "Unbekannt" #65

Draft
araemer wants to merge 8 commits from fix-reason-deleted-user into stage
Owner

recipe-app side of recipe-backend issue #35: deleting a user now keeps the shopping list item reasons they added, so a reason's addedBy can be absent (contract: recipe-platform PR #57, commit 18f9b60; rule: ADR docs/adr/2026-10-25-deleted-user-references.md, recipe-platform PR #58). Backend side: recipe-backend PR #38.

Stays draft until recipe-platform #57 is on main. The 004 contract merges first, then #57, then the contract_pin check is re-run.

Based on 004-fill-list-from-meal-plan (#64), not stage. Contract 18f9b60 builds on the spec 004 contract, and MEAL_PLAN reasons exist only on that branch. Until #64 is merged this PR also shows the 004 commits; it gets rebased onto stage afterwards.

Changes

  • contract.ref → 18f9b6007956977bc85464ddca46882438fe9757.
  • ShoppingListItemReasonModel.addedBy is optional. ShoppingListItemMapper.mapReasonDtoToModel maps it only when present. Before this change, a single reason without addedBy threw in the mapper and the whole list failed to load.
  • shoppingListDisplayUtils: manual and meal-plan reasons and the ticked text name a missing user "Unbekannt" via getUserDisplayName, as comments and ratings do. describeTick now reads "Abgehakt von Unbekannt am …" instead of "Abgehakt am …". This also applies to an optimistic tick without a session user (decided by the user).
  • Tests for the missing-user cases in ShoppingListItemMapper.test.ts and shoppingListDisplayUtils.test.ts.

Verification

  • npm run test (536 passed), npm run build, npm run lint: pass (the lint warnings are the existing two in MealPlanDayProvider.tsx).
  • Not verified in the running app: the dev backend wasn't reachable from the session. To check, open a list containing an item added or ticked by a deleted user. It should show "Manuell hinzugefügt von Unbekannt am …" / "Abgehakt von Unbekannt am …", and the list must load.

🤖 Generated with Claude Code

recipe-app side of recipe-backend issue #35: deleting a user now keeps the shopping list item reasons they added, so a reason's `addedBy` can be absent (contract: recipe-platform PR #57, commit `18f9b60`; rule: ADR `docs/adr/2026-10-25-deleted-user-references.md`, recipe-platform PR #58). Backend side: recipe-backend PR #38. **Stays draft** until recipe-platform #57 is on `main`. The 004 contract merges first, then #57, then the `contract_pin` check is re-run. **Based on `004-fill-list-from-meal-plan` (#64), not `stage`.** Contract `18f9b60` builds on the spec 004 contract, and MEAL_PLAN reasons exist only on that branch. Until #64 is merged this PR also shows the 004 commits; it gets rebased onto `stage` afterwards. ## Changes - `contract.ref` → `18f9b6007956977bc85464ddca46882438fe9757`. - `ShoppingListItemReasonModel.addedBy` is optional. `ShoppingListItemMapper.mapReasonDtoToModel` maps it only when present. Before this change, a single reason without `addedBy` threw in the mapper and the whole list failed to load. - `shoppingListDisplayUtils`: manual and meal-plan reasons and the ticked text name a missing user "Unbekannt" via `getUserDisplayName`, as comments and ratings do. `describeTick` now reads "Abgehakt von Unbekannt am …" instead of "Abgehakt am …". This also applies to an optimistic tick without a session user (decided by the user). - Tests for the missing-user cases in `ShoppingListItemMapper.test.ts` and `shoppingListDisplayUtils.test.ts`. ## Verification - `npm run test` (536 passed), `npm run build`, `npm run lint`: pass (the lint warnings are the existing two in `MealPlanDayProvider.tsx`). - **Not verified in the running app**: the dev backend wasn't reachable from the session. To check, open a list containing an item added or ticked by a deleted user. It should show "Manuell hinzugefügt von Unbekannt am …" / "Abgehakt von Unbekannt am …", and the list must load. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
docs(adr) Add the fill-from-meal-plan ADR for spec 004
All checks were successful
/ test (pull_request) Successful in 1m5s
/ contract_pin (pull_request) Successful in 3s
4ad8a14ecf
Approved at GATE B of spec 004.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs(plan) Add the implementation plan for spec 004
Some checks failed
/ contract_pin (pull_request) Has been cancelled
/ test (pull_request) Has been cancelled
8301803ab3
Approved at GATE C of spec 004 (on the user's delegation).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chore(contract) Pin the contract for spec 004
Some checks failed
/ test (pull_request) Failing after 46s
/ contract_pin (pull_request) Failing after 3s
535b392e27
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat(shopping-list) #004 Add abort support, fill range utils, meal-plan reasons and fill preview models
Some checks failed
/ test (pull_request) Successful in 1m10s
/ contract_pin (pull_request) Failing after 2s
0526c3ec8c
- apiClient takes an optional abort signal on get/post/delete; isAbortError
- routes for the fill review page
- formatPlanDay, isIsoDate and the fill range rules
- reason union with the meal-plan variant, reason lines with a recipe link
- fill preview models and mapper

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat(shopping-list) Add fill and move resources, fill error messages and removing meal-plan items
Some checks failed
/ test (pull_request) Successful in 1m5s
/ contract_pin (pull_request) Failing after 2s
16bfd7c48e
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat(shopping-list) Add the fill review page and move dishes through the move route
Some checks failed
/ test (pull_request) Successful in 1m7s
/ contract_pin (pull_request) Failing after 2s
af24921a97
- review page with range and list pickers, decisions, lines and skipped dishes
- useFillReview: debounced, abortable previews; fill with 409 handling
- RadioGroup basic
- meal plan header entry point
- MealPlanDayProvider.moveDish via POST /meal-plan-dish/:dishId/move, waiting for saves in flight
- move popup: delayed busy state and inline error

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(shopping-list) Move fill review texts into builders and block the list picker during a fill
Some checks failed
/ test (pull_request) Successful in 1m7s
/ contract_pin (pull_request) Failing after 3s
619e94193d
- inline German texts of the review components into tested builders in fillReviewUtils.ts
- SelectField gains native disabled; the list picker uses it while a fill runs
- document the accepted residual risk of a note save during a dish move
- record the recipe link's back state as a plan deviation

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(shopping-list) keep item reasons and ticks of deleted users, shown as "Unbekannt"
Some checks failed
/ test (pull_request) Successful in 1m8s
/ contract_pin (pull_request) Failing after 3s
85969f9e1d
The contract (recipe-platform #57) makes ShoppingListItemReasonDto.addedBy
optional: it is absent once that user's account has been deleted, and
tickedBy is absent on a ticked item for the same reason. The mapper
called compactUserMapper on addedBy unconditionally, so a single such
reason failed the whole list load.

Map addedBy only when present and name a missing user "Unbekannt" via
getUserDisplayName, as comments and ratings do, in manual and meal-plan
reasons and in the "Abgehakt von" text. Pin the contract to 18f9b60.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Some checks failed
/ test (pull_request) Successful in 1m8s
/ contract_pin (pull_request) Failing after 3s
This pull request is marked as a work in progress.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix-reason-deleted-user:fix-reason-deleted-user
git switch fix-reason-deleted-user

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch stage
git merge --no-ff fix-reason-deleted-user
git switch fix-reason-deleted-user
git rebase stage
git switch stage
git merge --ff-only fix-reason-deleted-user
git switch fix-reason-deleted-user
git rebase stage
git switch stage
git merge --no-ff fix-reason-deleted-user
git switch stage
git merge --squash fix-reason-deleted-user
git switch stage
git merge --ff-only fix-reason-deleted-user
git switch stage
git merge fix-reason-deleted-user
git push origin stage
Sign in to join this conversation.
No reviewers
No labels
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
araemer/recipe-app!65
No description provided.