Merge upstream#3
Open
SimplyRin wants to merge 1047 commits into
Open
Conversation
Replace the lightweight ICopilotModel with the SDK's ModelInfo across app state, stores, and UI. Update AppStore to hold ModelInfo list and resolve a selected model before calling generateCommitMessage. Enhance CopilotStore with cached model list (ModelListCacheTTL), logic to pick a preferred default model (prefer DefaultCopilotModel, otherwise cheapest by billing multiplier), reasoning-effort handling, and a getCachedModels helper to refresh the cache. Also add safer fallbacks when listing models or generating commit messages.
Add enableCopilotConflictResolution() gated on enableDevelopmentFeatures() only. This is a dev-only flag with no consumers subsequent PRs inyet the epic will wire it up to UI and resolution logic.
Create the data extraction layer that parses merge conflict markers from files and packages them into structured context for the Copilot SDK. New file: app/src/lib/copilot-conflict-context.ts - extractConflictHunks: parses standard and diff3 conflict markers - buildConflictContext: reads conflicted files and assembles context - formatConflictContextForPrompt: formats context as human-readable prompt New file: app/test/unit/copilot-conflict-context-test.ts - 21 tests covering extraction, formatting, and edge cases Part of github/gh-cli-and-desktop#87
…lution Add feature flag for Copilot merge conflict resolution
Add testing skill for Copilot agents
Export getLowestReasoningEffort and getPreferredDefaultModel from copilot-store and add unit tests covering those helpers and the CopilotPreferences UI. New tests validate reasoning-effort selection, preferred default model selection (including billing fallback and DefaultCopilotModel preference), and CopilotPreferences rendering/behavior (availability, loading, model picker, selection changes).
Remove the claim that ties are broken by lowest reasoning effort — the implementation only sorts by billing multiplier.
Move 'Attaching artifacts' body content above 'Faking data' section and demote the latter to a #### subheading so the heading hierarchy matches the content structure. Remove duplicate artifact instructions.
Cover edge cases where the default model ID is not in the fetched model list, and where the persisted selectedCopilotModel no longer exists in the available models.
Make copilotModels nullable (ReadonlyArray<ModelInfo> | null) in IAppState and the full prop chain. Null means the list has not been fetched yet (shows 'Loading available models…'), an empty array means the fetch completed with no results (shows 'No models available. Check your Copilot subscription.'), and a populated array renders the model picker dropdown.
Instead of resolving the selected model against copilotModels in AppStore (which may be null if not yet fetched), pass the raw selectedCopilotModel string to CopilotStore.generateCommitMessage. The method now accepts string | ModelInfo | null and resolves the model against its own cached model list. If the ID is not found in the cache, it is still passed through to the SDK session so the user's selection is honored even before the UI model list loads.
CopilotStore now proactively fetches models when the GitHub.com account changes and emits a did-update event. AppStore listens and updates copilotModels from the cached result, so the Copilot tab in Settings shows fresh models even if the user signed in without reopening the dialog. Concurrent fetch calls are deduplicated via an in-flight promise guard to avoid spawning multiple SDK clients.
Add new interfaces and functions to copilot-conflict-context.ts: - IConflictCommitContext: commit messages from both sides of the merge - IConflictPullRequestContext: PR metadata (number, title, body) - gatherCommitContext(): uses getMergeBase + getCommits to retrieve recent commits on each branch since the divergence point (best-effort) - gatherPullRequestContext(): extracts PR context from Desktop's cached PullRequest object (no API call needed) - Updated formatConflictContextForPrompt() with optional commit and PR context parameters that render new sections in the prompt output These enrichment contexts help Copilot understand the intent behind conflicting commit messages explain why changes were made,changes and PR descriptions describe the feature/goal. 8 new unit tests added (29 total).
GitHub AE has been discontinued. This updates the Enterprise sign-in UI to: - Change label from 'Enterprise or AE address' to 'Enterprise address' - Update placeholder URL from https://github.example.com to https://example.ghe.com - Update the invalid URL error message with the new example URL - Update corresponding test Fixes #21925 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) from 4.5.4 to 4.5.6. - [Release notes](https://github.com/NaturalIntelligence/fast-xml-parser/releases) - [Changelog](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/CHANGELOG.md) - [Commits](NaturalIntelligence/fast-xml-parser@v4.5.4...v4.5.6) --- updated-dependencies: - dependency-name: fast-xml-parser dependency-version: 4.5.6 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
Remove GitHub AE references from Enterprise login screen
…ml-parser-4.5.6 build(deps): bump fast-xml-parser from 4.5.4 to 4.5.6
The method refreshes on TTL expiry, not on empty cache. Update the doc to say 'has expired' instead of 'has expired or is empty'.
Add null check before .length to match the nullable ReadonlyArray<ModelInfo> | null type.
Only show the Copilot tab in Preferences when at least one dotcom account has the SDK commit message generation feature flag enabled. Tab indices are mapped between visual position and PreferencesTab enum values so subsequent tabs remain correctly selectable. The model list fetch is also skipped when the flag is off.
Fix target path quotation when launching custom shells
…log-scaffold Add Copilot conflicts dialog scaffold
When the user clicks 'Resolve with Copilot', the loading dialog now triggers the full resolution pipeline: 1. Calls the Copilot SDK to get resolutions for conflicted files 2. Writes resolved content to disk (same pattern as manual resolution) 3. Stages files with git add 4. Transitions to the Copilot conflicts result dialog On failure, gracefully falls back to the manual conflicts dialog. Also adds copilotResolutions to the multi-commit operation state so the result dialog can display per-file reasoning from Copilot. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move the writeFile + git-add logic out of _startCopilotConflictResolution (which fires immediately on API response) into a new _applyCopilotConflictResolutions method that is called only when the user clicks "Continue Merge" from the result dialog. Also fix merge.tsx onContinueAfterConflicts to accept ShowCopilotConflicts step kind (not just ShowConflicts), preventing the "Invalid state" error. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Wire the onProgress callback from _resolveConflictsWithCopilot through state (copilotResolutionProgress) to the CopilotConflictsLoadingDialog, which now displays "X of Y files resolved" as Copilot processes files. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Move applyCopilotConflictResolutions into CopilotConflictsDialog so it works for all operation types (merge, rebase, cherry-pick), not just merge. - Add cancellation check after awaiting the Copilot API and in the progress callback, so a late response doesn't override the user's cancellation. - Batch git-add into a single invocation instead of one per file. - Fix stale doc comment on _startCopilotConflictResolution. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Bump Copilot SDK and update CopilotStore fields
Bumps [ip-address](https://github.com/beaugunderson/ip-address) from 10.0.1 to 10.2.0. - [Commits](https://github.com/beaugunderson/ip-address/commits) --- updated-dependencies: - dependency-name: ip-address dependency-version: 10.2.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
…licts-resolve-flow Wire up end-to-end Copilot conflict resolution flow
- Show per-file reasoning from Copilot in the result dialog - Add resolution dropdown per file (Copilot / Current / Incoming) using native context menu with checkmarks - Add overflow (...) menu per file with Open in Editor, Open with Default Program, and Reveal in Finder options - Left-align 'Back to manual' and right-align Abort + Continue buttons in the footer - Show green checkmark resolved state when a file is resolved externally (conflict markers removed outside Desktop) - Update _applyCopilotConflictResolutions to skip files the user overrode with ours/theirs via the dropdown Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The updateMultiCommitOperationStateAfterManualResolution method only synced manual resolutions when the step was ShowConflicts. When the step is ShowCopilotConflicts the method early-returned, so dropdown selections were saved to changesState but never propagated to the multi-commit operation step's conflictState — causing the UI to not re-render with the new selection. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When useCopilotConflictResolution is true (user previously opted into Copilot for this operation), _triggerConflictsFlow now routes directly to ShowCopilotConflictsLoading instead of ShowConflicts. This means subsequent conflict rounds during rebase/cherry-pick automatically use Copilot without requiring the user to click 'Resolve with Copilot' again. Also update updateMultiCommitOperationConflictsIfFound to sync manual resolutions when the step is ShowCopilotConflicts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Wrap onContinue in try/catch to reset isContinuing state if applyCopilotConflictResolutions or the continue operation throws, preventing the dialog from becoming permanently unresponsive. - Replace factory methods (makeResolutionDropdownClickHandler, makeOverflowMenuClickHandler) with memoized handler caches so the same function reference is returned for a given path across renders. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- onConfirmingAbort and onInvokeConflictsDialogDismissed now accept ShowCopilotConflicts step kind (previously threw, breaking the Abort button in the Copilot conflicts dialog). - moveToConflictState returns to ShowCopilotConflicts when useCopilotConflictResolution is true, so 'Return to conflicts' from ConfirmAbort goes back to the correct dialog. - Fix updateMultiCommitOperationConflictsIfFound to write manualResolutions into step.conflictState (not as a top-level step property). This was a pre-existing bug exposed by adding ShowCopilotConflicts to the guard. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add parsing and handling for Copilot SDK session.error events with HTTP 402 (Payment Required). Implements getCopilotPaymentRequiredErrorFromSessionError and cleanSessionErrorMessage to extract/clean billing-related messages and map known payment error codes. Introduces CopilotStore#sendAndWait to capture session.error events during sendAndWait calls and surface a parsed CopilotError for 402 responses while logging other session errors. Swap direct session.sendAndWait calls to use the new helper. Adds unit tests covering parsing and behavior for various session.error payloads.
Bumps [fast-uri](https://github.com/fastify/fast-uri) from 3.1.0 to 3.1.2. - [Release notes](https://github.com/fastify/fast-uri/releases) - [Commits](fastify/fast-uri@v3.1.0...v3.1.2) --- updated-dependencies: - dependency-name: fast-uri dependency-version: 3.1.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
…flicts-in-copilot-dialog Add per-file resolution controls to Copilot conflicts dialog
Add `.dialog-content` rules to limit dialog height and enable vertical scrolling. Uses `max-height: calc(100vh - 200px)` and `overflow-y: auto` so Copilot preferences dialog fits smaller viewports and the four sections remain accessible.
Parse git worktree list --porcelain output using NUL delimiters instead of newlines, making it safe for paths containing special characters. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The function name implies it returns all worktree-checked-out branches. Excluding the main worktree was a caller-specific optimization that leaked into a general-purpose function. The branch-pruner already independently checks against HEAD so this is safe. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Skip branches checked out in linked worktrees during pruning
Constrain Copilot BYOK dialog height
Co-authored-by: Markus Olsson <j.markus.olsson@gmail.com>
Handle Copilot SDK 402 session errors
Update CI and local tooling to Node 24.15.0 (/.github/workflows, .node-version, .nvmrc, .tool-versions). Upgrade Electron target and dependency to 42.0.1 (app/.npmrc, package.json) and adjust beta validation in script/validate-electron-version.ts. Update yarn.lock with matching Electron/@electron/get/env-paths/undici and strip-ansi entries. Ensures consistency across toolchain and release channel validation for the new Electron version.
Update Electron to version 42.0.1
…ress-10.2.0 Bump ip-address from 10.0.1 to 10.2.0
…ri-3.1.2 Bump fast-uri from 3.1.0 to 3.1.2
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #[issue number]
Description
Screenshots
Release notes
Notes: