Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(desktop): handle missing app state in ops module

Steven Enamakelebf244f1e9c7
diff --git a/crates/openhuman-core/src/desktop/app_state/ops.rs b/crates/openhuman-core/src/desktop/app_state/ops.rs
index d0809b2321..2132b116e1 100644
--- a/crates/openhuman-core/src/desktop/app_state/ops.rs
+++ b/crates/openhuman-core/src/desktop/app_state/ops.rs
@@ -40,6 +40,39 @@ mod tests;
// working unmodified via `use super::*;`. Each submodule marks the items
// these tests reach into as `pub(super)` (visible to `ops` and, therefore,
// to these test descendants) for exactly this purpose.
+//
+// External types the tests reach through `super::*` (rather than importing
+// themselves) also need to be back in this flat scope, since a plain `use`
+// inside a submodule is private to it and is not picked up by a glob import
+// of that submodule.
+#[cfg(test)]
+use crate::api::rest::user_id_from_profile_payload;
+#[cfg(test)]
+use crate::config::rpc as config_rpc;
+#[cfg(test)]
+use crate::config::Config;
+#[cfg(test)]
+use crate::inference::LocalAiStatus;
+#[cfg(test)]
+use crate::platform::service::{ServiceState, ServiceStatus};
+#[cfg(test)]
+use crate::rpc::RpcOutcome;
+#[cfg(test)]
+use crate::security::credentials::session_support::{
+ is_local_session_token, load_app_session_profile, session_state_from_profile,
+ session_token_from_profile,
+};
+#[cfg(test)]
+use crate::security::credentials::{AuthService, APP_SESSION_PROVIDER, DEFAULT_AUTH_PROFILE_NAME};
+#[cfg(test)]
+use serde_json::Value;
+#[cfg(test)]
+use std::collections::{BTreeMap, HashMap};
+#[cfg(test)]
+use std::sync::atomic::{AtomicU64, Ordering};
+#[cfg(test)]
+use std::time::{Duration, Instant};
+
#[cfg(test)]
use auth_timeout::*;
#[cfg(test)]