fix(composer): exit edit mode after deleting a message
MR
1d ago+137+137+012345678901234567890123456789-15-15-01234567890123456789
Summary
Closes #43227.
When a message is successfully deleted from edit mode, stopping the editor must not fetch the deleted message again. Add a dedicated cleanup path that discards that message's draft and clears edit mode/highlighting without calling findMessageByID. Keep the regular stop flow unchanged for messages that still exist.
Also leave edit mode intact when the delete-confirmation modal closes without a successful deletion.
- Add unit coverage for cleanup after deletion and the no-active-edit case.
- Add a patch changeset for Meteor and its linked packages.
Validation
- Deno runtime assertions passed against
CurrentEditingMessagefor deletion cleanup and the no-active-edit case. git diff --checkpassed.- Jest/typecheck could not run because Node.js/Yarn dependencies are unavailable in this environment.
Summary by CodeRabbit
- Bug Fixes
- Deleting the message currently being edited now exits edit mode, discards that message’s draft, restores the regular composer draft, and clears the message highlight after deletion succeeds.
- Closing the deletion confirmation without deleting the message leaves the current editing state and draft unchanged. If the active edit changes while drafts are being restored, the newer editing state is preserved.