Repository navigation
Take resolveThreadGit and the default-branch lookup off sync git on the PR read paths (closes #228) - #230
Merged
currentbits merged 8 commits intoAug 17, 2026
Conversation
added 7 commits
August 17, 2026 11:46
… Web mode silently drops image attachments; the button just d
Convert electron tests for resolveThreadGit/listPrs/prStatus/prChecks/createPr/mergePr going async: await every call site, turn assert.throws into assert.rejects, and add a small AsyncFunction regression on the three read paths.
Convert resolveThreadGit, listPrs, prStatus, and prChecks to async gitTryAsync/ghTryAsync so tab render and poll cannot freeze the UI. createPr and mergePr become async only to await those helpers; their write-path ghTry, push, and gitTry stay synchronous on purpose.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…remainder origin/main (#229) finished the sync-gh work this branch had duplicated, so the overlapping half is dropped in favour of main's. What survives is exactly what #228 asked for and main still does not have: resolveThreadGit and the project default-branch lookup off sync git on the PR read paths.
currentbits
deleted the
coder/sync-local-git-remains-in-resolvethreadg-f3a349
branch
October 3, 2026 16:07
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 #228.
What this is now
This branch originally also converted the synchronous
ghon the PR read paths, because at the time it was cutorigin/mainstill had syncghTryat a 30s bound — contrary to what #228's body claimed. #229 has since landed and finished exactly that work, so the overlapping half was dropped in favour of main's version during the merge.What is left is precisely the remainder #228 was filed for, and it is still missing from main: the PR read paths call
resolveThreadGit, which does two synchronous local git calls (branch --show-current,remote get-url origin), andcreatePrresolves its base through the synchronousdefaultBranch.Changes
electron/worktrees.jsresolveThreadGit→ async, on the existinggitOutAsync/gitTryAsync. Every error message and throw condition is byte-identical; thetry/catchshape around the branch lookup is preserved by usinggitOutAsync(which throws) rather than theTryvariant.defaultBranchAsync, used bycreatePr. The synchronousdefaultBranchstays exactly as it is —setupWorktree,mergeWorktreeand the orphan sweep still call it and are deliberately blocking.listPrshad one straggler syncgitTryforremote get-url origin; nowgitTryAsync.awaitadded at all five call sites (prStatus,prChecks,mergePr,refreshPrStates,createPr). All five were alreadyasync, so no signature outside this file changes andelectron/ipc.jsneeds no edit.ponytail:note on syncgitOutnow names the write flows it actually covers, states its ceiling, and points at theCODER_LOOP_LAGprobe as the trigger for converting further — the measure-first method App beachballs when multiple threads run concurrently #124 established.electron/test/list-prs.test.jsdefaultBranchAsyncareAsyncFunction, anddefaultBranchis still a plainFunctionso the write-path split does not silently erode.Sync git in this file is now confined to the worktree write flows plus
createPr's ahead-of-basegit logcheck.Verification
npm run typecheck— clean.npm run test:electron— 861 tests, 850 pass, 11 fail. Baseline onorigin/main(79a1e52) in an identical worktree: 860 tests, 849 pass, the same 11 failures (orch-server / MCP-over-socket, environment-dependent, untouched here). Net: +1 test, no new failures.npm run test:renderer— 724/724 pass.Not done
No conversion of the worktree write flows — one per deliberate click, bounded at 15s by Synchronous git on the main-process event loop with no default timeout #88, and Sync local git remains in resolveThreadGit / defaultBranch on the PR read paths #228 explicitly scopes them out.
PR created by the Claude Code agent