Skip to content

fix(server): deleting an old pre-v2 fork thread removes its folder and workspace file - #351

Merged
LoganRupe merged 1 commit into
LoganRupe:multi-repo-workspacesfrom
stefanvandervelden-zipline:fix/multi-repo/fork-thread-delete-cleanup
Oct 15, 2026
Merged

LoganRupe merged 1 commit into
LoganRupe:multi-repo-workspacesfrom
stefanvandervelden-zipline:fix/multi-repo/fork-thread-delete-cleanup

Conversation

@stefanvandervelden-zipline

Copy link
Copy Markdown

This is the follow-up to #350. Deleting a thread migrated from the pre-v2 multi-repo fork left three things behind: its container folder, <container>.code-workspace beside it, and the layout file. The fork wrote its workspace file as a real file inside the container. remove() keeps real files, so the container survived, and the beside files are only deleted once the container is gone.

remove() now handles that case. For a run with no root repository, if the container's only content after the usual cleanup is one real .code-workspace file, the container is deleted along with it, and the beside files are then cleaned up as usual. Any other leftover file still keeps the folder, as before.

There are two new tests in WorkspaceWorktrees.test.ts. A fork-shaped run gets fully removed, and a fork run that also holds a notes.md keeps both files. The first test fails without the fix.

Written with Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

…d workspace file

The pre-v2 multi-repo fork wrote its workspace file as a real file inside
the run's container. remove() keeps real files, so deleting a migrated
thread left the container, the beside .code-workspace and the layout file
behind. A run with no root repository whose only leftover is that one
.code-workspace file is now removed in full; any other leftover still
keeps the folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@LoganRupe LoganRupe left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is tidy. Folding the fork case into remove() after removeLeftovers keeps the normal path untouched, and the notes.md test covers the case I'd have asked about.

@LoganRupe
LoganRupe merged commit 732f629 into LoganRupe:multi-repo-workspaces Oct 15, 2026
@stefanvandervelden-zipline
stefanvandervelden-zipline deleted the fix/multi-repo/fork-thread-delete-cleanup branch October 15, 2026 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants