Skip to content

pr-branch-auto-delete - Wait for the PR header before reading branches - #10327

Draft
fregante wants to merge 1 commit into
mainfrom
claude/pr-branch-auto-delete
Draft

fregante wants to merge 1 commit into
mainfrom
claude/pr-branch-auto-delete

Conversation

@fregante

Copy link
Copy Markdown
Member

Created by Claude, will be reviewed by @fregante first.

Waits for the PR header's branch links to render before getBranches() reads them, the same way clean-conversation-headers already waits for them.

Fixes #10204

Test URLs

  1. Open https://github.com/pulls
  2. Click on any PRs you can merge (in repositories without native auto-delete)
  3. Merge the PR

Checked

  • getBranches() returns the right base and head on logged-out server-rendered markup of an open, a draft, a merged, a same-repo and a cross-repo PR, plus the Files tab. That includes the reported conversation-activity-filter - Move to top right  #10187. So the selectors themselves are fine, which is why I think this is a timing issue (header not rendered yet when init runs) and not a markup change.
  • The extension builds and loads on a public PR logged out without new errors. The feature itself doesn't run logged out.

Not checked (reviewer tasks)

  • I couldn't reproduce the error. It needs a logged-in session with merge rights and client-side navigation (PR list → PR), which can't be done in the sandbox.
  • Please confirm on the Test URLs steps above that the branch gets deleted after merging and that the console no longer shows Expected element not found: .head-ref.

@github-actions github-actions Bot added the bug label Oct 25, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

pr-branch-auto-delete - Expected element not found: .head-ref

1 participant