fix(desktop): restore commit_active_scope as test-only helper

C4 removed commit_active_scope from identity_storage.rs (no longer called
in production after the inline commit). app_state_scope_tests.rs uses it as
a test helper to set up a live scope without running the full apply_workspace
pipeline. Re-add it under #[cfg(test)] so tests continue to compile.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
This commit is contained in:
npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7
2026-08-03 02:51:06 -04:00
co-authored by Will Pfleger
parent 372b0fabd9
commit d4391c9097
+12
View File
@@ -84,6 +84,18 @@ impl AppState {
}
crate::managed_agents::scope::next_scope_generation();
}
/// Commit the active scope directly. Used by tests that need to set up a
/// live workspace without running the full `apply_workspace` pipeline.
#[cfg(test)]
pub(crate) fn commit_active_scope(
&self,
scope: crate::managed_agents::scope::WorkspaceAgentScope,
) {
if let Ok(mut g) = self.active_agent_scope.lock() {
*g = Some(scope);
}
}
}
/// Pending-owned-channel overlay — moved here to keep `app_state.rs` within