Skip to content

Conflicting PRs: stop running a background merge to list files; the agent's own merge shows them - #24266

Closed
brennanb2025 wants to merge 9 commits into
mainfrom
brennanb2025/drop-background-conflict-file-list
Closed

brennanb2025 wants to merge 9 commits into
mainfrom
brennanb2025/drop-background-conflict-file-list

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 18 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​620 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1261 $\color{#cf222e}{\Huge{\mathbf{−}}}$​641
Prod 53 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​12719 $\color{#cf222e}{\Huge{\mathbf{−}}}$​13002 $\color{#cf222e}{\Huge{\mathbf{−}}}$​283

ELI5

When a pull request conflicts with its base branch, Orca used to quietly do a practice merge in the background, over and over, just to print the names of the conflicting files. That was slow, fought with worktree creation for the disk, and left junk files in your repository. Orca now just says what GitHub or GitLab says ("GitHub reports conflicts with main"), and the files appear when you (or the "Resolve conflicts with AI" agent) actually merge the base branch in your worktree.

What Changed

The problem. For every pull request that GitHub reported as conflicting, every PR refresh (and the Merge button's pre-check) ran git fetch origin <base>, git merge-base, git rev-list and git merge-tree against the local repository. Each new commit on main restarted that work for every conflicting PR. On 2026-09-28 one machine logged 357 of these practice merges in 3.6 hours. They competed for the disk while worktrees were being created, and each one wrote unreferenced Git objects into the user's repository. All of it existed to show a list of conflicting file names that the hosting provider does not supply (GitHub's and GitLab's APIs only say yes/no).

The change. Orca no longer computes a conflicting-file list. Whether a pull request conflicts still comes from the hosting provider, exactly as before. The file names come from where Git already shows them: a real merge in the user's own worktree, which Source Control lists with each file's conflict kind.

Checks panel (desktop):

Case Before After
GitHub PR conflicting, local or WSL repo "N commits behind (base commit: abc1234)", then "Conflicting files" with one row per path; while loading, "This branch has conflicts that must be resolved / Refreshing conflict details…" "GitHub reports conflicts with main" / "Merge main into this branch to see and resolve the conflicting files." No file list, no commits-behind line, no spinner text.
GitHub PR conflicting, local merge came out clean (stale GitHub state) "…local Git did not reproduce them. Refresh the review or push…" plus a copy box with an empty-commit recipe Same as the row above. The agent's prompt now covers this case (see below).
GitHub PR conflicting, SSH repo, Git older than 2.38, or base fetch failed "This branch has conflicts that must be resolved / Conflict file details are unavailable" Same as the first row.
GitHub PR conflicting, PR has no base branch name Same "unavailable" notice "GitHub reports conflicts with the base branch" / "Merge the base branch into this branch…"
GitLab MR conflicting "Conflict file details are unavailable" (GitLab never had a list) "GitLab reports conflicts with the target branch" / "Merge the target branch into this branch to see and resolve the conflicting files."
PR or MR not conflicting, other providers, folder workspaces No conflict block Unchanged

The one-time forced refresh when you open a conflicting PR stays, because a stale "conflicting" now sends you to an agent. Only its "Refreshing conflict details…" text is gone.

"Resolve conflicts with AI" (desktop and mobile):

Case Before After
GitHub PR with a file list Base branch from the background summary; "Conflicted files reported by the pull request (3): …"; "git fetch origin main" Base branch and base repository from the PR ("branch "main" of repository "acme/widgets""); "Git lists them once the merge below stops; read them with git status"; fetch from the remote whose URL matches the base repository
GitHub PR without a list (SSH, old Git, fetch failed) Desktop: "base branch: unavailable from cached conflict details" and "(0): No conflicting files were reported" Same as the row above, so SSH repos now get the base name too
Fork checkout (origin is the fork) Merged origin's copy of the base, which can be stale or missing Told to find the remote that points at the PR's base repository (often "upstream"), or fetch from that repository's URL; never to add or change remotes
Agent's merge completes with no conflicts, or Git says "Already up to date" No instruction The agent says so and shows git status -sb: the conflicts may already be resolved in local commits that were not pushed (for example by an earlier "Resolve with AI" run), or the host's conflict report may be stale. It does not push.
GitLab MR Base unavailable, "(0)" Base still unavailable; fetch from the remote that hosts the MR; Git lists the files

Merge button (blocked merge message):

Case Before After
Conflicting, local or WSL repo After a base fetch (up to 10 s) and a practice merge: "…cannot be merged yet. 3 commits behind main (base commit: …). Conflicting files: - …" Immediately: "This pull request has merge conflicts and cannot be merged yet. Update the branch with main and resolve the conflicts before merging."
Conflicting, SSH repo No Orca message; the merge failed with GitHub's error Same message as local
Conflicting, PR has no base branch name No Orca message "…Update the branch with the base branch and resolve the conflicts before merging."

Mobile PR sidebar (GitHub):

Case Before After
Conflicting PR "Conflicts" with "This branch has conflicts that must be resolved / Conflict file details are unavailable" and the AI button. The mobile reply reader dropped both the file list and the base branch name, so mobile always showed this and its prompt never had a base. "Conflicts" with "GitHub reports conflicts with main" / "Merge main into this branch to see and resolve the conflicting files." and the AI button. The reader now keeps the PR's base branch name, so the notice and the prompt can name it.

The mechanism.

  • Deleted src/main/github/conflict-summary.ts and its cache, and stopped threading the summary through the PR lookup (branch-lookup-derived-data.ts, branch-lookup-resolution.ts, pr-refresh-outcome-assembly.ts).
  • getPRMergeBlocker now returns the generic conflict text straight from GitHub's mergeable, with no local Git, for local, WSL and SSH repos alike.
  • Removed the PRConflictSummary type and the optional conflictSummary field from PRInfo, HostedReviewInfo and MRInfo (the GitLab one was never filled in).
  • Checks panel: ConflictingFilesSection, the "locally clean" notice and its command box are replaced by MergeConflictNotice in merge-conflict-notice.tsx. It reads the GitHub base name from the PR the panel already holds; the shared review mapper is unchanged on purpose, because adding a base name there would switch on a Source Control base-branch repair that is currently off.
  • buildResolvePullRequestConflictsPrompt takes the base repository instead of a file list.
  • Mobile: the conflicts section, its presentation helper and prompt builder follow the desktop copy, and the PR reply reader keeps baseRefName.
  • Removed the merge-tree-merge-base Git capability, its error matcher, its row in docs/reference/git-compatibility.md, and the part of the real-Git compatibility test that only this feature used.

Side effects to know about.

  • The background fetch also happened to refresh origin/<base> for every conflicting PR. Source Control's ahead/behind counts and compare base now get that ref only from Orca's other fetches and the user's own.
  • The Merge button no longer waits on a base fetch and a practice merge before it answers.

Why

The practice merge was the most expensive way to get a nice-to-have: it ran on every refresh of every conflicting PR, restarted on every main move, wrote objects into repositories, and still could not run for SSH repos, older Git, or offline base fetches, where users saw "details are unavailable" anyway. The list was also often wrong for forks, because it merged origin's copy of the base.

The new design has no background Git at all for this feature. Conflict yes/no stays with the provider, which is the source of truth for whether the PR can merge. The file names come from the one place that is always right: an actual merge of the real base in the user's worktree, which the "Resolve conflicts with AI" agent performs and Source Control already displays.

Alternatives considered:

  • Keep the list but quarantine the practice merge's objects in a scratch folder (fix(git): keep merge-tree's throwaway trees out of the real object store #22356). That fixed the junk files but kept the repeated fetches and disk contention, and needed a lot of careful machinery (scratch folders, partial-clone handling, WSL path translation, age-based cleanup) to protect a feature that should not run in the background at all.
  • Ask the provider for conflicting paths. GitHub and GitLab do not offer them, so it could not replace the list for the two providers the Checks panel shows.

Compatibility with other versions. The host simply stops sending an optional field. An older desktop or mobile client talking to this host sees no list and shows the "Conflict file details are unavailable" notice it already shows for SSH repos. A new client talking to an older host ignores the old field and gets the full new experience (the base name has always been on the PR). The SSH relay protocol is unchanged. Old cached PR entries that still carry the field are never read and are replaced on the next refresh.

Git versions. This removes the feature's dependency on Git 2.38/2.40; nothing new is required of Git.

Where this fits

This PR is step 1 of 2 in the plan to remove background git merge-tree from Orca:

  1. This PR (A): stop computing the conflicting-file list (two of the three merge-tree call sites).
  2. Next (B): branch cleanup after a workspace delete keeps Git's safe branch -d, and when Git refuses, asks the provider whether the PR was merged at this exact commit instead of running a local squash proof. That removes the last merge-tree call site.

After B lands, #22356's scratch-folder quarantine has nothing left to protect; whether to close it then is Brennan's call. This work is part of the wider worktree-create latency plan: #23699 is its step 1, and #23698 is tracked separately.

Differences from the common pattern

  • Whether a pull request conflicts comes from the hosting provider: matches the common pattern.
  • No conflicting-file list for a pull request that is not being merged locally: matches.
  • File names come only from a real merge in the user's own checkout (Source Control): matches.
  • Intended: a "Resolve conflicts with AI" action that performs that merge. It already existed; this PR only changes its prompt (base repository, remote matching for forks, Git lists the files, a clean merge means the report may be stale).
  • Intended: a one-time refresh of mergeability when a conflicting pull request is opened. It already existed; it matters more now because a stale "conflicting" sends the user to an agent.
  • Temporary: providers whose API can list conflicting paths (Bitbucket, and likely Azure DevOps) are not asked for them. Today no Orca surface shows those providers' conflicts at all (Bitbucket reports no conflict state, and the Checks panel shows only GitHub and GitLab reviews). Follow-up: give Bitbucket a conflict state from its conflicts endpoint, then decide whether to show paths; no ticket exists yet.

Linked Issue

Part of the plan described in "Where this fits" (supersedes the approach in #22356).

Visual Proof

Checks panel on a separate macOS QA machine, in an isolated app profile with no GitHub login. Its PR cache was seeded with a conflicting pull request, and the app keeps showing the cached PR when its refresh fails, so the panel renders from that cache. The live PR card could not be shown, because the test app is never given a GitHub credential.

Before (main) After (this PR)
PR with base main Before: commits-behind line and conflicting file list After: GitHub reports conflicts with main
No cached file list / no base name Before: conflict file details are unavailable After: GitHub reports conflicts with the base branch

"Resolve conflicts with AI" dialog and its prompt preview (After):

Resolve dialog
Prompt preview naming branch main of the base repository

Mobile was not run on a device; it is covered by unit tests.

Testing

  • Typecheck: node, web, mobile, and the mobile test-typecheck ratchet all pass.

  • Mobile recorded RPC replies (the golden recordings) were re-recorded: the mobile PR reader now keeps the optional baseRefName, so 14 recordings gain that one key and nothing else (checked by decoding every changed recording).

  • Unit tests: 57 desktop test files (501 passed, 19 skipped: the real-Git compatibility file, which needs a Git binary set in the environment) and 7 mobile test files (121 passed).

  • Real-Git compatibility contract run locally against Git 2.50.1: 19 passed. CI covers Git 2.25.5, 2.38.1 and 2.49.1.

  • New tests: a conflicting PR refresh (local and WSL) runs no fetch, merge-base, rev-list or merge-tree; the merge blocker for local, SSH and missing base; the Checks panel copy for GitHub with and without a base and for GitLab, also rendered through the panel; the one-time refresh fires once per PR; the resolve prompt for a fork-shaped base repository, a non-github.com host, GitLab, option-looking branch names, and the clean-merge rule; GitHub reporting "merge state dirty" while mergeability is still unknown still counts as conflicting (its only test lived in a deleted file); the Checks panel hands the PR's base and repository to the prompt; mobile copy, section, prompt, and a mobile reply from an older host that still sends conflictSummary.

  • Each new test was checked to fail when the old behaviour is put back (old SSH/missing-base skip, notice without the base name, git fetch origin, no clean-merge rule, prompt without the PR's base, refresh without its once-per-PR guard, the background summary restored, mobile reader dropping baseRefName).

  • Lint, changed-code quality gate, React Doctor, and localization catalog/extraction/coverage checks pass.

  • Platforms: unit tests on macOS. Manual QA on a separate macOS machine: the Checks panel notice (both variants, against main's old notice), the Resolve dialog's prompt, and a real agent following the prompt in a fork-shaped clone (origin is a fork with a stale main, upstream is the base). The agent fetched the base from upstream, Git listed the conflicted file, it resolved and committed the merge, and it pushed nothing. Run a second time on the already-merged clone, it said the conflicts already looked resolved locally and that pushing would update the PR, rather than blaming the host. Re-run on the final wording with fresh agents in a normal checkout, a fork checkout, and a branch that tracks the base: each merged and resolved, pushed nothing, and on the second run gave a hedged answer with git status -sb instead of blaming GitHub.

  • Not verified live: a real GitHub PR card (needs a credential in the test app) and the Merge button's message (the button is disabled while the PR conflicts). Windows, Linux, WSL, SSH and mobile are covered by unit tests only.

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

AI Disclosure

Review

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Ensure no issues in: Security, Cross-platoform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance

  • SSH: gains the merge-blocker message and the base name in the prompt; nothing new runs on the remote.
  • WSL: no Git runs in the distro for this feature anymore.
  • Folder workspaces: not affected (no branch, no review conflict UI).
  • Translations: the six new strings are added to all six desktop catalogs; the eleven removed strings are deleted from all of them.

Author: @BrennanKB5

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

…ting files

Conflicting PRs used to trigger a base fetch, merge-base, rev-list and
`git merge-tree` on every PR refresh and on the Merge button's preflight,
just to show a list of conflicting file names. Those runs piled up on every
main move, competed for disk during worktree creation, and wrote unreferenced
objects into the user's repository.

Orca now takes the conflict yes/no from the hosting provider only:
- Checks panel (desktop and mobile) says "GitHub reports conflicts with
  <base>" (or "GitLab reports conflicts with the target branch") and points
  the user at merging the base to see the files.
- "Resolve conflicts with AI" names the PR's base branch and base
  repository, fetches from the remote that matches it (forks), lets Git list
  the conflicted files, and treats a clean merge as a possibly stale report.
- The Merge button blocks a conflicting PR immediately, including SSH repos
  and PRs without a base name.
- Mobile now keeps the PR's base branch name when parsing the host reply.

Removes the merge-tree --merge-base capability and its doc row; branch
cleanup's merge-tree use is left for the follow-up.
@brennanb2025

brennanb2025 commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor Author

Review status: ready for review (head 914086e4b1e)

The problem. For every pull request GitHub marked as conflicting, each refresh and the Merge button's pre-check ran a background fetch of the base branch plus a practice merge (git merge-tree) in the user's repository, only to list the conflicting file names. It competed with worktree creation for the disk and left unreferenced objects in the repository.

What changes for users.

  • The Checks panel now says "GitHub reports conflicts with main. Merge main into this branch to see and resolve the conflicting files." There is no file list and no "commits behind" line.
  • When the PR has no base name, it says "the base branch". GitLab says "GitLab reports conflicts with the target branch".
  • "Resolve conflicts with AI" has the agent fetch the PR's real base from the remote that points at the base repository (which is "upstream" in a fork checkout), merge it, and read the conflicted files from git status. It never adds or changes remotes and never pushes.
  • The Merge button's blocked message is generic and immediate, now also for SSH repositories.
  • No Git runs in the background for this feature anymore.

Fixed during review.

  • CI was red. The mobile reply reader now keeps the optional baseRefName, so 14 recorded mobile RPC replies gained that key. They were re-recorded, and every changed recording was decoded to confirm that key was the only difference (19e414ee74b).
  • The rule "GitHub merge state DIRTY counts as conflicting" had lost its only test with a deleted file. It is tested again, and that test fails if the rule is removed (66c6483a512).
  • The agent prompt told the agent to blame a stale GitHub report whenever its merge came out clean. That was wrong in a common case: an earlier "Resolve with AI" run had already resolved the merge locally but not pushed it. The agent now says the merge was clean, shows git status -sb, and says the conflicts may already be resolved in unpushed local commits, or the report may be stale. It still never pushes.
    • An intermediate version that compared the branch with its upstream was dropped. It mis-handled branches that track the base branch, GitLab, and fork branches named like the base (914086e4b1e; history in 454eca1c193..f023b73beb9).
  • main merged in twice; no conflicts.

Deferred (not blocking).

  • GitHub Enterprise remotes over SSH: the prompt names the repository as host/owner/repo. That text appears literally only in HTTPS remote URLs, so the agent has to recognise the SSH form itself. If it doesn't, it falls back to fetching by URL, which fails loudly rather than doing harm.
  • An older desktop app talking to a newer Orca host loses the base name in its own (old) resolve prompt. It shows the same "conflict details are unavailable" state it already shows for SSH repositories. No version gate is needed; the field was optional and old clients handle it missing.
  • The Merge button's pre-check reads GitHub's raw mergeable rather than the derived value, so an UNKNOWN + DIRTY pull request gets GitHub's error instead of Orca's message. This predates this PR.
  • Small cleanups: a type declared in the notice file that only the triage strip uses; getPRMergeBlocker is exported but has no outside callers; stale entries for the two deleted test files in ci-shard-timings.json, which the shard script ignores; no test for a host sending a null baseRefName (it degrades to "the base branch").

Verified.

  • Three independent code reviews, covering the main process and remote compatibility, the renderer and prompt, and mobile, Git compatibility and leftovers. Then narrow re-checks of each fix and a readiness checklist with no P0/P1 candidates.
  • Typecheck (node, web, mobile, and the mobile test-file typecheck), the targeted desktop and mobile tests, the mobile recording suites, the real-Git compatibility tests against Git 2.50.1, and full CI, all green.
  • Manual QA on a separate macOS machine with an isolated test app (screenshots in the description):
    • the new notice for both variants, compared with main's file list;
    • the Resolve dialog's prompt;
    • a real agent following the prompt in a fork-shaped clone. It fetched the base from upstream rather than the fork's stale main, resolved the conflict, and pushed nothing. On a second run on the already-merged clone it pointed at the unpushed local resolution instead of blaming GitHub.
    • Re-run on the final head with fresh agents in three setups: a normal checkout, a fork checkout, and a branch that tracks the base. Each time the agent merged and resolved the conflict, and pushed nothing. On the second run each answer was hedged and included git status -sb, and none flatly blamed GitHub.

Not verified.

  • The live GitHub PR card: the test app is never given a GitHub credential, so the panel was rendered from a seeded PR cache.
  • The before/after difference in background Git on a live refresh: without a login the PR lookup fails before that code runs in either build.
  • The Merge button's message: the button is disabled while a PR conflicts.
  • Windows, Linux, WSL, SSH and mobile: unit tests only.

@brennanb2025
brennanb2025 marked this pull request as ready for review October 1, 2026 03:42
@greptile-apps

greptile-apps Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Removes background merge conflict detection, relies on agent merge data.

The PR appears safe to merge; no actionable regression was established.

Summary

This PR removes background Git practice merges used to list hosted-review conflicts. Desktop and mobile now show the provider's conflict state, while the AI prompt directs an agent to fetch the base and inspect conflicts in the worktree.

  • Removes conflict-summary caching, shared fields, and the Git capability used only by that feature.
  • Updates merge-blocker messaging, localized notices, mobile reply parsing, and relevant tests.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  P[Provider mergeability] --> N[Desktop or mobile conflict notice]
  N --> A[Resolve conflicts with AI]
  A --> F[Fetch PR base]
  F --> M[Merge in selected worktree]
  M --> S[Git status and Source Control show conflicted files]
Loading

Reviews (1) · Last reviewed commit: "fix(source-control): report a clean conf..."

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found. The background practice-merge removal is coherent and the supporting contracts all line up.

Reviewed changes

  • Removed the background conflict-file list. conflict-summary.ts/conflict-summary-cache.ts and their tests are deleted, along with the PRConflictSummary type, the optional conflictSummary field on PRInfo/HostedReviewInfo/MRInfo, and the merge-tree-merge-base Git capability (plus its error matcher, docs row, and the now-dead real-Git test slice). Conflict yes/no still comes from the hosting provider.
  • Merge button answers without local Git. getPRMergeBlocker now derives its message from GitHub's mergeable alone for local, WSL, and SSH repos; the repoPath parameter and the conflict preflight are gone.
  • Checks panel shows provider attribution, not a file list. ConflictingFilesSection and the old notice are replaced by merge-conflict-notice.tsx, which names the GitHub base branch (or falls back to "the base branch") and the GitLab target branch. Six new checksPanel.mergeConflict.* keys are added to all six catalogs; eleven removed.
  • Resolve-conflicts prompt reworked. buildResolvePullRequestConflictsPrompt takes baseRepository instead of entries, points at the matching remote for fork checkouts, adds a clean-merge rule that prints git status -sb and explicitly forbids pushing, and leaves file discovery to git status.
  • Mobile parity. PRConflictingFilesSection → PRMergeConflictsSection, resolveConflictDisplay returns {title, body}, the reply schema keeps baseRefName, and the affected goldens were re-recorded.

ℹ️ Carried-forward side effect

The removed background fetch was also the thing that refreshed origin/<base> for every conflicting PR, so ahead/behind counts and compare-base for those PRs now depend on Orca's other fetches. This is intentional and documented in the PR body — noting it only so it is on the record as the one behavior change outside the conflict UI itself.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: b45fbe55-3342-4368-afbf-0c5dec0d27e4

📥 Commits

Reviewing files that changed from the base of the PR and between 78daf71 and 914086e.

📒 Files selected for processing (71)
  • config/scripts/locale-ko-key-overrides.json
  • docs/reference/git-compatibility.md
  • mobile/rpc-foundation/goldens/matrix-github.pr-read-github.listassignableusers-1.json
  • mobile/rpc-foundation/goldens/matrix-github.pr-read-github.prcheckdetails-1.json
  • mobile/rpc-foundation/goldens/matrix-github.pr-read-github.prchecks-1.json
  • mobile/rpc-foundation/goldens/matrix-github.pr-read-github.prforbranch-1.json
  • mobile/rpc-foundation/goldens/matrix-github.pr-read-github.reposlug-1.json
  • mobile/rpc-foundation/goldens/matrix-github.pr-read-github.workitemdetails-1.json
  • mobile/rpc-foundation/goldens/matrix-github.pr-read-hostedreview.forbranch-1.json
  • mobile/rpc-foundation/goldens/matrix-session.pr-sidebar-github.prchecks-1.json
  • mobile/rpc-foundation/goldens/matrix-session.pr-sidebar-github.prforbranch-1.json
  • mobile/rpc-foundation/goldens/matrix-session.pr-sidebar-hostedreview.forbranch-1.json
  • mobile/rpc-foundation/goldens/matrix-session.pr-sidebar-worktree.show-1.json
  • mobile/rpc-foundation/goldens/pr-read-surface.json
  • mobile/rpc-foundation/goldens/pr-sidebar-checks-refused.json
  • mobile/rpc-foundation/goldens/pr-sidebar-load.json
  • mobile/src/components/MobilePRSidebar.tsx
  • mobile/src/components/pr-sidebar/PRConflictingFilesSection.test.ts
  • mobile/src/components/pr-sidebar/PRConflictingFilesSection.tsx
  • mobile/src/components/pr-sidebar/PRMergeConflictsSection.test.ts
  • mobile/src/components/pr-sidebar/PRMergeConflictsSection.tsx
  • mobile/src/components/pr-sidebar/pr-conflict-presentation.test.ts
  • mobile/src/components/pr-sidebar/pr-conflict-presentation.ts
  • mobile/src/components/pr-sidebar/pr-conflict-styles.ts
  • mobile/src/session/github-pr-read-reply-schema.ts
  • mobile/src/session/pr-ai-triage-prompt.test.ts
  • mobile/src/session/pr-ai-triage-prompt.ts
  • mobile/src/session/session-reply-schema.test.ts
  • src/main/github/client-merge-queue-auto-merge.test.ts
  • src/main/github/client-pr-conflict-summary.test.ts
  • src/main/github/client-pr-conflicting-refresh.test.ts
  • src/main/github/client-pr-local-runtime.test.ts
  • src/main/github/client-test-harness.ts
  • src/main/github/client/lookup/branch-lookup-derived-data.ts
  • src/main/github/client/lookup/branch-lookup-resolution.ts
  • src/main/github/client/lookup/pr-refresh-outcome-assembly.ts
  • src/main/github/client/merge/merge-pr.ts
  • src/main/github/conflict-summary-cache.ts
  • src/main/github/conflict-summary.test.ts
  • src/main/github/conflict-summary.ts
  • src/main/github/default-branch-stale-pr.test.ts
  • src/main/source-control/forge-review-mappers.ts
  • src/renderer/src/components/right-sidebar/SourceControl.resolve-conflicts-prompt.test.ts
  • src/renderer/src/components/right-sidebar/checks-panel-content.test.tsx
  • src/renderer/src/components/right-sidebar/checks-panel/active-content-props.ts
  • src/renderer/src/components/right-sidebar/checks-panel/active-content.tsx
  • src/renderer/src/components/right-sidebar/checks-panel/conflict-summary.tsx
  • src/renderer/src/components/right-sidebar/checks-panel/merge-conflict-notice.tsx
  • src/renderer/src/components/right-sidebar/checks-panel/panel-content-rendering.test.tsx
  • src/renderer/src/components/right-sidebar/checks-panel/triage-strip.tsx
  • src/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-ai-queue.test.tsx
  • src/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-ai-queue.tsx
  • src/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-conflict-refresh.test.tsx
  • src/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-conflict-refresh.tsx
  • src/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-context-state.tsx
  • src/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-controller-state.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/shared/git-binary-compatibility.test.ts
  • src/shared/git-capability-cache.ts
  • src/shared/git-merge-tree-capability.test.ts
  • src/shared/git-merge-tree-capability.ts
  • src/shared/github/pull-request-types.ts
  • src/shared/gitlab-types.ts
  • src/shared/hosted-review-github.ts
  • src/shared/hosted-review.ts
  • src/shared/source-control-conflict-prompts.ts
💤 Files with no reviewable changes (16)
  • mobile/src/components/pr-sidebar/PRConflictingFilesSection.test.ts
  • src/main/github/conflict-summary.test.ts
  • src/shared/git-merge-tree-capability.ts
  • src/main/github/client-pr-local-runtime.test.ts
  • src/main/github/client-test-harness.ts
  • src/shared/github/pull-request-types.ts
  • src/renderer/src/components/right-sidebar/checks-panel/active-content-props.ts
  • src/main/github/client-pr-conflict-summary.test.ts
  • src/shared/hosted-review.ts
  • src/main/github/default-branch-stale-pr.test.ts
  • src/shared/git-capability-cache.ts
  • src/renderer/src/components/right-sidebar/checks-panel/conflict-summary.tsx
  • src/main/github/conflict-summary.ts
  • config/scripts/locale-ko-key-overrides.json
  • src/main/github/conflict-summary-cache.ts
  • mobile/src/components/pr-sidebar/PRConflictingFilesSection.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.


📝 Walkthrough

Walkthrough

The change removes locally derived conflict summaries from pull-request data and merge handling. Desktop and mobile conflict notices now use provider and base-branch details. Resolution prompts use base-repository information and leave conflict-file discovery to Git. GitHub PR schemas and RPC golden recordings are updated to include baseRefName. Locale strings and tests are updated for these changes.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 91408

Conflict guidance now uses provider-reported status and available base-branch metadata, leaving file discovery to Git during a local merge. No concrete merge-blocking issue remains; merging is appropriate after normal checks.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 91408

The change removes background merge work without weakening the inspected hosting-provider merge checks. No introduced security weakness was demonstrated. Local conflict-resolution execution and compatibility across deployed versions were not fully established.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • observed — The inspected mobile path targets an existing worktree by worktreeId through the existing launch contract. The merge path resolves a repository before invoking repository-scoped provider operations. The changed mobile builder receives base branch and base repository, not PR body or fork-head repository metadata.

Trust Boundaries and Controls

  • observed — Ordinary merge preflight retains review and merge-queue blockers and now blocks host-reported conflicts without requiring a local connection or complete local ref metadata. Lookup failure still returns no preflight blocker; that behavior is unchanged from the base and leaves final acceptance to the provider.
  • observed — The mobile conflict action remains conditional on host-reported conflicts and is disabled when launch is busy or unavailable. Capability checks and existing-workspace targeting remain in the launch path; the inspected change does not replace them with direct shell submission.

Resilience and Maintainability Implications

  • observed — Local-resolution guidance protects unrelated changes, preserves manual conflict work, handles clean or already-up-to-date completion, and instructs repeated status/continue checks until completion or an unsafe state. Destructive cleanup and pushing remain prohibited by guidance, whose enforcement was not established.
  • observed — Existing mobile launch handling synchronously prevents concurrent taps, releases its busy lock in finally, and distinguishes delivered, undelivered, failed, and unconfirmed outcomes. Stack merges submit the validated head SHA, release the local concurrency slot once, and poll provider-owned completion; exhausted polling reports that merging may still be underway rather than asserting rollback.
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 35 functions across 34 files. (17 skipped… Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description is detailed and covers the change, rationale, testing, visual proof, compatibility, and checklist. However, the required Linked Issue section does not contain an actual issue reference… Add the actual issue reference in the Linked Issue section, such as Fixes #12345 or another valid issue link. Complete or explicitly justify any remaining required sections if applicable, including AI Disclosure and Review for this reposi…
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly describes the main change: removing background merges used to list conflicting files and relying on the agent's real merge.
Full details: Docstring Coverage

Explanation

Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 35 functions across 34 files. (17 skipped: 17 unsupported.)

Full details: Description check

Explanation

The description is detailed and covers the change, rationale, testing, visual proof, compatibility, and checklist. However, the required Linked Issue section does not contain an actual issue reference.

Resolution

Add the actual issue reference in the Linked Issue section, such as Fixes #12345 or another valid issue link. Complete or explicitly justify any remaining required sections if applicable, including AI Disclosure and Review for this repository's contributor requirements.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Closing. This removed the conflicting-file list to save background work, which loses a feature users rely on. The underlying problem (conflict checks leaving throwaway objects in the repository) is fixed in #22356 with no change to what users see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant