Skip to content

Redirect back to MR after editing blob

What does this MR do and why?

This MR is a chunk of work I started in !202756 (closed). I've realised I'll have to cover a couple of scenarios that previously the controller was taking care. Below you can find a breakdown how I plan to split the work:

MR # Scope Status
1 Uses rest API to submit data
1a ...and go back to existing MR ⬅️
2 Reintroduce notifications
3 Editing file name is possible
4 File size validation We don't need to move this from controller to frontend, because the message is shown on entering the edit, not submitting it.
5 Handle fork workflow

This redirects back to the MR, if the single file editor was opened from a file diff options. I'm putting it as 1a in that table above. That's something I missed in previous changes.

References

Screenshots or screen recordings

Before After
Screen_Recording_2025-10-31_at_17.37.14 Screen_Recording_2025-10-31_at_17.35.11

How to set up and validate locally

  1. In rails console enable the feature flag

    Feature.enable(:blob_edit_refactor)
  2. Go to Project / Merge requests and open any MR.

  3. Go to Changes tab.

  4. Edit the file and click Commit changes

  5. Leave all options in the dropdown as they are and click Commit changes

  6. You should be redirected back to the MR.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #509968

Edited by Paulina Sedlak-Jakubowska

Merge request reports

Loading