feat(contract) #002 Shopping list overview with item previews: spec, contract and ADR (spec G of E01) #35
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "002-shopping-list-overview-previews"
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?
Summary
docs/features/002-shopping-list-overview-previews.md): the shopping list overview becomes a grid of cards. Each card previews the list's first 5 open items with name, amount and unit, and the cards are ordered by most recently changed.docs/epics/E01-shopping-lists.md): adds spec G after A in the order, two decisions across specs (overview order, open items only) and two open questions for spec F.api-contract/src/shopping-lists.ts):GET /shopping-list/allcarries the previews and the new order. No route is added or removed.docs/adr/2026-10-03-shopping-list-overview-previews.md): the contract decisions and the rejected options.Raised in #32. Approved at the epic gate, the spec gate and GATE A. The spec's status is
Phase B: Repo architecturefor both repos.Contract changes
CompactShoppingListItemDto(id,name,amount?,unit?): the reduced view of an open item on a card.CompactShoppingListDtogains two required fields:openItemsPreview: the first open items in list order, at most 5. The backend fixes the size.openItemCount: all open items. The "+ n weitere" line isopenItemCount - openItemsPreview.length.ShoppingListListResponse.shoppingListsis ordered by the last change to each list's items, most recent first, then by name ascending. No change time is on the wire.versionandupdatedAtcover the name only. Item and share changes never move them, so a 409 on rename always means someone else renamed the list.What breaks, and what the compiler does not catch
CompactShoppingListDtois built, until the two new fields are supplied.versionandupdatedAtis a backend obligation that needs a test. An ordinary TypeORM write to the list row would break it.Affected repos
recipe-backend: affected — records the last change to each list's items, and returns the item previews, the open item count and the new order.recipe-app: affected — builds the card grid from the new fields, and sorts the list switcher by name itself.Contract review
review-contractran twice in a clean context. It found no convention violation. Its questions were settled with the user and are recorded in the ADR. Two JSDoc edits were made after the second run and have not been through the clean review: the "edit with unchanged content" case in the order rule, and theupdatedAtparagraph onShoppingListDto.🤖 Generated with Claude Code
WIP: docs(features) #002 Shopping list overview with item previews (spec G of E01)to feat(contract) #002 Shopping list overview with item previews: spec, contract and ADR (spec G of E01)