Skip to content

Fix merged PR matching and auto-clean merged worktrees - #155

Merged
webdevcody merged 2 commits into
mainfrom
cursor/worktree-pr-cleanup-58d7
Oct 9, 2026
Merged

webdevcody merged 2 commits into
mainfrom
cursor/worktree-pr-cleanup-58d7

Conversation

@webdevcody

@webdevcody webdevcody commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Validate branch PR lookups against checkout branch, default branch, and PR head SHA so stale merged PRs from long-lived branches (like main) do not make current checkouts purple.
  • Add opt-in auto_cleanup_merged under Settings > Sessions to clean safely merged linked worktrees.
  • Add daemon-side cleanup safety checks for root/default branches, branch/head drift, dirty or untracked worktrees, active sessions, and running terminals, plus docs and tests.

Tests

  • cargo +stable test -q -p nebula-tui pull_request --no-default-features
  • cargo +stable test -q -p nebula-tui auto_cleanup --no-default-features
  • cargo +stable test -q -p nebula-daemon cleanup_merged_worktree --no-default-features
  • cargo +stable check -q --workspace --no-default-features

Notes

  • cargo +stable test -q --workspace --no-default-features was stopped after the existing tui_drag_past_the_pane_top_autoscrolls_and_copies_the_run test hung for several minutes locally; earlier test groups in that run had passed before the hang.
  • The initial Ubuntu CI failure was a test setup issue (temp git repo missing author identity) and is fixed in the latest push.
Open in Web Open in Cursor 

cursoragent and others added 2 commits October 9, 2026 18:25
Co-authored-by: Web Dev Cody <webdevcody@gmail.com>
Co-authored-by: Web Dev Cody <webdevcody@gmail.com>
@cursor
cursor Bot force-pushed the cursor/worktree-pr-cleanup-58d7 branch from 9365404 to 4f13577 Compare October 9, 2026 18:26
@webdevcody
webdevcody marked this pull request as ready for review October 9, 2026 18:26
@claude

claude Bot commented Oct 9, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

1 similar comment
@claude

claude Bot commented Oct 9, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@webdevcody
webdevcody merged commit 6bcc262 into main Oct 9, 2026
4 checks passed
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