Skip to content

Move relay admin panel to NIP-43 message path#494

Merged
baxen merged 2 commits into
mainfrom
baxen/admin-panel
May 7, 2026
Merged

Move relay admin panel to NIP-43 message path#494
baxen merged 2 commits into
mainfrom
baxen/admin-panel

Conversation

@baxen
Copy link
Copy Markdown
Collaborator

@baxen baxen commented May 6, 2026

Summary

  • move relay access/admin membership reads to the relay message path via the NIP-43 kind:13534 snapshot
  • publish relay membership admin changes as signed NIP-43 admin events over WebSocket (kinds 9030–9032)
  • update onboarding membership checks and E2E mocks to use the same relay path
  • ignore local identity.key files so dev identity secrets are not accidentally staged

Test plan

  • cd desktop && pnpm exec tsc --noEmit
  • cd desktop && pnpm exec biome check src/shared/api/relayMembers.ts src/features/relay-members/hooks.ts src/features/onboarding/ui/OnboardingFlow.tsx src/testing/e2eBridge.ts
  • pre-commit / pre-push hooks passed, including desktop/web/mobile checks, Rust fmt/clippy/tests, desktop build, desktop Tauri check, and mobile tests

@baxen baxen requested a review from wesbillman as a code owner May 6, 2026 22:31
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 15712fd71b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


export async function listRelayMembers(): Promise<RelayMember[]> {
const event = await fetchMembershipListEvent();
return event ? relayMembersFromEvent(event) : [];
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Distinguish missing NIP-43 snapshot from denied membership

Returning an empty list when no kind 13534 event exists makes getMyRelayMembership() resolve to null, which onboarding interprets as “access denied” (checkMembershipDenied in OnboardingFlow.tsx). On relays with membership gating disabled, the server does not publish the startup 13534 snapshot, so this path incorrectly sends normal users to the membership-denied flow before profile save. Please treat “no snapshot available” as a non-denial state (or explicitly surface an unknown state) instead of collapsing it to “not a member.”

Useful? React with 👍 / 👎.

@baxen baxen merged commit c89ef07 into main May 7, 2026
14 checks passed
@baxen baxen deleted the baxen/admin-panel branch May 7, 2026 17:51
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