Skip to content

fix(native): open the active session from a pull request's checkout - #914

Merged
omartelo merged 1 commit into
mainfrom
fix/pulls-go-to-active-session
Oct 22, 2026
Merged

omartelo merged 1 commit into
mainfrom
fix/pulls-go-to-active-session

Conversation

@omartelo

Copy link
Copy Markdown
Collaborator

Summary

On the Pulls screen, Go to session on a pull request whose checkout holds several sessions always opened the first of them, even when the session you were in sat in that checkout.

  • (*model).sessionToOpenAt picks the session to bring up for a checkout: the window's active session when it sits there, the first otherwise. prSession reads it instead of sessionsAt(...)[0].
  • CHANGELOG.md [Unreleased] › Fixed entry.

#913 applies the same rule to where a pull request's review comments go (pullsScreen.reviewSession). Once both are in, reviewSession can read sessionToOpenAt.

Test plan

  • native/: gofmt -l . clean, go vet ./... and go test ./... green
  • TestSessionToOpenAtPrefersTheActiveSession: fails on the old ids[0] rule
  • TestSessionToOpenAtFallsBackToTheFirstSession: active session in another project, checkout with no sessions

@omartelo
omartelo force-pushed the fix/pulls-go-to-active-session branch from b0d6adc to 4aad5e9 Compare October 22, 2026 20:16
@omartelo
omartelo merged commit 590daad into main Oct 22, 2026
7 checks passed
@omartelo
omartelo deleted the fix/pulls-go-to-active-session branch October 22, 2026 20:32
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