File locks inconsistencies when displayed in the UI

Summary

Locking/unlocking a file does not seem to properly expose the file locks label in the tree view.

Initially reported by a Large Premium customer in ZD (internal only).

Steps to reproduce

  1. Lock/unlock a file and look for the icon in the UI files view.

Example Project

In repro-lock-icons, I've locked test file and the locked icon was not showing up in the tree view:

image

I've added the test 2 file - locked it, and both icons showed up. Now, I've unlocked the test 2 file as seen in the paths locks, but both files still show locked in the tree view.

image

What is the current bug behavior?

The file lock icon path is inconsistent with the actual status of the file.

What is the expected correct behavior?

The icon should follow the status of the file.

Possible fixes

In my tests, I do get a lock_label returned from the logs_tree endpoint, but it's not reflecting the correct status, I think it may be related to !29949 (merged) as the customer mentioned above noticed the change after upgrading from 12.10 to 13.0 - cc @igor.drozdov