fix(messaging): show delete for a processing message - #3145
Merged
Conversation
The delete card was hidden while a message sat in processing, so a message a worker never finished could not be removed from the console at all. The server no longer rejects that delete, so the card can always render. Editing stays gated where it already was; only removal is unblocked.
Contributor
Greptile SummaryThe PR replaces the message-status delete gate with the established
Confidence Score: 5/5The PR appears safe to merge. The previously reported delete-control permission mismatch is resolved by gating the component on the exact messages.write scope, and no blocking failure remains. Important Files Changed
Reviews (3): Last reviewed commit: "Merge remote-tracking branch 'origin/cho..." | Re-trigger Greptile |
GHSA-rgw5-rvv9-x895 widened the affected range to <5.0.9, so the existing >=5.0.8 override stopped clearing it and the audit step in tests.yml now fails on every branch. Only the pinned floor and the resolved version move; integrity hashes are untouched.
The card had no permission check, so a reader saw a delete control that only failed once confirmed. The rest of the feature already derives that from messages.write: the list gates its create button and row selection on it. Gate the card the same way, so it tracks permission rather than status.
… fix/delete-processing-message
atharvadeosthale
approved these changes
Aug 4, 2026
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.
What does this PR do?
The message detail page gated the whole delete card on status:
{#if $message.status !== 'processing'} <Delete message={$message} /> {/if}That mirrored the server, which rejected the delete with
message_already_scheduled. The problem is thatprocessingis not always transient — a worker that died before writing a terminal status left the message there permanently, and the queue dead-letters a failed job rather than redelivering it. Nothing ever moved the message on, so the record could not be removed from the console at all. This is what the reported support case ran into.appwrite/appwrite#13091 fixed the server side: the worker now writes
failedwhen a job dies before a terminal status, and the delete endpoint no longer rejectsprocessing.This replaces that status gate with a write-scope gate. The card had no permission check at all, so a reader with
messages.readsaw a delete control that only failed once confirmed — that was true before this PR for every other status, and simply removing the condition would have widened it. The rest of the feature already derives this frommessages.write:+layout.svelte:29disables the tab action, and the list gates its create button (+page.svelte:144) and row selection (:154) on$canWriteMessages. The card now tracks permission rather than status, which is what it should have keyed on in the first place.Scope stays narrow:
overview.sveltestill hides the footer forprocessingandsent, and updating aprocessingmessage is still rejected server-side withmessage_already_processing. Editing stays blocked.helper.tsand the list page is untouched.Test Plan
With
messages.write: open a message stuck inprocessingand confirm the "Delete message" card renders and the delete succeeds. Before this change the card was absent entirely.With only
messages.read: confirm the card is now hidden, on any status.prettier --checkandeslintpass on the changed file. There are no messaging journeys undere2e/, so no test needed updating.Worth a reviewer's opinion:
delete.svelteappends ", and its delivery will be canceled" only forscheduled. Deleting aprocessingmessage does not stop an in-flight send — the queue has no cancellation primitive — so the copy is accurate as-is, but a note forprocessingmay be worth adding. I left the wording alone since that is a product call.Related PRs and Issues
buildjob here (unrelatedbrace-expansionadvisory)