Skip to content

fix(ios): batch of eight UX bugs from the onboarding audit - #42

Open
1395490241lhj-code wants to merge 3 commits into
mainfrom
claude/km-ux-bug-batch
Open

1395490241lhj-code wants to merge 3 commits into
mainfrom
claude/km-ux-bug-batch

Conversation

@1395490241lhj-code

Copy link
Copy Markdown
Owner

Summary

Fixes eight deterministic iOS UX bugs found in the onboarding/UX audit. Each was fixed test-first, then reviewed in three rounds (correctness, data safety, UX/accessibility/design), with every finding adversarially verified.

Bug Fix
Home recommendations never followed new inventory (ONB-2) Untouched local defaults re-rank when the inventory signature changes. Search, 换一批, remove, open, add to today, or scrolling the shelf past its first card (or stacked cards at AX sizes) counts as browsing and keeps the list.
Quantity boxes saved only on focus loss (INV-2) Shared DecimalQuantityField for receipt, 添加常备, 生成清单 and 使用量. It writes on every keystroke. A cleared required box falls back to its pre-edit amount and re-shows it on focus loss. Typed text is read as typed, and a pasted grouped 1,000 keeps its value.
Used-up batches counted as 已过期/临期 and sorted to the top (INV-1) 0-quantity rows are excluded from the date filters, matching Home's counts, and sink below stocked rows. 缺货 keeps every emptied row, per KITCHEN_DESIGN_LANGUAGE.md Phase A.
Unconvertible stock unit locked the cook-confirmation row (COOK-1) Stock held in a single unit (1 盒 vs 2 个) can be deducted by hand in that unit. The row is off by default and switches on when an amount is typed. It deducts only batches in that unit. D-050 undo records are unchanged.
Cooking timer did not ring (COOK-2) Asks for [.alert, .sound] on first start while undecided, and never under a UITEST_ launch. Keeps the due notification on a natural finish. CookingTimerNotificationDelegate presents only the timer notification in the foreground and is installed in the post-first-frame .task.
Weekly result: wrong primary action and contradictory purchase count (PLAN-1/3) 加入用餐计划 is the primary KitchenButtonStyle; review-and-add-to-shopping is secondary. The count (还缺食材 N 样) and 需要购买 use the local check behind the dish rows, and dish rows now read 还缺 N 样.
Planned meal claimed 「菜谱暂不可用」 while loading or offline (ONB-M1) PlannedRecipeAvailability with loading / failed (重试) / missing states, shared by Home and the Planner via PlannedMealRecipeDestination.
完整菜谱库 setting (most dishes have no method, plans break) Picker removed; iOS browses the curated library. Members who had stored full keep a read-only lookup of full-only dishes, so old plans and 收藏/常做 still resolve.

docs/IOS_RECIPE_COOKING_MODE.md is updated for the new timer behaviour.

Validation

Run with the xcodebuild fallback, not Xcode MCP, on Claude's reserved simulator 533FDD2B via dev-sim-slot, with parallel testing off.

  • Build: build-for-testing succeeded for the app, unit-test and UI-test targets, with no new warnings in changed files.
  • Unit tests: the full KitchenManagerTests suite ran 2907 tests: 0 failures, 5 skipped.
  • New or changed tests: each failed first, for the expected reason, before its fix.
  • UI tests (targeted, all passed):
    • PR31VisualAcceptanceUITests/testConsumptionSheetExplainsUnitsAndStatusStaples
    • WeeklyMenuMaterializationUITests/testTheResultNamesTheDaysItCoversAndOffersOneWayToAddThem
    • SettingsExperienceUITests/testCoreSettingsEntriesRemainReachable and testGuestSettingsLeadsWithAccountStatusAndKeepsLocalUseClear
    • RecipeCookingModeUITests/testCookingTimerCanStartAndCancelWithoutDebugUI
    • RecipeFlowsUITests/testDetailServingsStepsCookingAndEdit
    • HomeDashboardUITests/testDecisionModeBrowsesRecommendationsInlineWithoutAnotherNavigationStep and testAnOrdinaryDayMakesRecipeRecommendationThePrimaryTask
  • Screenshots inspected:
    • Consumption unit-mismatch row at standard and AX-XXXL sizes.
    • Weekly result: primary button and 还缺 copy.
    • Cooking timer, with no permission alert.

Not verified

  • Rendered states the screenshots don't cover:
    • The manual-unit row after an amount is typed.
    • The planned-recipe loading and failed pages.
    • The Home shelf after scrolling.
  • Timer banner and sound on a real device.
  • The full UI-test suite.

Notes / trade-offs

  • 缺货 counts: Home counts 缺货 per food and Inventory per row. That difference is kept because the design language says an emptied row still counts. Aligning them needs a design-doc change.
  • Extra request for former 完整菜谱库 members: they make one extra pack request per library load.
  • Weekly 还缺 check: it is a name-presence check, not amount-aware. The review sheet does the exact comparison.
  • Boundaries: no schema, migration, sync, Keychain, signing, entitlement or project-file changes.

🤖 Generated with Claude Code

1395490241lhj-code and others added 2 commits November 3, 2026 15:57
- Home: untouched local default recommendations re-rank when the
  inventory changes; searching, 换一批, removing, opening, adding to
  today or scrolling past the first card keeps the list.
- Quantity boxes (receipt, 添加常备, 生成清单, 使用量) share
  DecimalQuantityField: writes on every keystroke, a cleared required
  box falls back to its pre-edit amount, typed text is read as typed,
  and a pasted grouped amount (1,000) keeps its value.
- Inventory: used-up batches no longer count as 已过期/临期 and sink
  below stocked rows; 缺货 still lists every emptied row per the
  design language.
- Cook confirmation: stock held in one unconvertible unit (1 盒 vs
  2 个) can be deducted by hand in that unit; off by default, switched
  on by typing an amount; undo records unchanged.
- Cooking timer: asks for alert+sound permission on first start while
  undecided (never under UI tests), keeps the due notification on a
  natural finish, and presents only the timer notification in the
  foreground.
- Weekly result: 加入用餐计划 is the primary action; the missing count
  and 需要购买 come from the local check behind the dish rows (还缺).
- Planned meals tell loading, failed load (with 重试) and a truly
  missing recipe apart, on Home and in the Planner.
- Settings: remove the 完整菜谱库 picker; members who chose it keep
  full-only plans and favorites resolvable via a read-only lookup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 菜谱库模式 picker is gone and RecipeStore.recipes now also merges
the retired full-library dishes kept for former 完整菜谱库 members.
Assert the new shape: user recipes still override every library dish by
ID, libraryMode is always curated, and Settings no longer offers the
picker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant