Skip to content

feat: add a dashboard button to retrigger a branch workflow - #46626

Merged
djhi merged 7 commits into
masterfrom
gildasgarcia/fe-2862-add-dashboard-button-to-retrigger-branch-workflows
Jun 4, 2026
Merged

djhi merged 7 commits into
masterfrom
gildasgarcia/fe-2862-add-dashboard-button-to-retrigger-branch-workflows

Conversation

@djhi

@djhi djhi commented Jun 3, 2026 •

Copy link
Copy Markdown
Contributor

Problem

When workflow runs for branches fail due to stuck tasks, they can sit idle indefinitely. Users are unaware that they need to make a new commit to retrigger the workflow — leading to confusion, wasted time, and silent failures going unnoticed.

Solution

Provide a button that allows users to retrigger a workflow when it is not being removed.

How to test

  • Create a branch
  • Wait for its row to appear on the branch management page
  • Click the View logs button
  • You should see a Retrigger button
  • Clicking it should make a new row appear in those logs

Summary by CodeRabbit

  • New Features

    • Retrigger previously executed workflows directly from branch preview actions.
    • Confirmation dialog added for retrigger actions.
  • Improvements

    • Toast-style error notifications when retriggering fails.
    • Workflow run list layout updated for a more flexible horizontal display.
    • After retriggering, workflow and action lists refresh so updates appear promptly.

@djhi
djhi requested a review from a team as a code owner June 3, 2026 16:12
@vercel

vercel Bot commented Jun 3, 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 4, 2026 8:49am
studio-staging Ready Ready Preview, Comment Jun 4, 2026 8:49am
5 Skipped Deployments
Project Deployment Actions Updated (UTC)
studio Ignored Ignored Jun 4, 2026 8:49am
design-system Skipped Skipped Jun 4, 2026 8:49am
docs Skipped Skipped Jun 4, 2026 8:49am
ui-library Skipped Skipped Jun 4, 2026 8:49am
zone-www-dot-com Skipped Skipped Jun 4, 2026 8:49am

Request Review

@supabase

supabase Bot commented Jun 3, 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 3, 2026 •

Copy link
Copy Markdown
Contributor

Review 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

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: 9f307696-a5ab-4a7a-bc0d-056bb3032a0c

📥 Commits

Reviewing files that changed from the base of the PR and between 2a8c5c1 and 917677b.

📒 Files selected for processing (1)
  • apps/studio/components/interfaces/BranchManagement/Overview.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/studio/components/interfaces/BranchManagement/Overview.tsx

📝 Walkthrough

Walkthrough

Adds a branch "Retrigger" action (Overview) wired to useBranchPushMutation with confirmation modal; mutation now invalidates both branchKeys.list and actionKeys.list. Also updates a workflow-run list item's layout to use flex with spacing.

Changes

Branch retrigger and cache invalidation

Layer / File(s) Summary
Branch push mutation: invalidate action cache
apps/studio/data/branches/branch-push-mutation.ts
Add actionKeys import and invalidate actionKeys.list(projectRef) in the mutation onSuccess handler.
Overview: retrigger UI and mutation wiring
apps/studio/components/interfaces/BranchManagement/Overview.tsx
Add Redo icon and useBranchPushMutation import; add showConfirmRetriggersModal state, onRetriggerBranch handler, a retrigger dropdown item that opens a ConfirmationModal, and wire mutation loading/error handlers to UI.
WorkflowLogs: run list item layout tweak
apps/studio/components/interfaces/BranchManagement/WorkflowLogs.tsx
Change the workflow run li className to a flex row with gap and justify-between; purely layout change.

Sequence Diagram

sequenceDiagram
  participant User
  participant Overview
  participant ConfirmationModal
  participant useBranchPushMutation
  participant queryClient
  participant toast
  User->>Overview: click "Retrigger" in branch actions
  Overview->>ConfirmationModal: open confirmation
  ConfirmationModal->>useBranchPushMutation: confirm -> call with {branchRef, projectRef}
  useBranchPushMutation->>queryClient: invalidate branchKeys.list(projectRef)
  useBranchPushMutation->>queryClient: invalidate actionKeys.list(projectRef)
  useBranchPushMutation-->>ConfirmationModal: success -> close modal
  useBranchPushMutation-->>toast: error -> show error toast
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • joshenlim

Poem

🐰 I nudged a branch to run again,
A little modal, then off it went,
Cache refreshed and lists made bright,
A flexed-up row showed just right,
✨🌿

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description does not follow the required template structure with sections like 'I have read CONTRIBUTING.md', 'What kind of change', etc. While it provides useful context about the problem and solution, it lacks the expected template format. Restructure the description to match the provided template, including the CONTRIBUTING.md acknowledgment, change type classification, behavior changes, and additional context sections.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main feature being added: a dashboard button to retrigger branch workflows, which is the primary change across all modified files.
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-2862-add-dashboard-button-to-retrigger-branch-workflows

Warning

Review ran into problems

🔥 Problems

Stopped waiting for pipeline failures after 30000ms. One of your pipelines takes longer than our 30000ms fetch window to run, so review may not consider pipeline-failure results for inline comments if any failures occurred after the fetch window. Increase the timeout if you want to wait longer or run a @coderabbit review after the pipeline has finished.


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.

@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

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/studio/components/interfaces/BranchManagement/WorkflowLogs.tsx`:
- Line 160: Update the user-facing dialog text in WorkflowLogs.tsx that
currently reads "This will runs all steps again." to correct grammar; change the
string to "This will run all steps again." by locating the literal inside the
component (search for the exact phrase) and replace it accordingly so the dialog
displays the corrected sentence.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: bbd7d364-87e6-40ff-a75e-f788f9309bed

📥 Commits

Reviewing files that changed from the base of the PR and between e3be344 and 7fbc174.

📒 Files selected for processing (2)
  • apps/studio/components/interfaces/BranchManagement/WorkflowLogs.tsx
  • apps/studio/data/branches/branch-push-mutation.ts

@github-actions

github-actions Bot commented Jun 3, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright Test Results

passed  216 passed
flaky  2 flaky
skipped  5 skipped

Details

stats  223 tests across 24 suites
duration  3 minutes, 34 seconds
commit  917677b

Flaky tests

Features › filter-bar.spec.ts › Filter Bar › Date Column Filters › date less than operator filters correctly
Features › sql-editor.spec.ts › SQL Editor › should check if SQL editor is working as expected

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

@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

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/studio/components/interfaces/BranchManagement/Overview.tsx`:
- Around line 364-387: The Retrigger menu item (DropdownMenuItemTooltip) is
currently enabled for branches that are scheduled for deletion; update its
disabled logic to also check the branch's scheduled-for-deletion flag (the same
property used by PreviewBranchActions, e.g., isScheduledForDeletion or
branch.scheduledForDeletion) so it becomes disabled when true, and adjust the
tooltip.text to explain the branch is being removed (e.g., "Branch is scheduled
for removal and cannot be retriggered"). Also guard the onSelect/onClick
handlers to no-op when that flag is set (so setShowConfirmRetriggersModal is not
called for scheduled-for-deletion branches).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: bb7eaf0a-5156-4c5f-a389-93aa407e5459

📥 Commits

Reviewing files that changed from the base of the PR and between c7212d4 and 2a8c5c1.

📒 Files selected for processing (2)
  • apps/studio/components/interfaces/BranchManagement/Overview.tsx
  • apps/studio/components/interfaces/BranchManagement/WorkflowLogs.tsx
💤 Files with no reviewable changes (1)
  • apps/studio/components/interfaces/BranchManagement/WorkflowLogs.tsx

@djhi
djhi merged commit 375cbcf into master Jun 4, 2026
32 checks passed
@djhi
djhi deleted the gildasgarcia/fe-2862-add-dashboard-button-to-retrigger-branch-workflows branch June 4, 2026 13:35
@github-actions

github-actions Bot commented Jun 4, 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.

3 participants