-
Notifications
You must be signed in to change notification settings - Fork 4.2k
fix(desktop): report a failed DM close instead of silently restoring the row - #7400
Open
PresentJay wants to merge 1 commit into
Open
fix(desktop): report a failed DM close instead of silently restoring the row #7400PresentJay wants to merge 1 commit into
PresentJay wants to merge 1 commit into
Conversation
...the row Closing a DM from the sidebar optimistically drops the row and rolls it back when the relay rejects the hide, but the handler swallowed the error. A reader whose relay is unreachable, or whose membership the relay no longer recognises, saw the conversation flicker out and return with no explanation and no way to tell a transient failure from a refusal. Surface the failure the same way the sidebar's project delete already does, with the relay's own message when there is one. The optimistic removal and its rollback are unchanged; only the missing report is added. Signed-off-by: Hyeonjae.Jeong <presentj94@gmail.com>
🔐 Codex Security Review
Status: review required for the current range.
The current range is
3c7f288c60d67df78577b237e27c3dfc8831aaa1...85df610bfe79cefc6af5012cf0f09dc620b2216c.
A new review must complete for this exact range. When manual authorization
is required, a Block organization member must comment exactly
@buzz-security-review 85df610bfe79cefc6af5012cf0f09dc620b2216cto authorize a new review.
Any previous review applies only to its recorded range.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #7310.
What the report asked for, and what the code does
#7310 reports that deleting a group DM from Desktop drops the row locally
while the channel survives on the relay. I could not reproduce a delete:
Desktop never offers one for a DM.
AppSidebar.tsx:749passesonHideDmand neveronDeleteChannel(Channels and Forums both pass it)ChannelContextMenu.tsx:198—canLoadOwnerActionsrequireschannelType !== "dm"ChannelManagementSheet.tsx:148—canEditChannelrequireschannelType !== "dm"The one affordance on a DM row is the
X, labelledClose direct message,and it publishes kind:41012 (hide) — not kind:9008 (delete).
The reporter's CLI measurements are accurate:
buzz channels deleteagainsta DM is rejected, deterministically, because
create_dmenrols everyparticipant with
role='member'(crates/buzz-db/src/dm.rs:181) whilekind:9008 requires
owner(crates/buzz-relay/src/handlers/side_effects.rs:721).That is #4739. Desktop simply does not take that path.
The remaining symptom — "no way back to it from the UI even though it still
exists and still receives messages" — was a real bug, and #6885 fixed it on
2026年08月27日. The report is against 0.5.19 (tagged 2026年08月25日); the fix shipped
in 0.5.22.
The silent failure that is real
What survives from the report is its subtitle. Closing a DM removes the row
optimistically and rolls it back when the relay rejects the hide, but the
handler discarded the error:
hideDmMutation.erroris not rendered anywhere. A reader whose relay isunreachable, or whose membership the relay no longer recognises
(
forbidden: not a member of this DM), sees the conversation flicker out andreturn with no explanation, and cannot tell a transient failure from a refusal.
This reports the failure the way the sidebar's project delete already does
(
SidebarProjectsSection.tsx:239), preferring the relay's own message. Theoptimistic removal and its rollback are unchanged.
Verification
desktop/tests/e2e/dm-hide-failure.spec.tsdrives the sidebarXwith thehide forced to fail, and asserts both halves: the error is shown, and the row
is still there afterwards.
Red/green, each on a clean
distwith port 4173 killed first:pnpm typecheck— cleanpnpm exec biome checkon the four touched files — no fixes applied--project=smokesuite: 1396 passed, 8 failed, 1 skippedOn the 8: none are mine. Running the same eight specs on
origin/mainwithout this branch gives 4 failed / 127 passed, and all four reproduce here.
The rest vary between runs — re-running the two extras against unchanged code
passed them. The one that fails every time,
workflow-local-controls ... restores the caret, fails onorigin/maintoo.Scope
This does not make group DMs deletable; that needs #4739. It stops Desktop
from failing quietly when the relay says no.