getsentry / getsentry/sentry

"Invalid" tag highlight fails to update when tag list changes

Open
#77,275 3 comments 0 reactions 0 assignees View on GitHub
Bug
Dominant language
Python
Stars
44.8k
Forks
4.9k
Avg merge
22h 21m
Merged PRs (30d)
586

Description

### Environment

SaaS (https://sentry.io/)

### Steps to Reproduce

1. Open an error page where at least one of the tags has a red "" highlight
2. Click on the different tag filters, ex. All, Custom, Application, Client, Other

### Expected Result

The tag that was initially highlighted as invalid is consistently highlighted, and the red highlight disappears when the invalid tag is filtered out.

### Actual Result

The red highlight remains in the same list position. For example, you can see in the screenshots that when the "All" filter is selected, exc_info is highlighted red as invalid (note that it's the 4th item in the list). When I switch to "custom", the internal_product_id (the 4th option in the list) becomes highlighted, even though it was not highlighted before. When I switch to "application", server_name (again the 4th item) is highlighted instead, and same for when I click Other. It seems that once the initial tag list is rendered, items in the list are highlighted based on the position in the list rather than on the content, which means when the list is updated, the highlight remains in the same place even though that is no longer correct.

![Image](https://github.com/user-attachments/assets/7113b204-97dc-4e6e-b44e-4a3c13bef64b)
![Image](https://github.com/user-attachments/assets/cdab67e6-2ebc-4b05-ad90-a8ec788f4cc9)
![Image](https://github.com/user-attachments/assets/57228442-6a5e-4ae8-a3f1-9e2773492530)
![Image](https://github.com/user-attachments/assets/15ca90ec-6750-4e41-ab41-3c007f8aa86a)

### Product Area

Issues

### Link

_No response_

### DSN

_No response_

### Version

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.