You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(mobile): list Source Control changes with desktop's sections, order and row rules - #34017
The phone's Source Control list grouped, sorted and labelled changed files by its own rules. Now it uses desktop's: conflicts get their own section, your group order applies, and rows inside a submodule can't be staged or discarded.
What Changed
Each item is from the mobile/desktop parity audit (source-control report).
source-control-section-order.ts, plus a new groupSourceControlEntries that desktop's file projection also uses now
git-status-sort.ts
source-control-entry-actions.ts
source-control-discard-all-sequence.ts
The phone builds its sections from these. Conflicts (unresolved and resolved locally) are pinned in a "Conflicts" section, and the rest follow the user's group order.
Stage, Unstage and Discard follow desktop's rules, including no Stage/Discard/Unstage on submodule-internal rows or gitlink-only dirtiness.
Conflict rows show their kind ("Both modified"), using the shared CONFLICT_KIND_LABELS.
Before, the phone used a fixed Changes/Staged order and split conflicts between sections. It offered Stage on submodule rows and Discard on any non-conflict row.
Host: the group order is published.settings.get now carries sourceControlGroupOrder, so paired clients can order the list the way the desktop does. Older hosts omit it, and the phone falls back to desktop's default.
Add repo-added notifications #19 Path sort. The phone uses the shared compareFileNames (pinned en with a tie-break) instead of the device locale, in the status list, the branch compare and the review queue.
Each listing rule now has one copy in src/shared, used by desktop and the phone.
Linked Issue
Part of the mobile/desktop parity audit
Visual Proof
No device captures for this fleet. The change adopts desktop's existing behaviour: section-order / use-file-projection grouping, source-control-status-sort, entry-actions / discard-all-sequence eligibility, conflict-label kinds, file-name-sort, and DiffNotesSendMenu formatting.
Testing
Focused mobile tests (source-control, session, components, RPC recordings with re-recorded goldens), and desktop/shared tests for the moved modules and the host settings projection.
Mobile typecheck / typecheck:tests, tc:web and tc:node pass, as do check:code-quality:changed and check:react-doctor:changed.
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:
The new sourceControlGroupOrder projection field is optional to readers; old hosts omit it.
Submodule fields are optional in the phone's schema.
Folder workspaces: folder workspaces have no git status list.
Benchmark:config/scripts/source-control-path-sort-benchmark.mjs now points at the moved comparator.
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)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
Walkthrough
The change consolidates source-control sorting, labels, grouping, action checks, and worktree ID parsing in shared modules. Mobile source-control sections now use configurable group ordering and preserve submodule fields. Mobile review prompts now contain formatted comments only. Renderer imports use shared source-control APIs. Runtime settings expose normalized group order. RPC goldens are regenerated with updated status fields, settlements, outcomes, snapshots, and checkpoint references.
Priority: Normal
Merge Risk: Low · up to 19bf9
Non-English users still see two English merge-queue labels. This is a bounded localization issue that can be addressed as a follow-up.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 0.00% 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 survi…
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Title check
The title clearly and concisely describes the main change: aligning mobile Source Control sections, ordering, and row rules with desktop.
Description check
The description is mostly complete and covers the user-facing changes, implementation, rationale, testing, scope, compatibility, and checklist. It does not provide an actual linked issue and does not …
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Description check
Explanation
The description is mostly complete and covers the user-facing changes, implementation, rationale, testing, scope, compatibility, and checklist. It does not provide an actual linked issue and does not use the exact N/A wording for visual proof, but these gaps do not make the description incomplete overall.
Full details: Docstring Coverage
Explanation
Docstring coverage is 0.00% 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 14 functions across 19 files. (5 skipped: 5 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Finishing Touches: 💡 1
📝 Generate docstrings: 💡
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.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.
Route both merge-queue labels through localization.
The raw labels predate this PR, so this is not a regression. The checked-in localization contract still requires user-facing renderer strings to use the localization layer. Replace both literals with translate(...) calls and add the English catalog entry for "Auto-merge on". Use a key consistent with this component’s existing hash-style keys; autoMergeOn does not match that convention.
…t and row rules
Conflicts get their own section in the user's group order, submodule rows lose stage and
discard like desktop, paths sort with the shared collator, and review notes go out as desktop formats them.
…module rows read-only
The host's paired settings projection now carries sourceControlGroupOrder, the
normalized status projection keeps submodule metadata, and conflict rows reuse the
shared conflict-kind labels.
…sktop
Desktop and mobile group rows through one shared helper, mobile's unstage button
follows desktop's rule, and the group order resets when the host changes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Upstream stablyai#34017 moved listing/section-order.ts to src/shared/source-control-section-order.ts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Upstream stablyai#34017 moved listing/section-order.ts to src/shared/source-control-section-order.ts.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Oct 30, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Upstream stablyai#34017 moved listing/section-order.ts to src/shared/source-control-section-order.ts.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 2, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Upstream stablyai#34017 moved listing/section-order.ts to src/shared/source-control-section-order.ts.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 3, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Upstream stablyai#34017 moved listing/section-order.ts to src/shared/source-control-section-order.ts.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 4, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Upstream stablyai#34017 moved listing/section-order.ts to src/shared/source-control-section-order.ts.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 5, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Upstream stablyai#34017 moved listing/section-order.ts to src/shared/source-control-section-order.ts.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 5, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Upstream stablyai#34017 moved listing/section-order.ts to src/shared/source-control-section-order.ts.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 6, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Upstream stablyai#34017 moved listing/section-order.ts to src/shared/source-control-section-order.ts.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 7, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Upstream stablyai#34017 moved listing/section-order.ts to src/shared/source-control-section-order.ts.
audichuang
added a commit
to audichuang/orca
that referenced
this pull request
Nov 8, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Upstream stablyai#34017 moved listing/section-order.ts to src/shared/source-control-section-order.ts.
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
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.
ELI5
The phone's Source Control list grouped, sorted and labelled changed files by its own rules. Now it uses desktop's: conflicts get their own section, your group order applies, and rows inside a submodule can't be staged or discarded.
What Changed
Each item is from the mobile/desktop parity audit (source-control report).
src/shared:source-control-section-order.ts, plus a newgroupSourceControlEntriesthat desktop's file projection also uses nowgit-status-sort.tssource-control-entry-actions.tssource-control-discard-all-sequence.tsCONFLICT_KIND_LABELS.settings.getnow carriessourceControlGroupOrder, so paired clients can order the list the way the desktop does. Older hosts omit it, and the phone falls back to desktop's default.compareFileNames(pinnedenwith a tie-break) instead of the device locale, in the status list, the branch compare and the review queue.formatDiffCommentsalone, without the phone-only "You are reviewing…/After applying fixes" wrapper.getRepoIdFromWorktreeId.STATUS_LABELS) moved tosrc/shared/git-status-labels.ts.Mobile behaviour removed or changed (it now follows desktop):
Not changed:
DiffCommentSchemawould drop the phone's file-level notes (lineNumber: 0). That looks like a separate bug and is left for its own change.Why
Each listing rule now has one copy in
src/shared, used by desktop and the phone.Linked Issue
Part of the mobile/desktop parity audit
Visual Proof
No device captures for this fleet. The change adopts desktop's existing behaviour:
section-order/use-file-projectiongrouping,source-control-status-sort,entry-actions/discard-all-sequenceeligibility,conflict-labelkinds,file-name-sort, andDiffNotesSendMenuformatting.Testing
Focused mobile tests (source-control, session, components, RPC recordings with re-recorded goldens), and desktop/shared tests for the moved modules and the host settings projection.
Mobile
typecheck/typecheck:tests,tc:webandtc:nodepass, as docheck:code-quality:changedandcheck:react-doctor:changed.I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
Review
Agent skill upstream boundary
Notes
sourceControlGroupOrderprojection field is optional to readers; old hosts omit it.config/scripts/source-control-path-sort-benchmark.mjsnow points at the moved comparator.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)