From 6c49d7436f86f005c196e6a020da6a84a77106c9 Mon Sep 17 00:00:00 2001 From: Siavash Sameni Date: Tue, 14 Apr 2026 16:04:45 +0400 Subject: [PATCH] feat(ui): direct-only mode setting (no relay fallback) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit New toggle in Settings → "Direct-only mode (no relay fallback)": - Default: OFF (normal behavior, relay fallback on P2P failure) - When ON: connect returns error if P2P fails, with full candidate_diags in the debug log showing why each candidate failed. Call never falls back to relay. Useful for testing NAT traversal — you see the exact failure reason instead of the call silently working through relay. Wired end-to-end: - Settings.directOnly persisted in localStorage - Passed as directOnly param to Rust connect command - connect:path_negotiated shows direct_only flag - connect:direct_only_failed emits on failure with diags Co-Authored-By: Claude Opus 4.6 (1M context) --- desktop/index.html | 4 ++++ desktop/src-tauri/src/lib.rs | 19 +++++++++++++++++++ desktop/src/main.ts | 8 ++++++++ 3 files changed, 31 insertions(+) diff --git a/desktop/index.html b/desktop/index.html index 0a2713a..10e0c92 100644 --- a/desktop/index.html +++ b/desktop/index.html @@ -187,6 +187,10 @@ Call flow debug logs (trace every step of a call) +