tju-yxq opened a new issue, #5539:
URL: https://github.com/apache/rocketmq-dashboard/issues/5539

   ## Problem
   
   Two tables mix selection semantics that contradict each other, so the 
selection count can include rows the operator cannot see:
   
   1. **DLQ groups table** (`instance/dlq.tsx`): `rowSelection` sets 
`preserveSelectedRowKeys: true`, which advertises cross-page selection. But the 
rest of the code makes cross-page selection impossible by design: every page 
change clears the selection (`setSelectedGroupNames([])` in the pagination 
`onChange`), and every successful load prunes the selection to the groups on 
the newly loaded page. The preserve flag is dead weight that misleads future 
readers into believing selection spans pages.
   
   2. **AI conversation history table** 
(`ai/components/ConversationListModal.tsx`): the opposite problem. The 
selection state (`selectedRowKeys`) is never cleared on page change, and antd 
does not prune controlled keys when the data changes — so after paging, `删除 
({count})` counts (and deletes) rows from a page the user can no longer see, 
while the on-screen checkboxes all appear unchecked. The batch confirm then 
says "delete the {count} selected conversations" for rows that are not visibly 
selected.
   
   ## Expected behavior
   
   Both tables follow the per-page selection convention the topic and consumer 
group tables already implement (clear the selection on page change):
   
   - The DLQ table drops the dead `preserveSelectedRowKeys` flag; its behavior 
is unchanged (per-page selection, pruned on load).
   - The AI history table clears `selectedRowKeys` when the page changes, so 
the batch-delete count always matches the visible checked rows.
   


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