mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
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:
co-authored by
Will Pfleger
parent
372b0fabd9
commit
d4391c9097
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user