mirror of
https://github.com/kuhyx/wake-alarm.git
synced 2026-11-21 08:42:19 +01:00
The escape-hatch form was a keyboard dead end. Tk traps Tab inside a tk.Text (inserts a literal tab, refocuses the widget) and binds Shift-Tab to nothing, so the only exits are the undocumented Ctrl+Tab / Ctrl+Shift+Tab. Unlike diet_guard's equivalent box, which at least binds <Return>, this one bound nothing at all -- so a keyboard-only user who tabbed into the justification field at 6am could not get back out to Submit. Enter now activates Submit / Back / the escape button too. X11 Tk binds only <space> on Button, so the key a user actually reaches for did nothing. Escape returns to the alarm from the escape FORM. To be explicit, because this app's whole point is resisting dismissal: this does not weaken the gating. The alarm still requires DISMISS_ROUNDS_REQUIRED correct answers or the budgeted escape hatch. The absent global <Escape>, the overrideredirect + grab_set_global + VT lock, and the hidden-until-earned escape button are deliberate adversarial design and are left alone. What changed is that the *sanctioned* paths are now reachable without a pointer. Focus rings everywhere: the dismiss-code entry, the escape button, the justification Text and the three escape-form fields all kept Tk's default 1px BLACK ring, invisible against #211D1B. On a screen with no other window and a global grab, that ring is the only feedback that a keystroke landed anywhere. _alarm_view.py imported gatelock only under TYPE_CHECKING, so bind_activate would have raised NameError at runtime while the module still imported cleanly -- an import smoke test would have missed it. phone_app is Android-only, so 1366x768 does not apply; its risk is landscape. home_screen and settings_screen were bare Columns that cannot scroll, so content overflowed with the stripe pattern painted over the primary control: phone landscape leaves ~360px of body height for ~405px of content. Both now scroll inside a SafeArea. The status line also rendered an unbounded raw 'Error: $e' with no maxLines, which added 100-150px and overflowed even in portrait; it is capped at four lines. The gatelock pin moves to v0.3.0, which is where the shared Tk-default workarounds live. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| screens | ||
| services | ||
| ui | ||
| main.dart | ||