Use rest API for to submit data for blob edit
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 | |
| 2 | Reintroduce notifications | |
| 3 | Editing file name is possible | |
| 4 | File size validation | |
| 5 | Handle fork workflow |
Apart from the first couple of commits from !202756 (closed), this branch also includes a commit that introduces a feature flag and reintroduces a previous submit with controller and one commit that stubs the feature flag to false for feature tests that will pass after I finish MRs no 2, 3 and 4.
References
Screenshots or screen recordings
| Context | Before | After |
|---|---|---|
| Impersonated second user trying to edit the file at the same time | ![]() |
![]() |
| Before / feature flag off | After / feature flag on |
|---|---|
| Screen_Recording_2025-09-18_at_14.43.37 | Screen_Recording_2025-09-18_at_14.46.00 |
How to set up and validate locally
- In rails console enable the feature flag
Feature.enable(:blob_edit_refactor) - Go to Project / Repository
- Choose a file to edit in single file editor.
- Check the following scenarios:
- commit changes directly to master
- commit changes to a new branch with opening an MR
- commit changes to a new branch without opening an MR
- Validate you can perform all of these actions.
- In another browser impersonate a member of the group that has rights to edit files.
- In both browsers open the same file in the repository and go to Edit with single file editor.
- Edit file with one of the users and submit changes.
- After that try to edit the file with the second user, you should get a message about the file changing in the meantime.
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

