Hyperlink of submodule's hash does not work when the repository link to GitLab

Problem to solve

When adding another repository in as submodule, the web UI will show <repo>@<hash>, where both are hyperlink: the former link to the repository while the hash link the to commit hash of given repository. However, the later link does not work if the repository is on GitLab.

Steps to reproduce

  1. Create any 2 repositories, let says foo and bar
  2. Add bar as submodule of foo, then commit and push
  3. Back to web GUI of foo, the submodule should exist with working link, but not the hash.
  4. Add any repository from GitHub as submodule of foo, then commit and push
  5. Back to web GUI of foo, this time both the submodule link and hash link works

Configuration

Default GitLab CE installation (v17.0) on Debian 11.

Versions

GitLab v17.0.0
GitLab Shell 14.35.0
GitLab Workhorse v17.0.0
GitLab API v4
GitLab KAS 17.0.0
Ruby 3.1.5p253
Rails 7.0.8.1
PostgreSQL (main) 14.11
PostgreSQL (ci) 14.11
Redis 7.0.15

Helpful resources

This is the element inspector, clearly show that the missing href for the GitLab submodule hash.