summaryrefslogtreecommitdiff
path: root/docs/adr/005-agent-api-authentication.md
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-08-06 16:35:50 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-08-06 16:35:50 +0000
commitb56da63fe7776b14bc2cff4fe3c63ae2dd65ac73 (patch)
treeaa00f4c78126c1cc290702b9e95b54cfcf985ca5 /docs/adr/005-agent-api-authentication.md
parent702e0ea04984f203048d9a440bc6e1c8ba8b6d4e (diff)
Widget: fix QuickAdd keyboard-focus race, force widget re-render on save
QuickAddActivity's autofocus used delay(150) then requestFocus() + keyboard.show() -- a fixed delay racing against the window actually gaining focus. This is a translucent, separate-taskAffinity popup activity, so window focus transfer is variable/device-dependent; a show() call made before the window is focused is silently dropped by the IME service, no error, no retry -- the classic cause of "keyboard doesn't appear until I tap out and back in" (reported 2026-08-06, "more consistent here" than the same general Android quirk elsewhere). Fixed to react to LocalWindowInfo.isWindowFocused instead of guessing a timing window, plus windowSoftInputMode="adjustResize|stateVisible" as an OS-level second line of defense. Tried to verify live and hit a real limitation worth recording: this box's AVDs run -no-window (headless), and in that mode mInputShown never reports true via dumpsys input_method even for a manual, deliberate tap on the field -- confirmed by testing a plain tap directly, independent of any app code. The harness can't observe IME visibility here, so this fix is verified by code-level reasoning (LocalWindowInfo-driven focus is the standard, documented fix for this exact bug class) and confirmed window-focus DOES transfers correctly (mServedView moves to the bottom sheet's window), not by watching the keyboard actually appear. Real confirmation has to happen on-device. Also: SettingsActivity.saveAndFinish() only ever called DootWidget().updateAll() indirectly, as a side effect of RefreshWorker succeeding its network fetch -- so a slow or failing request could delay or block the widget from reflecting a setting the user just saved, even though every setting saved there (theme, text size, background, checkboxes) is already fully local and needs no network round trip to take effect. Now calls updateAll() directly and immediately after writing prefs; RefreshWorker still runs afterward to separately pull fresh server data. Verified installable and crash-free on a real API 36 emulator. Deployed as doot-widget.apk.
Diffstat (limited to 'docs/adr/005-agent-api-authentication.md')
0 files changed, 0 insertions, 0 deletions