Bold font does not represent viewed state in review

Summary

After pushing new commits, the viewed flag is updated, but the bold font in the file list is not updated.

Steps to reproduce

  • Create a merge request with changes in two files
  • Go to changes tab in single-file view
  • Mark both files as viewed
  • close the review page
  • change both files again, push those changes
  • reopen the MR in the changes tab

Example Project

Reproducing the error requires dynamical interaction.

What is the current bug behavior?

Both files in the list use in normal font, which correspond to "viewed" files. Toggling the checkbox twice changes the font as desired.

What is the expected correct behavior?

Both files are marked in bold font, which usually corresponds to "not viewed" files.

Relevant logs and/or screenshots

viewed_flag_bold_font

Implementation plan

Start by reviewing these functions and verifying functionality:
reviewFile - this is triggered when you toggle the viewed checkbox.
mrReviews - this is set when the page loads

Potential causes: file_identifier_hash and file_hash are different. Maybe one of them doesn’t change after the push and that causes this state desync.

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info
System information
System:		Debian 10
Proxy:		no
Current User:	git
Using RVM:	no
Ruby Version:	2.7.5p203
Gem Version:	3.1.4
Bundler Version:2.2.33
Rake Version:	13.0.6
Redis Version:	6.2.6
Sidekiq Version:6.4.0
Go Version:	unknown

GitLab information
Version:	15.0.0-ee
Revision:	3b397c17532
Directory:	/opt/gitlab/embedded/service/gitlab-rails
DB Adapter:	PostgreSQL
DB Version:	12.10
URL:		https://gitlab.inh.lmi-dev.de
HTTP Clone URL:	https://gitlab.inh.lmi-dev.de/some-group/some-project.git
SSH Clone URL:	ssh://git@gitlab.inh.lmi-dev.de:2222/some-group/some-project.git
Elasticsearch:	no
Geo:		no
Using LDAP:	yes
Using Omniauth:	yes
Omniauth Providers: 

GitLab Shell
Version:	14.3.0
Repository storage paths:
- default: 	/var/opt/gitlab/git-data/repositories
GitLab Shell path:		/opt/gitlab/embedded/service/gitlab-shell

Results of GitLab application Check

Expand for output related to the GitLab application check
Checking GitLab subtasks ...

Checking GitLab Shell ...

GitLab Shell: ... GitLab Shell version >= 14.3.0 ? ... OK (14.3.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Internal API available: OK Redis available via internal API: OK gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Gitaly ...

Gitaly: ... default ... OK

Checking Gitaly ... Finished

Checking Sidekiq ...

Sidekiq: ... Running? ... yes Number of Sidekiq processes (cluster/worker) ... 1/1

Checking Sidekiq ... Finished

Checking Incoming Email ...

Incoming Email: ... Reply by email is disabled in config/gitlab.yml

Checking Incoming Email ... Finished

Checking LDAP ...

LDAP: ... Server: ldapmain LDAP authentication... Success LDAP users with access to your GitLab server (only showing the first 100 results) User output sanitized. Found 33 users of 100 limit.

Checking LDAP ... Finished

Checking GitLab App ...

Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Systemd unit files or init script exist? ... skipped (omnibus-gitlab has neither init script nor systemd units) Systemd unit files or init script up-to-date? ... skipped (omnibus-gitlab has neither init script nor systemd units) Projects have namespace: ... 2/1 ... yes 11/4 ... yes 14/6 ... yes 17/7 ... yes 17/8 ... yes 20/10 ... yes 26/11 ... yes 10/12 ... yes 10/13 ... yes 10/14 ... yes 26/15 ... yes 11/16 ... yes 21/17 ... yes 21/20 ... yes 27/21 ... yes 36/22 ... yes 11/23 ... yes 26/24 ... yes 27/25 ... yes 11/27 ... yes 44/28 ... yes 27/29 ... yes 20/30 ... yes 48/31 ... yes 26/32 ... yes 48/33 ... yes 48/34 ... yes 24/36 ... yes 27/37 ... yes 6/38 ... yes 39/39 ... yes 39/40 ... yes 21/42 ... yes 27/43 ... yes 54/45 ... yes 54/46 ... yes 21/47 ... yes 39/48 ... yes 21/49 ... yes 21/50 ... yes 21/51 ... yes 21/52 ... yes 44/54 ... yes 43/55 ... yes 26/56 ... yes 11/58 ... yes 27/59 ... yes 27/60 ... yes 66/61 ... yes 66/62 ... yes 66/63 ... yes 69/64 ... yes 69/65 ... yes 69/66 ... yes 23/67 ... yes 54/68 ... yes 70/69 ... yes 71/70 ... yes 39/71 ... yes 53/72 ... yes 21/73 ... yes 52/74 ... yes 135/75 ... yes 135/76 ... yes 135/77 ... yes 135/78 ... yes 67/79 ... yes 67/80 ... yes 23/81 ... yes 19/82 ... yes 19/83 ... yes 26/84 ... yes 6/85 ... yes 67/86 ... yes 6/88 ... yes 27/89 ... yes 143/90 ... yes 143/91 ... yes 143/92 ... yes 6/94 ... yes 27/95 ... yes 67/96 ... yes 59/97 ... yes 59/98 ... yes 66/99 ... yes 59/100 ... yes 11/101 ... yes 11/102 ... yes 67/103 ... yes 157/104 ... yes 157/105 ... yes 157/106 ... yes 180/107 ... yes 143/111 ... yes 143/112 ... yes 28/113 ... yes 11/114 ... yes Redis version >= 5.0.0? ... yes Ruby version >= 2.7.2 ? ... yes (2.7.5) Git user has default SSH configuration? ... yes Active users: ... 33 Is authorized keys file accessible? ... yes GitLab configured to store new projects in hashed storage? ... yes All projects are in hashed storage? ... yes Elasticsearch version 7.x-8.x or OpenSearch version 1.x ... skipped (Advanced Search is disabled)

Checking GitLab App ... Finished

Checking GitLab subtasks ... Finished

Possible fixes

Edited by Arianna Haradon