unbridled-41 opened a new issue, #4244:
URL: https://github.com/apache/rocketmq-dashboard/issues/4244
## Problem
Creating a consumer group (single create or CSV import) updates the group
list only locally: the created group is prepended to the currently loaded rows
without refetching the server-paginated list and without updating the
pagination total. The list the operator sees afterwards diverges from the
server's paginated inventory until a manual refresh.
## Evidence
- `web/src/pages/instance/consumer.tsx` create flow (`onOk` of the create
confirmation): after `createConsumerGroup(...)` succeeds it does
`setGroups((prev) => [created, ...prev.filter(...)])`.
- Same file, CSV import flow: `if (createdGroups.length > 0) {
setGroups((previous) => [...createdGroups, ...previous.filter(...)]); }`.
- The list is server-paginated: `loadConsumerGroupPage(page, pageSize)`
fetches `listConsumerGroupPage({ page, pageSize })` and sets both `groups` and
`totalGroups`. The local prepend updates neither the total nor the server
ordering, and `autoRefresh` defaults to `false`, so nothing self-heals.
- The same file refetches the page after single and batch delete
(`reloadConsumerGroupPageAfterDelete`) — the create/import paths are the only
list mutations that skip the reload.
Consequences with the default settings: the pagination footer keeps showing
the pre-create total; on a full page the prepended row pushes the page's last
row out of view; and if the user is on page > 1 the new group is injected into
that page even though the server's ordering places it elsewhere. The identical
defect was already fixed for the topic inventory (merged PR #3339, "refresh
paginated inventory after create") and for the ACL user inventory (#3306).
## Impact
After a successful create, the consumer group inventory shows rows and a
total that do not match the server's paged inventory. An operator who creates a
group and then looks for it — or trusts the total — gets wrong answers until
they manually refresh.
## Expected behavior
After a successful create or import, the current page is refetched from the
server (mirroring the delete paths and the topic page's post-create behavior),
so rows and the pagination total reflect the server inventory.
## Related work
- #3337 (closed) tracked the same defect class for the topic page and was
fixed by merged PR #3339.
- #3306 tracks the same class for the ACL user inventory.
## PR
Fix incoming.
--
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]