feat: Add chat thread deletion functionality
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- javascript, typescript
调研方向
Start by reading ThreadHeader.jsx and threads.controller.ts, then locate the ThreadService, thread-list UI, API documentation, and existing service/API/UI test patterns. Implement the authorized DELETE /api/threads/{threadId} flow with confirmation and related-resource cleanup, while first resolving the soft-delete versus permanent-delete requirement. Done means the UI, endpoint, cascade cleanup, permission and error handling, tests, and documentation satisfy all listed acceptance criteria.
由索引模型根据 Issue 内容生成。
描述
Summary
Implement a feature that allows users (and admins where appropriate) to delete entire chat threads.
The deletion should remove all messages belonging to the thread from both the UI and the underlying data store while preserving data integrity for related entities.
Motivation
- Users currently have no way to clean up obsolete or unwanted conversation histories.
- Provides better privacy controls and reduces storage bloat.
- Aligns with the roadmap for improving chat management capabilities.
Acceptance Criteria
-
UI
- A Delete Thread button appears on the thread header (visible to the thread owner and admins).
- Clicking the button opens a confirmation modal with Cancel and Delete options.
- After confirmation, the thread disappears from the thread list with a smooth fade‑out animation.
-
Backend
- API endpoint
DELETE /api/threads/{threadId}that:- Authenticates the requester.
- Checks that the requester is the thread owner or has admin privileges.
- Performs a cascade delete of all messages linked to the thread.
- Returns
204 No Contenton success, with appropriate error codes otherwise (403,404).
- API endpoint
-
Data Integrity
- All foreign‑key constraints remain satisfied after deletion.
- No orphaned attachment files or metadata remain; clean up any related resources.
-
Testing
- Unit tests for the service layer confirming cascade deletion.
- Integration tests covering the API endpoint (success, unauthorized, non‑existent thread).
- End‑to‑end UI test verifying that the button appears, modal works, and the thread is removed from the list.
-
Documentation
- Update the README/API docs with the new endpoint definition and usage examples.
- Add a Chat Thread Management section to the user guide describing how to delete a thread.
Edge Cases & Considerations
- Permissions: Ensure that only authorized users can delete threads; regular members should not see the delete
option for threads they don’t own. - Undo/Recovery: Evaluate whether a soft‑delete (with a 30‑day recovery window) is needed. If not, clearly state
the action is permanent in the confirmation modal. - Concurrent Deletion: Handle race conditions where two users might attempt to delete the same thread
simultaneously (idempotent delete operation).
Implementation Approach
-
Add a
DeleteThreadbutton inThreadHeader.jsx(or equivalent component). -
Create a confirmation modal component
ConfirmDeleteModal. -
Implement the backend handler in
threads.controller.ts(or language‑specific equivalent) that invokes the service
layer. -
Extend the
ThreadServiceto perform a cascade delete of associated messages and clean up attachments. -
Write unit, integration, and E2E tests.
-
Update API documentation and user guide.
- 主要语言
- TypeScript
- 星标
- 6k
- 派生
- 868
- 平均合并
- 2 天 8 小时
- 30 天内合并 PR
- 55
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
CopilotKit/OpenDots 的其他 Issue
-
Page conversation panel overflows horizontally可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
CopilotKit/OpenDots#69 ·
维护者通常 2 天内回复
-
Long page titles are clipped in the page editor可能已有人在做 @charan-rathore 于 22 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
CopilotKit/OpenDots#68 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 53/100
CopilotKit/OpenDots#171 ·
维护者通常 2 天内回复
-
Add a way to delete specialist Dots可能已有人在做 @XENONCYBER 于 11 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 45/100
CopilotKit/OpenDots#151 · 1 条评论 ·
维护者通常 2 天内回复
-
难度 1/5 1 小时以内 新手友好度 8/100
CopilotKit/OpenDots#149 ·
维护者通常 2 天内回复
查看 CopilotKit/OpenDots 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
Merit-Systems/x402scan#1312 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
Native Web
难度 1/5 1 小时以内 新手友好度 80/100
digitalfabrik/integreat-app#4517 ·
维护者通常 2 天内回复
-
TLS guide repeats certs/ in the certificate directory可能已有人在做 @maheshrijal 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 92/100
prometheus/docs#3156 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 83/100
medusajs/dtc-starter#90 ·
维护者通常 1 天内回复