Kris20030907 opened a new pull request, #7364:
URL: https://github.com/apache/rocketmq-dashboard/pull/7364
## What
Deleting a Lite parent topic cascades on the broker: every child Lite
session under
the parent disappears with it, while the consumer groups bound to the parent
survive.
Neither delete path in the console said so. This change adds a Lite-aware
delete
confirmation to both paths and a delete action on the LiteTopic page.
Closes #6643
## Changes
- `LiteTopic.tsx`: per-row delete action with a blast-radius modal — shows
the parent's
child session count and bound consumer-group count up front, states that
bound groups
are not deleted, and asks for the owning instance (auto-selected when only
one runtime
instance is available) before confirming.
- `instance/topic.tsx`: single-topic delete confirm now detects a Lite
parent via
`queryLiteTopicList` (lookup failure never blocks the delete) and shows
the cascade
warning with real counts; the batch delete confirm warns when the
selection contains
Lite parents.
- `LiteTopic.tsx` table layout: the wider action column pushed the page into
a
horizontal scroll. Columns now carry explicit widths and the table uses the
repo-wide `scroll={{ x: tableScrollX(columns) }}` pattern.
- `translations.ts`: zh/en strings for the cascade warnings and the delete
modal.
- Tests: red-first coverage for the Lite delete confirmations on both pages;
the
LiteTopic sorter tests query headers by `columnheader` role because
`scroll.x`
makes antd render an aria-hidden measure row that clones the header cells.
## Testing
- web unit suites for the touched pages pass (vitest, limited workers).
- E2E against a real RocketMQ 5.5 two-broker cluster (LMQ + multi-dispatch
enabled),
parent `lite-slice2` with 2 child sessions and 1 bound group `lite-g1`.
**01. Topic page single delete confirm** — real counts 「子 Lite 会话 2 个,绑定消费组
1 个」and the note 「绑定消费组不会被删除。」
<img width="2478" height="1287" alt="01-topic-page-lite-delete-confirm"
src="https://github.com/user-attachments/assets/f973673f-944d-44dc-971e-a97e46fe6106"
/>
**02. Topic page batch delete warning** — the selection contains 1 Lite
parent.
<img width="2478" height="1287" alt="02-topic-page-batch-delete-warning"
src="https://github.com/user-attachments/assets/d1b2440c-c634-4625-a1c1-bca84031099e"
/>
**03. LiteTopic list before delete** — children 2 / bound groups 1.
<img width="2478" height="1287" alt="03-litetopic-page-list-with-counts"
src="https://github.com/user-attachments/assets/3598d22d-af3d-4253-a73c-0c9e13e20301"
/>
**04. LiteTopic delete modal** — blast radius plus the owning instance
auto-selected.
<img width="2478" height="1287" alt="04-litetopic-delete-modal-blast-radius"
src="https://github.com/user-attachments/assets/788cb06c-5257-4ab6-85ef-782cc991ae7c"
/>
**05. After delete** — Topic 数 2→0 (children cascaded), 消费者 stays 1 (bound
group retained).
<img width="2478" height="1287"
alt="05-after-delete-children-cleared-group-retained"
src="https://github.com/user-attachments/assets/71382cb8-8198-4dfa-9657-07b9bbfc7bb8"
/>
--
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]