Voice input suspends the screen-off timer; add menu to Nightscout; fix defocused highlight style in Terminal menu

This commit is contained in:
James Babcock committed 2026-07-21 09:40:43 -07:00
1 parent 026a8ed439
commit 3452945322
5 files changed
+87 -30

No files matched your search

+9
View File
@@ -273,6 +273,13 @@ class Shell {
applyScreenTimeout(nowMs = Date.now()): boolean {
const timeoutMs = this.config.getScreenTimeoutMs();
if (timeoutMs === null || !this.screenOn) return false;
// An open voice dialog suspends the timeout: a long dictation or refine
// has no button presses, but the screen must stay on for it. Sliding
// lastInputAtMs forward also restarts the full timeout when it closes.
if (this.activeVoiceLayer) {
this.lastInputAtMs = nowMs;
return false;
}
if (nowMs - this.lastInputAtMs < timeoutMs) return false;
this.sleep();
return true;
@@ -451,6 +458,8 @@ class Shell {
() => {
if (this.activeVoiceLayer === layer) {
this.activeVoiceLayer = null;
// The idle countdown restarts in full once voice input ends.
this.noteUserActivity();
}
},
(text) => this.sendTextToForegroundWindow(text),