Repository navigation
Conversation
sergiou87
force-pushed
the
sergiou87-assisted-commit-runs
branch
from
October 9, 2026 15:22
036ef33 to
2995341
Compare
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Shared-worktree admission and local-clone source coordination contain concurrency gaps, alongside several UI correctness and accessibility issues.
6 open findings
Atomically protect all shared resources during repository operations · New Protect local clone sources from transient repository commits · New Preserve completion announcements after non-retry errors · New Refresh commit author after partial committer update failure · New Clear creation state before dismissing the popup · New Avoid duplicate screen-reader announcements for errors · New
What changed in this PR
Connects Copilot-assisted commits to an awaited, repository-owned local commit workflow with guarded execution, recovery, and UI progress.
Changes:
- Adds assisted-run orchestration, validation, rollback, and resource coordination.
- Adds progress, cancellation, recovery UI, and mutation guards.
- Adds broad integration, Git, and accessibility coverage.
| File | Description |
|---|---|
docs/technical/assisted-commit-transactions.md |
Updates transaction lifecycle documentation. |
docs/technical/assisted-commit-runs.md |
Documents assisted-run architecture. |
app/test/unit/ui/copilot-commit-panel-test.tsx |
Tests run progress and recovery UI. |
app/test/unit/ui/commit-message-test.tsx |
Tests assisted completion announcements. |
app/test/unit/ui/clone-repository-test.tsx |
Tests protected clone destinations. |
app/test/unit/ui/assisted-worktree-mutations-test.ts |
Tests worktree mutation guards. |
app/test/unit/ui/assisted-repository-creation-test.tsx |
Tests repository-creation coordination. |
app/test/unit/ui/assisted-commit-sidebar-test.tsx |
Tests end-to-end sidebar wiring. |
app/test/unit/stores/assisted-commit-run-hooks-test.ts |
Tests hook handling and rollback. |
app/test/unit/stores/assisted-commit-reader-publication-test.ts |
Tests selection publication. |
app/test/unit/git/repository-operation-test.ts |
Tests Git operation coordination. |
app/test/unit/git/clone-test.ts |
Tests independent clone admission. |
app/test/unit/git/assisted-commit-selected-fence-test.ts |
Tests selected-file acceptance fences. |
app/test/unit/git/assisted-commit-completion-test.ts |
Tests final transaction locking. |
app/test/helpers/changes-state-helper.ts |
Adds default assisted state. |
app/test/helpers/assisted-commit-run.ts |
Adds an assisted-run harness. |
app/styles/ui/changes/_copilot-commit-panel.scss |
Styles progress and error actions. |
app/src/ui/worktrees/worktree-list-item-context-menu.ts |
Disables protected worktree mutations. |
app/src/ui/worktrees/add-worktree-dialog.tsx |
Routes worktree creation through Dispatcher. |
app/src/ui/toolbar/worktree-dropdown.tsx |
Supports disabling worktree controls. |
app/src/ui/toolbar/push-pull-button.tsx |
Disables synchronization during runs. |
app/src/ui/toolbar/branch-dropdown.tsx |
Guards branch interactions. |
app/src/ui/repository.tsx |
Propagates assisted mutation locks. |
app/src/ui/repository-settings/repository-settings.tsx |
Coordinates identity updates. |
app/src/ui/dispatcher/dispatcher.ts |
Exposes assisted and guarded operations. |
app/src/ui/clone-repository/clone-repository.tsx |
Validates protected clone paths. |
app/src/ui/changes/sidebar.tsx |
Connects assisted actions to Dispatcher. |
app/src/ui/changes/filter-changes-list.tsx |
Wires cancellation and recovery actions. |
app/src/ui/changes/copilot-commit-panel.tsx |
Presents assisted-run status. |
app/src/ui/changes/commit-message.tsx |
Freezes and dispatches assisted requests. |
app/src/ui/changes/commit-message-avatar.tsx |
Suspends inactive configuration reads. |
app/src/ui/app.tsx |
Adds consent and toolbar locking. |
app/src/ui/app-error.tsx |
Preserves nested Copilot errors. |
app/src/ui/add-repository/create-repository.tsx |
Guards complete repository creation. |
app/src/models/popup.ts |
Adds assisted consent popup state. |
app/src/models/diff/diff-selection.ts |
Adds exact selection comparison. |
app/src/models/copilot-assisted-commit.ts |
Adds preflight intent capability. |
app/src/models/assisted-commit-run.ts |
Defines run states and outcomes. |
app/src/lib/stores/repository-state-cache.ts |
Persists repository-owned assisted state. |
app/src/lib/stores/git-store.ts |
Tracks coordinated Git operations. |
app/src/lib/stores/git-store-cache.ts |
Maintains authoritative native stores. |
app/src/lib/stores/copilot-store.ts |
Checks assisted runtime availability. |
app/src/lib/menu-update.ts |
Disables conflicting menu actions. |
app/src/lib/git/worktree.ts |
Exposes typed worktree options. |
app/src/lib/git/var.ts |
Reads frozen author and committer identities. |
app/src/lib/git/update-index.ts |
Supports certified partial diffs. |
app/src/lib/git/repository-operation.ts |
Implements operation leases and protections. |
app/src/lib/git/repository-operation-context.ts |
Propagates operation ownership. |
app/src/lib/git/diff.ts |
Supports disabling text conversion. |
app/src/lib/git/core.ts |
Coordinates native Git commands. |
app/src/lib/git/commit.ts |
Stages certified partial selections. |
app/src/lib/git/clone.ts |
Reserves clone destinations. |
app/src/lib/git/assisted-commit/index.ts |
Exports assisted HEAD reading. |
app/src/lib/git/assisted-commit/git.ts |
Adds final selected-file fencing. |
app/src/lib/git/assisted-commit/execute.ts |
Adds validation and acceptance boundaries. |
app/src/lib/git/apply.ts |
Applies certified diff bases. |
app/src/lib/error-with-metadata.ts |
Traverses nested error causes. |
app/src/lib/assisted-commit-run.ts |
Adds recovery and selection reconciliation. |
app/src/lib/assisted-commit-request.ts |
Freezes and validates request inputs. |
app/src/lib/app-state.ts |
Adds assisted state to changes state. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
sergiou87
force-pushed
the
sergiou87-assisted-commit-runs
branch
from
October 9, 2026 16:12
2995341 to
841b99b
Compare
This was referenced Oct 15, 2026
sergiou87
force-pushed
the
sergiou87-assisted-commit-runs
branch
from
October 15, 2026 15:21
841b99b to
7b51819
Compare
sergiou87
force-pushed
the
sergiou87-assisted-commit-runs
branch
from
October 15, 2026 16:51
7b51819 to
8d94375
Compare
sergiou87
force-pushed
the
sergiou87-assisted-commit-runs
branch
from
October 16, 2026 12:18
8d94375 to
e5bc2fc
Compare
sergiou87
force-pushed
the
sergiou87-assisted-commit-runs
branch
from
October 19, 2026 17:28
e5bc2fc to
5b969a2
Compare
sergiou87
force-pushed
the
sergiou87-assisted-commit-runs
branch
from
October 20, 2026 13:05
5b969a2 to
f9b3260
Compare
sergiou87
force-pushed
the
sergiou87-assisted-commit-runs
branch
3 times, most recently
from
October 26, 2026 15:31
162fe05 to
a29c35f
Compare
This was referenced Oct 28, 2026
sergiou87
marked this pull request as ready for review
October 28, 2026 15:49
sergiou87
force-pushed
the
sergiou87-assisted-commit-runs
branch
from
October 29, 2026 14:01
fa886b8 to
1466b87
Compare
Connect the Changes action to repository-owned planning, validation and local commit transactions through Dispatcher and AppStore. Preserve frozen inputs, manual drafts, consent, native hooks, cancellation and guarded recovery.\n\nCoordinate Desktop readers and mutations throughout the run and retain verified selection authority across refreshes. Keep completion local; opt-in push follows in the next stack layer.
Normalize synthetic prefix textconv output before testing partial-to-whole selection lineage, and exercise both local autocrlf settings without weakening selection assertions. Seed under deterministic test identities before removing committer environment overrides, isolate Git configuration, and verify frozen native sign-off against a changed live committer.
Keep owned temporary cleanup retryable even when capture fails before publishing a snapshot. Preserve nested failure causes and prioritize complete transaction recovery before acknowledging temporary-only obligations. Reconcile current selection without restoring external HEAD, index or working-file changes, and cover real owned-directory faults through AppStore, Dispatcher and the existing retry UI.
Suppress manual completion messages only while the previous assisted state still locks the repository. Cover switching from a settled error to Manual and preserve suppression for active, recovery and settling states.
Clear the polite live region for error states so the visible alert is the sole failure announcement. Preserve live progress and cancellation messages and cover settled, settling, recovery and refresh errors in the accessible DOM.
Refresh the displayed author whenever a name/email update is attempted, including when a later config write fails. Exercise native name-success/email-lock failures for local edits and global fallback, retaining visible errors and unchanged-identity no-op behavior.
Clear the creating state before successful dismissal can unmount the dialog. Cover real unmount ordering, pending disablement and dispatcher-reported failures that leave the dialog open.
Recognize native local-path and file URL source forms without changing remote transport selection. Retain source, physical metadata and peer worktree reads alongside destination fencing until clone completes, and keep progress observers outside operation ownership. Cover real transient commits rolled back before source release, aliases, URL decoding, shared worktrees, lifetime draining and destination protection. Narrow the earlier dialog regression's live ref at dismissal so the combined tests pass strict null checking.
Preserve file URL authorities as UNC paths on Windows and decode paths before parsing them, matching Git's native file transport. Keep POSIX authority handling and literal path characters unchanged while coordinating the source Git actually reads. Cover platform-specific drive, UNC and encoded paths, retain native source-recovery checks with a supported Windows URL, and document the transport distinction.
Move review-history cases beside their selection, recovery, cancellation, completion, reader, authorization, hook, operation, clone, identity and repository-state contracts. Reuse existing suites where appropriate and share only the partial-selection fixture used by multiple suites. Preserve all test bodies, parameterized cases, assertions and native fault injection while removing the review-named file and suite. No application behavior changes.
Resolve the current working-directory snapshot for assisted intent and deferred readers while retaining each run's frozen issuing session. Revoke prepared and active runs after repository account reassignment, including background analysis and partial native transactions. Preserve upstream worktree move fences and repository indicator publication through asynchronous operation admission. Update integration fixtures for assigned accounts and native reader lifetimes, and cover stale snapshots, reassignment, rollback and deferred delivery without weakening existing cases.
sergiou87
force-pushed
the
sergiou87-assisted-commit-runs
branch
from
November 3, 2026 11:34
1466b87 to
b4bcd70
Compare
tidy-dev
approved these changes
Nov 3, 2026
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.



Description
This PR wires up the Copilot-assisted commit flow in Changes. Copilot plans focused commits from the files and lines you selected, and Desktop checks the entire plan before creating any commits. Your saved manual commit message and unselected changes are left alone.
You can follow progress, cancel a run, and handle failing Git hooks using the existing Abort or Ignore and Continue controls. If a run fails or is cancelled before acceptance, Desktop rolls back only the commits it created while keeping your current working changes. If rollback or refresh cannot finish safely, the error stays visible with a retry action rather than silently treating the run as complete.
The integration also protects active runs from conflicting repository actions and preserves partial selections through refresh and recovery. With Allow empty enabled and no changes selected, it creates one
Empty commitwithout calling Copilot.The run lifecycle, selection tracking, and recovery live in dedicated feature modules; AppStore connects them to the existing repository state and UI. Ordinary commits and standalone commit-message generation keep their existing paths. This PR creates local commits only. Optional push is added in the next PR.
Stack
Merge in order, starting with 1. Each PR builds on the preceding PR.
Verification
Validated head
b4bcd7053563f3ed07040abce73776c455bc244c, treed165d90c629611546d651c705ceab896d89b3ad7, on plannerf1cc254e745f7755462666fcd1d63ea6f3ba65b9and pinned development2d365100350bf559f0123eea45a0062aedf4b6c7.The rebase combines upstream repository-assigned accounts and working-directory-keyed caches with assisted run ownership. Prepared and active runs are revoked when their repository's assigned account changes, even in the background. Deferred refresh and History use the current repository snapshot rather than an old account association. Existing operation leases, clone account fallback/picker behavior, worktree rename exclusion, status indicators, selection authority, native hooks and recovery remain covered.
Six new account-assignment cases failed before the integration fix and passed afterward, including stale callers, first-click intent, pending analysis, rollback after an earlier commit, and deferred background refresh/History. All prior test titles, options, parameterization and assertion ASTs in the 29 layer-owned test/helper files are retained (292 declarations and 1,376 assertions). This includes the reorganized 124 cases/402 assertions; the retired generic test file remains removed. Upstream cache/state-key tests and all four commit-mode account/worktree regressions are unchanged.
Validation ran on macOS arm64 with Node 24.22.1, Electron 44.9.1, TypeScript 6.0.3, Copilot SDK 1.0.27-preview.1, native runtime 1.0.104-1 (protocol 3), and Dugite 3.3.2 / Git 2.56.0. Frozen restoration left the pinned dependency manifests and lockfiles unchanged.
Focused account/session/cache/trampoline, SDK, native run/cancellation/recovery, clone, preview, worktree and UI checks:
Result: 870/870 passed, 49 files, 102 suites, zero failures or skips. Actual SDK/native-runtime instruction, tool-policy, cancellation and credential-session integration are included.
YARN_FROZEN_LOCKFILE=true corepack yarn install --frozen-lockfileGIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=safe.bareRepository GIT_CONFIG_VALUE_0=all corepack yarn testcorepack yarn testwithout the process-only compatibility settingcorepack yarn tsc --noEmitcorepack yarn lint:fixcorepack yarn lintcorepack yarn exec markdownlint -- docs/technical/assisted-commit-runs.md --config .markdownlint.js --rules .markdownlint-rules.jscorepack yarn test:script script/webpack-copilot-timers-test.tscorepack yarn test:e2e:build:unpackagedgit diff --checkA session-local probe reran six scenarios in the newly built production Electron app: selected-only multi-commit with History, analysis cancellation with manual-draft preservation, invalid-plan rejection and dismissal, native hook Abort after a partial commit with whole-run rollback, Ignore and Continue without skipping the next hook, and exact
Empty commitwith no additional model call. Native HEAD/index/working-byte outcomes were checked. All six passed; isolated profiles and repositories were removed and the app closed.The Electron probe used synthetic account/planner inputs; SDK tests used synthetic credentials and local request handlers. Native Git, hooks, selection/history/index and rollback were real. No live model quality or billing was tested. Existing videos remain earlier demonstrations, not recordings of this rebase. No new native Windows execution or exact-head CI success is claimed here.
I also did manual validation of as many scenarios as possible.
Team-authored review
Evidence: Verification and the existing scenario recordings.
Review path:
needs-deep-review. Native commits and rollback modify Git history and index state, and run authorization follows the issuing sign-in. In-depth human review should cover transaction ownership, rollback/interference fences and credential retirement. A maintainer should apply the required label before approval.Screenshots
Video recorded manually:
Screen.Recording.2026-10-28.at.09.31.18.mov
Video of other scenarios, recorded by Copilot:
0-copilot-assisted-commit-scenarios.mp4
Release notes
Notes: no-notes