diet-guard/diet_guard
Krzysztof kuhy Rudnicki 372e8a19f6
Some checks are pending
pre-commit / pre-commit (push) Waiting to run
Tests / test (3.10) (push) Waiting to run
Tests / test (3.11) (push) Waiting to run
Tests / test (3.12) (push) Waiting to run
release-apk / release (APK) (push) Waiting to run
Remove the Snack chip from the phone's slot selector
The chip was the only control that logged a meal against no slot at all
(`slot: null`). Removing it leaves the row with just the four hour chips,
so every logged meal now satisfies a real slot.

Storage keeps its null-slot support on purpose. Entries already on disk
and arriving over sync carry no `slot` key, and the `slot != null` filters
in log_storage_service.loggedSlotsToday / _state.logged_slots_today are
what stop them from retroactively satisfying meal slots -- so both are
documented as load-bearing rather than deleted as dead code.

Also corrects the MCP tool's docstring, which claimed its slot argument
"may be None early in the day"; it falls back to slot_for_log, which
clamps to a real hour and never returns None.

Adds the widget test the chip row never had -- being untested is why the
chip read as unused.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MPheLM86xUN9TGf34Ygtfz
2026-08-14 22:31:09 +02:00
..
tests Make the phone publish on every tick, and fail closed on Firebase errors 2026-08-10 14:35:37 +02:00
__init__.py Remove unused features; fix reminder false alarms; share all state 2026-07-26 16:39:52 +02:00
__main__.py Extract diet_guard from testsAndMisc as a standalone repo 2026-06-22 12:18:39 +02:00
_averages.py Show weekly and monthly average intake on both devices 2026-08-09 14:59:40 +02:00
_budget_history.py Remove unused features; fix reminder false alarms; share all state 2026-07-26 16:39:52 +02:00
_budget.py Remove unused features; fix reminder false alarms; share all state 2026-07-26 16:39:52 +02:00
_calendar_view.py Show weekly and monthly average intake on both devices 2026-08-09 14:59:40 +02:00
_cli_averages.py Show weekly and monthly average intake on both devices 2026-08-09 14:59:40 +02:00
_cli_gate.py Review fixes: specific sync exceptions, clearer names 2026-07-11 18:33:43 +02:00
_cli_sync.py Make the phone publish on every tick, and fail closed on Firebase errors 2026-08-10 14:35:37 +02:00
_cli.py Show weekly and monthly average intake on both devices 2026-08-09 14:59:40 +02:00
_coerce.py Extract diet_guard from testsAndMisc as a standalone repo 2026-06-22 12:18:39 +02:00
_constants.py Push under a persisted per-install uuid, not a fixed role id 2026-08-09 17:18:42 +02:00
_daystatus.py Show weekly and monthly average intake on both devices 2026-08-09 14:59:40 +02:00
_device.py Push under a persisted per-install uuid, not a fixed role id 2026-08-09 17:18:42 +02:00
_estimator.py Extract diet_guard from testsAndMisc as a standalone repo 2026-06-22 12:18:39 +02:00
_foodbank_manual.py Remove unused features; fix reminder false alarms; share all state 2026-07-26 16:39:52 +02:00
_foodbank.py Remove unused features; fix reminder false alarms; share all state 2026-07-26 16:39:52 +02:00
_fuzzy.py feat(diet_guard): add meal-logging screen-lock gate with trigger fix 2026-06-10 22:32:39 +02:00
_gate.py Extract diet_guard from testsAndMisc as a standalone repo 2026-06-22 12:18:39 +02:00
_gatelock_buttons.py Make the meal gate usable without a pointer on a 1366x768 screen 2026-07-30 16:21:27 +02:00
_gatelock_calendar_ui.py Show weekly and monthly average intake on both devices 2026-08-09 14:59:40 +02:00
_gatelock_calendar.py Show weekly and monthly average intake on both devices 2026-08-09 14:59:40 +02:00
_gatelock_core.py Remove unused features; fix reminder false alarms; share all state 2026-07-26 16:39:52 +02:00
_gatelock_groups.py Remove unused features; fix reminder false alarms; share all state 2026-07-26 16:39:52 +02:00
_gatelock_mealflow.py Remove unused features; fix reminder false alarms; share all state 2026-07-26 16:39:52 +02:00
_gatelock_nutrition.py Add budget-adherence calendar, streaks, and freely-editable synced budget 2026-07-13 21:31:45 +02:00
_gatelock_spacing.py Migrate diet_guard to gatelock v0.2.0 per-output locking 2026-07-25 16:56:13 +02:00
_gatelock_support.py feat: split oversized modules for 500-line limit, fix kasa coverage gap 2026-06-14 07:19:37 +02:00
_gatelock_typography.py Make the meal gate usable without a pointer on a 1366x768 screen 2026-07-30 16:21:27 +02:00
_gatelock_ui_types.py Remove unused features; fix reminder false alarms; share all state 2026-07-26 16:39:52 +02:00
_gatelock_ui.py Fit the meal gate on 1366x768 with a full day logged, and stop the auto-scroll 2026-08-03 16:00:13 +02:00
_gatelock.py Remove unused features; fix reminder false alarms; share all state 2026-07-26 16:39:52 +02:00
_mcp.py Remove the Snack chip from the phone's slot selector 2026-08-14 22:31:09 +02:00
_portions.py Extract diet_guard from testsAndMisc as a standalone repo 2026-06-22 12:18:39 +02:00
_resolve.py Extract diet_guard from testsAndMisc as a standalone repo 2026-06-22 12:18:39 +02:00
_slots.py Remove unused features; fix reminder false alarms; share all state 2026-07-26 16:39:52 +02:00
_state.py Remove the Snack chip from the phone's slot selector 2026-08-14 22:31:09 +02:00
_sync_merge.py Push under a persisted per-install uuid, not a fixed role id 2026-08-09 17:18:42 +02:00
_sync.py Make the phone publish on every tick, and fail closed on Firebase errors 2026-08-10 14:35:37 +02:00
_test_guard.py Remove unused features; fix reminder false alarms; share all state 2026-07-26 16:39:52 +02:00