Skip to content

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

test(desktop): move navigation regression to sibling module

Eloi Torrents3a88562f7b98
diff --git a/crates/openhuman-app/src/external_navigation.rs b/crates/openhuman-app/src/external_navigation.rs
index 28f8264f47..eda07d3eb6 100644
--- a/crates/openhuman-app/src/external_navigation.rs
+++ b/crates/openhuman-app/src/external_navigation.rs
@@ -38,33 +38,5 @@ pub fn init() -> TauriPlugin<crate::AppRuntime> {
}
#[cfg(test)]
-mod tests {
- use super::*;
-
- #[test]
- fn remote_navigation_is_external_but_app_origins_are_preserved() {
- let dev = Url::parse("http://localhost:1420").unwrap();
- for href in [
- "https://github.com/example/repo/pull/1",
- "http://localhost:8000",
- "https://tauri.localhost.example.com",
- ] {
- assert!(
- is_external(&Url::parse(href).unwrap(), Some(&dev)),
- "{href}"
- );
- }
- for href in [
- "tauri://localhost/#/chat",
- "http://tauri.localhost/#/chat",
- "https://tauri.localhost/#/chat",
- "http://localhost:1420/#/chat",
- ] {
- assert!(
- !is_external(&Url::parse(href).unwrap(), Some(&dev)),
- "{href}"
- );
- }
- assert!(is_external(&dev, None));
- }
-}
+#[path = "external_navigation_tests.rs"]
+mod tests;
diff --git a/crates/openhuman-app/src/external_navigation_tests.rs b/crates/openhuman-app/src/external_navigation_tests.rs
new file mode 100644
index 0000000000..12519785ac
--- /dev/null
+++ b/crates/openhuman-app/src/external_navigation_tests.rs
@@ -0,0 +1,28 @@
+use super::*;
+
+#[test]
+fn remote_navigation_is_external_but_app_origins_are_preserved() {
+ let dev = Url::parse("http://localhost:1420").unwrap();
+ for href in [
+ "https://github.com/example/repo/pull/1",
+ "http://localhost:8000",
+ "https://tauri.localhost.example.com",
+ ] {
+ assert!(
+ is_external(&Url::parse(href).unwrap(), Some(&dev)),
+ "{href}"
+ );
+ }
+ for href in [
+ "tauri://localhost/#/chat",
+ "http://tauri.localhost/#/chat",
+ "https://tauri.localhost/#/chat",
+ "http://localhost:1420/#/chat",
+ ] {
+ assert!(
+ !is_external(&Url::parse(href).unwrap(), Some(&dev)),
+ "{href}"
+ );
+ }
+ assert!(is_external(&dev, None));
+}
diff --git a/docs/TEST-COVERAGE-MATRIX.md b/docs/TEST-COVERAGE-MATRIX.md
index 28c0ee0f39..a9b7d505e0 100644
--- a/docs/TEST-COVERAGE-MATRIX.md
+++ b/docs/TEST-COVERAGE-MATRIX.md
@@ -193,7 +193,7 @@ Canonical mapping of every product feature to its test source(s). Drives gap-fil
| 4.2.9 | Share cards ("Look what my agent did" post to X / LinkedIn) | VU | `app/src/features/share/shareContent.test.ts`, `app/src/features/share/shareTargets.test.ts`, `app/src/features/share/shareCaption.test.ts`, `app/src/features/share/shareCard.test.ts`, `app/src/features/share/ShareMessageButton.test.tsx`, `app/src/features/share/ShareCardModal.test.tsx` | ✅ | Hover Share button under completed agent messages opens a Canvas 2D branded card; LLM-drafted headline/caption via `inference_agent_chat_simple` with deterministic offline fallback; X/LinkedIn intent URLs + copy/save PNG; secrets/paths/emails redacted before render. MVP wires only the completed-task trigger; workflow-run + Human-tab triggers are follow-ups. WD E2E deferred |
| 4.2.10 | Durable agent reply (core stores it before announcing `chat_done`) | RU+VU | `crates/openhuman-core/src/web_chat/reply_persistence_tests.rs`, `crates/openhuman-core/src/web_chat/presentation_tests.rs`, `app/src/providers/__tests__/ChatRuntimeProvider.test.tsx` | ✅ | `deliver_response` persists an unsegmented reply under `agent:<request_id>` before publishing the terminal event, so a dropped socket, a failed `threads_message_append` or a reloaded webview costs a repaint rather than the answer; the client's append collapses onto that row by id. RU covers the write, its idempotency, the empty-reply and missing-thread paths, and that delivery still announces when the store refuses. VU covers the mirrored id, the segmented exception, the refetch that recovers a failed append, and the reconnect that rejoins orphaned thread rooms. WD E2E (kill the append mid-turn) is a follow-up |
-| 4.2.11 | External reply links preserve the desktop chat | RU+VU+WD+MS | `app/src/utils/openUrl.test.ts`, `crates/openhuman-app/src/external_navigation.rs`, `app/test/e2e/specs/agent-harness-behaviors.spec.ts`, release-manual-smoke | 🟡 | Successful and failed OS-opener IPC covered; native origin policy covered. macOS bundle smoke verified. WD regression added; execution pending compatible desktop driver. |
+| 4.2.11 | External reply links preserve the desktop chat | RU+VU+WD+MS | `app/src/utils/openUrl.test.ts`, `crates/openhuman-app/src/external_navigation_tests.rs`, `app/test/e2e/specs/agent-harness-behaviors.spec.ts`, release-manual-smoke | 🟡 | Successful and failed OS-opener IPC covered; native origin policy covered. macOS bundle smoke verified. WD regression added; execution pending compatible desktop driver. |
### 4.3 Tool Invocation