From 6cb245492ec118aabde693ef431461d3170de853 Mon Sep 17 00:00:00 2001 From: Fimeg Date: Mon, 3 Aug 2026 15:16:09 -0400 Subject: [PATCH] sessiond: record the wake, so the trail can tell it from nothing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- src/sessiond/device_state.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/sessiond/device_state.rs b/src/sessiond/device_state.rs index da9b79d..94382ca 100644 --- a/src/sessiond/device_state.rs +++ b/src/sessiond/device_state.rs @@ -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(