Watch
1
0
Fork
You've already forked souveraine
0

sessiond: record the wake, so the trail can tell it from nothing

apply_gesture's dark-panel branch returned Unblank+Restore without a
record_decision, while the blank branch records panel-off or
lock-before-blank. The trail showed 'button-gesture recognised' and then
silence, so a press that woke the panel and a press that was swallowed
left identical evidence — which is the one question anyone debugging a
dark phone is asking.
This commit is contained in:
Fimeg 2026-08-03 15:16:09 -04:00
commit 6cb245492e

View file

@ -1628,6 +1628,16 @@ impl DeviceStateMachine {
// `Restore` puts back the brightness the dim captured rather than a
// guessed floor — see the comment on that capture.
self.blank_requested = false;
// Recorded, because the blank branch below records and this one did
// not: the trail showed `button-gesture … recognised` and then
// silence, so "the press woke it" and "the press did nothing" were
// the same entry. A trail that cannot tell those apart is the one
// question anyone debugging a dark phone is actually asking.
self.record_decision(
"panel-on",
serde_json::json!({ "button": "power", "gesture": "tap" }),
"a tap on a dark panel is a wake",
);
return vec![Action::Unblank, Action::Restore];
}
self.request_blank(