chstercc opened a new pull request, #5786: URL: https://github.com/apache/rocketmq-dashboard/pull/5786
<!-- Make sure the base branch is `rocketmq-studio`: that is the RocketMQ Studio trunk. --> ### Which Issue(s) This PR Fixes - Fixes #5780 ### Brief Description Switching AI conversations could leave the previous conversation’s transcript visible when the new timeline failed to load. Load More could also use the previous conversation’s cursor to request the new conversation, mixing their events. Scope transcript rows, bubbles, replay position and pagination to the conversation that loaded them. Block incremental loading until the selected conversation has a successful snapshot, while preserving its existing snapshot during a pending or failed refresh. Add six regression cases covering pending and failed switches, blocked incremental requests, pagination after a successful switch, and snapshot retention after a same-conversation refresh fails. ### How Did You Test This Change? ```bash cd web npm test -- src/pages/ai/hooks/useConversationTimeline.test.ts src/pages/ai/hooks/useActiveRunAttach.test.ts src/pages/ai/hooks/useAgentRun.timeline.test.ts src/pages/ai/hooks/useAgentRun.test.ts src/pages/ai/__tests__/AiPage.test.tsx # Test Files: 5 passed; Tests: 51 passed. npm run lint # Passed: 0 errors, 10 existing warnings in unchanged files. npm run build # TypeScript compilation and Vite production build passed. # The final license:check step failed: # license gate: build artifact verification failed: assets/index-*.js ``` Against unchanged production code at `12b63f34`, four new regression cases fail and two positive cases pass. All six pass with the fix. Prettier checks for both changed files and `git diff --check` also pass. The same license-check failure was reproduced on an untouched archive of upstream `12b63f34`, using Node.js 22.20.0 and the same locked dependencies. The complete build remains failing at that step. Backend tests were not run because only the frontend timeline hook and its tests changed. ### Checklist - [x] One coherent change; unrelated modifications are not bundled in - [x] Commit subject follows Conventional Commits (`feat:` / `fix:` / `refactor:` / `chore:` / `docs:` / `perf:`) - [x] Tests added or updated for non-trivial changes, test methods named `...Test` - [ ] New UI text has both Chinese and English entries under `web/src/i18n/` — N/A: no new UI text - [ ] Architecture constraints stay green (`mvn test` runs the ArchUnit checks) — not run: frontend-only change - [ ] New source files carry the ASF license header — N/A: no new source files; existing headers retained - [ ] Documentation touched where behaviour changed (README / `docs/` / in-app help) — ownership behavior documented in the hook; no user documentation changed -- 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]
