-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Opens all changes after open in worktree flow finished for PRs #3701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Opens all changes after open in worktree flow finished for PRs #3701
Conversation
dacb6c6 to
4c7014a
Compare
axosoft-ramint
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried creating a VSIX from the latest of this branch, and running "open in worktree" on a few PRs, but I'm never able to see the PR changes opened. I will check if there was an issue with the package creation but in the meantime, some comments below:
axosoft-ramint
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found out why I wasn't able to see the PR changes in my test cases using the Launchpad. See below.
Also have an overall suggestion for making this much simpler. Let me know if it would work or if we would run into issues.
Co-authored-by: Ramin Tadayon <[email protected]>
02a3e5a to
861824b
Compare
axosoft-ramint
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works for me - though I was speaking with @eamodio this morning and thinking that it might not make sense to always load the changes. Will follow up on that in a bit.
src/uris/deepLinks/deepLink.ts
Outdated
| [DeepLinkServiceAction.OpenGraph]: DeepLinkServiceState.OpenGraph, | ||
| [DeepLinkServiceAction.OpenFile]: DeepLinkServiceState.OpenFile, | ||
| [DeepLinkServiceAction.OpenSwitch]: DeepLinkServiceState.SwitchToRef, | ||
| [DeepLinkServiceAction.OpenAllPrChanges]: DeepLinkServiceState.OpenAllPrChanges, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This transition is no longer necessary since it would/should only be reachable from OpenInspect
| repository: repo, | ||
| source: 'launchpad', | ||
| } satisfies ShowWipArgs); | ||
| action = DeepLinkServiceAction.OpenAllPrChanges; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now this would work because we really only open inspect on PR switches, in which case all the info is there to show the PR changes. Would be a nice additional touch though to check the action type in this._context.action though and maybe restrict/guard against any non-PR case.
|
Hey @nzaytsev, while reviewing your PR, I'd suggest the following code changes: 👉 Only open changes when worktree is created
You can also review and apply these suggestions locally on your machine. Learn more about GitKraken Code Suggest
Join your team on GitKraken to speed up PR review. |
|
Hey @nzaytsev, while reviewing your PR, I'd suggest the following code changes: 👉 Restricts to only opening on "Open in Worktree" and only when worktree is created You can also review and apply these suggestions locally on your machine. Learn more about GitKraken Code Suggest
Join your team on GitKraken to speed up PR review. |
- Only shows changes for "open in worktree" action - Removes unnecessary state transition - Only shows changes if worktree is created in flow - Applies to branches in views and graph
|
@eamodio Asking for your help reviewing this one since I committed to it directly. |
|
Going to go ahead and merge this - we can address further issues in follow-up |
Description
Screen.Recording.2024-10-28.at.11.18.31.mov
Checklist
Fixes $XXX -orCloses #XXX -prefix to auto-close the issue that your PR addresses