RockteMQ-AI commented on issue #4008: URL: https://github.com/apache/rocketmq-dashboard/issues/4008#issuecomment-5561121473
**Issue Evaluation** Category: `bug` | Status: **Confirmed** The reported issue has been verified against the described code paths. **Root Cause:** Both alert-rule routes (`/ops/alerts` and `/ops/business-alerts`) in `web/src/App.tsx:187-188` render the same `AlertsPage` component without a React `key` prop. React Router therefore preserves the component instance and its internal state (`page`, `search`, `enabledFilter` at `alerts.tsx:159-162`) across navigation between the two menu entries. The list effect re-fetches with the retained values instead of resetting. **Impact:** Navigating between the two alert-rule pages shows stale/empty results because pagination, search text, and status filter from the previous page carry over. Operators may miss active alert rules or believe a page has no rules. **Severity:** Medium — navigation state leak between two distinct pages in the ops section. **Linked PR:** #4004 — Adding a `key` prop derived from the `domain` to force remount is the correct React-idiomatic fix. --- *Automated evaluation by github-manager* -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
