Skip to content

fix(swa): gate relay info modal on connected status with loaded info#56

Merged
github-actions[bot] merged 1 commit into
devfrom
feature/relay-info-modal-fixes
May 14, 2026
Merged

fix(swa): gate relay info modal on connected status with loaded info#56
github-actions[bot] merged 1 commit into
devfrom
feature/relay-info-modal-fixes

Conversation

@Ryback2501

Copy link
Copy Markdown
Owner

Summary

  • Add NIP-11 to the supported-specs list shown in the about modal.
  • Make the relay-info modal openable only from a connected relay whose information document has been fetched; disconnected/unfetched relays are no longer clickable.
  • Clicking the Connect button never reopens a stale relay-info modal — currentRelayModalUrl is now cleared whenever the modal is closed.

Changes

SWA (swa/)

  • app.js — Added '11' to SUPPORTED_SPECS. In rerenderRelayList, the URL element now only gets a click handler and the clickable class when status === 'connected' and store.relayInfos.has(url). Introduced closeRelayModal() which hides the modal and resets currentRelayModalUrl = null, used by the close button, the overlay click-through, and the Escape key handler.
  • style.css.relay-item-url no longer has cursor: pointer or a hover color by default. Both are now gated behind the .clickable modifier class.

Test plan

  • On a fresh load, only relays that are connected AND have returned a NIP-11 document show pointer cursor and are clickable.
  • Clicking on a disconnected relay does nothing — no empty modal is shown.
  • Clicking the Connect button on any relay never opens the relay-info modal, even after previously closing it on the same relay.
  • Opening the relay-info modal on a connected relay, closing it (X button, overlay click, or Escape), and then disconnecting/reconnecting does not reopen the modal automatically.
  • The about modal shows the NIP-11 badge alongside the other supported specs.

@github-actions github-actions Bot merged commit 5e7a3d6 into dev May 14, 2026
6 checks passed
@github-actions github-actions Bot deleted the feature/relay-info-modal-fixes branch May 14, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant