Repository navigation
fix(mobile): use desktop's check rules and fix-checks prompt in the PR panel - #34014
Conversation
de1996b to
fbc062c
Compare
Walkthrough
Priority: Merge Risk:
|
There was a problem hiding this comment.
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:
e19f4348-63a8-4998-8865-b04452906651
Files selected for processing: 175-
mobile/rpc-foundation/goldens/matrix-github.pr-read-github.listassignableusers-1.jsonmobile/rpc-foundation/goldens/matrix-github.pr-read-github.prcheckdetails-1.jsonmobile/rpc-foundation/goldens/matrix-github.pr-read-github.prchecks-1.jsonmobile/rpc-foundation/goldens/matrix-github.pr-read-github.prforbranch-1.jsonmobile/rpc-foundation/goldens/matrix-github.pr-read-github.reposlug-1.jsonmobile/rpc-foundation/goldens/matrix-github.pr-read-github.workitemdetails-1.jsonmobile/rpc-foundation/goldens/matrix-github.pr-read-hostedreview.forbranch-1.jsonmobile/rpc-foundation/goldens/matrix-hostedreview.create-intent-git.bulkstage-1.jsonmobile/rpc-foundation/goldens/matrix-hostedreview.create-intent-git.commit-1.jsonmobile/rpc-foundation/goldens/matrix-hostedreview.create-intent-git.generatecommitmessage-1.jsonmobile/rpc-foundation/goldens/matrix-hostedreview.create-intent-git.push-1.jsonmobile/rpc-foundation/goldens/matrix-hostedreview.create-intent-git.status-1.jsonmobile/rpc-foundation/goldens/matrix-hostedreview.create-intent-git.status-2.jsonmobile/rpc-foundation/goldens/matrix-hostedreview.create-intent-git.status-3.jsonmobile/rpc-foundation/goldens/matrix-hostedreview.create-intent-git.status-4.jsonmobile/rpc-foundation/goldens/matrix-hostedreview.create-intent-hostedreview.create-1.jsonmobile/rpc-foundation/goldens/matrix-hostedreview.create-intent-hostedreview.getcreationeligibility-1.jsonmobile/rpc-foundation/goldens/matrix-hostedreview.create-intent-hostedreview.getcreationeligibility-2.jsonmobile/rpc-foundation/goldens/matrix-hostedreview.create-intent-worktree.set-1.jsonmobile/rpc-foundation/goldens/matrix-session.pr-sidebar-github.prchecks-1.jsonmobile/rpc-foundation/goldens/matrix-session.pr-sidebar-github.prforbranch-1.jsonmobile/rpc-foundation/goldens/matrix-session.pr-sidebar-hostedreview.forbranch-1.jsonmobile/rpc-foundation/goldens/matrix-session.pr-sidebar-worktree.show-1.jsonmobile/rpc-foundation/goldens/pr-read-surface.jsonmobile/rpc-foundation/goldens/pr-read-upstream-error.jsonmobile/rpc-foundation/goldens/pr-sidebar-checks-refused.jsonmobile/rpc-foundation/goldens/pr-sidebar-load.jsonmobile/rpc-foundation/goldens/sc-create-intent-stage-commit-push-create.jsonmobile/rpc-foundation/goldens/sc-create-intent-unlisted-provider.jsonmobile/rpc-foundation/goldens/sc-pr-link-hosted-review.jsonmobile/rpc-foundation/goldens/sc-prerequisite-publish.jsonmobile/rpc-foundation/pilot-scenarios.jsonmobile/src/components/MobilePRSidebar.tsxmobile/src/components/pr-sidebar/MobileLinkPrForm.tsxmobile/src/components/pr-sidebar/PRActionsSection.tsxmobile/src/components/pr-sidebar/PRChecksSection.tsxmobile/src/components/pr-sidebar/PRReviewersSection.tsxmobile/src/components/pr-sidebar/PrSidebarCreateEmptyState.tsxmobile/src/components/pr-sidebar/pr-actions-state.test.tsmobile/src/components/pr-sidebar/pr-actions-state.tsmobile/src/components/pr-sidebar/pr-actions-styles.tsmobile/src/components/pr-sidebar/pr-check-detail-content.tsmobile/src/components/pr-sidebar/pr-checks-presentation.test.tsmobile/src/components/pr-sidebar/pr-checks-presentation.tsmobile/src/session/github-pr-mutation-operations.tsmobile/src/session/github-pr-mutations.tsmobile/src/session/github-pr-read-reply-schema.tsmobile/src/session/github-pr-repo-slug.tsmobile/src/session/github-pr-rpc.tsmobile/src/session/mobile-existing-agent-launch.tsmobile/src/session/mobile-pr-sidebar-resolve.test.tsmobile/src/session/mobile-pr-sidebar-resolve.tsmobile/src/session/mobile-pr-sidebar-state.tsmobile/src/session/pr-action-mutation-contract.tsmobile/src/session/pr-actions-engine.test.tsmobile/src/session/pr-actions-engine.tsmobile/src/session/pr-ai-triage-launch.test.tsmobile/src/session/pr-ai-triage-launch.tsmobile/src/session/pr-ai-triage-prompt.test.tsmobile/src/session/pr-ai-triage-prompt.tsmobile/src/session/pr-comment-actions.test.tsmobile/src/session/pr-comment-actions.tsmobile/src/session/use-mobile-pr-actions.test.tsmobile/src/session/use-mobile-pr-actions.tsmobile/src/session/use-mobile-pr-ai-triage.tsmobile/src/session/use-mobile-pr-sidebar-controller-probe.test.tsmobile/src/session/use-mobile-pr-sidebar-controller.test.tsmobile/src/session/use-mobile-pr-sidebar-controller.tsmobile/src/source-control/MobileSourceControlContent.test.tsxmobile/src/source-control/MobileSourceControlContent.tsxmobile/src/source-control/MobileSourceControlPanel.tsxmobile/src/source-control/github-pr-link-parse.test.tsmobile/src/source-control/github-pr-link-parse.tsmobile/src/source-control/mobile-create-pr-action.test.tsmobile/src/source-control/mobile-create-pr-action.tsmobile/src/source-control/mobile-git-mutation-operations.tsmobile/src/source-control/mobile-hosted-review-create-intent-runner.tsmobile/src/source-control/mobile-hosted-review-create-intent.test.tsmobile/src/source-control/mobile-hosted-review-create-intent.tsmobile/src/source-control/mobile-hosted-review-git-preparation.tsmobile/src/source-control/mobile-hosted-review-remote-prerequisite.tsmobile/src/source-control/mobile-pr-chip-summary.test.tsmobile/src/source-control/mobile-pr-create.test.tsmobile/src/source-control/mobile-pr-create.tsmobile/src/source-control/mobile-pr-link.test.tsmobile/src/source-control/mobile-pr-link.tsmobile/src/source-control/mobile-source-control-primary-action.test.tsmobile/src/source-control/mobile-source-control-primary-action.tsmobile/src/source-control/mobile-worktree-metadata-operations.tsmobile/src/source-control/source-control-status-retry.test.tsxmobile/src/source-control/use-mobile-create-pr-runner.tsmobile/src/source-control/use-mobile-source-control-create-pr-action.tsmobile/src/source-control/use-mobile-source-control-state.tsmobile/src/source-control/worktree-metadata-reply-schema.tsmobile/src/tasks/agent-launch-request.tsmobile/src/tasks/mobile-tasks-item-detail-content.tsxmobile/src/tasks/mobile-tasks-project-review-panels.tsxmobile/src/tasks/mobile-tasks-repository-presentation.tsmobile/src/test-support/rpc-recording/adapters/hosted-review-mount-adapters.tsmobile/src/test-support/rpc-recording/adapters/pr-sidebar-mount-adapters.tsmobile/src/test-support/rpc-recording/adapters/source-control-mount-adapters.tsmobile/src/test-support/rpc-recording/mutants/operation-mutations.tsmobile/src/test-support/rpc-recording/recording-scenario.tsmobile/src/test-support/rpc-recording/run-recording.tsmobile/src/test-support/rpc-recording/scripted-rpc-transport.tsmobile/src/transport/use-workspace-client.tsmobile/src/transport/workspace-server.tssrc/main/runtime/mobile-rpc-allowlist.test.tssrc/main/runtime/runtime-rpc/runtime-rpc-mobile-method-routing.tssrc/renderer/src/components/editor/CheckRunJobs.tsxsrc/renderer/src/components/editor/check-details-reading-cache.tssrc/renderer/src/components/editor/check-details-reading-owner.tssrc/renderer/src/components/editor/check-run-details-fix-context.tssrc/renderer/src/components/github-item-dialog/inspect-pull-request/checks-tab-actions.tssrc/renderer/src/components/github-item-dialog/inspect-pull-request/checks-tab.tsxsrc/renderer/src/components/github-item-dialog/land-pull-request/pr-reviewers-panel.tsxsrc/renderer/src/components/github-item-dialog/land-pull-request/pr-reviewers-request-actions.tssrc/renderer/src/components/github-item-dialog/land-pull-request/pr-reviewers-requested-list.tsxsrc/renderer/src/components/github-pr-merge-state.test.tssrc/renderer/src/components/github-pr-merge-state.tssrc/renderer/src/components/pr-checks-fix-prompt.tssrc/renderer/src/components/pull-request-page/checks/fix-launch.tssrc/renderer/src/components/pull-request-page/checks/tab.tsxsrc/renderer/src/components/pull-request-page/reviewers/panel.tsxsrc/renderer/src/components/pull-request-page/reviewers/request-actions.tssrc/renderer/src/components/pull-request-page/reviewers/requested-list.tsxsrc/renderer/src/components/right-sidebar/HostedReviewActions.tsxsrc/renderer/src/components/right-sidebar/check-job-log-tail.tsxsrc/renderer/src/components/right-sidebar/checks-panel-content.test.tsxsrc/renderer/src/components/right-sidebar/checks-panel-review-creation.test.tssrc/renderer/src/components/right-sidebar/checks-panel-review-creation.tssrc/renderer/src/components/right-sidebar/checks-panel-review-lookup-authority.tssrc/renderer/src/components/right-sidebar/checks-panel/active-content.tsxsrc/renderer/src/components/right-sidebar/checks-panel/check-details-model.tssrc/renderer/src/components/right-sidebar/checks-panel/check-run-details.tsxsrc/renderer/src/components/right-sidebar/checks-panel/checks-list.tsxsrc/renderer/src/components/right-sidebar/checks-panel/comment-controls.tsxsrc/renderer/src/components/right-sidebar/checks-panel/comment-row.tsxsrc/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-check-and-review-actions.tsxsrc/renderer/src/components/right-sidebar/checks-panel/use-checks-panel-comment-mutations.tsxsrc/renderer/src/components/right-sidebar/github-pr-stack-merge.test.tssrc/renderer/src/components/right-sidebar/github-pr-stack-merge.tssrc/renderer/src/components/right-sidebar/source-control-create-pr-intent-flow.test.tssrc/renderer/src/components/right-sidebar/source-control-dropdown-items.test.tssrc/renderer/src/components/right-sidebar/source-control/review/create-pr-intent-flow.tssrc/renderer/src/components/right-sidebar/source-control/review/create-pr-intent-review-step.tssrc/renderer/src/components/right-sidebar/source-control/review/use-linked-reviews.tssrc/renderer/src/components/task-page/github/Avatars.tsxsrc/renderer/src/components/task-page/github/ReviewCell.tsxsrc/renderer/src/components/task-page/github/task-page-github-reviewer-actions.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/store/github/pull-request-actions.tssrc/renderer/src/store/github/pull-request-execution.tssrc/renderer/src/store/github/refresh-event-actions.tssrc/renderer/src/store/github/worktree-refresh.tssrc/renderer/src/store/slices/github-branch-mismatched-linked-pr.test.tssrc/shared/github/linked-pr-staleness.tssrc/shared/github/pr-comment-mutability.test.tssrc/shared/github/pr-comment-mutability.tssrc/shared/github/pr-reviewer-display.test.tssrc/shared/github/pr-reviewer-display.tssrc/shared/github/pull-request-merge-state.tssrc/shared/github/pull-request-stack-merge.tssrc/shared/hosted-review-create-confirmation.test.tssrc/shared/hosted-review-create-confirmation.tssrc/shared/hosted-review-push-target.test.tssrc/shared/hosted-review-push-target.tssrc/shared/pr-check-status-label.tssrc/shared/pr-check-step-status.test.tssrc/shared/pr-check-step-status.tssrc/shared/pr-checks-fix-prompt.test.tssrc/shared/pr-checks-fix-prompt.tssrc/shared/source-control-create-review-intent.test.tssrc/shared/source-control-create-review-intent.tssrc/shared/source-control-runtime-capabilities.ts
Files with no reviewable changes: 13-
- mobile/src/tasks/mobile-tasks-repository-presentation.ts
- src/renderer/src/components/right-sidebar/checks-panel-content.test.tsx
- mobile/src/source-control/github-pr-link-parse.test.ts
- mobile/src/session/mobile-pr-sidebar-resolve.ts
- mobile/src/session/pr-comment-actions.test.ts
- mobile/src/session/mobile-pr-sidebar-resolve.test.ts
- mobile/src/source-control/github-pr-link-parse.ts
- src/renderer/src/components/pr-checks-fix-prompt.ts
- src/renderer/src/components/right-sidebar/checks-panel/comment-controls.tsx
- 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/components/pr-sidebar/pr-checks-presentation.ts
- 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; 5 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', |
There was a problem hiding this comment.
Translate the merge-queue labels.
Every other case in presentMergeStateKind sends its label through translate. The merge_queue and merge_queue_auto_merge_on cases return the raw English strings 'Merge when ready' and 'Auto-merge on'. In a non-English locale, the merge-state chip therefore shows untranslated text for repositories that use a merge queue. The catalog already has a key for 'Merge when ready' (b169f943e1). 'Auto-merge on' needs a new key.
Proposed fix
-
--- "a/src/renderer/src/components/github-pr-merge-state.ts" +++ "b/src/renderer/src/components/github-pr-merge-state.ts" @@ -123,7 +123,10 @@ case 'merge_queue': case 'merge_queue_auto_merge_on': return { - 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.autoMergeOn', 'Auto-merge on') + : translate('auto.components.github.pr.merge.state.b169f943e1', 'Merge when ready'), tone: WARNING_TONE, tooltip: translate( 'auto.components.github.pr.merge.state.35ec24bc43',
Committable suggestion
-
IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.Suggested changelabel: 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.autoMergeOn', 'Auto-merge on') : translate('auto.components.github.pr.merge.state.b169f943e1', 'Merge when ready'),
fbc062c to
005aea1
Compare
There was a problem hiding this comment.
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:
4c2b6f6d-9cbd-4a14-a0f5-c886f88d40d4
Files selected for processing: 11-
mobile/rpc-foundation/goldens/matrix-session.pr-sidebar-github.prchecks-1.jsonmobile/rpc-foundation/goldens/matrix-session.pr-sidebar-github.prforbranch-1.jsonmobile/rpc-foundation/goldens/matrix-session.pr-sidebar-hostedreview.forbranch-1.jsonmobile/rpc-foundation/goldens/matrix-session.pr-sidebar-worktree.show-1.jsonmobile/rpc-foundation/goldens/pr-sidebar-checks-refused.jsonmobile/rpc-foundation/goldens/pr-sidebar-load.jsonmobile/rpc-foundation/pilot-scenarios.jsonmobile/src/components/MobilePRSidebar.tsxmobile/src/session/mobile-pr-sidebar-state.tsmobile/src/session/use-mobile-pr-sidebar-controller.test.tssrc/renderer/src/components/pull-request-page/checks/tab.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
-
| details: null, | ||
| checks: checksOutcome.result, | ||
| checksError: null, | ||
| pushTarget: link.pushTarget |
There was a problem hiding this comment.
Clear the old push target when replacing a stale review.
If resolveStaleLink clears the linked review and fetchPR(null) finds another PR, pr refers to the new PR but link.pushTarget still refers to the old review. Source Control then builds actions from mismatched review data. Return a null push target after a stale-link clear in both ready-state branches.
Create PR now fast-forwards a behind-only branch before committing, picks its push step from desktop's shared rule, and the commit-area button reads the branch's review state.
…-target gating Restaging after a failed commit is best effort and checks the branch first, and reviews with their own push target are not gated until mobile reads targeted upstream status.
…push targets ungated
…ate PR on desktop's intent rule Desktop and mobile compose the review push target through one shared function, the Create button admits branches Create PR can prepare, and older hosts without a lookup outcome still fail closed on mobile.
…in the PR panel Check, step, reviewer and comment rules move to src/shared; the phone's fix-checks agent now gets failing log tails, the worktree path and the action's saved agent arguments.
…rop the prompt re-export Fix and Rerun show for the same checks the prompt and the host use, desktop imports the fix-checks prompt from src/shared directly, and job steps split through the shared summary.
005aea1 to
2361218
Compare
Stacked on #34011: review the commits after 43798d5.
ELI5
The phone's PR checks list, labels and "Fix with AI" button followed rules of their own. Now they use desktop's rules, and the agent started from the phone gets the same failing-log details desktop gives it.
What Changed
Each item is from the mobile/desktop parity audit (source-control report, plus agent-sessions #6 / #14 and tasks #18).
collectFixChecksPromptDetails(withhasGitHubCheckHandleandisBrokenCheck) insrc/shared/pr-checks-fix-prompt.ts.sortChecksBySeverity: failure, cancelled, pending, success, neutral, skipped.src/shared/pr-check-status-label.ts. A queued check now reads "Queued" on the phone.resolveStepOutcome/summarizeJobStepsmoved tosrc/shared/pr-check-step-status.ts, so jobs ending instartup_failure,action_requiredorstalenow count as failed jobs.github-pr-reviewer-display.tsmoved tosrc/shared/github/pr-reviewer-display.ts, and the phone's copy is deleted.src/shared/github/pr-comment-mutability.ts, and the phone's copy is deleted.isBrokenCheck, the same set the host reruns.action_requiredno longer offers an agent a prompt with nothing in it.Mobile behaviour removed or changed (it now follows desktop):
action_required-only PRsDeferred / not in this PR:
chosenOpensAsChatneeds host facts mobile doesn't have).Why
Each rule now has one copy in
src/shared, used by desktop and the phone. The renderer re-export of the fix-checks prompt is gone, so desktop imports the shared module directly.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-checks-panel-check-and-review-actionsdetails fetchsortChecksBySeveritycheck-details-modellabelscheck-job-step-statusgithub-pr-reviewer-displaycomment-controlseligibilityactive-contentbroken-check gatingTesting
Focused mobile tests (pr-sidebar, session, tasks, RPC recordings) and desktop/shared tests for every moved module.
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
agentArgsis an existing optional field ofagent.launch; the host validates it for its own shell.github.prCheckDetails.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)