Skip to content

fix(mobile): compare branches and show diffs with desktop's base-ref and whitespace settings - #34038

Merged
AmoabaKelvin merged 5 commits into
mainfrom
mobile-source-control-diff-sync-parity
Oct 27, 2026
Merged

AmoabaKelvin merged 5 commits into
mainfrom
mobile-source-control-diff-sync-parity

Conversation

@AmoabaKelvin

@AmoabaKelvin AmoabaKelvin commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 7 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​71 $\color{#cf222e}{\Huge{\mathbf{−}}}$​2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​69
Prod 33 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2242 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1475 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​767

ELI5

On the phone, the "committed changes" list always compared against the base branch, and its diffs showed every re-indented line as changed. Desktop compares against the upstream when you turn that setting on, and hides whitespace-only edits unless you ask to see them. The phone now reads those two desktop settings and follows them.

What Changed

Each item is from the mobile/desktop parity audit (source-control report).

  • Fix update checker 406 error and add menu feedback #8 Branch-compare base.
    • Desktop's base-ref-resolution.ts moved to src/shared/source-control-base-ref-resolution.ts; desktop imports it from there.
    • The phone resolves its compare base with the same resolveSourceControlBaseRef / resolveSourceControlCompareBaseRef. With compare-against-upstream on and no pinned base, the Changes list and the review screen compare against the branch's upstream, as desktop does.
  • Fix useEffect anti-patterns across renderer #9 Whitespace in diffs.
    • New src/shared/diff-whitespace.ts (shouldIgnoreTrimWhitespace) is desktop's Monaco rule; desktop's diff-editor-whitespace-options.ts uses it.
    • The phone's line diff compares trimmed lines unless diffShowWhitespace is on, so a re-indent shows no changed lines by default. Context rows show the new text. This applies to the staged/unstaged file tabs, the review screen and the branch diff preview.
    • Open diff tabs, including ones still loading, are rebuilt when the setting changes.
  • Host: the two settings are published. settings.get now carries sourceControlCompareAgainstUpstream and diffShowWhitespace.
  • Phone settings read. useMobileSourceControlSettings keeps one copy per host connection, shared by every screen. It rereads when a screen mounts, on reconnect, and on Source Control Refresh.

Mobile behaviour removed or changed (it now follows desktop):

  • comparing against the base branch even with compare-against-upstream on
  • showing whitespace-only line edits as delete plus add

Not changed:

  • PR base for SHA-pinned worktrees (Fix update checker 406 error and add menu feedback #8, deferred). Desktop compares a worktree pinned to a commit hash against its PR's base branch. The phone does not have the PR's base branch when it runs the compare, so that part needs the PR read wired into the compare and is left for a follow-up.
  • No live settings stream. The phone has no settings subscription. A desktop change shows after a Refresh, a screen open or a reconnect. An open branch diff preview sheet keeps its diff until it is reopened.

Why

Both rules now have one copy in src/shared. The desktop renderer and the phone both read it, with desktop's settings published by the host.

Linked Issue

Part of the mobile/desktop parity audit

Visual Proof

No device captures for this fleet. The change adopts desktop's existing behaviour: use-base-refs compare-base resolution (sourceControlCompareAgainstUpstream) and the Monaco diff editor's ignoreTrimWhitespace: diffShowWhitespace !== true.

Testing

  • Focused mobile tests (source-control, session, components, tasks, RPC recordings with re-recorded goldens). Also desktop and shared tests for the moved module and the host settings projection.

  • New: a re-indent hidden unless whitespace is shown, and open or loading diffs dropped when desktop's setting arrives. The second test was confirmed failing without the fix.

  • Mobile typecheck / typecheck:tests, tc:web and tc:node pass. So do check:code-quality:changed, check:react-doctor:changed and verify:localization-coverage.

  • 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 copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

  • Mixed versions: older hosts omit the two new fields, and the phone then uses desktop's defaults (compare against base, hide whitespace-only edits). Older phones ignore the fields.
  • Folder workspaces: they have no branch compare. The whitespace rule only applies to git diffs.
  • SSH/remote: the settings come from the paired host's settings.get, so the phone follows the desktop it is connected to.

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)

@AmoabaKelvin
AmoabaKelvin force-pushed the mobile-source-control-diff-sync-parity branch from 799c05a to a66f7a7 Compare October 26, 2026 19:20
@AmoabaKelvin
AmoabaKelvin force-pushed the mobile-source-control-diff-sync-parity branch from a66f7a7 to 66e451b Compare October 27, 2026 01:07
@AmoabaKelvin
AmoabaKelvin marked this pull request as ready for review October 27, 2026 01:08
@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 13 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fdc05dd5-04f9-4c49-961e-588906a0720a
Commits

Reviewing files that changed from the base of the PR and between e6cd2c6 and 8247ab4.

Files selected for processing: 40
  • mobile/rpc-foundation/goldens/matrix-git.changes-load-git.branchcompare-1.json
  • mobile/rpc-foundation/goldens/matrix-git.changes-load-git.status-1.json
  • mobile/rpc-foundation/goldens/matrix-git.changes-load-repo.list-1.json
  • mobile/rpc-foundation/goldens/matrix-git.changes-load-worktree.show-1.json
  • mobile/rpc-foundation/goldens/sc-changes-loaded.json
  • mobile/src/files/mobile-file-tab-doc.ts
  • mobile/src/session/mobile-diff-lines.test.ts
  • mobile/src/session/mobile-diff-lines.ts
  • mobile/src/session/mobile-diff-review-loaders.ts
  • mobile/src/session/mobile-diff-review-retry.test.tsx
  • mobile/src/session/use-mobile-diff-review-controller.ts
  • mobile/src/session/use-mobile-diff-review-diff-loading.ts
  • mobile/src/session/use-mobile-session-document-readers.test.ts
  • mobile/src/session/use-mobile-session-document-readers.ts
  • mobile/src/source-control/MobileSourceControlPanel.tsx
  • mobile/src/source-control/mobile-branch-base-ref.ts
  • mobile/src/source-control/mobile-branch-compare-outcome.ts
  • mobile/src/source-control/mobile-branch-preview-ownership.test.tsx
  • mobile/src/source-control/mobile-source-control-screen-state.ts
  • mobile/src/source-control/mobile-source-control-sections.ts
  • mobile/src/source-control/mobile-source-control-settings.ts
  • mobile/src/source-control/use-mobile-branch-diff-preview.ts
  • mobile/src/source-control/use-mobile-source-control-loaders.ts
  • mobile/src/source-control/use-mobile-source-control-openers.test.tsx
  • mobile/src/source-control/use-mobile-source-control-openers.ts
  • mobile/src/source-control/use-mobile-source-control-state.ts
  • mobile/src/test-support/rpc-recording/adapters/diff-review-mount-adapters.ts
  • mobile/src/test-support/rpc-recording/adapters/source-control-screen-read-mount-adapters.ts
  • mobile/src/transport/settings-read-operations.ts
  • src/main/runtime/runtime-client-settings-shape.ts
  • src/main/runtime/runtime-client-settings-source-control-projection.spec.ts
  • src/main/runtime/runtime-client-settings.ts
  • src/main/runtime/runtime-store-contract.ts
  • src/renderer/src/components/editor/diff-editor-whitespace-options.ts
  • src/renderer/src/components/right-sidebar/SourceControl.compare-summary.test.ts
  • src/renderer/src/components/right-sidebar/SourceControl.tsx
  • src/renderer/src/components/right-sidebar/source-control/sync/use-base-refs.ts
  • src/renderer/src/components/right-sidebar/source-control/sync/use-branch-compare.ts
  • src/shared/diff-whitespace.ts
  • src/shared/source-control-base-ref-resolution.ts
Walkthrough

The changes add runtime and mobile support for source-control settings, including upstream comparison, group ordering, and whitespace display. Mobile branch comparisons use the configured comparison target. Mobile diff paths can ignore whitespace-only changes while retaining original line content for display. Shared whitespace and base-reference helpers are used by mobile and renderer code. RPC recording fixtures now capture the revised requests, responses, states, and checkpoints.

Priority: Normal

Merge Risk: Low · previous review e6cd2

A narrowly timed Refresh may leave mobile comparison and whitespace settings stale. Another Refresh recovers; fixing the queued reread is advisable before merge.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Description check Warning The description is detailed and relevant, but it does not provide the required actual linked issue. The visual-proof section also does not use the required N/A wording or provide before-and-after ca… Add a valid issue link under Linked Issue, provide before-and-after visual proof or write N/A with a brief reason, and complete the Review section. Confirm whether the unchecked full lint, typecheck, test, and build commands passed locall…
Docstring Coverage Warning Docstring coverage is 15.38% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surv… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: aligning mobile branch comparison and diff whitespace behavior with desktop settings.
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.
Full details: Description check

Explanation

The description is detailed and relevant, but it does not provide the required actual linked issue. The visual-proof section also does not use the required N/A wording or provide before-and-after captures, and the Review section is empty.

Resolution

Add a valid issue link under Linked Issue, provide before-and-after visual proof or write N/A with a brief reason, and complete the Review section. Confirm whether the unchecked full lint, typecheck, test, and build commands passed locally or will be covered by CI.

Full details: Docstring Coverage

Explanation

Docstring coverage is 15.38% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 13 functions across 18 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 2
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ebca5a8f-5ac4-47bb-bfaf-a652bc5bc35a
Commits

Reviewing files that changed from the base of the PR and between 57aa892 and 66e451b.

Files selected for processing: 281
  • config/scripts/source-control-path-sort-benchmark.mjs
  • mobile/rpc-foundation/goldens/diff-review-snapshot.json
  • mobile/rpc-foundation/goldens/matrix-git.changes-load-git.branchcompare-1.json
  • mobile/rpc-foundation/goldens/matrix-git.changes-load-git.status-1.json
  • mobile/rpc-foundation/goldens/matrix-git.changes-load-repo.list-1.json
  • mobile/rpc-foundation/goldens/matrix-git.changes-load-worktree.show-1.json
  • mobile/rpc-foundation/goldens/matrix-git.review-preparation-git.status-1.json
  • 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-hostedreview.create-intent-git.bulkstage-1.json
  • mobile/rpc-foundation/goldens/matrix-hostedreview.create-intent-git.commit-1.json
  • mobile/rpc-foundation/goldens/matrix-hostedreview.create-intent-git.generatecommitmessage-1.json
  • mobile/rpc-foundation/goldens/matrix-hostedreview.create-intent-git.push-1.json
  • mobile/rpc-foundation/goldens/matrix-hostedreview.create-intent-git.status-1.json
  • mobile/rpc-foundation/goldens/matrix-hostedreview.create-intent-git.status-2.json
  • mobile/rpc-foundation/goldens/matrix-hostedreview.create-intent-git.status-3.json
  • mobile/rpc-foundation/goldens/matrix-hostedreview.create-intent-git.status-4.json
  • mobile/rpc-foundation/goldens/matrix-hostedreview.create-intent-hostedreview.create-1.json
  • mobile/rpc-foundation/goldens/matrix-hostedreview.create-intent-hostedreview.getcreationeligibility-1.json
  • mobile/rpc-foundation/goldens/matrix-hostedreview.create-intent-hostedreview.getcreationeligibility-2.json
  • mobile/rpc-foundation/goldens/matrix-hostedreview.create-intent-worktree.set-1.json
  • mobile/rpc-foundation/goldens/matrix-session.diff-review-base-ref-show.json
  • mobile/rpc-foundation/goldens/matrix-session.diff-review-git.branchcompare-1.json
  • mobile/rpc-foundation/goldens/matrix-session.diff-review-git.status-1.json
  • mobile/rpc-foundation/goldens/matrix-session.diff-review-repo.list-1.json
  • mobile/rpc-foundation/goldens/matrix-session.diff-review-review-show.json
  • mobile/rpc-foundation/goldens/matrix-session.pr-branch-context-git.branchcompare-1.json
  • mobile/rpc-foundation/goldens/matrix-session.pr-branch-context-git.status-1.json
  • mobile/rpc-foundation/goldens/matrix-session.pr-branch-context-repo.list-1.json
  • mobile/rpc-foundation/goldens/matrix-session.pr-branch-context-worktree.show-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-branch-identity.json
  • mobile/rpc-foundation/goldens/pr-read-surface.json
  • mobile/rpc-foundation/goldens/pr-read-upstream-error.json
  • mobile/rpc-foundation/goldens/pr-sidebar-checks-refused.json
  • mobile/rpc-foundation/goldens/pr-sidebar-load.json
  • mobile/rpc-foundation/goldens/review-create-agent-refused.json
  • mobile/rpc-foundation/goldens/review-send-notes-heals-stale-input.json
  • mobile/rpc-foundation/goldens/sc-changes-loaded.json
  • mobile/rpc-foundation/goldens/sc-create-intent-stage-commit-push-create.json
  • mobile/rpc-foundation/goldens/sc-create-intent-unlisted-provider.json
  • mobile/rpc-foundation/goldens/sc-pr-link-hosted-review.json
  • mobile/rpc-foundation/goldens/sc-prerequisite-publish.json
  • mobile/rpc-foundation/goldens/sc-review-status-normalized.json
  • mobile/rpc-foundation/pilot-scenarios.json
  • mobile/src/components/MobileDiffReviewFileSummary.tsx
  • mobile/src/components/MobilePRSidebar.tsx
  • mobile/src/components/pr-sidebar/MobileLinkPrForm.tsx
  • mobile/src/components/pr-sidebar/PRActionsSection.tsx
  • mobile/src/components/pr-sidebar/PRChecksSection.tsx
  • mobile/src/components/pr-sidebar/PRReviewersSection.tsx
  • mobile/src/components/pr-sidebar/PrSidebarCreateEmptyState.tsx
  • mobile/src/components/pr-sidebar/pr-actions-state.test.ts
  • mobile/src/components/pr-sidebar/pr-actions-state.ts
  • mobile/src/components/pr-sidebar/pr-actions-styles.ts
  • mobile/src/components/pr-sidebar/pr-check-detail-content.ts
  • mobile/src/components/pr-sidebar/pr-checks-presentation.test.ts
  • mobile/src/components/pr-sidebar/pr-checks-presentation.ts
  • mobile/src/files/mobile-file-tab-doc.ts
  • mobile/src/session/MobileSessionSheets.tsx
  • mobile/src/session/github-pr-mutation-operations.ts
  • mobile/src/session/github-pr-mutations.ts
  • mobile/src/session/github-pr-read-reply-schema.ts
  • mobile/src/session/github-pr-repo-slug.ts
  • mobile/src/session/github-pr-rpc.ts
  • mobile/src/session/mobile-diff-comments.test.ts
  • mobile/src/session/mobile-diff-comments.ts
  • mobile/src/session/mobile-diff-lines.test.ts
  • mobile/src/session/mobile-diff-lines.ts
  • mobile/src/session/mobile-diff-review-loaders.ts
  • mobile/src/session/mobile-diff-review-queue.ts
  • mobile/src/session/mobile-diff-review-retry.test.tsx
  • mobile/src/session/mobile-existing-agent-launch.ts
  • mobile/src/session/mobile-new-tab-agent-loader.ts
  • mobile/src/session/mobile-pr-sidebar-resolve.test.ts
  • mobile/src/session/mobile-pr-sidebar-resolve.ts
  • mobile/src/session/mobile-pr-sidebar-state.ts
  • mobile/src/session/mobile-session-route-helpers.ts
  • mobile/src/session/pr-action-mutation-contract.ts
  • mobile/src/session/pr-actions-engine.test.ts
  • mobile/src/session/pr-actions-engine.ts
  • mobile/src/session/pr-ai-triage-launch.test.ts
  • mobile/src/session/pr-ai-triage-launch.ts
  • mobile/src/session/pr-ai-triage-prompt.test.ts
  • mobile/src/session/pr-ai-triage-prompt.ts
  • mobile/src/session/pr-comment-actions.test.ts
  • mobile/src/session/pr-comment-actions.ts
  • mobile/src/session/use-mobile-diff-review-controller.ts
  • mobile/src/session/use-mobile-diff-review-diff-loading.ts
  • mobile/src/session/use-mobile-diff-review-send-actions.test.ts
  • mobile/src/session/use-mobile-diff-review-send-actions.ts
  • mobile/src/session/use-mobile-native-chat-readability.ts
  • mobile/src/session/use-mobile-pr-actions.test.ts
  • mobile/src/session/use-mobile-pr-actions.ts
  • mobile/src/session/use-mobile-pr-ai-triage.ts
  • mobile/src/session/use-mobile-pr-sidebar-controller-probe.test.ts
  • mobile/src/session/use-mobile-pr-sidebar-controller.test.ts
  • mobile/src/session/use-mobile-pr-sidebar-controller.ts
  • mobile/src/session/use-mobile-session-accessory-selection.ts
  • mobile/src/session/use-mobile-session-diff-comments.ts
  • mobile/src/session/use-mobile-session-document-readers.test.ts
  • mobile/src/session/use-mobile-session-document-readers.ts
  • mobile/src/source-control/MobileSourceControlContent.test.tsx
  • mobile/src/source-control/MobileSourceControlContent.tsx
  • mobile/src/source-control/MobileSourceControlFileList.tsx
  • mobile/src/source-control/MobileSourceControlFileList.web.test.tsx
  • mobile/src/source-control/MobileSourceControlFileRows.tsx
  • mobile/src/source-control/MobileSourceControlPanel.tsx
  • mobile/src/source-control/git-status-reply-schema.ts
  • mobile/src/source-control/github-pr-link-parse.test.ts
  • mobile/src/source-control/github-pr-link-parse.ts
  • mobile/src/source-control/mobile-branch-base-ref.ts
  • mobile/src/source-control/mobile-branch-compare-outcome.ts
  • mobile/src/source-control/mobile-branch-compare.ts
  • mobile/src/source-control/mobile-branch-preview-ownership.test.tsx
  • mobile/src/source-control/mobile-create-pr-action.test.ts
  • mobile/src/source-control/mobile-create-pr-action.ts
  • mobile/src/source-control/mobile-git-mutation-operations.ts
  • mobile/src/source-control/mobile-git-status.test.ts
  • mobile/src/source-control/mobile-git-status.ts
  • mobile/src/source-control/mobile-hosted-review-create-intent-runner.ts
  • mobile/src/source-control/mobile-hosted-review-create-intent.test.ts
  • mobile/src/source-control/mobile-hosted-review-create-intent.ts
  • mobile/src/source-control/mobile-hosted-review-git-preparation.ts
  • mobile/src/source-control/mobile-hosted-review-remote-prerequisite.ts
  • mobile/src/source-control/mobile-hosted-review-service.ts
  • mobile/src/source-control/mobile-path-sort.test.ts
  • mobile/src/source-control/mobile-pr-chip-summary.test.ts
  • mobile/src/source-control/mobile-pr-create.test.ts
  • mobile/src/source-control/mobile-pr-create.ts
  • mobile/src/source-control/mobile-pr-link.test.ts
  • mobile/src/source-control/mobile-pr-link.ts
  • mobile/src/source-control/mobile-source-control-primary-action.test.ts
  • mobile/src/source-control/mobile-source-control-primary-action.ts
  • mobile/src/source-control/mobile-source-control-screen-state.ts
  • mobile/src/source-control/mobile-source-control-sections.ts
  • mobile/src/source-control/mobile-source-control-settings.ts
  • mobile/src/source-control/mobile-worktree-metadata-operations.ts
  • mobile/src/source-control/source-control-reply-schema.test.ts
  • mobile/src/source-control/source-control-status-retry.test.tsx
  • mobile/src/source-control/use-mobile-branch-diff-preview.ts
  • mobile/src/source-control/use-mobile-create-pr-runner.ts
  • mobile/src/source-control/use-mobile-source-control-create-pr-action.ts
  • mobile/src/source-control/use-mobile-source-control-loaders.ts
  • mobile/src/source-control/use-mobile-source-control-openers.test.tsx
  • mobile/src/source-control/use-mobile-source-control-openers.ts
  • mobile/src/source-control/use-mobile-source-control-state.ts
  • mobile/src/source-control/worktree-metadata-reply-schema.ts
  • mobile/src/tasks/agent-launch-request.ts
  • mobile/src/tasks/mobile-tasks-item-detail-content.tsx
  • mobile/src/tasks/mobile-tasks-project-review-panels.tsx
  • mobile/src/tasks/mobile-tasks-repository-presentation.ts
  • mobile/src/test-support/rpc-recording/adapters/diff-review-mount-adapters.ts
  • mobile/src/test-support/rpc-recording/adapters/hosted-review-mount-adapters.ts
  • mobile/src/test-support/rpc-recording/adapters/pr-sidebar-mount-adapters.ts
  • mobile/src/test-support/rpc-recording/adapters/source-control-mount-adapters.ts
  • mobile/src/test-support/rpc-recording/adapters/source-control-screen-read-mount-adapters.ts
  • mobile/src/test-support/rpc-recording/mutants/operation-mutations.ts
  • mobile/src/test-support/rpc-recording/recording-scenario.ts
  • mobile/src/test-support/rpc-recording/run-recording.ts
  • mobile/src/test-support/rpc-recording/scripted-rpc-transport.ts
  • mobile/src/transport/settings-read-operations.ts
  • mobile/src/transport/use-workspace-client.ts
  • mobile/src/transport/workspace-server.ts
  • mobile/src/worktree/last-visited-worktree-repo.ts
  • src/main/runtime/mobile-rpc-allowlist.test.ts
  • src/main/runtime/runtime-client-settings-shape.ts
  • src/main/runtime/runtime-client-settings-source-control-projection.spec.ts
  • src/main/runtime/runtime-client-settings.ts
  • src/main/runtime/runtime-rpc/runtime-rpc-mobile-method-routing.ts
  • src/main/runtime/runtime-store-contract.ts
  • src/renderer/src/components/editor/CheckRunJobs.tsx
  • src/renderer/src/components/editor/check-details-reading-cache.ts
  • src/renderer/src/components/editor/check-details-reading-owner.ts
  • src/renderer/src/components/editor/check-run-details-fix-context.ts
  • src/renderer/src/components/editor/diff-editor-whitespace-options.ts
  • src/renderer/src/components/github-item-dialog/inspect-pull-request/checks-tab-actions.ts
  • src/renderer/src/components/github-item-dialog/inspect-pull-request/checks-tab.tsx
  • src/renderer/src/components/github-item-dialog/land-pull-request/pr-reviewers-panel.tsx
  • src/renderer/src/components/github-item-dialog/land-pull-request/pr-reviewers-request-actions.ts
  • src/renderer/src/components/github-item-dialog/land-pull-request/pr-reviewers-requested-list.tsx
  • src/renderer/src/components/github-pr-merge-state.test.ts
  • src/renderer/src/components/github-pr-merge-state.ts
  • src/renderer/src/components/pr-checks-fix-prompt.ts
  • src/renderer/src/components/pull-request-page/checks/fix-launch.ts
  • src/renderer/src/components/pull-request-page/checks/tab.tsx
  • src/renderer/src/components/pull-request-page/reviewers/panel.tsx
  • src/renderer/src/components/pull-request-page/reviewers/request-actions.ts
  • src/renderer/src/components/pull-request-page/reviewers/requested-list.tsx
  • src/renderer/src/components/right-sidebar/HostedReviewActions.tsx
  • src/renderer/src/components/right-sidebar/SourceControl.compare-summary.test.ts
  • src/renderer/src/components/right-sidebar/SourceControl.tsx
  • src/renderer/src/components/right-sidebar/check-job-log-tail.tsx
  • src/renderer/src/components/right-sidebar/checks-panel-content.test.tsx
  • src/renderer/src/components/right-sidebar/checks-panel-review-creation.test.ts
  • src/renderer/src/components/right-sidebar/checks-panel-review-creation.ts
  • src/renderer/src/components/right-sidebar/checks-panel-review-lookup-authority.ts
  • src/renderer/src/components/right-sidebar/checks-panel/active-content.tsx
  • src/renderer/src/components/right-sidebar/checks-panel/check-details-model.ts
  • src/renderer/src/components/right-sidebar/checks-panel/check-run-details.tsx
  • src/renderer/src/components/right-sidebar/checks-panel/checks-list.tsx
  • src/renderer/src/components/right-sidebar/checks-panel/comment-controls.tsx
  • src/renderer/src/components/right-sidebar/checks-panel/comment-row.tsx
  • src/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-check-and-review-actions.tsx
  • src/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-comment-mutations.tsx
  • src/renderer/src/components/right-sidebar/github-pr-stack-merge.test.ts
  • src/renderer/src/components/right-sidebar/github-pr-stack-merge.ts
  • src/renderer/src/components/right-sidebar/source-control-create-pr-intent-flow.test.ts
  • src/renderer/src/components/right-sidebar/source-control-dropdown-items.test.ts
  • src/renderer/src/components/right-sidebar/source-control-tree.ts
  • src/renderer/src/components/right-sidebar/source-control/commit/discard-all-failure-description.test.tsx
  • src/renderer/src/components/right-sidebar/source-control/commit/discard-confirmation.ts
  • src/renderer/src/components/right-sidebar/source-control/commit/discard-dialog.tsx
  • src/renderer/src/components/right-sidebar/source-control/commit/rename-mutation-paths.test.ts
  • src/renderer/src/components/right-sidebar/source-control/commit/source-control-entry-mutation-failures.test.tsx
  • src/renderer/src/components/right-sidebar/source-control/commit/use-bulk-actions-capped-stage.test.tsx
  • src/renderer/src/components/right-sidebar/source-control/commit/use-bulk-actions.ts
  • src/renderer/src/components/right-sidebar/source-control/commit/use-discard-confirmation.ts
  • src/renderer/src/components/right-sidebar/source-control/listing/directory-action-paths.ts
  • src/renderer/src/components/right-sidebar/source-control/listing/section-action-buttons.test.tsx
  • src/renderer/src/components/right-sidebar/source-control/listing/section-file-list.tsx
  • src/renderer/src/components/right-sidebar/source-control/listing/submodule-expansion.ts
  • src/renderer/src/components/right-sidebar/source-control/listing/tree-directory-rows.tsx
  • src/renderer/src/components/right-sidebar/source-control/listing/uncommitted-entry-row.tsx
  • src/renderer/src/components/right-sidebar/source-control/listing/uncommitted-sections.tsx
  • src/renderer/src/components/right-sidebar/source-control/listing/use-file-projection.ts
  • src/renderer/src/components/right-sidebar/source-control/panel/use-panel-view-state.ts
  • src/renderer/src/components/right-sidebar/source-control/review/create-pr-intent-flow.ts
  • src/renderer/src/components/right-sidebar/source-control/review/create-pr-intent-review-step.ts
  • src/renderer/src/components/right-sidebar/source-control/review/use-action-model.ts
  • src/renderer/src/components/right-sidebar/source-control/review/use-linked-reviews.ts
  • src/renderer/src/components/right-sidebar/source-control/sync/use-base-refs.ts
  • src/renderer/src/components/right-sidebar/source-control/sync/use-branch-compare.ts
  • src/renderer/src/components/right-sidebar/status-display.ts
  • src/renderer/src/components/task-page/github/Avatars.tsx
  • src/renderer/src/components/task-page/github/ReviewCell.tsx
  • src/renderer/src/components/task-page/github/task-page-github-reviewer-actions.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/store/github/pull-request-actions.ts
  • src/renderer/src/store/github/pull-request-execution.ts
  • src/renderer/src/store/github/refresh-event-actions.ts
  • src/renderer/src/store/github/worktree-refresh.ts
  • src/renderer/src/store/slices/github-branch-mismatched-linked-pr.test.ts
  • src/shared/diff-whitespace.ts
  • src/shared/git-status-labels.ts
  • src/shared/git-status-sort.test.ts
  • src/shared/git-status-sort.ts
  • src/shared/github/linked-pr-staleness.ts
  • src/shared/github/pr-comment-mutability.test.ts
  • src/shared/github/pr-comment-mutability.ts
  • src/shared/github/pr-reviewer-display.test.ts
  • src/shared/github/pr-reviewer-display.ts
  • src/shared/github/pull-request-merge-state.ts
  • src/shared/github/pull-request-stack-merge.ts
  • src/shared/hosted-review-create-confirmation.test.ts
  • src/shared/hosted-review-create-confirmation.ts
  • src/shared/hosted-review-push-target.test.ts
  • src/shared/hosted-review-push-target.ts
  • src/shared/pr-check-status-label.ts
  • src/shared/pr-check-step-status.test.ts
  • src/shared/pr-check-step-status.ts
  • src/shared/pr-checks-fix-prompt.test.ts
  • src/shared/pr-checks-fix-prompt.ts
  • src/shared/source-control-base-ref-resolution.ts
  • src/shared/source-control-create-review-intent.test.ts
  • src/shared/source-control-create-review-intent.ts
  • src/shared/source-control-discard-all-sequence.test.ts
  • src/shared/source-control-discard-all-sequence.ts
  • src/shared/source-control-entry-actions.test.ts
  • src/shared/source-control-entry-actions.ts
  • src/shared/source-control-runtime-capabilities.ts
  • src/shared/source-control-section-order.test.ts
  • src/shared/source-control-section-order.ts
Files with no reviewable changes: 11
  • src/renderer/src/components/right-sidebar/checks-panel-content.test.tsx
  • mobile/src/session/mobile-session-route-helpers.ts
  • src/renderer/src/components/right-sidebar/source-control-create-pr-intent-flow.test.ts
  • src/renderer/src/components/right-sidebar/checks-panel-review-creation.test.ts
  • mobile/src/session/mobile-diff-comments.ts
  • mobile/src/session/mobile-diff-comments.test.ts
  • mobile/src/session/pr-comment-actions.test.ts
  • mobile/src/tasks/mobile-tasks-repository-presentation.ts
  • mobile/src/components/pr-sidebar/pr-checks-presentation.ts
  • src/renderer/src/components/right-sidebar/checks-panel/comment-controls.tsx
  • src/renderer/src/store/github/worktree-refresh.ts

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

case 'merge_queue':
case 'merge_queue_auto_merge_on':
return {
label: kind === 'merge_queue_auto_merge_on' ? 'Auto-merge on' : 'Merge when ready',

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.

Minor · Functional Correctness · Quick win

Supported by static analysis

Script executed:

sed -n '105,145p' src/renderer/src/components/github-pr-merge-state.ts
rg -n 'Merge when ready|Auto-merge on|b169f943e1' src/renderer/src/i18n/locales src/renderer/src/components/github-pr-merge-state.ts
rg -n 'verify:localization|translate\(' config/scripts/audit-localization-coverage.mjs src/renderer/src/components/github-pr-merge-state.ts

Repository: stablyai/orca

Length of output: 6873


Script executed:

set -o pipefail
printf '%s\n' '--- component imports and changed diff ---'
sed -n '1,65p' src/renderer/src/components/github-pr-merge-state.ts
git diff --unified=20 8d32eb0c3b0cdfd8692fdc104e9700fbb28a9887 66e451b1ec9034c48b1ee8e5e50cf05c60303fc8 -- src/renderer/src/components/github-pr-merge-state.ts src/renderer/src/i18n/locales/en.json
printf '%s\n' '--- relevant English catalog block ---'
sed -n '2995,3030p' src/renderer/src/i18n/locales/en.json
printf '%s\n' '--- localization audit and key-generation references ---'
rg -n -F --glob '*.mjs' --glob '*.ts' --glob '*.json' -e 'locale-english-regression' -e 'sync:localization-catalog' -e 'bootstrap:locale-catalog' -e 'auto.components.github.pr.merge.state' -e 'sha1' -e 'source text' config src/renderer/src | head -200
printf '%s\n' '--- localization audit script ---'
sed -n '1,240p' config/scripts/audit-localization-coverage.mjs

Repository: stablyai/orca

Length of output: 38658


Script executed:

set -o pipefail
printf '%s\n' '--- localization key generator ---'
sed -n '1,180p' config/scripts/localize-renderer-strings.mjs
printf '%s\n' '--- audit localization call handling ---'
rg -n -F -e 'translate' -e 'fallback' -e 'key' config/scripts/audit-localization-coverage.mjs | tail -80
printf '%s\n' '--- component namespace keys and overrides ---'
rg -n -F --glob 'config/scripts/*' -e 'auto.components.github.pr.merge.state' -e 'github-pr-merge-state.ts' .
printf '%s\n' '--- package localization commands ---'
rg -n -F -e 'sync:localization-catalog' -e 'verify:localization-coverage' package.json pnpm-workspace.yaml config/package.json 2>/dev/null || true

Repository: stablyai/orca

Length of output: 7491


Script executed:

python3 - <<'PY'
import hashlib
file_path = 'src/renderer/src/components/github-pr-merge-state.ts'
text = 'Auto-merge on'
source = f'{file_path}:{text}'
key = hashlib.sha1(source.encode()).hexdigest()[:10]
print(f'{source}')
print(key)
print(f'auto.components.github.pr.merge.state.{key}')
PY

Repository: stablyai/orca

Length of output: 278


Translate the merge-queue labels.

The merge-queue branch bypasses translate, so non-English locales can display these badges in English. Reuse the existing key for Merge when ready and add the generated English catalog key for Auto-merge on. The semantic key autoMergeOn does not follow the repository convention.

🌐 Suggested fix
-        label: kind === 'merge_queue_auto_merge_on' ? 'Auto-merge on' : 'Merge when ready',
+        label:
+          kind === 'merge_queue_auto_merge_on'
+            ? translate('auto.components.github.pr.merge.state.a7fe7ab823', 'Auto-merge on')
+            : translate('auto.components.github.pr.merge.state.b169f943e1', 'Merge when ready'),
               "b169f943e1": "Merge when ready",
+              "a7fe7ab823": "Auto-merge on",

@AmoabaKelvin
AmoabaKelvin force-pushed the mobile-source-control-diff-sync-parity branch 4 times, most recently from 7f9eedc to e6cd2c6 Compare October 27, 2026 04:30

@coderabbitai coderabbitai 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.

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

Minor · Queue a settings reread requested during an in-flight… · mobile-source-control-settings.ts:34-53

mobile/src/source-control/mobile-source-control-settings.ts:34-53
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Queue a settings reread requested during an in-flight read.

settings.get snapshots the host settings when runtime.getClientSettings() runs. If the host settings change before that response completes, Refresh calls reloadSettings(), but entry.inFlight discards the reread. The same client remains connected, so no automatic effect reruns. The earlier response can therefore leave comparison and whitespace settings stale.

Suggested fix
 type ClientSettings = {
   settings: MobileSourceControlSettings
   inFlight: Promise<void> | null
+  rereadQueued: boolean
   listeners: Set<() => void>
 }
 
@@
-    entry = { settings: DESKTOP_DEFAULTS, inFlight: null, listeners: new Set() }
+    entry = {
+      settings: DESKTOP_DEFAULTS,
+      inFlight: null,
+      rereadQueued: false,
+      listeners: new Set()
+    }
@@
   const entry = clientSettings(client)
   if (entry.inFlight) {
+    entry.rereadQueued = true
     return
   }
@@
     .finally(() => {
       entry.inFlight = null
+      if (entry.rereadQueued) {
+        entry.rereadQueued = false
+        rereadSettings(client)
+      }
     })
 }

Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 57770f75-346b-46c4-8fbe-698c382fabfc
Commits

Reviewing files that changed from the base of the PR and between 7f9eedc and e6cd2c6.

Files selected for processing: 9
  • mobile/src/source-control/mobile-branch-base-ref.ts
  • mobile/src/source-control/mobile-source-control-screen-state.ts
  • mobile/src/source-control/mobile-source-control-sections.ts
  • mobile/src/source-control/use-mobile-source-control-state.ts
  • mobile/src/transport/settings-read-operations.ts
  • src/main/runtime/runtime-client-settings-shape.ts
  • src/main/runtime/runtime-client-settings-source-control-projection.spec.ts
  • src/main/runtime/runtime-client-settings.ts
  • src/main/runtime/runtime-store-contract.ts

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

…and whitespace settings

Base-ref resolution moves to src/shared and the host publishes the compare-against-upstream
and show-whitespace settings, so the phone's branch compare and diffs match desktop.
…ffs loading under the old whitespace setting
@AmoabaKelvin
AmoabaKelvin force-pushed the mobile-source-control-diff-sync-parity branch from e6cd2c6 to 8247ab4 Compare October 27, 2026 05:07
@AmoabaKelvin
AmoabaKelvin merged commit 9d2e441 into main Oct 27, 2026
43 checks passed
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