unbridled-41 commented on PR #5070:
URL: 
https://github.com/apache/rocketmq-dashboard/pull/5070#issuecomment-5813353877

   ### Verification pass (evidence audit, 2026-09-24) — one gap found, one 
commit added
   
   Fresh checkout of this branch (`/tmp/aud-b`, detached at the tip); every 
`file:line` re-read against base `a562601d` and the branch; every command 
re-executed; pre-fix claims reproduced by writing the base content of the 
production file back (`git show <rev>:<path> > <path>`, which does not touch 
the index) and keeping the tests.
   
   **Citations — all hold at base**: `:170` the selection state, `:224` the 
failed-delete pruning, `:411` `onSearch`, `:416` `Segmented.onChange`, `:427` 
the toolbar button's `selectedRowKeys.length > 0`, `:434` 
`remove(selectedRowKeys.map(Number))`, `:483` `rowSelection`, `:491` `onChange: 
list.setPage`, and `:424-426` the comment the code contradicted.
   
   **Pre-fix reproduction** (base production file + the three tests): `3 failed 
| 19 passed (22)`, the page-change failure rendering the stray button, exactly 
as quoted in the description.
   
   **Gap found by this pass — the fourth path.** The description claimed the 
selection "survived a change of query identity" and fixed the three setters, 
but archiving (or unarchiving) also removes the ticked row from the scope the 
modal is showing, and that path kept the tick: tick a row, archive it, and the 
toolbar still offers `删除 (1)` for a row that is no longer in the table. Same 
defect, same invariant as the three fixed handlers, and the codebase's own 
comment ("the checkbox column antd selects the current page only") covers it. A 
probe test written against `ba0e28c7` (the branch with only the three setters 
cleared) failed exactly like the others:
   
   ```
   $ cd web && npx vitest run 
src/pages/ai/components/__tests__/ConversationListModal.test.tsx \
         -t dropsTheSelectionWhenARowIsArchivedOutOfTheListTest
   FAIL  … > dropsTheSelectionWhenARowIsArchivedOutOfTheListTest
   Error: expect(element).not.toBeInTheDocument()
   expected document not to contain element, found <button
     class="ant-btn … ant-btn-dangerous …" 
data-testid="ai-conversation-selected-delete" …
     ><span>删除 (1)</span>
   ```
   
   **Action taken**: commit `8e6657d8` drops just the archived row's key on a 
successful archive (`setSelectedRowKeys(keys => keys.filter(key => Number(key) 
!== id))`) — the other ticks still refer to rows on screen, so they stay — and 
adds `dropsTheSelectionWhenARowIsArchivedOutOfTheListTest`. The description now 
lists the four paths, carries both pre-fix runs, and reports 23 tests.
   
   **Post-fix**: `Tests 23 passed (23)`, `tsc --noEmit` exit 0, eslint exit 0. 
Four tests, one per path, each asserting both that the toolbar button is gone 
and that the new page's checkbox is unticked.
   
   **Commit hygiene**: `git show --stat ba0e28c7` (production file + tests) and 
`git show --stat 8e6657d8` (production file + the one new test) — nothing else 
in either.
   


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