feat(contract) #002 Shopping list overview with item previews: spec, contract and ADR (spec G of E01) #35

Merged
araemer merged 4 commits from 002-shopping-list-overview-previews into main 2026-10-03 13:40:37 +00:00
Owner

Summary

  • Spec 002 (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.
  • Epic E01 (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.
  • Contract (api-contract/src/shopping-lists.ts): GET /shopping-list/all carries the previews and the new order. No route is added or removed.
  • ADR (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 architecture for both repos.

Contract changes

  • New CompactShoppingListItemDto (id, name, amount?, unit?): the reduced view of an open item on a card.
  • CompactShoppingListDto gains 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 is openItemCount - openItemsPreview.length.
  • ShoppingListListResponse.shoppingLists is ordered by the last change to each list's items, most recent first, then by name ascending. No change time is on the wire.
  • A request that succeeds but leaves the list's items as they were does not count as a change.
  • The list's version and updatedAt cover 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

  • Both siblings stop compiling wherever a CompactShoppingListDto is built, until the two new fields are supplied.
  • The changed order has no type change. The app's list switcher must sort by name itself.
  • The name-only rule for version and updatedAt is 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-contract ran 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 the updatedAt paragraph on ShoppingListDto.

🤖 Generated with Claude Code

## Summary - **Spec 002** (`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. - **Epic E01** (`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. - **Contract** (`api-contract/src/shopping-lists.ts`): `GET /shopping-list/all` carries the previews and the new order. No route is added or removed. - **ADR** (`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 architecture` for both repos. ## Contract changes - New `CompactShoppingListItemDto` (`id`, `name`, `amount?`, `unit?`): the reduced view of an open item on a card. - `CompactShoppingListDto` gains 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 is `openItemCount - openItemsPreview.length`. - `ShoppingListListResponse.shoppingLists` is ordered by the last change to each list's items, most recent first, then by name ascending. No change time is on the wire. - A request that succeeds but leaves the list's items as they were does not count as a change. - The list's `version` and `updatedAt` cover 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 - Both siblings stop compiling wherever a `CompactShoppingListDto` is built, until the two new fields are supplied. - The changed order has no type change. The app's list switcher must sort by name itself. - The name-only rule for `version` and `updatedAt` is 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-contract` ran 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 the `updatedAt` paragraph on `ShoppingListDto`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
docs(features) #002 Add spec G of E01: shopping list overview with item previews
All checks were successful
/ typecheck-contract (pull_request) Successful in 19s
33e0a85dd8
Spec 002 turns the list overview into a grid of cards that preview each
list's first open items, ordered by most recently changed. Epic E01 gains
spec G, its place in the order, two decisions across specs and two open
questions for spec F. Raised in recipe-platform#32.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs(features) #002 Merge main and set status: Phase A: Contract
All checks were successful
/ typecheck-contract (pull_request) Successful in 19s
60493353b8
Brings the spec status convention from main into the branch. Spec 002 is
approved at the spec gate, so its status is Phase A: Contract, and spec G
is In progress in the Status column of E01. The conflict in E01's Specs
table is resolved by keeping the new column and the row for spec G.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat(contract) #002 Add item previews and change order of the shopping list overview
All checks were successful
/ typecheck-contract (pull_request) Successful in 19s
bb56b3ce53
- CompactShoppingListItemDto: reduced view of an open item for overview cards
- CompactShoppingListDto gains openItemsPreview (at most 5) and openItemCount
- GET /shopping-list/all returns lists by last item change, most recent first
- List version and updatedAt cover the name only, never item or share changes
- ADR 2026-10-03-shopping-list-overview-previews records the decisions
- Spec 002: both repos marked as affected

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs(features) #002 Status: recipe-backend and recipe-app Phase B: Repo architecture
All checks were successful
/ typecheck-contract (pull_request) Successful in 20s
c426cfda51
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
araemer changed title from 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) 2026-10-03 13:39:56 +00:00
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-platform!35
No description provided.