lib

Core libraries for Radroots
git clone https://radroots.dev/git/lib.git
Log | Files | Refs | README

commit 6fb1e4394d8a2dbaddc8a84a52741b3ad3bfc23e
parent 024b3c8d4c738b3f386d5c4ecba78b202afe7614
Author: triesap <tyson@radroots.org>
Date:   Tue,  4 Aug 2026 00:02:15 +0000

accounts: expose removal impact and recovery

- carry credential session and expiry impact through UniFFI
- project removal confirmation progress and terminal state
- describe exact local effects before destructive confirmation
- retain safe retry actions only for replayable commands

Diffstat:
Mcrates/studio_ffi/src/commands.rs | 19+++++++++++++++++++
1 file changed, 19 insertions(+), 0 deletions(-)

diff --git a/crates/studio_ffi/src/commands.rs b/crates/studio_ffi/src/commands.rs @@ -154,6 +154,9 @@ impl GeneratedRecoveryRequest { #[derive(uniffi::Object)] pub struct RemovalRequest { public_key_hex: String, + deletes_local_credential: bool, + signs_out: bool, + expires_at_seconds: i64, token: Mutex<Option<RemovalConfirmationToken>>, } @@ -162,6 +165,18 @@ impl RemovalRequest { pub fn public_key_hex(&self) -> String { self.public_key_hex.clone() } + + pub fn deletes_local_credential(&self) -> bool { + self.deletes_local_credential + } + + pub fn signs_out(&self) -> bool { + self.signs_out + } + + pub fn expires_at_seconds(&self) -> i64 { + self.expires_at_seconds + } } pub(crate) struct RuntimeCore { @@ -402,8 +417,12 @@ impl StudioAppCore { .request_account_removal(public_key) .await .map(|token| { + let impact = token.impact(); Arc::new(RemovalRequest { public_key_hex, + deletes_local_credential: impact.deletes_local_credential(), + signs_out: impact.signs_out(), + expires_at_seconds: token.expires_at().as_seconds(), token: Mutex::new(Some(token)), }) })