iloveeyjafjalla opened a new pull request, #6293: URL: https://github.com/apache/rocketmq-dashboard/pull/6293
### Which Issue(s) This PR Fixes The accompanying bug report will be linked immediately after PR creation. ### Brief Description After a Topic detail opens successfully, changing the consumer table's page calls `loadTopicConsumers` without a rejection handler. A timeout can leave the last successful page visible with no page-level error and an unhandled promise rejection. Initial detail loading already catches this error, but the later pagination callback does not. Catch consumer pagination failures and reuse the existing Topic detail failure message. Keep the last successful rows/page so the requested page can be retried. Ignore failures from superseded consumer requests or a detail/page the user left; closing and unmounting invalidate the relevant request generations. This is a follow-up to the initial-detail error handling in #5472 / #5442. The shared client already reports some business-envelope errors; the added handling also covers failures such as timeouts without that envelope. ### How Did You Test This Change? Baseline: `rocketmq-studio@5e4c39b053c35a5598cc79ff331b8a54e649d7b1`; final commit `967736ec8ca67d22f4382271d5128c2ffb180174`. Windows 11, Node 24.15.0, npm 11.12.1; independent LF worktree sharing existing npm-ci dependencies via junction. - Old code: real TopicPage loads a coherent first consumer page, the actual second-page control triggers a timeout, the expected failure message is absent and Vitest reports the unhandled rejection. The final test fixture on unchanged production still fails this assertion (1 failed, 45 skipped, 1 unhandled error), rather than the whole test timing out. - New targeted page controls: 5/5 pass, covering failure/retry, a newer page winning, close, reopen and leaving the page with the App message surface still mounted. Only one outer Topic row is needed; the actual consumer detail still renders full twenty-row pages and coherent totals. Modal motion is disabled only in the lifecycle test harness because jsdom does not complete the CSS exit animation. - Final uninstrumented `npm test -- --maxWorkers=1 src/pages/instance/__tests__/TopicPage.test.tsx src/services/topicService.test.ts src/api/metadata.test.ts`: 3 files, 61/61 pass. Clean baseline passes its 56/56 existing cases. This final confirmation keeps the original patch, assertions, timeouts, dependencies and runtime unchanged. - `npm run lint`: exit 0, 0 errors, 10 warnings in untouched files. Targeted ESLint, Prettier and `git diff --check` pass. - `npm run build`: pass on the final commit, including the license gate (133 components, 140 legal files). Final changed-file ESLint, Prettier and diff checks also pass. Validation limits: earlier full frontend runs passed 1518/1522 with four workers and 1515/1522 with two workers, with Topic/Alerts timeouts and a Consumer subscription-refresh assertion failure. A later related run passed 55/61 with six old Topic timeouts. A separate diagnostic checkout traced those awaits and queries; its 46/46 result is not used as the normal-test pass above. The final uninstrumented 61/61 confirmation followed that diagnostic without changing the patch. Historical failure causes remain unestablished, and the final commit was not rerun across all 153 frontend files. No remote CI pass is claimed. The regression renders the actual page and pagination, supplying ordinary `TopicConsumerPage` responses and a controlled service rejection. No live broker, database, deployment or injected network outage was used. Java and Go checks were not run for this frontend-only change. AI assistance: OpenAI Codex investigated, implemented and ran checks. Separate automated agents reviewed the production call chain, current related head diffs/public comments, and the implementation/regression evidence. No human or maintainer approval is claimed. ### Checklist - [x] One coherent fix and its tests - [x] Conventional Commit subject - [x] Real page regressions with `Test` names - [x] New UI text: N/A, existing failure message reused - [ ] Java architecture/integration checks: not run, no backend change - [x] Existing ASF headers retained; no new source file - [x] Documentation: N/A, restores failure feedback on an existing control -- 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]
