refactor(meal-plan) Use NameInputDialog for creating and renaming meal plans #50

Merged
araemer merged 1 commit from meal-plan-name-input-dialog into 001-shopping-lists 2026-10-03 06:57:07 +00:00
Owner

The meal plan's create and rename dialogs become the shared NameInputDialog, so the app has one single-field name dialog instead of three. Follow-up from plan 001, D8.

Depends on #47 (shopping lists), which introduces NameInputDialog. This branch is stacked on 001-shopping-lists, so until #47 is merged the diff here also shows all of #47; the only change of its own is the last commit (f49a258). The WIP: prefix blocks merging until #47 is in; then this branch gets rebased onto stage and the prefix removed.

Changes

  • MealPlanPage renders NameInputDialog for create and rename, with the meal plan's own texts ("Neuen Essensplan erstellen", placeholder "z. B. Woche 23", "Umbenennen").
  • MealPlanCreateDialog.tsx and MealPlanRenameDialog.tsx are deleted.
  • docs/architecture.md and the NameInputDialog doc comment are updated.

Behaviour is unchanged: trimmed name, empty name can't be confirmed, rename disabled while unchanged. The only visible difference: the field uses text-base on phones, which keeps iOS from zooming into it.

Verification

  • npm run build, npm run lint (only the 2 existing warnings in MealPlanDayProvider) and npm run test (368 tests) pass.
  • /verify-ui as user: create a plan (empty name disabled, Enter creates), rename it (prefilled, disabled while unchanged), the dialog fits on all five viewports; the test plan was deleted afterwards.

🤖 Generated with Claude Code

The meal plan's create and rename dialogs become the shared `NameInputDialog`, so the app has one single-field name dialog instead of three. Follow-up from plan 001, D8. **Depends on #47** (shopping lists), which introduces `NameInputDialog`. This branch is stacked on `001-shopping-lists`, so until #47 is merged the diff here also shows all of #47; the only change of its own is the last commit (`f49a258`). The `WIP:` prefix blocks merging until #47 is in; then this branch gets rebased onto `stage` and the prefix removed. ## Changes - `MealPlanPage` renders `NameInputDialog` for create and rename, with the meal plan's own texts ("Neuen Essensplan erstellen", placeholder "z. B. Woche 23", "Umbenennen"). - `MealPlanCreateDialog.tsx` and `MealPlanRenameDialog.tsx` are deleted. - `docs/architecture.md` and the `NameInputDialog` doc comment are updated. Behaviour is unchanged: trimmed name, empty name can't be confirmed, rename disabled while unchanged. The only visible difference: the field uses `text-base` on phones, which keeps iOS from zooming into it. ## Verification - `npm run build`, `npm run lint` (only the 2 existing warnings in `MealPlanDayProvider`) and `npm run test` (368 tests) pass. - `/verify-ui` as `user`: create a plan (empty name disabled, Enter creates), rename it (prefilled, disabled while unchanged), the dialog fits on all five viewports; the test plan was deleted afterwards. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
docs(adr) Add shopping list refresh ADR for spec 001
All checks were successful
/ test (pull_request) Successful in 1m9s
a5661d6382
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs(plan) Add shopping list implementation plan (spec 001)
All checks were successful
/ test (pull_request) Successful in 1m2s
eb28899d1b
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApiError now carries code: ErrorCode, read from the error body or derived
from the HTTP status when the body has no known code. The error body is read
once as text and then parsed, fixing the double-consume when it is not JSON.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New ADR partially supersedes 2026-09-20-contract-enums-in-models (only its
explicit list of 9 enums). CLAUDE.md states the rule by kind and points
server-refreshed contexts at the shopping list refresh ADR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Response-only mappers for lists, items, shares and compact users;
ShoppingListRestResource returning only models; GET /user/list-shareable;
item input parsing, display texts, error classification and optimistic
state transforms, each with tests. Name helpers and UserAvatar accept
CompactUserModel via DisplayableUser.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Entry, overview and list routes; ShoppingListProvider loads and refreshes
the list in place (polling, visibility, pull to refresh, settle-refresh)
with optimistic tick/remove/move/reorder/remove-ticked; item rows with tap
panel and drag handle, add form with duplicate prompt, edit/move/share
dialogs; PullToRefresh and NameInputDialog basics; menu entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On desktop the three buttons wrapped into a ragged right-aligned stack in
the narrow dialog card; stack them full-width with the primary on top, as
on phones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Entfernen in an item's panel and Erledigte entfernen now ask for
confirmation (DeleteModal), revising plan D8 after review. The item
confirmation lives on the page, not in the dnd-kit-transformed row.
Kept as its own commit so it can be reverted on its own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat(shopping-list) give a full-access user's own share the usual controls
All checks were successful
/ test (pull_request) Successful in 1m4s
a2be4dfac8
Consistent with the meal plan share dialog: the user's own share row,
marked (Du), has the permission select and the remove button. Removing it
ends their access (the page goes to the overview with the access-lost
notice); losing FULL closes the share dialog.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(shopping-list) keep the rename dialog's draft across polling
All checks were successful
/ test (pull_request) Successful in 1m4s
184e659029
The list page's rename dialog was keyed on the live list version, so a
rename by someone else reset the user's typing on the next poll, and the
save used the live version, so it never got the 409. The dialog now
snapshots name and version when it opens; renameList takes that version,
and a conflict re-seeds the dialog from the refreshed list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test(shopping-list) cover the error-message selection and form value helpers
All checks were successful
/ test (pull_request) Successful in 1m3s
977b2b22ae
itemToInputValues and EMPTY_ITEM_INPUT_VALUES move into
shoppingListItemInputUtils next to formatAmountForInput, with tests.
shoppingListMessages stays component-side and gets its own test, since it
decides when an error is shown and when navigation makes it unnecessary;
CLAUDE.md's Tier 1 scope lists it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(shopping-list) don't flash "item gone" when the whole list is gone
All checks were successful
/ test (pull_request) Successful in 1m3s
dea07c397b
An item route's 404/403 set the item-gone message in the same tick as the
reload that finds the list deleted or inaccessible, so the popup could
paint before the page navigated to the overview. The page now shows its
error popup only while the list is READY (plan 10.4 / 10.7).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(shopping-list) keep (Du) visible, use the plan's prompt text, document children
All checks were successful
/ test (pull_request) Successful in 1m5s
9a46c30495
- Share dialog: only the name truncates, so the (Du) marker stays visible
  on narrow phones.
- Overview: the choose-a-default prompt uses the plan's wording; the extra
  touch-specific sentence is gone.
- JSDoc on the children props of ShoppingListProvider and PullToRefresh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(shopping-list) centre the list column, make add primary, tone down remove-ticked
All checks were successful
/ test (pull_request) Successful in 1m9s
294ea7b63e
- Overview and list page bodies use ContentBody (centred max-w-2xl column,
  like the recipe pages) instead of spanning the full desktop width; px-0
  keeps the full width on phones.
- "Eintrag hinzufügen" uses the primary style, like "Schritt hinzufügen".
- "Erledigte entfernen" is a small link-style action (TextLinkButton) with
  a 44 px tap area instead of a full button.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(shopping-list) light hover tooltip in the InfoTooltip style
All checks were successful
/ test (pull_request) Successful in 1m4s
55b616e0b7
The item hover was a dark grey bubble, unlike every other tooltip in the
app. It now uses InfoTooltip's white/bordered style, sizes to its lines
(one line per reason on desktop), and never exceeds the row width, so a
narrow desktop window doesn't scroll sideways.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(shopping-list) show the item hover tooltip only after a short rest
All checks were successful
/ test (pull_request) Successful in 1m3s
06bff72488
The tooltip appeared the moment the pointer touched a row, so moving the
mouse across the list made bubbles flicker. It now appears after the
pointer rests on a row for 500 ms and hides immediately on leave
(DELAYED_HOVER_TOOLTIP_CLASS in config/layout.ts). Touch devices are
unchanged: no tooltip, the tap panel shows the same text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
refactor(meal-plan) use NameInputDialog for creating and renaming meal plans
All checks were successful
/ test (pull_request) Successful in 1m9s
f49a258665
MealPlanCreateDialog and MealPlanRenameDialog were the same single-field
dialog as the new NameInputDialog (trimmed, non-empty, rename disabled
while unchanged). The meal plan page now uses NameInputDialog with its own
texts, and the two files are gone (follow-up from plan 001, D8).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
araemer changed target branch from stage to 001-shopping-lists 2026-10-03 06:56:21 +00:00
araemer changed title from WIP: refactor(meal-plan) Use NameInputDialog for creating and renaming meal plans to refactor(meal-plan) Use NameInputDialog for creating and renaming meal plans 2026-10-03 06:57:01 +00:00
araemer merged commit 0137cf95a0 into 001-shopping-lists 2026-10-03 06:57:07 +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-app!50
No description provided.