zmuxuny opened a new pull request, #7384: URL: https://github.com/apache/rocketmq-dashboard/pull/7384
### Which Issue(s) This PR Fixes Fixes #7186. Replaces stale-closed #7187 with its original implementation and authorship, refreshed onto current rocketmq-studio. ### Brief Description Keep alert-rule imports owned by the keyed domain page that started them. A pending File.text() can otherwise dispatch an import into the old domain after page departure; file/API outcomes can also show global notifications after departure. Check a monotonic page generation after file reading, after the import request, and in error/loading continuations. Same-domain navigation preserves an active import. Already-dispatched writes are not cancelled or rolled back. Export, payload validation and mutation serialization remain unchanged. This continues the page ownership established by merged #6190/#6454/#6889. The current #5542 source still has an unguarded import handler, so it does not cover this fix. ### How Did You Test This Change? Fresh local verification on 2026-11-04 at f83b2c59e491739819f3e7e391222fc2a0e5041b against trunk 7abf8ada: - npm test -- src/pages/ops/__tests__/AlertsPage.test.tsx --maxWorkers=1: final complete run 59/59 PASS (205.87s), including all 11 new regressions, with the original 20s timeout and no source changes. - Earlier complete runs were 56/59 and 58/59 due to timeouts in varying existing cases. Those results are retained; the final pass does not erase that timing variability. The last timed-out navigation case also passed alone under the original timeout in 10.20s. - npx tsc -b --force: PASS. Changed-file ESLint: no errors, five existing warnings. Prettier --check and git diff --check: PASS. - npm run build: PASS, including TypeScript, Vite and license check (134 actual components, 141 license files). - Negative controls against unchanged trunk production both fail as expected: old file reads still dispatch after departure, and old API success still shows a global notification. Coverage includes domain changes, full unmount, leaving/returning to the same domain, file/API errors, StrictMode, repeated selection and same-domain query navigation. No live rules imported; no full local web/backend suite claimed. Hosted CI will verify this replacement head separately. ### Checklist - [x] One coherent change with lifecycle regression coverage - [x] Original implementation and commit authorship retained - [x] No new UI text, API, dependency or workflow changes AI assistance was used for review and validation; the diff and results were checked before submission. -- 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]
