zmuxuny opened a new pull request, #4487: URL: https://github.com/apache/rocketmq-dashboard/pull/4487
### Which Issue(s) This PR Fixes - Fixes #4486 ### Brief Description A selected-message DLQ resend could finish after the operator switched instances and opened another group's message drawer. The old continuation then reloaded its original group through the shared detail request generation, superseding the newer instance's pending detail request. This could render instance A's messages under instance B's drawer scope. This change gives detail resends their own request generation and invalidates it when the instance, drawer, or detail scope changes. Post-await UI effects (toast, selection reset, error state, detail reload, loading state) run only while the resend still belongs to the current scope. The existing one-resend-at-a-time behavior is preserved with separate whole-group and detail in-flight guards that cross-check each other, so a stale completion cannot unlock a newer operation. ### Fail-before evidence Baseline: `master@987b748e8f4f421c5cd3c4c4e51a064cc7e59f18`. The deterministic regression starts a detail resend on instance A, switches to instance B, opens B's drawer, then resolves the old A resend before B's pending detail request. On the unmodified baseline the test fails because `instance-b-message` never appears: the old A refresh advances the shared detail request generation and invalidates B's response. The fixed version keeps the old-instance detail call count at 1 and renders B's message without allowing the stale A refresh to publish. ### How Did You Test This Change? - `npx vitest run src/pages/instance/__tests__/DLQPage.test.tsx` — **21/21 passed**. - `npx eslint src/pages/instance/dlq.tsx src/pages/instance/__tests__/DLQPage.test.tsx` — **0 errors**; one pre-existing Fast Refresh warning in `dlq.tsx`. - `npm run build` — TypeScript + Vite production build passed; **8046 modules transformed**. - `npx prettier --check` after formatting and `git diff --check` pass. AI-assisted analysis, implementation, and regression authoring; the red/green tests and build above were executed locally on the current `master` baseline. -- 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]
