Skip to content

fix(web): deleting a thread with its threads no longer wipes a child the server keeps - #1051

Merged
badcuban merged 1 commit into
mainfrom
fix/delete-cleans-only-deleted-threads
Nov 23, 2026
Merged

badcuban merged 1 commit into
mainfrom
fix/delete-cleans-only-deleted-threads

Conversation

@badcuban

Copy link
Copy Markdown
Collaborator

Deleting a parent with "Also delete its N threads" ticked made the client stop each child it counted, delete that child's terminal history, and clear its draft. It did this from a list it read before sending the delete. If a child left the family in between (separated from another device or by the agent, or archived on its own), the server kept that child, but the child had already lost its terminal history and draft.

The client now winds down only the thread the user named. Each child the server actually deletes is already cleaned up from its own thread.deleted event: ThreadDeletionReactor stops its runtime and deletes its terminal history, and every client drops its draft and terminal state when the removal comes in. The counted list now only decides the number in the dialog and where to navigate. Nothing on the wire changed, so older servers and phones keep working.

A new sidebar browser test deletes a parent with its threads while the child stays on the server, and checks that the child's session isn't stopped, its terminal isn't closed, and its draft is still there. It fails on main.

…the server keeps

The client stopped each child it counted, deleted its terminal history and
cleared its draft before and after sending the delete. A child that left the
family in the meantime survives on the server but lost that work. The server
already cleans up every thread it deletes (ThreadDeletionReactor) and clients
forget each one when its removal arrives, so the client now winds down only the
thread the user named.
@vercel

vercel Bot commented Nov 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
threadlines Skipped Skipped Nov 23, 2026 3:34pm UTC

Request Review

@badcuban
badcuban added this pull request to the merge queue Nov 23, 2026
Merged via the queue into main with commit fc87922 Nov 23, 2026
23 checks passed
@badcuban
badcuban deleted the fix/delete-cleans-only-deleted-threads branch November 23, 2026 16:05

This branch was previously deployed

1 inactive deployment
Preview — 2a40d78b Deployed Nov 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant