Skip to content

Clarify Git operation status across workspaces - #37093

Merged
AmethystLiang merged 9 commits into
mainfrom
AmethystLiang/publish-branch-in-progress-confusing
Nov 1, 2026
Merged

AmethystLiang merged 9 commits into
mainfrom
AmethystLiang/publish-branch-in-progress-confusing

Conversation

@AmethystLiang

@AmethystLiang AmethystLiang commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​123 $\color{#cf222e}{\Huge{\mathbf{−}}}$​8 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​115
Prod 24 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​213 $\color{#cf222e}{\Huge{\mathbf{−}}}$​61 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​152

Problem

When a Git operation runs in one workspace, another workspace can look like it is publishing its own branch. This makes it hard to tell what is happening and why its Git action is disabled.

Solution

Show “Git busy elsewhere” when another workspace is running a Git operation, with an explanation to wait. Track each operation by workspace so the active workspace shows its own progress and overlapping operations remain tracked until each finishes.

ELI5

If another workspace is busy with Git, Orca now says so instead of showing a misleading publishing spinner.

What Changed

  • Track remote Git operations by workspace and remove each operation when it finishes.
  • Show a disabled waiting action without a spinner for operations in another workspace, including a keyboard-accessible explanation.
  • Add narrow-sidebar fixtures and update operation tracking and recovery tests.

Why

The previous shared operation label could make a workspace appear to be publishing when the operation was happening elsewhere. Workspace-specific tracking keeps the feedback accurate while retaining the existing protection against overlapping actions.

Linked Issue

No linked issue.

Visual Proof

TODO: Attach before and after screenshots or videos.

Testing

Automated tests were added or updated for waiting feedback, overlapping operations, and recovery behavior. Test execution and platforms are not documented.

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

AI Disclosure

TODO if applicable.

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

TODO: Verify security, cross-platform support, remote SSH, mobile, backwards compatibility, and performance.

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)

@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

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.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • Resume reviews
  • Trigger review
Walkthrough

The editor store now tracks remote operations by worktree and kind, with cleanup callbacks that remove individual operations. The source-control panel uses this status to disable its primary action when another worktree has an active operation. The waiting action has localized text, suppresses spinners, and is covered by tests and fixtures for concurrent operations, tooltips, and narrow layouts.

Merge Risk: Low · previous review 18864

Users may see “Preparing branch for review…” instead of being told that another workspace is running Git. This is a bounded UI issue with a localized fix.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Description check Warning The description explains the problem, solution, user-facing change, and mechanism. However, it is incomplete for the required template: no linked issue is provided, visual proof remains TODO for a UI … Add the required linked issue or explain the maintainer exception. Provide before-and-after screenshots or videos, or write N/A with a reason. Add a Risk section with impact and rollback details. Document test commands, results, and tested …
Docstring Coverage Warning Docstring coverage is 0.00% 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. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: clarifying Git operation status across workspaces.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the problem, solution, user-facing change, and mechanism. However, it is incomplete for the required template: no linked issue is provided, visual proof remains TODO for a UI change, the Risk section is missing, testing platforms and execution details are not documented, and several checklist items remain unresolved.

Resolution

Add the required linked issue or explain the maintainer exception. Provide before-and-after screenshots or videos, or write N/A with a reason. Add a Risk section with impact and rollback details. Document test commands, results, and tested platforms. Complete the AI Disclosure and Notes sections, and update the remaining checklist items.

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 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 7 functions across 17 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.

Share

@AmethystLiang
AmethystLiang force-pushed the AmethystLiang/publish-branch-in-progress-confusing branch from 51ff0c6 to b4b49f1 Compare November 1, 2026 18:16

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: 064c0342-2445-47b7-b2b4-f530a8a71889
Commits

Reviewing files that changed from the base of the PR and between 51ff0c6 and b4b49f1.

Files selected for processing: 14
  • src/renderer/src/components/right-sidebar/CommitArea.test.tsx
  • src/renderer/src/components/right-sidebar/source-control-primary-action.ts
  • src/renderer/src/i18n/locales/de.json
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/pt.json
  • src/renderer/src/i18n/locales/ru.json
  • src/renderer/src/i18n/locales/tr.json
  • src/renderer/src/i18n/locales/zh-Hant.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/store/slices/editor-remote-branch-actions.test.ts
Files skipped from review as they are similar to previous changes: 1
  • src/renderer/src/i18n/locales/en.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.

@AmethystLiang
AmethystLiang force-pushed the AmethystLiang/publish-branch-in-progress-confusing branch 2 times, most recently from af1b190 to 18864d2 Compare November 1, 2026 21:17

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (2)

Minor · Show the cross-worktree waiting state during Create-PR… · source-control-primary-action.ts:44-49

src/renderer/src/components/right-sidebar/source-control-primary-action.ts:44-49
Minor · Functional Correctness · Quick win

Show the cross-worktree waiting state during Create-PR preparation.

When another worktree starts a Git operation while the local Create-PR intent is awaiting an asynchronous step, the adapter keeps the disabled “Preparing branch for review…” action because of the explicit exemption. This hides the reason the action must wait and omits isWaitingForRemoteOperation. Remove the exemption so the adapter returns the localized cross-worktree waiting action.

Suggested fix
     inputs.isRemoteOperationActive &&
     inputs.isRemoteOperationInAnotherWorktree &&
-    !inputs.isCommitting &&
-    !(inputs.isPrIntentInFlight && decision.kind === 'create_pr_intent')
+    !inputs.isCommitting
Minor · Show the cross-worktree waiting state in the… · primary-create-pr-intent-action.ts:199-218

src/renderer/src/components/right-sidebar/source-control/review/primary-create-pr-intent-action.ts:199-218
Minor · Functional Correctness · Quick win

Show the cross-worktree waiting state in the Create-PR header.

When another worktree starts a Git operation while the local Create-PR intent is in flight, resolveCreatePrIntentInFlightPrimaryAction still returns “Preparing branch for review…”. Pass the cross-worktree state into this resolver and return the existing waiting action before the preparation action. Preserve the !isCommitting condition used by the adapter.

Suggested fix
 export function resolveCreatePrIntentInFlightPrimaryAction(
-  inputs?: Pick<PrimaryActionInputs, 'hostedReviewCreation'>
+  inputs?: Pick<
+    PrimaryActionInputs,
+    | 'hostedReviewCreation'
+    | 'isCommitting'
+    | 'isRemoteOperationActive'
+    | 'isRemoteOperationInAnotherWorktree'
+  >
 ): PrimaryAction {
   const copy = localizedHostedReviewCopy(
     resolveSupportedHostedReviewCopyProvider(inputs?.hostedReviewCreation?.provider)
   )
 
+  if (
+    inputs?.isRemoteOperationActive &&
+    inputs.isRemoteOperationInAnotherWorktree &&
+    !inputs.isCommitting
+  ) {
+    return {
+      kind: 'create_pr_intent',
+      label: translate(
+        'settings.sourceControl.gitOperationInAnotherWorkspace',
+        'Git operation running elsewhere'
+      ),
+      title: translate(
+        'settings.sourceControl.remoteOperationInAnotherWorkspace',
+        "Another workspace is running a Git operation, such as push, pull, or force push. Wait for it to finish before using this action, so the two operations don't overlap."
+      ),
+      disabled: true,
+      isWaitingForRemoteOperation: true
+    }
+  }
+
   return {

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: 78823dfc-7328-4170-ac42-30b4f830175f
Commits

Reviewing files that changed from the base of the PR and between af1b190 and 18864d2.

Files selected for processing: 2
  • src/renderer/src/store/slices/editor/actions/git-remote-push-pull.ts
  • src/renderer/src/store/slices/editor/actions/git-remote-sync.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@AmethystLiang

Copy link
Copy Markdown
Contributor Author

@coderabbitai Fixing. Will be in the next commit

@coderabbitai

coderabbitai Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@AmethystLiang Thanks for the update. The finding remains open until the fix is complete.

You are interacting with an AI system.

@AmethystLiang
AmethystLiang force-pushed the AmethystLiang/publish-branch-in-progress-confusing branch from 18864d2 to 671467f Compare November 1, 2026 21:36
@AmethystLiang
AmethystLiang merged commit 9599d71 into main Nov 1, 2026
36 of 40 checks passed
OmarHung added a commit to OmarHung/orca that referenced this pull request Nov 4, 2026
Upstream regrouped src/main and the settings pane by owner, so fork imports
follow the moved modules. GitBranchStatusSettings and GitInlineBlameSetting
join settings/source-control beside the pane that renders them.

The branch status segment reads remoteOperations now that stablyai#37093 replaced
inFlightRemoteOpKind, scoped to its own workspace so a fetch elsewhere no
longer spins it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
OmarHung added a commit to OmarHung/orca that referenced this pull request Nov 5, 2026
Upstream regrouped src/main and the settings pane by owner, so fork imports
follow the moved modules. GitBranchStatusSettings and GitInlineBlameSetting
join settings/source-control beside the pane that renders them.

The branch status segment reads remoteOperations now that stablyai#37093 replaced
inFlightRemoteOpKind, scoped to its own workspace so a fetch elsewhere no
longer spins it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
OmarHung added a commit to OmarHung/orca that referenced this pull request Nov 5, 2026
Upstream regrouped src/main and the settings pane by owner, so fork imports
follow the moved modules. GitBranchStatusSettings and GitInlineBlameSetting
join settings/source-control beside the pane that renders them.

The branch status segment reads remoteOperations now that stablyai#37093 replaced
inFlightRemoteOpKind, scoped to its own workspace so a fetch elsewhere no
longer spins it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
OmarHung added a commit to OmarHung/orca that referenced this pull request Nov 10, 2026
Upstream regrouped src/main and the settings pane by owner, so fork imports
follow the moved modules. GitBranchStatusSettings and GitInlineBlameSetting
join settings/source-control beside the pane that renders them.

The branch status segment reads remoteOperations now that stablyai#37093 replaced
inFlightRemoteOpKind, scoped to its own workspace so a fetch elsewhere no
longer spins it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
OmarHung added a commit to OmarHung/orca that referenced this pull request Nov 13, 2026
Upstream regrouped src/main and the settings pane by owner, so fork imports
follow the moved modules. GitBranchStatusSettings and GitInlineBlameSetting
join settings/source-control beside the pane that renders them.

The branch status segment reads remoteOperations now that stablyai#37093 replaced
inFlightRemoteOpKind, scoped to its own workspace so a fetch elsewhere no
longer spins it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
OmarHung added a commit to OmarHung/orca that referenced this pull request Nov 19, 2026
Upstream regrouped src/main and the settings pane by owner, so fork imports
follow the moved modules. GitBranchStatusSettings and GitInlineBlameSetting
join settings/source-control beside the pane that renders them.

The branch status segment reads remoteOperations now that stablyai#37093 replaced
inFlightRemoteOpKind, scoped to its own workspace so a fetch elsewhere no
longer spins it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
OmarHung added a commit to OmarHung/orca that referenced this pull request Nov 24, 2026
Upstream regrouped src/main and the settings pane by owner, so fork imports
follow the moved modules. GitBranchStatusSettings and GitInlineBlameSetting
join settings/source-control beside the pane that renders them.

The branch status segment reads remoteOperations now that stablyai#37093 replaced
inFlightRemoteOpKind, scoped to its own workspace so a fetch elsewhere no
longer spins it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant