Skip to content

[Bug]: Mobile Source Control retries selector_not_found for folder-workspace git RPCs that were never routed #11153

Closed as not planned

Description

@nwparker

Summary

On mobile, opening Source Control for a folder workspace hits several git RPCs that were never routed for folder-workspace selectors. Each throws selector_not_found, and the loader treats that error as transient and retries it — so the user gets a retry loop and then a bare error string rather than a clear "not supported here" state.

Unlike desktop, mobile has no folder-workspace gate: mobile/src/source-control/use-mobile-git-requests.ts:26 passes worktree: \id:${worktreeId}< />straight through, so afolder:` selector reaches the runtime.

Routed vs unrouted

#10819 routes git.status and git.diff for folder-workspace selectors. These remain unrouted and still throw:

RPC When it fires
git.branchCompare auto, on every status success
git.upstreamStatus Sync button
git.fetch / git.pull / git.push Sync button
git.history commit list

The retry loop

mobile/src/source-control/use-mobile-source-control-loaders.ts:224-226 retries on selector_not_found (SELECTOR_RETRY_COUNT = 3, SELECTOR_RETRY_DELAY_MS = 250). That heuristic is right for a worktree that is still being created; it is wrong for a selector that can never resolve, and it turns a fast failure into a slow one.

The branch card also renders blank, because the merged folder-workspace status intentionally leaves head/branch/upstreamStatus unset — no single child repo owns them.

Suggested direction

Two options, and the choice depends on where folder-workspace Source Control is headed generally:

  1. Detect and degrade — recognize a folder-workspace selector on the mobile side and render an explicit unsupported state for the branch/sync/history block, instead of firing RPCs that cannot resolve. Small and safe.
  2. Route them — give each a per-child-repo contract, the same select-one-or-refuse policy fix(git): route git operations for folder-workspace selectors #10819 uses for commit/abort. Larger, and it needs the same "is a folder workspace one repo or N?" decision the desktop panel needs.

Either way, selector_not_found should probably stop being retryable when the selector is structurally unresolvable.

Context

Found while reviewing #10819. Filing separately because it is independent of that PR's desktop-side question, and because mobile is currently the only surface where this code is reachable at all — the desktop Source Control tab is gated off for folder workspaces (right-sidebar-activity-visibility.ts:14-16).

Related: #6357 (original report), #10819 (main-process routing).

Made with Orca 🐋

Activity

  1. innocarpe commented on Jul 28, 2026

    @innocarpe
    Contributor

    Opened fix PR: #11184

  2. AmoabaKelvin commented on Oct 29, 2026

    @AmoabaKelvin
    Collaborator

    Closing this one. The host does still reject these RPCs for folder workspaces, but the phone hides Source Control for folder workspaces in the host list and the session header, so it never sends them and there are no retries. Git operations stay Git-only on purpose (#35223). If the phone ever offers Source Control for folders, we'll route these calls properly then.

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions