mirror of
https://github.com/kuhyx/diet-guard.git
synced 2026-11-11 13:07:40 +01:00
Found on the phone, not in the suite. Setting five meals updated the settings
preview and fired a reminder for the new 14:00 checkpoint, while the slot row
behind them kept showing the old 08/12/16/20 until the app was restarted:
onOpenSettings pushed the route without awaiting the pop, so the log screen
never rebuilt against the schedule the user had just chosen.
It now awaits and calls onScheduleMayHaveChanged, which re-reads the logged
slots and re-derives the selected slot -- the hour it pointed at may not be a
checkpoint at all any more. The other three destinations still fire and
forget, since none of them can change what this screen renders.
The regression test was confirmed to fail against the pre-fix behaviour
("Found 0 widgets with text 11:00") rather than passing vacuously.
Both files crossed the 250-line cap with the addition, so the hook moved to
log_meal_sync_mixin.dart -- which already owns refreshSlots and loggedSlots
and is the better home regardless -- and the new test into its own file.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0159b4E5hh512jYUeaJVNxfM
|
||
|---|---|---|
| .. | ||
| calendar_screen.dart | ||
| edit_entry_screen.dart | ||
| food_bank_screen.dart | ||
| github_client_id_dialog.dart | ||
| github_mirror_actions.dart | ||
| github_mirror_screen.dart | ||
| history_screen.dart | ||
| log_meal_actions.dart | ||
| log_meal_nav_mixin.dart | ||
| log_meal_progress.dart | ||
| log_meal_screen.dart | ||
| log_meal_sync_mixin.dart | ||
| settings_kcal_goal.dart | ||
| settings_meal_schedule.dart | ||
| settings_screen.dart | ||