89799969 opened a new pull request, #4323:
URL: https://github.com/apache/rocketmq-dashboard/pull/4323

   Fixes #4168
   
   ## Problem
   
   On the Producer page, switching the selected topic only resets 
producer-group suggestions (`handleTopicChange`), while the connection table 
and readiness banner keep showing the previous topic's results.
   
   `handleInstanceChange` already clears `connectionList`/`connectionSummary` 
for instance switches; the topic dimension was missed. Exporting from that 
state relabels topic A's client connections as the newly selected topic B.
   
   ## Fix
   
   On topic change:
   
   - invalidate any in-flight connection query (`queryRequestIdRef` / 
`queryInFlightRef`)
   - clear `connectionList`, `connectionSummary`, and loading state
   
   This matches the instance-switch path.
   
   ## Testing
   
   - `Producer.test.tsx` (14 tests, including the new `clears stale connection 
results when the topic changes`)
   
   ```
   Test Files  1 passed (1)
        Tests  14 passed (14)
   ```
   
   Local run: Node 20, `npm test -- --run 
src/pages/studio/__tests__/Producer.test.tsx`
   


-- 
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]

Reply via email to