Skip to content

feat: allow to resync production branches - #46723

Merged
djhi merged 3 commits into
masterfrom
gildasgarcia/fe-3553-support-rebase-on-git-based-production-branches
Jun 8, 2026
Merged

djhi merged 3 commits into
masterfrom
gildasgarcia/fe-3553-support-rebase-on-git-based-production-branches

Conversation

@djhi

@djhi djhi commented Jun 8, 2026 •

Copy link
Copy Markdown
Contributor

Problem

  1. Users can't resync/rebase production branches but those could get stuck too
  2. We currently check for branches health state to allow resync/rebase, preventing to unblock some cases

Solution

  1. Add an menu item to resync/rebase production branches
  2. Remove the unnecessary health checks

Summary by CodeRabbit

  • New Features

    • Added resync/retrigger for production (main) branches with a confirmation dialog and loading state.
  • Improvements

    • Simplified and clarified branch action tooltip messaging.
    • Refined availability and disabled logic for branch actions (permission and in-flight handling).
    • Improved UX for switching between preview and persistent branches, including adjusted messaging for upgrade entitlements.

@djhi
djhi requested a review from a team as a code owner June 8, 2026 09:18
@vercel

vercel Bot commented Jun 8, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
studio-self-hosted Ready Ready Preview, Comment Jun 8, 2026 12:55pm
studio-staging Ready Ready Preview, Comment Jun 8, 2026 12:55pm
5 Skipped Deployments
Project Deployment Actions Updated (UTC)
studio Ignored Ignored Jun 8, 2026 12:55pm
design-system Skipped Skipped Jun 8, 2026 12:55pm
docs Skipped Skipped Jun 8, 2026 12:55pm
ui-library Skipped Skipped Jun 8, 2026 12:55pm
zone-www-dot-com Skipped Skipped Jun 8, 2026 12:55pm

Request Review

@supabase

supabase Bot commented Jun 8, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitai Bot commented Jun 8, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: a1da83fc-c1c2-4a7c-b93e-d26cf70fbaad

📥 Commits

Reviewing files that changed from the base of the PR and between 5209bdc and ff1afe2.

📒 Files selected for processing (1)
  • apps/studio/components/interfaces/BranchManagement/Overview.tsx

📝 Walkthrough

Walkthrough

Updated branch management UI in Overview.tsx: preview Resync/Rebase disabled/tooltip logic simplified, preview Switch action refactored to combine health and entitlement gating, and main branch gained a conditional Resync menu item with confirmation modal wired to useBranchPushMutation.

Changes

Branch Management Resync/Rebase Updates

Layer / File(s) Summary
Preview branch Resync/Rebase simplification
apps/studio/components/interfaces/BranchManagement/Overview.tsx
Resync/Rebase menu item disabled logic now depends only on update permission and retrigger in-flight state; tooltip simplified to show only missing update permission.
Preview branch Switch action refactoring
apps/studio/components/interfaces/BranchManagement/Overview.tsx
"Switch to preview/persistent" menu item refactored to use a disabled predicate combining branch health and persistent-branch entitlement; tooltip shows either initializing or upgrade messaging.
Main branch Resync/Rebase feature
apps/studio/components/interfaces/BranchManagement/Overview.tsx
MainBranchActions derives branchRef/projectRef from the branch prop, wires useBranchPushMutation (with toasts), adds confirmation modal state, conditionally renders a permission-gated "Resync branch" menu item, and triggers the retrigger mutation on confirm.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • supabase/supabase#46626: Directly related—both PRs modify Overview.tsx to enhance branch workflow retrigger ("Resync/Rebase") UI and integrate useBranchPushMutation-driven confirmation and disabled logic.

Suggested reviewers

  • awaseem

Poem

🐰 In code meadows branches gleam,
Resyncs hum like a dream,
Preview, main, in tidy flow,
Confirm and push — now watch them go,
A rabbit cheers: "Sync, then beam!" 🌿

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description provided is incomplete compared to the template. It is missing the required sections: confirmation of reading CONTRIBUTING.md, kind of change designation, current behavior with issue links, new behavior with screenshots, and additional context. Fill in all required template sections: confirm CONTRIBUTING.md review, specify change type (feature), link relevant issues, describe new behavior with visual details, and add any additional context or screenshots.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: adding the ability to resync production branches, which directly aligns with the primary objective and code modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch gildasgarcia/fe-3553-support-rebase-on-git-based-production-branches

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 and usage tips.

@github-actions

github-actions Bot commented Jun 8, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright Test Results

passed  217 passed
flaky  1 flaky
skipped  5 skipped

Details

stats  223 tests across 24 suites
duration  19 minutes, 24 seconds
commit  ff1afe2

Flaky tests

Features › queue-table-operations.spec.ts › Queue Table Operations › reverted cell edit clears the pending change

Skipped tests

Features › auth-users.spec.ts › should show web3 users as enabled when the matching web3 provider is enabled
Features › sql-editor.spec.ts › SQL Editor › snippet favourite works as expected
Features › sql-editor.spec.ts › SQL Editor › share with team works as expected
Features › sql-editor.spec.ts › SQL Editor › folders works as expected
Features › sql-editor.spec.ts › SQL Editor › other SQL snippets actions work as expected

@djhi
djhi merged commit a491936 into master Jun 8, 2026
35 of 37 checks passed
@djhi
djhi deleted the gildasgarcia/fe-3553-support-rebase-on-git-based-production-branches branch June 8, 2026 13:59
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Braintrust eval report

Evals in progress... ⌛

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.

2 participants