WIP: fix(shopping-list) keep item reasons and ticks of deleted users, shown as "Unbekannt" #65
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-reason-deleted-user"
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?
recipe-app side of recipe-backend issue #35: deleting a user now keeps the shopping list item reasons they added, so a reason's
addedBycan be absent (contract: recipe-platform PR #57, commit18f9b60; rule: ADRdocs/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 thecontract_pincheck is re-run.Based on
004-fill-list-from-meal-plan(#64), notstage. Contract18f9b60builds 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 ontostageafterwards.Changes
contract.ref→18f9b6007956977bc85464ddca46882438fe9757.ShoppingListItemReasonModel.addedByis optional.ShoppingListItemMapper.mapReasonDtoToModelmaps it only when present. Before this change, a single reason withoutaddedBythrew 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" viagetUserDisplayName, as comments and ratings do.describeTicknow reads "Abgehakt von Unbekannt am …" instead of "Abgehakt am …". This also applies to an optimistic tick without a session user (decided by the user).ShoppingListItemMapper.test.tsandshoppingListDisplayUtils.test.ts.Verification
npm run test(536 passed),npm run build,npm run lint: pass (the lint warnings are the existing two inMealPlanDayProvider.tsx).🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.