From 95071fd16b6b3aa19e30b96f99d83d3edb0f8a97 Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Sat, 20 Jun 2026 08:27:41 -0400 Subject: [PATCH] feat(relays): clearer relay health UI + fix broken relay operations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Relay tab improvements so users can see which relays to remove: - Per-relay status pill: Online (with ping) / Offline / Checking… / Blocked. - Insecure remote ws:// relays (CSP-blocked) flagged immediately with a hint. - Offline relays show a "consider removing" hint; their Remove button is emphasized. - Summary banner when relays are down (incl. the all-dead case explaining why videos won't load), pointing at Restore defaults / healthy relays. Also fixes a pre-existing decomposition bug (commit 7300977a): handleRelayOperation called this.runRelayOperation, but that method lives on the main ProfileModalController — so ALL relay ops (add/remove/mode/restore) threw "this.runRelayOperation is not a function". Route via this.mainController. Tests: relay-insecure-url (isInsecureRelayUrl), relay-operation-routing (routes to mainController.runRelayOperation, guards no-pubkey). Both mutation-verified. Build + lint + full unit suite green. Co-Authored-By: Claude Opus 4.8 --- components/profile-modal.html | 6 + js/ui/profileModal/ProfileRelayController.js | 160 ++++++++++++++++++- tests/relay-insecure-url.test.mjs | 32 ++++ tests/relay-operation-routing.test.mjs | 67 ++++++++ 4 files changed, 262 insertions(+), 3 deletions(-) create mode 100644 tests/relay-insecure-url.test.mjs create mode 100644 tests/relay-operation-routing.test.mjs diff --git a/components/profile-modal.html b/components/profile-modal.html index 869f127a..9b77a609 100644 --- a/components/profile-modal.html +++ b/components/profile-modal.html @@ -720,6 +720,12 @@ +