You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Picker-driven model updates already fetch stackCandidate explicitly in processRemoteAndBranchResult, while each setter also fires this handler and starts another full GraphQL parent lookup plus REST stack lookup. Changing owner and branch can start three checks; the sequence guard only discards stale results after those requests complete. Deduplicate or cache the eligibility lookup to avoid unnecessary API-rate consumption.
GitHub owner and repository names are case-insensitive, but this helper treats a casing-only update as a different remote. If an initialize response canonicalizes the casing, selectionChanged clears an otherwise valid stack selection. Compare both components case-insensitively, as isCreatable already does in this file.
Reselecting the current option clears the stack selection
webviews/common/createContextNew.ts:165
This unconditionally clears a checked stack option even when the user reselects the current base remote/branch and the returned candidate is unchanged. A same-selection round trip is used to refresh warnings, so merely reopening/reselecting the picker can lose the user's choice. Preserve addToStack unless the branch, remote, or candidate actually changed.
This issue also appears on line 212 of the same file.
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🔵 Needs a closer look
Auto-merge state is lost when toggling stacking, and stack eligibility checks can generate excessive API traffic.
Review effort: Balanced Findings: None
Previously missed (2)
In code that hasn't changed since last review
Avoid repeated API lookups on unrelated model updates
src/github/createPRViewProvider.ts:721
This lookup now runs for every model change, including update({}) emitted on each local repository-state event while the compare branch is checked out (src/view/createPullRequestDataModel.ts:55-59). Each lookup performs both a GraphQL PR query and a REST stacks request, so ordinary Git state refreshes can repeatedly consume API quota and delay webview updates. Recompute the candidate only when one of the selected owner/branch fields changes; initial loading already fetches it in getCreateParams().
Preserve auto-merge selection when toggling stack option
webviews/createPullRequestViewNew/app.tsx:391
Checking this option permanently overwrites the user's selected auto-merge mode. When the option is unchecked again, params.autoMerge is already false, so the previous “Create + Auto‑…” action is not restored. Auto-merge is already masked while stacking in the menu label/value and in copyParams(), so only update addToStack here and preserve the underlying selection.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.