Testing: Manually verified that deleting a parent message closes the thread sidebar.
Code review: Self-reviewed.
Changelog Entry
Description
Fixes an issue where the thread sidebar remains open after the parent message is deleted, allowing users to send messages into an orphaned thread (#22781).
Fixed
Added a check in the message:delete event handler in Channel.svelte to set threadId = null when the deleted message is the parent of the currently open thread sidebar.
The fix is a 3-line check in the existing channelEventHandler function.
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/open-webui/open-webui/pull/22835
**Author:** [@xr843](https://github.com/xr843)
**Created:** 3/19/2026
**Status:** ❌ Closed
**Base:** `dev` ← **Head:** `fix/22781-thread-sidebar-orphan`
---
### 📝 Commits (1)
- [`8d06b18`](https://github.com/open-webui/open-webui/commit/8d06b18362754e934b8af45da1eccf636710ac2e) fix: close thread sidebar when parent message is deleted (#22781)
### 📊 Changes
**1 file changed** (+3 additions, -0 deletions)
<details>
<summary>View changed files</summary>
📝 `src/lib/components/channel/Channel.svelte` (+3 -0)
</details>
### 📄 Description
# Pull Request Checklist
- [x] **Target branch:** Targets `dev` branch.
- [x] **Description:** Provided below.
- [x] **Changelog:** Included below.
- [x] **Testing:** Manually verified that deleting a parent message closes the thread sidebar.
- [x] **Code review:** Self-reviewed.
# Changelog Entry
### Description
- Fixes an issue where the thread sidebar remains open after the parent message is deleted, allowing users to send messages into an orphaned thread (#22781).
### Fixed
- Added a check in the `message:delete` event handler in `Channel.svelte` to set `threadId = null` when the deleted message is the parent of the currently open thread sidebar.
---
### Additional Information
- Closes #22781
- The fix is a 3-line check in the existing `channelEventHandler` function.
### Contributor License Agreement
- [x] By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/22835
Author: @xr843
Created: 3/19/2026
Status: ❌ Closed
Base:
dev← Head:fix/22781-thread-sidebar-orphan📝 Commits (1)
8d06b18fix: close thread sidebar when parent message is deleted (#22781)📊 Changes
1 file changed (+3 additions, -0 deletions)
View changed files
📝
src/lib/components/channel/Channel.svelte(+3 -0)📄 Description
Pull Request Checklist
devbranch.Changelog Entry
Description
Fixed
message:deleteevent handler inChannel.svelteto setthreadId = nullwhen the deleted message is the parent of the currently open thread sidebar.Additional Information
channelEventHandlerfunction.Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.