Skip to content

4002 sandboxes UI to select workflows on merge#4518

Open
doc-han wants to merge 5 commits intomainfrom
4002-sandboxes-ui-to-select-workflows-on-merge
Open

4002 sandboxes UI to select workflows on merge#4518
doc-han wants to merge 5 commits intomainfrom
4002-sandboxes-ui-to-select-workflows-on-merge

Conversation

@doc-han
Copy link
Contributor

@doc-han doc-han commented Mar 10, 2026

Description

This PR allows user to select the specific workflows they want to merge during a sandbox merge

Before After
CPT2603100912-1536x915 CPT2603100911-1536x915

Closes #4002

Validation steps

  1. Create a sandbox
  2. try to merge the sandbox back into main
  3. does it ask which workflows from the sandbox you want to merge in? it should
  4. Now select just the workflows you want to be considered in the merge
  5. After merge, confirm the changes from your selected workflows got in and those from your unselected workflows didn't get in

Additional notes for the reviewer

  1. (Is there anything else the reviewer should know or look out for?)

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

@doc-han doc-han linked an issue Mar 10, 2026 that may be closed by this pull request
@github-project-automation github-project-automation bot moved this to New Issues in Core Mar 10, 2026
@codecov
Copy link

codecov bot commented Mar 10, 2026

Codecov Report

❌ Patch coverage is 87.96296% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.54%. Comparing base (5d4762c) to head (54e13ab).

Files with missing lines Patch % Lines
lib/lightning/projects/merge_projects.ex 71.87% 9 Missing ⚠️
lib/lightning_web/live/sandbox_live/index.ex 92.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4518      +/-   ##
==========================================
- Coverage   89.55%   89.54%   -0.01%     
==========================================
  Files         425      425              
  Lines       20307    20397      +90     
==========================================
+ Hits        18185    18265      +80     
- Misses       2122     2132      +10     

☔ 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.

@brandonjackson
Copy link
Contributor

@doc-han could you attach a screenshot please?

@doc-han
Copy link
Contributor Author

doc-han commented Mar 10, 2026

@doc-han could you attach a screenshot please?

@brandonjackson I've attached some visuals to the description

@brandonjackson
Copy link
Contributor

brandonjackson commented Mar 10, 2026

Thanks! Looks great. Can you make these copy changes as well while you're working on this component? cc @theroinaochieng

@doc-han
Copy link
Contributor Author

doc-han commented Mar 10, 2026

Thanks! Looks great. Can you make these copy changes as well while you're working on this component? cc @theroinaochieng

alright

@doc-han doc-han marked this pull request as ready for review March 10, 2026 11:43
@doc-han doc-han requested review from elias-ba and midigofrank March 10, 2026 11:44
@josephjclark
Copy link
Collaborator

I haven't checked the PR but I'd love to only suggest workflows that have changed in the sandbox. Unchanged workflows should be deselected. Maybe even greyed out? (less sure on that so for now I think just deselect please)

When running QA on this, please can we verify:

  • If I select a workflow to merge, changes in that workflow should appear on main
  • If I do not select a workflow to merge, but that workflow has changed, those changes do not overrwrite main (ie, that unselected workflow is properly ignored)
  • If I did not change a workflow, but I request to merge it anyway, AND if that workflow has changed on main, the sandbox version should be applied to main. This effectively rolls back main. I don't know if anyone wants or needs this, but it's the behaviour I expect out of the box

Maybe worth remembering in test that there are several types of change that we might see

  • I could make a change in the sandbox and main was not changed
  • I could make a change in the sandbox, and someone else made a change on main
  • I could make a change on main but not touch the sandbox

If this branch fails any of these tests I think we need to create a new issue because main will fail too. I just want to run these tests while we have focus on it

@josephjclark
Copy link
Collaborator

@doc-han if a workflow is deleted from the sandbox, it needs to count as a change (type delete) which can optionally merged. Ticked by default. If ticked, the sandbox needs to be removed from main

@brandonjackson brandonjackson linked an issue Mar 12, 2026 that may be closed by this pull request
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: warn users that merge is dumb sandboxes: UI to select workflows on merge

3 participants