stablyai/orca · error · Error

Unable to load committed changes

Error message

Unable to load committed changes

What it means

Thrown by `loadBranchCompare` when the `git.branchCompare` RPC returns ok:false with a code that is not a mobile-git-unavailable signal. Git-unavailable failures instead reset the compare state to idle (or keep the prior ready state under `preserveReadyOnFailure`). The catch at 148 reuses the same literal for non-Error throws. This populates the Changes-screen branch-compare error state.

Source

Thrown at mobile/src/source-control/use-mobile-source-control-loaders.ts:137

        }
        const response = await client.sendRequest('git.branchCompare', {
          worktree: `id:${worktreeId}`,
          baseRef
        })
        if (!isCurrentLoad()) {
          return false
        }
        if (!response.ok) {
          if (isMobileGitUnavailable(response.error?.code, response.error?.message)) {
            setBranchCompareState((prev) => {
              if (options?.preserveReadyOnFailure && prev.kind === 'ready') {
                return prev
              }
              return { kind: 'idle' }
            })
            return false
          }
          throw new Error(response.error?.message || 'Unable to load committed changes')
        }
        setBranchCompareState({
          kind: 'ready',
          result: (response as RpcSuccess).result as MobileGitBranchCompareResult
        })
        return true
      } catch (err) {
        if (!isCurrentLoad()) {
          return false
        }
        const message = err instanceof Error ? err.message : 'Unable to load committed changes'
        setBranchCompareState((prev) => {
          if (options?.preserveReadyOnFailure && prev.kind === 'ready') {
            return prev
          }
          return { kind: 'error', message }
        })
        return false

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Read the propagated `error.message`/`code` to find the host-side git failure.
  2. Refresh status (Retry) — the branch-compare load runs again with a fresh base ref.
  3. Ensure the repo is not a shallow clone if merge-base computation fails (unshallow if needed).
  4. Update the desktop host to a version matching the mobile client's `git.branchCompare` contract.
Defensive patterns

Strategy: try-catch

Try / catch

// loadBranchCompare already catches and sets branchCompareState to error;
// callers should respect preserveReadyOnFailure to avoid flashing.
try {
  await loadBranchCompare({ preserveReadyOnFailure: true })
} catch {
  // state already set to error; Retry button re-runs the load
}

Prevention

When it happens

Trigger: Loading the Changes/branch-compare view where `resolveMobileBranchCompareBaseRef` returned a base ref but `git.branchCompare` then fails with a real error — invalid baseRef, git internal error, worktree selector stale, or merge-base computation failure.

Common situations: The base ref resolved but points to a ref that no longer exists; the host's git failed to compute a merge base (divergent history, shallow clone); race where the worktree changed identity mid-load; mixed versions where the compare params shape changed.

Related errors


AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12). Data as JSON: /api/errors/58221000e52697a3. Report an issue: GitHub.