Skip to content

fix(native): open a card's pull request where it belongs - #939

Merged
omartelo merged 1 commit into
mainfrom
fix/pr-badge-click-elsewhere
Oct 24, 2026
Merged

omartelo merged 1 commit into
mainfrom
fix/pr-badge-click-elsewhere

Conversation

@omartelo

Copy link
Copy Markdown
Collaborator

Summary

  • The card's pull request badge follows the shell's cwd, but its click (the badge, the card menu's Pull request item, the footer's pull request button) opened Pulls on that number, which lists the project's pull requests. After a cd into another repository it opened the wrong pull request, or none.
  • prTarget decides once for all three: a shell inside the session's checkout opens the number on Pulls as before; one outside it opens the pull request's URL in the browser. Another worktree of the same project also goes to the browser, since a cleaned path cannot tell it from another repository.
  • The badge itself still follows the cwd, unchanged.
  • CHANGELOG [Unreleased] › Fixed entry.

Test plan

  • TestTheCardsPullRequestOpensWhereItBelongs (cardmenu_test.go): in the checkout and in a folder of it the click asks Pulls for the number; in another repository, and in a sibling directory sharing the checkout's prefix, it asks the browser for the URL. Before the fix the menu item asked Pulls for fix: forward the mouse wheel as a scroll instead of arrow keys #7 in every case.
  • Local gate in native/: gofmt, go vet ./..., go test ./....

The badge reads the pull request where the session's shell is, and a click on
it, its card menu item or the footer button looked that number up on Pulls,
which lists the project's pull requests. After a cd into another repository
that opened the wrong pull request, or none. A shell outside the session's
checkout now opens the pull request in the browser.
@omartelo
omartelo merged commit a68f29f into main Oct 24, 2026
7 checks passed
@omartelo
omartelo deleted the fix/pr-badge-click-elsewhere branch October 24, 2026 14:01
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.

1 participant