Skip to content

Show specific diverged workflows in sandbox merge dialog#4396

Open
midigofrank wants to merge 2 commits intomainfrom
4001-show-diverged-workflows
Open

Show specific diverged workflows in sandbox merge dialog#4396
midigofrank wants to merge 2 commits intomainfrom
4001-show-diverged-workflows

Conversation

@midigofrank
Copy link
Collaborator

@midigofrank midigofrank commented Feb 9, 2026

Description

  • Add diverged_workflows/2 function to return list of workflow names that have diverged between sandbox and target projects
  • Update merge modal to display specific workflow names in a bullet list when divergence is detected
Screenshot 2026-02-09 at 11 36 49

Fixes #4001

Validation steps

  1. Create a sandbox project
  2. Pick any workflow in the sandbox project and add a job
  3. Go back to the sandboxes page for the project and click to merge the sandbox.
  4. The merge modal should list your workflow as diverged, like in the attached screenshot

AI Usage

Please disclose whether you've used AI anywhere in this PR (it's cool, we just
want to know!):

  • I have used Claude Code
  • I have used another model
  • I have not used AI

You can read more details in our
Responsible AI Policy

Pre-submission checklist

  • I have performed an AI review of my code (we recommend using /review
    with Claude Code)
  • I have implemented and tested all related authorization policies.
    (e.g., :owner, :admin, :editor, :viewer)
  • I have updated the changelog.
  • I have ticked a box in "AI usage" in this PR

Add diverged_workflows/2 function to return list of workflow names that
have diverged between sandbox and target projects, rather than just a
boolean flag. Update merge modal to display these specific workflow
names in a bullet list when divergence is detected.

This helps users make informed decisions about whether to proceed with
a merge by showing exactly which workflows will be affected.

Fixes #4001
@github-project-automation github-project-automation bot moved this to New Issues in v2 Feb 9, 2026
@midigofrank midigofrank self-assigned this Feb 9, 2026
@codecov
Copy link

codecov bot commented Feb 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.33%. Comparing base (7f11217) to head (90ed012).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4396      +/-   ##
==========================================
- Coverage   89.38%   89.33%   -0.05%     
==========================================
  Files         425      425              
  Lines       20051    20061      +10     
==========================================
- Hits        17923    17922       -1     
- Misses       2128     2139      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@midigofrank
Copy link
Collaborator Author

@josephjclark let me know your thoughts on the wording

- Remove dbg() call from diverged workflows conditional check
- Extract duplicate diverged workflows logic into reusable helper function
- Simplifies code maintenance by centralizing the workflow divergence check
@josephjclark
Copy link
Collaborator

Something is up here Frank - I see the warning even if the branches haven't diverged

Divergence means that the parent project changed since the sandbox was forked. So the head version in the parent is not in the sandbox's history.

@doc """
Returns the list of workflow names that have diverged between source and target projects.

Compares version hashes for workflows with matching names. A workflow is considered
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yep:

A workflow is considered
diverged if it exists in both projects but has different version hashes.

this isn't quite right: a workflow is diverged if the parent head is not in the workflow's history.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New Issues

Development

Successfully merging this pull request may close these issues.

sandboxes: when projects have diverged, tell me which workflows are in conflict

2 participants