feat: Change open MR to use merge request id as the query param

What does this MR do and why?

This MR changes the Web IDE route for merge requests:

  1. from using the merge request ID as route parameters to query parameters.
  2. to include file path so that the exact file is opened in the WebIDE.
  3. New URL structure: /ide/project/:project_id/-/path/to/file.rb?merge_request_id=:merge_request_id
  4. The old structure /ide/project/:project_id/merge_requests/:merge_request_id is still supported for backward compatibility

Screenshots or screen recordings

No UI changes, this is a routing change. The Web IDE interface remains the same, only the URL structure changes.

How to set up and validate locally

  1. Start your GDK environment
  2. Navigate to any merge request in a project
  3. Click "Open in Web IDE" from the merge request page
  4. Verify the URL uses query parameters for MR id and include file path
  5. For forked projects, verify target_project is included in query params when source and target differ

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 #321614

Edited by aishahsofea

Merge request reports

Loading