Code Intelligence underlines don't appear until I navigate away from page and then back (with the back button)

Summary

I have a test-project I've enabled for GitLab Code Intelligence.

When I navigate to a page that should have links the dashed-underlines do not appear until I have the browser navigate to a different page (say, through a bookmark) and then navigate back to the GitLab source-page with the browser back button.

If I then reload the page the links are again gone (until I navigate away and come back).

I think this is some timing issue - because when I navigate to the page (or reload it) the LSIF data never comes from cache, but if I press the back-button the LSIF xhr request is served from cache.

(Additionally, if I disable the browser cache in the network console the back-button trick stops working)

I don't see any exceptions or error messages logged in the dev console when testing this, and the data and headers coming back from the LSIF xhr request look correct-enough at a glance.

Steps to reproduce

(How one can reproduce the issue - this is very important)

Example Project

(If possible, please create an example project here on GitLab.com that exhibits the problematic behavior, and link to it here in the bug report)

(If you are using an older version of GitLab, this will also determine whether the bug is fixed in a more recent version)

What is the current bug behavior?

Code intelligence links do not show up consistently.

What is the expected correct behavior?

Code intelligence links should show up consistently.

Relevant logs and/or screenshots

  • OS: Windows 10 2004
  • Browser: Chrome Version 83.0.4103.116 (Official Build) (64-bit)
  • GitLab instance: GitLab Community Edition 13.1.4

I've only tried out code-intelligence in my one test-project, and I have not tried reproducing this on a project I can share publicly (or on a public GitLab instance).

Output of checks

(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)

Results of GitLab environment info

N/A - I don't have admin access to my instance. Let me know if I should get anything from our admins.

Results of GitLab application Check

N/A - I don't have admin access to my instance. Let me know if I should get anything from our admins.

Possible fixes

(If you can, link to the line of code that might be responsible for the problem)

Edited by Antoine Latter