| 7851 | } |
| 7852 | |
| 7853 | // Update all visible model elements to refresh their tags |
| 7854 | // This ensures tags are updated even if the grid doesn't fully re-render |
| 7855 | const allFileItems = document.querySelectorAll('.file-item'); |
| 7856 | for (const item of allFileItems) { |
| 7857 | const filePath = item.getAttribute('data-filepath') || item.dataset.filepath; |
| 7858 | if (filePath) { |
| 7859 | await updateModelElement(filePath); |
| 7860 | } |
| 7861 | } |
| 7862 | } catch (error) { |
| 7863 | console.error('Error refreshing UI after tag manager close:', error); |
| 7864 | } |
| 7865 | }); |
| 7866 | } |
| 7867 | |