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
feat(mobile): one next-step bar under both Source Control tabs - #37104
Source Control on the phone had three tabs, and you had to hunt around for what to do next: commit was on one tab, merge on another, and Create PR showed up in five places. Now there are two tabs, Changes and Pull request, and one button bar at the bottom of both. It always offers the single next thing for this branch: commit, push, create the pull request, ask the agent to fix a failing check, turn on "merge when ready", or merge. When nothing can be done, it says why.
What Changed
Two segments. Changes and Pull request. Commits is no longer a tab. It opens as a pushed page over the hub through the in-panel pager from feat(mobile): Commits lists only this branch, and each commit opens its own page #37050, using that PR's MobileCommitsScreen. Old ?tab=history links and the native history/ redirect open Commits over Changes. Android and web Back close it.
One next-step bar under both tabs (MobileSourceControlNextStepBar). It shows one state at a time:
the commit box, only when there's something to commit. It reads "Commit 2 files" or "Stage all".
Create pull request, or Push & create pull request when the commits are still local. GitLab reads "merge request".
Complete merge once a local merge's last conflict is resolved.
Resolve with <agent> for local or PR conflicts.
Fix with <agent> with "Can't merge yet: 1 check failing".
Merge when ready (GitHub auto-merge) with "2 checks still running" or "Waiting on review from brennanb".
Will merge when ready + Cancel.
Squash and merge in desktop's merge green, using the repo's default method.
A disabled Merge with GitHub's reason.
Merged into main.
The agent's name. "Fix with Claude" names the agent the launch will actually use: desktop's Source Control AI recipe, then the default agent, then the first detected one, resolved by the existing resolveMobileSourceControlLaunchAgent. Until that's known, or when there's no agent, the button says "AI". If the host can't launch agents from a phone, the button is disabled and the existing launch notice says why. That notice also offers Copy prompt when the prompt didn't reach the agent.
Gone from the Changes tab: the disabled "A pull request already exists" banner and the Create PR entry above the file list. The bar's Create PR replaces them. Complete merge moved from the branch card to the bar.
The PR tab body hides its own Merge button and auto-merge toggle only while the bar is offering them. On local steps (commit, push) and agent steps (fix, resolve), the body keeps them, so a stray untracked file never makes Merge or Cancel auto-merge unreachable. The bar and the PR body share one agent launcher, so Fix can't start two agents.
Failures from push, commit, complete merge, merge and auto-merge show in red above the bar on whichever tab you're on. A refused merge (no permission) disables the merge buttons.
The bar and the keyboard. The bar rides the keyboard only for its own commit box. For any other field, such as a PR comment, it steps aside.
Why
The rule lives in one place, src/shared/source-control-next-step-decision.ts. It is layered on desktop's existing commit-area decision (resolveSourceControlCommitAreaPrimaryActionDecision) and its PR merge rules (resolveGitHubPRMergeState and the stack merge decision), so the phone can't drift from desktop. Desktop's behaviour is unchanged. The mobile side only names the steps and draws them.
Agent name: I name the launch agent rather than whichever agent last ran in a terminal. That's the agent that will actually do the fix, so the label is never wrong.
Pushed pages: they go through the shared in-panel pager, not new expo-router routes, so shipped phone shells don't need an app release.
No issue. This is the approved Source Control redesign (hub, segments and next-step bar). The redesigned Changes rows, sections, swipe-to-discard, conflict block and ⋯ menu follow as a stacked PR.
Visual Proof
Before (main): three tabs, commit on Changes only, merge on PR only, and the disabled "already exists" banner.
After: one bar under both tabs, one state per screenshot (dirty tree, push, create PR, fix with agent, waiting on review, checks running, auto-merge on, ready, blocked, merged, local conflicts), plus the pushed Commits page.
Captured from the built page bundle in headless WebKit at iPhone size, with scripted host replies for each state.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Rendered every bar state above from the real page bundle (build:mobile-web, 183 assets), with a scripted host for each branch and PR state.
src/shared/source-control-next-step-decision.test.ts pins the ranking: local conflicts, then complete merge, then the commit box, then push or pull, then create, then PR conflicts, failing checks, auto-merge, merge, merge when ready and blocked. It also checks that a fetch on a clean branch doesn't flash an empty commit box.
A bar test checks that the bar rides the keyboard only for its own commit box. I watched it fail without the fix.
Ran the focused mobile tests (src/source-control, src/components/pr-sidebar, src/host-screen), the RPC recording goldens, mobile localization verify and coverage, changed-file code quality and React Doctor. All pass.
Not tested on a physical phone yet.
AI Disclosure
Review
Two reviewers (Codex and Claude) ran four rounds. Fixed:
errors from Git steps were invisible on the PR tab;
refused merges gave no feedback;
a dock tab switch left Commits covering the PR tab;
the prompt-copy recovery was dropped;
PR conflicts behind review-required showed a dead Merge button;
Merge and Cancel auto-merge were unreachable on local and agent steps;
the commit box and the keyboard (redesigned into one focus rule);
a fetch flashed the commit box;
Fix counted checks the prompt leaves out;
two separate agent launch guards;
the PR data wasn't reread after a push;
stale errors replaced the step's reason.
Handed to the Commits PR: a refresh control on the pushed Commits page.
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
Mobile: this is the mobile PR. Every string goes through the mobile i18n catalogs.
Remote and mixed versions: no new RPC methods or fields. It uses existing github.mergePR, github.setPRAutoMerge, agent.launchReplay, settings.get and preflight.detectAgents. Hosts too old to launch agents get a disabled AI button with the update notice.
Folder workspaces: no git status means no bar.
Non-GitHub hosts: the bar stops at Create (provider-named) because the PR body is GitHub-only.
Desktop: unchanged.
Page bundle: 183 assets, 9,447,887 bytes, under the 9.5 MiB fence.
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)
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.
Walkthrough
The changes add a shared resolver for source-control next steps and a mobile bar that displays commit, remote, review, check, and merge actions. The source-control panel connects this bar to pull-request state and triage, and routes commits through hub navigation. The pull-request sidebar accepts shared state and can hide its merge controls. The changes also update primary-action labels, locale entries, and related tests.
Merge Risk: Low · previous review d39da
The change is broadly usable, but these bounded history, feedback, localization, and accessibility regressions should receive follow-up.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 30.30% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta…
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 describes the primary change: adding one next-step bar under both mobile Source Control tabs.
Description check
The description is comprehensive and covers the required sections, user-facing behavior, rationale, visual proof, testing, compatibility notes, and checklist. It explicitly states that no linked issue…
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 comprehensive and covers the required sections, user-facing behavior, rationale, visual proof, testing, compatibility notes, and checklist. It explicitly states that no linked issue exists, which is acceptable only under the template's maintainer exception.
Full details: Docstring Coverage
Explanation
Docstring coverage is 30.30% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 33 functions across 22 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Finishing Touches
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; 2 remain after this review.
The mobile Source Control code still requests sourceControl.hubTab.pullRequest and sourceControl.primaryAction.stageAll. The non-English locale files no longer define those keys, so those labels fall back to English. Restore the existing translations in all affected locale files.
🐛 Suggested fix for German
"hubTab": {
- "changes": "Änderungen"+ "changes": "Änderungen",+ "pullRequest": "Pull Request"
},
...
"primaryAction": {
"commit": "Committen",
"forcePush": "Push erzwingen",
"forcePushFromDesktop": "Push für den Branch dieses Pull Requests vom Desktop aus erzwingen",
"publishBranch": "Branch veröffentlichen",
"pull": "Pullen",
"push": "Pushen",
+ "stageAll": "Alle vormerken",
"sync": "Synchronisieren"
},
The reason will be displayed to describe this comment to others. Learn more.
Minor · Stability & Availability · Quick win
Use the fallback message when the transport error has an empty message.
A transport rejection can carry an empty message, for example new Error('') with isRpcDeliveryUnknown: true. The fetchMobileGitHistory function rethrows that error unchanged. The catch block at Lines 126-130 then calls setError('').
resolveMobileHistoryScreenView tests if (error). An empty string is falsy. rows is still null and connected is true, so the view resolves to loading. The screen then shows "Loading commits…" with no Retry control. The screen stays in this state until the connection state, refreshKey, or refreshNonce changes.
The new golden matrix-git.history-branch-commits-git.history-1.json records this outcome. Its checkpoint transport-rejection-no-message:settled has the state 5ad8bfe89483, which is the loading state.
MobileCommitDetailPage already treats an empty message as a failure. Apply the same rule here, then re-record the golden.
set -o pipefail
printf'%s\n''--- source-control panel around hook and bar ---'
nl -ba mobile/src/source-control/MobileSourceControlPanel.tsx | sed -n '190,245p;345,390p'printf'%s\n''--- mobile PR sidebar around triage and conflict section ---'
nl -ba mobile/src/components/MobilePRSidebar.tsx | sed -n '250,345p'printf'%s\n''--- conflict section implementation ---'
nl -ba mobile/src/components/pr-sidebar/PRConflictingFilesSection.tsx | sed -n '1,220p'printf'%s\n''--- next-step types and triage scope references ---'
nl -ba mobile/src/source-control/mobile-source-control-next-step.ts | sed -n '1,140p'
rg -n -F --glob '*.ts' --glob '*.tsx' \
-e 'usePrAiTriage' \
-e 'scope: ' \
-e 'resolve-conflicts' \
-e 'conflictsTriage' \
mobile/src/components mobile/src/source-control mobile/src | head -300
Repository: stablyai/orca
Length of output: 41688
Script executed:
set -o pipefail
nl -ba mobile/src/source-control/MobileSourceControlPanel.tsx | sed -n '190,245p;345,390p'
nl -ba mobile/src/components/MobilePRSidebar.tsx | sed -n '250,345p'
nl -ba mobile/src/components/pr-sidebar/PRConflictingFilesSection.tsx | sed -n '1,220p'
nl -ba mobile/src/source-control/mobile-source-control-next-step.ts | sed -n '1,140p'
rg -n -F --glob '*.ts' --glob '*.tsx' \
-e 'usePrAiTriage' \
-e 'resolve-conflicts' \
-e 'conflictsTriage' \
mobile/src/components mobile/src/source-control
Repository: stablyai/orca
Length of output: 25105
Script executed:
set -o pipefail
printf'%s\n''--- next-step decision definitions and resolve-conflicts producers ---'
rg -n -F --glob '*.ts' --glob '*.tsx' \
-e 'type SourceControlNextStep' \
-e 'resolve_conflicts' \
-e 'scope:.*local' \
-e 'scope:.*review' \
src/shared mobile/src/source-control | head -220
nl -ba src/shared/source-control-next-step-decision.ts | sed -n '1,240p'printf'%s\n''--- conflict display predicate ---'
nl -ba mobile/src/components/pr-sidebar/pr-conflict-presentation.ts | sed -n '1,130p'printf'%s\n''--- hook conflict handler and triage state ---'
nl -ba mobile/src/source-control/use-mobile-source-control-next-step.ts | sed -n '140,215p'
nl -ba mobile/src/session/use-mobile-pr-ai-triage.ts | sed -n '1,180p'
Repository: stablyai/orca
Length of output: 18933
Script executed:
set -o pipefail
nl -ba mobile/src/components/MobilePRSidebar.tsx | sed -n '338,380p'
rg -n -F --glob '*.tsx' --glob '*.ts' \
-e 'checksTriage' \
-e 'AgentLaunchNotice' \
mobile/src/components/pr-sidebar mobile/src/components | head -160
Repository: stablyai/orca
Length of output: 2178
Keep launch feedback visible when the PR body cannot render it.
On the Pull request tab, agentNotice is suppressed for every resolve_conflicts step. The PR conflict section can render its notice only when pr.mergeable === 'CONFLICTING'. A local working-tree conflict can therefore hide launch failures, “Waiting for desktop…”, or undelivered-prompt feedback.
Hide the bar notice only when the corresponding PR-body section can render it:
Files skipped from review as they are similar to previous changes: 11
mobile/src/i18n/locales/ko.json
mobile/src/i18n/locales/ja.json
mobile/src/i18n/locales/de.json
mobile/src/i18n/locales/pt.json
mobile/src/i18n/locales/zh.json
mobile/src/i18n/locales/es.json
mobile/src/i18n/locales/ru.json
mobile/src/i18n/locales/fr.json
mobile/src/i18n/locales/zh-Hant.json
mobile/src/i18n/locales/tr.json
mobile/src/i18n/locales/en.json
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Give both composer controls a button role.
The AI-generation and commit Pressable controls have accessible names but no accessibilityRole. React Native for Web does not assign a button role to Pressable by default. Add accessibilityRole="button" to both controls so screen readers identify their purpose. (raw.githubusercontent.com)
Based on learnings: interactive elements should expose appropriate roles to screen readers.
Changes and Pull request are the only segments. A bar at the foot of both
shows the branch's one next action: the commit box, push or pull, create
the review, resolve or fix with the workspace's agent, merge when ready,
merge, or why it can't. Commits opens as a pushed screen.
…yai#37104)
* feat(mobile): one next-step bar under both Source Control tabs
Changes and Pull request are the only segments. A bar at the foot of both
shows the branch's one next action: the commit box, push or pull, create
the review, resolve or fix with the workspace's agent, merge when ready,
merge, or why it can't. Commits opens as a pushed screen.
* fix(mobile): keep Merge reachable and show bar failures on both tabs
* test(mobile): expect the two Source Control segments in the page render test
Nenzyz
pushed a commit
to Nenzyz/orca
that referenced
this pull request
Nov 2, 2026
…yai#37104)
* feat(mobile): one next-step bar under both Source Control tabs
Changes and Pull request are the only segments. A bar at the foot of both
shows the branch's one next action: the commit box, push or pull, create
the review, resolve or fix with the workspace's agent, merge when ready,
merge, or why it can't. Commits opens as a pushed screen.
* fix(mobile): keep Merge reachable and show bar failures on both tabs
* test(mobile): expect the two Source Control segments in the page render test
Nenzyz
pushed a commit
to Nenzyz/orca
that referenced
this pull request
Nov 2, 2026
…yai#37104)
* feat(mobile): one next-step bar under both Source Control tabs
Changes and Pull request are the only segments. A bar at the foot of both
shows the branch's one next action: the commit box, push or pull, create
the review, resolve or fix with the workspace's agent, merge when ready,
merge, or why it can't. Commits opens as a pushed screen.
* fix(mobile): keep Merge reachable and show bar failures on both tabs
* test(mobile): expect the two Source Control segments in the page render test
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
Source Control on the phone had three tabs, and you had to hunt around for what to do next: commit was on one tab, merge on another, and Create PR showed up in five places. Now there are two tabs, Changes and Pull request, and one button bar at the bottom of both. It always offers the single next thing for this branch: commit, push, create the pull request, ask the agent to fix a failing check, turn on "merge when ready", or merge. When nothing can be done, it says why.
What Changed
MobileCommitsScreen. Old?tab=historylinks and the nativehistory/redirect open Commits over Changes. Android and web Back close it.MobileSourceControlNextStepBar). It shows one state at a time:resolveMobileSourceControlLaunchAgent. Until that's known, or when there's no agent, the button says "AI". If the host can't launch agents from a phone, the button is disabled and the existing launch notice says why. That notice also offers Copy prompt when the prompt didn't reach the agent.Why
The rule lives in one place,
src/shared/source-control-next-step-decision.ts. It is layered on desktop's existing commit-area decision (resolveSourceControlCommitAreaPrimaryActionDecision) and its PR merge rules (resolveGitHubPRMergeStateand the stack merge decision), so the phone can't drift from desktop. Desktop's behaviour is unchanged. The mobile side only names the steps and draws them.Linked Issue
No issue. This is the approved Source Control redesign (hub, segments and next-step bar). The redesigned Changes rows, sections, swipe-to-discard, conflict block and ⋯ menu follow as a stacked PR.
Visual Proof
Before (main): three tabs, commit on Changes only, merge on PR only, and the disabled "already exists" banner.
After: one bar under both tabs, one state per screenshot (dirty tree, push, create PR, fix with agent, waiting on review, checks running, auto-merge on, ready, blocked, merged, local conflicts), plus the pushed Commits page.
Captured from the built page bundle in headless WebKit at iPhone size, with scripted host replies for each state.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Rendered every bar state above from the real page bundle (
build:mobile-web, 183 assets), with a scripted host for each branch and PR state.src/shared/source-control-next-step-decision.test.tspins the ranking: local conflicts, then complete merge, then the commit box, then push or pull, then create, then PR conflicts, failing checks, auto-merge, merge, merge when ready and blocked. It also checks that a fetch on a clean branch doesn't flash an empty commit box.A bar test checks that the bar rides the keyboard only for its own commit box. I watched it fail without the fix.
Ran the focused mobile tests (
src/source-control,src/components/pr-sidebar,src/host-screen), the RPC recording goldens, mobile localization verify and coverage, changed-file code quality and React Doctor. All pass.Not tested on a physical phone yet.
AI Disclosure
Review
Two reviewers (Codex and Claude) ran four rounds. Fixed:
Handed to the Commits PR: a refresh control on the pushed Commits page.
Agent skill upstream boundary
Notes
github.mergePR,github.setPRAutoMerge,agent.launchReplay,settings.getandpreflight.detectAgents. Hosts too old to launch agents get a disabled AI button with the update notice.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)