From b8e8368a2565ba48a7de07f6878a77a342158be5 Mon Sep 17 00:00:00 2001 From: michael Date: Mon, 27 Apr 2026 10:52:14 -0700 Subject: [PATCH] feat(gui): bus::Daemon::{get_pending_status,clear_pending_flag} client wrappers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit clear_pending_flag is added alongside get_pending_status because Phase 10 needs both — its first-login modal checks status on startup and clears the flag on successful enrollment. Bundling here keeps the Phase 10 lane free of bus.rs edits. Co-Authored-By: Claude Opus 4.7 (1M context) --- gui/src/bus.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gui/src/bus.rs b/gui/src/bus.rs index 92dfb66..a0580f5 100644 --- a/gui/src/bus.rs +++ b/gui/src/bus.rs @@ -4,7 +4,7 @@ //! `glib::MainContext::spawn_local`, which polls the future on the GTK main //! thread; tokio's reactor wakes the future when zbus I/O is ready. -use authforge_common::types::Credential; +use authforge_common::types::{Credential, PendingStatus}; const BUS_NAME: &str = "io.dangerousthings.AuthForge"; const OBJECT_PATH: &str = "/io/dangerousthings/AuthForge"; @@ -48,6 +48,14 @@ impl Daemon { ) -> zbus::Result> { self.proxy.receive_signal("EnrollmentFailed").await } + + pub async fn get_pending_status(&self, user: &str) -> zbus::Result { + self.proxy.call("GetPendingStatus", &(user,)).await + } + + pub async fn clear_pending_flag(&self, user: &str) -> zbus::Result<()> { + self.proxy.call("ClearPendingFlag", &(user,)).await + } } #[allow(dead_code)] // wired through keys_page.rs in Task 4.