Fix blob overflow menu permalink shortcut does not get triggered

What does this MR do and why?

This happens when user navigate to the blob page from repository page. This feature was originally added in !181901 (merged) and is behind the blob_overflow_menu feature flag.

References

Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.

MR acceptance checklist

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

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

CleanShot 2025-03-06 at 18.47.24.mp4

CleanShot 2025-03-06 at 18.46.58.mp4

How to set up and validate locally

  1. Enable blob_overflow_menu and enable blob_repository_vue_header_app feature flag
   Feature.enable(:blob_overflow_menu)
   Feature.enable(:blob_repository_vue_header_app)
  1. Go to a directory
  2. Go to a file
    1. The copied link (when flag is on) and the url in the search bar (when flag is off) should match
    2. This should work when viewing a file with:
      1. A branch
      2. A commit (Select Code > Commits > Select a commit > View file)
      3. A tag
    3. In all situations, the last selected line number should be append to the end of the link
    4. Press y should work the same as clicking the dropdown item
    5. Blame button remains in the header and should not be impacted by this change

Related to #452305 (closed)

Edited by Chaoyue Zhao

Merge request reports

Loading