Skip to content

fix(ios): truthful cook result, untinted Home card, Chinese dates, stale tags - #45

Open
1395490241lhj-code wants to merge 1 commit into
claude/km-ux-bug-batchfrom
claude/km-ux-audit2-fixes
Open

1395490241lhj-code wants to merge 1 commit into
claude/km-ux-bug-batchfrom
claude/km-ux-audit2-fixes

Conversation

@1395490241lhj-code

Copy link
Copy Markdown
Owner

Stacked on #42 (base claude/km-ux-bug-batch). It retargets to main once #42 merges.

Five problems found by running #42's build on the simulator during the second audit.

Changes

  • Cook result tells the truth. The confirmation always said 已记录消耗,库存已更新, even when nothing was deducted: 126 of the 165 curated recipes carry no quantities, so most cooks deduct nothing. A new CookConsumptionStockResult is read from the receipt the confirmation actually wrote. It drives the sheet's headline and style, the D-047 stock line and title, and the Planner toast:

    • full deduction: unchanged
    • partial: 已扣减 N 样食材,M 样未扣减
    • nothing deducted: 已记录这次做饭,库存没有变化 (informational, not green)
    • an earlier receipt already covers the meal: says no second deduction was made

    didConfirm is now derived from the result. The Special Plan UI seed now stocks 嫩豆腐, so the D-047 UI test's 库存已更新 assertion describes a real deduction.

  • Home recommendation card no longer washed out. The decision surface's lighting gradient was an .overlay drawn above the content. That turned 加入今天 into white on light blue (measured 2.93:1) and greyed the text. The gradient now sits beneath the content. Light and Dark screenshots were checked.

  • Dates in Chinese. The bundle is localized only in English, so DatePickers and .formatted(date:) text rendered "Nov 7, 2026".

    • All 7 DatePickers use kitchenDateLocale(), and every date string uses KitchenDateStyle (zh_Hans_CN, per D-018).
    • The locale is pinned per view rather than app-wide, so number fields keep the device region's decimal rules.
    • test/ios-native-date-locale.test.mjs keeps both kinds of date pinned.
  • 今晚 tags. A dish that has been cooked no longer tags its ingredients 今晚 · .

  • Deleted recipes leave Home. A local card whose recipe left the library (deleted, or local data cleared) is dropped without re-ranking the rest:

    • The member stays on the card they were viewing.
    • An emptied list reloads the defaults.
    • Recipes that still resolve (retired library dishes, samples, AI cards) stay.

Validation

All runs used xcodebuild on Claude's reserved simulator through dev-sim-slot, not Xcode MCP.

Not in this PR

  • Pre-confirm copy: the sheet still says 确认后将扣减库存 and offers 更新冰箱 when no row can deduct. That text is pinned in canonical Product & IA, so changing it needs an owner decision.
  • Root cause: missing recipe quantities in the curated library. That belongs to the recipe re-curation work.
  • Known edge case: if the same food appears twice in a recipe with different units and stock runs out, one row can be counted as deducted when it wasn't. The receipt does not record which row each batch was taken for. A code comment documents this.

🤖 Generated with Claude Code

…ale tags

Five problems found by running the app on the simulator (second audit):

- Cook confirmation: the result always said 已记录消耗,库存已更新, even
  when nothing was deducted (126 of 165 curated recipes have no
  quantities). CookConsumptionStockResult is now read from the receipt
  the confirmation wrote and drives the sheet headline and style, the
  D-047 stock line and title, and the Planner toast. didConfirm is
  derived from it. The Special Plan UI seed stocks 嫩豆腐 so its D-047
  assertion is true.
- Home decision card: the lighting gradient was an overlay above the
  content and washed 加入今天 to 2.93:1. It now sits beneath the content.
- Dates: the bundle is localized only in English, so DatePickers and
  .formatted(date:) text rendered "Nov 7, 2026". Every DatePicker uses
  kitchenDateLocale() and every date string uses KitchenDateStyle
  (zh_Hans_CN, D-018), pinned per view so number fields keep the device
  region's decimal rules. A Node guard keeps both pinned.
- Inventory: a cooked dish no longer tags its ingredients 今晚 · <dish>.
- Home recommendations: a local card whose recipe left the library
  (deleted, local data cleared) is dropped without re-ranking the rest;
  the member stays on their card, an emptied list reloads the defaults,
  and recipes that still resolve (retired library dishes, samples, AI
  cards) stay.

Tests: new CookConsumptionStockResultTests, InventoryTonightLinkageTests,
HomeRecommendationStoreTests cases, a rendered-pixel check in
UIFeedbackTests, UI assertions in RecipeCookingModeUITests and
SpecialPlanMenuUITests, and test/ios-native-date-locale.test.mjs.

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