messere1 opened a new pull request, #6145: URL: https://github.com/apache/rocketmq-dashboard/pull/6145
### What problem does this PR solve? The Producer connection page invalidates an in-flight query when the instance or the topic changes, but editing the producer-group filter mid-query does nothing: - While a query is pending, typing, picking, or clearing the optional group leaves the request running under the old criteria; its response then publishes connections, the readiness summary and the loading state underneath the newly displayed form. - After a query completes, the rows and summary of the old group stay on screen while the form already shows different criteria. The topic control clears them on every change; the group control does not. `resetConnectionQuery` is documented in the page as "shared by every scope change (instance / topic)" — the producer-group scope is missing from that list. Original report: #1589 (issue closed as not planned by the stale sweep, not invalidated as fixed; its expected behavior explicitly includes "Any user change to Topic **or Producer Group** invalidates an in-flight query" — only the Topic half of that is implemented on the current branch). ### What is changed and how it works? The group `AutoComplete` now calls `resetConnectionQuery()` from `onChange`, the same hook the instance and topic controls already use, so every user-driven group edit (typing, selecting, clearing): - advances the request generation, so an obsolete completion can no longer publish connections, notifications, or loading state; - drops the rows, summary and failure tags that belong to the old criteria; - releases the in-flight slot, so a fresh query can start immediately. ### How Did You Test This Change? - [x] `npx vitest run src/pages/studio/__tests__/Producer.test.tsx` — 18/18 pass (16 pre-existing + 2 new). - [x] Red-green: both new tests fail on the unpatched tip — `clears stale connection results when the producer group changes` still finds the old rows and the `生产者连接健康` summary after the edit, and `discards a slow connection response after the producer group changes` renders the obsolete completion after the group changed mid-flight. - [x] `npx eslint src/pages/studio/Producer.tsx src/pages/studio/__tests__/Producer.test.tsx` — clean. - [x] `npx prettier --check` on the committed content — clean. -- 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]
