Skip to content

Revert "Show current branch in Source Control header (#9787)" - #10032

Merged
AmethystLiang merged 1 commit into
mainfrom
revert-source-control-header-9787
Jul 23, 2026
Merged

AmethystLiang merged 1 commit into
mainfrom
revert-source-control-header-9787

Conversation

@AmethystLiang

@AmethystLiang AmethystLiang commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Reverts #9787.

Why

#9787 removed the "Create PR" button from the Source Control header. That button was the primary/visible entry point for creating a review — it handled the direct create (create_pr), the prepare-then-create intent (create_pr_intent → publish/push/sync, then PR), and the disabled "not ready yet" state.

After #9787, the only remaining Create PR affordance in the body (directCreatePrAction) renders solely when hostedReviewCreation.canCreate === true (branch already published + pushed + has commits + no open PR). For every other state — unpublished branches, branches that need a push/sync, or clean branches — there is now no Create PR button at all, only "Publish Branch". The prepare-then-PR one-click flow (runCreatePrIntent) is left reachable only via the small push_create_pr dropdown item.

The "Create PR" button is one of the most-used actions in this workflow, so we're reverting to restore it.

@AmethystLiang
AmethystLiang merged commit 72a0a4d into main Jul 23, 2026
1 of 2 checks passed
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ccb463d9-1e17-4bdf-812a-f2966e4d8906

📥 Commits

Reviewing files that changed from the base of the PR and between 6a8e992 and 2eafcc8.

📒 Files selected for processing (13)
  • src/renderer/src/components/DetachedHeadBadge.tsx
  • src/renderer/src/components/right-sidebar/SourceControl.hosted-review-header-link.test.tsx
  • src/renderer/src/components/right-sidebar/SourceControl.tsx
  • src/renderer/src/components/right-sidebar/hosted-review-header-chrome.tsx
  • src/renderer/src/components/right-sidebar/source-control-create-pr-intent-state.test.ts
  • src/renderer/src/components/right-sidebar/source-control-create-pr-intent-state.ts
  • src/renderer/src/components/right-sidebar/source-control-header-toolbar.test.tsx
  • src/renderer/src/components/right-sidebar/source-control-header-toolbar.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json

📝 Walkthrough

Walkthrough

Source Control now renders hosted review actions with provider-specific navigation, adds visibility-aware Create PR header actions, and routes in-app review clicks to the Checks tab. The collapsed toolbar accepts hosted review and Create PR controls with loading states. Detached-head identities render through a dedicated badge, whose obsolete accessibility and focus props were removed. Tests cover hosted review provider behavior, modified clicks, external links, and Create PR action visibility. Current-branch translation entries were removed from the locale files.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Checkov (3.3.8)
src/renderer/src/i18n/locales/en.json

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

src/renderer/src/i18n/locales/es.json

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

src/renderer/src/i18n/locales/ja.json

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

  • 2 others

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

Comment @coderabbitai help to get the list of available commands.

gal064 pushed a commit to gal064/orca that referenced this pull request Jul 23, 2026
brennanb2025 added a commit that referenced this pull request Jul 23, 2026
…10215)

* feat(source-control): show current branch without evicting Create PR

#9787 added the current-branch identity to the Source Control header but
did it by replacing the Create PR button's toolbar slot, so #10032 reverted
the whole thing. Create PR is the primary entry point into the
stage→commit→push→generate-PR flow, so it can't be traded away.

Restore the branch identity as its own row above the toolbar so it coexists
with the Create PR button (Option 2 layout). Detached HEAD renders in the
same identity row via DetachedHeadBadge (re-adds its tabIndex/aria-label),
replacing the separate below-toolbar badge row.

* style(source-control): match branch identity text to the 'vs main' base ref

Same font-mono / 10.5px / foreground-90 / underline treatment so the current
branch name reads visually consistent with the base ref in the context row.

* style(source-control): drop branch identity underline

Keeps the 'vs main' font/size/color match but no underline — the label isn't
clickable, so the underline read as a false affordance.

* test(source-control): harden identity-row detached + no-identity contracts

Add a stable data-testid to the identity row so the no-identity case proves no
row renders, and assert the detached badge's accessible label + focusability.
Addresses CodeRabbit review on #10215.
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…tablyai#10215)

* feat(source-control): show current branch without evicting Create PR

stablyai#9787 added the current-branch identity to the Source Control header but
did it by replacing the Create PR button's toolbar slot, so stablyai#10032 reverted
the whole thing. Create PR is the primary entry point into the
stage→commit→push→generate-PR flow, so it can't be traded away.

Restore the branch identity as its own row above the toolbar so it coexists
with the Create PR button (Option 2 layout). Detached HEAD renders in the
same identity row via DetachedHeadBadge (re-adds its tabIndex/aria-label),
replacing the separate below-toolbar badge row.

* style(source-control): match branch identity text to the 'vs main' base ref

Same font-mono / 10.5px / foreground-90 / underline treatment so the current
branch name reads visually consistent with the base ref in the context row.

* style(source-control): drop branch identity underline

Keeps the 'vs main' font/size/color match but no underline — the label isn't
clickable, so the underline read as a false affordance.

* test(source-control): harden identity-row detached + no-identity contracts

Add a stable data-testid to the identity row so the no-identity case proves no
row renders, and assert the detached badge's accessible label + focusability.
Addresses CodeRabbit review on stablyai#10215.
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