iloveeyjafjalla opened a new pull request, #6295: URL: https://github.com/apache/rocketmq-dashboard/pull/6295
### Which Issue(s) This PR Fixes The accompanying bug report will be linked immediately after PR creation. ### Brief Description Start archiving a conversation, switch history from Active to Archived while the update is pending, then let the archive finish. Its old `reload` callback starts a new Active query and overwrites the Archived list: an active row appears under the archived selector with an unarchive action. Make `reload` a stable query invalidation callback. The existing effect then loads the current page/search/archive scope rather than the `load` closure captured before the mutation. Keep the request-generation guard for superseded reads. A retained callback after unmount also stops starting new list requests. This changes the shared reload path; the separate deletion branch that explicitly moves to a captured previous page is outside this fix. ### How Did You Test This Change? Baseline `rocketmq-studio@5e4c39b053c35a5598cc79ff331b8a54e649d7b1`; final commit `0c662cd9a2582db817cee0fd1a8fc65ee74e9599`. Windows 11, Node 24.15.0, npm 11.12.1; isolated LF worktree sharing existing npm-ci dependencies by junction. - Old production: the actual history modal archives a row, switches scope while the update is pending and first displays the correct archived row. Completing the update then loses that row; a retained hook callback also requests old criteria, and a retained unmounted callback starts an extra read. Three regressions fail; two delayed-read compatibility controls pass. The coherent list responses follow the query actually supplied, rather than returning the same rows for both scopes. - `npm test -- --maxWorkers=1 src/pages/ai/components/__tests__/ConversationListModal.test.tsx src/pages/ai/hooks/useConversationList.test.ts src/api/aiConversations.test.ts`: three files, 47/47 pass, including all five new cases. These cover real archive/scope interaction, retained callback after page/search/archive changes, late old success/failure and unmount. The final subsequent edit is test-only Prettier line wrapping, with no semantic change. - `npm run lint`: exit 0, zero errors, ten warnings in untouched files. Final changed-file Prettier and `git diff --check` pass. - `npm run build`: exit 0, including the license gate (133 components / 140 legal files). The full frontend suite and Java/Go checks were not run for this change; no remote CI pass is claimed. Component/API boundaries use controlled ordinary responses, not a real database, model invocation, broker or deployment. AI assistance: OpenAI Codex investigated, implemented and tested the fix. Separate automated agents reviewed the actual diff, production call chain, meaningful red/green tests and all related public head differences/comments. No human or maintainer approval is claimed. ### Checklist - [x] One coherent fix and regression/compatibility tests - [x] Conventional Commit subject and new `Test` names - [x] Existing ASF headers retained; no new source files - [x] New UI wording / documentation: N/A - [ ] Java architecture/integration checks: not run, no backend change -- 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]
