Skip to content

fix(desktop): allow removing a community from this device without its relay - #7755

Open
eran-rom wants to merge 1 commit into
block:mainfrom
eran-rom:fix/desktop-remove-community-locally
Open

eran-rom wants to merge 1 commit into
block:mainfrom
eran-rom:fix/desktop-remove-community-locally

Conversation

@eran-rom

@eran-rom eran-rom commented Sep 19, 2026

Copy link
Copy Markdown

Summary

A saved community can become impossible to remove when its relay goes down or returns HTTP 404, because Leave community requires relay communication before local cleanup.

After Leave community fails because the relay is unavailable, offer a confirmed Remove from this device fallback beneath the error. It removes the saved connection without contacting the relay, keeps the user's identity, and switches to another community or returns to community discovery. The confirmation explains that server membership is unchanged and the community itself is not deleted.

Recognize network failures, disconnected WebSockets, leave-request timeouts, and HTTP 404/410/5xx responses. Relay permission errors and owner restrictions do not expose this fallback.

Reuse the existing local cleanup and navigation flow. Leave community continues to require relay acceptance.

Related issue

Fixes #7754.

Related: #7049, #7097 and #3621. This covers local removal when the relay is unavailable, including the HTTP 404 case; #7097 addresses revoked membership with a reachable relay.

Testing

  • Full desktop unit suite: 6,510 passed, including availability classification and a WebSocket failure after the membership check succeeds.
  • Targeted Playwright tests with the mocked Tauri bridge: 5 passed. Cover HTTP 404, an unreachable relay, permission rejection, cancellation, saved-state persistence, identity preservation, fallback navigation, and ordinary leaving.
  • Full desktop lint checks and production build passed. The E2E build, file-size checks, and git diff --check also passed.
  • Regression checks failed against the original behavior before the fix.
  • No live relay or installed-app testing.

Full just ci passed, using the repository-required nextest 0.9.136 from a temporary tools directory. This includes repository lint/policy checks, Rust/native/desktop/mobile tests, and desktop/web builds.

Screenshots

Captured with the mocked Tauri bridge; no live relay or installed app was used.

Before: the failed leave has no local-removal action.

Before

After: the availability error exposes the local-removal fallback.

After

Confirmation explains the effect on the device and server membership.

Confirmation

@eran-rom
eran-rom requested a review from a team as a code owner September 19, 2026 12:01
@github-actions

Copy link
Copy Markdown

🔐 Codex Security Review

Status: review required for the current range.

The current range is 5511b56fcf0047f9d0d4887dc75125b6933a6bbd...de40f7c884e263e7fa3a1e3a240795ab043531c6.
A new review must complete for this exact range. When manual authorization
is required, a Block organization member must comment exactly
@buzz-security-review de40f7c884e263e7fa3a1e3a240795ab043531c6 to authorize a new review.
Any previous review applies only to its recorded range.

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.

Desktop: cannot remove a saved community when its relay is unavailable

1 participant