From 4e5c6b453ed9d28265529c98f01d595e041e1dcb Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Sat, 10 Oct 2026 19:58:30 +0200 Subject: [PATCH] docs: the schedule combobox popdown maps beneath the lock surface Observed on Xvfb with the demo gate: the ComboboxPopdown is viewable but stacked under the gatelock surface, so typing and Up/Down are the paths. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_015npsYVB2PdtWkG7MPAi4tn --- app/pubspec.yaml | 2 +- diet_guard/_gatelock_calendar_schedule.py | 13 +++++++------ docs/DOCS-meal-schedule.md | 4 +++- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/app/pubspec.yaml b/app/pubspec.yaml index 463443c..8684a1d 100644 --- a/app/pubspec.yaml +++ b/app/pubspec.yaml @@ -2,7 +2,7 @@ name: diet_guard_app description: "Companion phone app for diet_guard: log meals on the go." publish_to: 'none' -version: 1.0.107+1 +version: 1.0.108+1 environment: sdk: ^3.12.2 diff --git a/diet_guard/_gatelock_calendar_schedule.py b/diet_guard/_gatelock_calendar_schedule.py index eb52426..dea4645 100644 --- a/diet_guard/_gatelock_calendar_schedule.py +++ b/diet_guard/_gatelock_calendar_schedule.py @@ -10,12 +10,13 @@ offers every quarter hour, and the user may also type any ``HH:MM``. The ``ttk`` import is load-bearing for the tests, which patch this module's ``ttk`` with a fake -- keep binding it at module level. -**The dropdown is a popup over a grabbed lock.** gatelock's grab watch treats -a ``ttk.Combobox`` popdown as "grab lost" and re-takes the grab within about a -second, which closes the list. So the list is a convenience, never the only -path: typing works, and Up/Down step the value by 15 minutes *without* posting -the list (:func:`step_time`), which keeps the row fully usable from the -keyboard on the real lock. +**The dropdown is a popup over a lock that keeps itself on top.** Observed on +Xvfb (2026-10-10, demo gate): the ``ComboboxPopdown`` window maps but sits +*beneath* the lock surface, which gatelock re-raises; on the real lock its grab +watch also treats the popdown as "grab lost" and re-takes the grab. So the +list cannot be relied on: typing works, and Up/Down step the value by 15 +minutes *without* posting the list (:func:`step_time`), which keeps the row +fully usable from the keyboard. """ from __future__ import annotations diff --git a/docs/DOCS-meal-schedule.md b/docs/DOCS-meal-schedule.md index a600fda..f5dc10e 100644 --- a/docs/DOCS-meal-schedule.md +++ b/docs/DOCS-meal-schedule.md @@ -86,7 +86,9 @@ Editable on both surfaces: the app's Settings screen (`_gatelock_scheduleedit.py`, widgets in `_gatelock_calendar_schedule.py`). The gate's first/last fields are `ttk.Combobox`es offering every quarter hour and accepting any typed `HH:MM`; Up/Down step 15 minutes without posting the -dropdown, which gatelock's grab watch would close over the real lock. +dropdown. Typing and Up/Down are the real paths: the popdown list maps +*beneath* the lock surface (gatelock keeps it raised), and on the real lock the +grab watch re-takes the grab from it. `diet-guard-gate.timer` fires every 15 minutes (`*:00/15:00`), so it lands on every grid slot exactly; an off-grid first/last meal is caught by the next