Repository navigation
Revert "Show current branch in Source Control header (#9787)" - #10032
Conversation
This reverts commit 56a31a5.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (13)
📝 WalkthroughWalkthroughSource 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
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.jsonTraceback (most recent call last): src/renderer/src/i18n/locales/es.jsonTraceback (most recent call last): src/renderer/src/i18n/locales/ja.jsonTraceback (most recent call last):
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. Comment |
…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.
…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.
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 whenhostedReviewCreation.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 smallpush_create_prdropdown item.The "Create PR" button is one of the most-used actions in this workflow, so we're reverting to restore it.