feat(shopping-list) Shopping list overview with item previews (spec 002) #56
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?
Implements spec 002: the shopping list overview as a grid of cards with item previews.
docs/plans/002-shopping-list-overview-previews.mdUI verification
Verified with
/verify-uion 2026-10-03 against the dev backend running recipe-backend PR #25 (spec 002), asuser, with one list owned byadminand shared read-write. All nine checks of plan step 9 passed. The test lists are deleted again.GET /shopping-list/allon return to the app, and the changed card moves to the front. No requests during 16 s of idle. Pull to refresh works with real touch events (CDP); a short pull does nothing.Also checked: with a long list name at 400 px the name truncates and the badge stays on one line; the keyboard focus ring surrounds the whole card, Tab goes from the name link to the card's actions and then to the next card, Enter opens the list.
Limits of this verification:
visibilitychangewith an overriddenvisibilityState; a real tab or app switch is not possible headless.PullToRefreshwraps the body only, as on the list page.What was implemented, per plan step
CompactShoppingListItemModel,CompactShoppingListItemMapper;CompactShoppingListModelgainsopenItemsPreviewandopenItemCount; stale "sorted by name" JSDoc fixed. The mapper keeps the server order, with a regression test.shoppingListDisplayUtils.ts:sortShoppingListsByName(German collation, tie-break by id),countHiddenOpenItems,describeHiddenOpenItems, with tests.ShoppingListHeader(switcher) andShoppingListMoveItemDialogsort by name themselves.fetchShoppingListOverviewhas exactly the four callers the plan names.useVisibilityChangehook, used byShoppingListProvider(behaviour unchanged) and the overview.ContentBodywidth(ContentBodyWidth.Narrow/Wide) andCARD_GRID_CLASSinlayout.ts.ShoppingListOverviewRow→ShoppingListOverviewCard: stretched link as tap target, preview lines, "more" line, actions in their own row.ShoppingListOverviewPage: wide body, grid, pull to refresh, refresh on return to the app, no timer; epoch counter and in-flight count for the discard / skip / latest-wins rules.docs/architecture.mdis updated in the commits of steps 4 and 5–7.Deviations from the plan
Four, recorded in the plan's Deviations section:
widthClasseskeyed by the enum constants: the plan wrote the literal keysnarrow/wide; the code uses[ContentBodyWidth.Narrow]/[ContentBodyWidth.Wide], asCLAUDE.md(Enums) asks. Decided byreview-implementation.src/utils/truncationUtils.ts, with tests). To make the texts hoverable, the link stretched over the card is replaced by a click handler on the card; the name stays a real link. Ctrl-click and middle-click now open a new tab only on the name. Decided by the user (tooltip) and implementation (click handler).These three card changes were verified in the browser on 2026-10-04 as
user: columns and 44 px buttons unchanged at the five viewports; the item, the card body and the name open the list with one history entry; star, pencil, bin and the rename dialog do not; the keyboard focus ring surrounds the card and Enter opens the list; tooltips appear only on cut names. Where the description above says the actions are at the bottom or the quantity on the right, this section replaces it.Judgment calls
ring-accent, not the plan'sring-accent-ring. The plan says to use the app's existing focus style for links/cards if there is one;RecipeListItemusesfocus-visible:ring-2 focus-visible:ring-accent.shoppingListDisplayUtils.ts; "Keine offenen Einträge" is a constant in the card file (the plan listsshoppingListMessages.tsas not to be changed)."de"collation gives "Äpfel", "Apfelmarkt", "Zoo" (a shorter prefix sorts first); the test asserts exactly that.Verification
npm run buildnpm run lintMealPlanDayProvider.tsxthat are not from this branchnpm run test/verify-ui)Rollout
The backend with spec 002 must be deployed before this app version: the mapper has no fallback for a missing
openItemsPreview/openItemCount(plan D9), so the overview fails to render against an older backend.🤖 Generated with Claude Code
WIP: feat(shopping-list) Shopping list overview with item previews (spec 002)to feat(shopping-list) Shopping list overview with item previews (spec 002)