"Your Review" pending comment links do not consistently link to the comment

Summary

The pending comment links seem to link/jump to

  1. on first activation, sometimes scroll the comment into view
  2. on second activation, scroll the view again, sometimes scrolling away from the comment, effectively hiding it again

Presumably related to #554702 (closed).

Steps to reproduce

  1. Open a review with enough changes for significant/sufficient view scrolling
  2. Navigate to Changes tab
  3. Add one or a few review comments
  4. Click a pending comment link
  5. Close "Your Review" to check if comment is visible
  6. Open "Your Review" again
  7. Click the same pending comment link, notice the view scrolls/jumps again
  8. Close "Your Review" to check if comment is visible
  9. Repeat from 4.

What is the current bug behavior?

Pending comment links seem to be random in what they will show on first and second activation.

What is the expected correct behavior?

I click a pending comment link, the diff view opens if not already open, and I see the comment.

Clicking the pending comment link a second time does not change the view scroll position.

Relevant logs and/or screenshots

Results of GitLab environment info

It's the current GitLab version 18.1.1 via omnibus installation. I don't currently have root access to the server due to internal role sync issues.

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

Patch release information for backports

If the bug fix needs to be backported in a patch release to a version under the maintenance policy, please follow the steps on the patch release runbook for GitLab engineers.

Refer to the internal "Release Information" dashboard for information about the next patch release, including the targeted versions, expected release date, and current status.

High-severity bug remediation

To remediate high-severity issues requiring an internal release for single-tenant SaaS instances, refer to the internal release process for engineers.

Edited by 🤖 GitLab Bot 🤖