Web IDE does not Redirect to Document in Fork without Write Access

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

When trying to edit a document on a repo that I do not have write access to, the Web IDE does not redirect me to the document on the forked repo. Instead, it start at the root of the forked repo.

Not sure if this can be considered as a bug but it is certainly a unwanted behavior and a bad UX.

Steps to reproduce

Prerequisites:

  1. Are logged into an account that does not have write access to https://gitlab.com/-/ide/project/gitlab-com/www-gitlab-com.
  2. Have an up to date fork of https://gitlab.com/-/ide/project/gitlab-com/www-gitlab-com.

Steps:

  1. Open any page on the GitLab Handbook, e.g. https://about.gitlab.com/handbook/product/personas/
  2. Click "Edit this page"
  3. Which loads https://gitlab.com/-/ide/project/gitlab-com/www-gitlab-com/edit/master/-/sites/handbook/source/handbook/product/personas/index.html.md
  4. Due to lack of write access on that repo get "You don't have write access" "You can't edit files directly in this project. To make changes, go to your fork and create a merge request."
  5. Click "Go to fork"
  6. Which loads https://gitlab.com/-/ide/project/{your_username}/www-gitlab-com/edit/master

Example Project

Not necesary.

What is the current bug behavior?

The Web IDE loads the root of the forked repo.

What is the expected correct behavior?

The Web IDE should load the document to be edited of the forked repo.

Relevant logs and/or screenshots

grafik

grafik

grafik

Output of checks

This bug happens on GitLab.com

Results of GitLab environment info

Happens to me with my user https://gitlab.com/marc_wuerth

Results of GitLab application Check

None

Possible fixes

Not known.

Edited by 🤖 GitLab Bot 🤖