fix(ui): clean up delete confirm popover listener (#76318)

Summary:
- The PR centralizes Control UI chat delete-confirm popover dismissal, adds listener-cleanup regression coverage and unit-UI test routing fixes, and records the fix in the changelog.
- Reproducibility: yes. Current-main source shows a high-confidence path: open the delete confirm, let `reques ... ncel, Delete, or same-button toggle; those paths remove the popover without removing the document listener.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(ui): clean up delete confirm popover listener
- PR branch already contained follow-up commit before automerge: fix(clawsweeper): address review for automerge-openclaw-openclaw-7559…
- PR branch already contained follow-up commit before automerge: fix(clawsweeper): reconcile automerge-openclaw-openclaw-75590 with ma…
- PR branch already contained follow-up commit before automerge: fix(ui): repair delete confirm listener cleanup checks

Validation:
- ClawSweeper review passed for head 62240d8153.
- Required merge gates passed before the squash merge.

Prepared head SHA: 62240d8153
Review: https://github.com/openclaw/openclaw/pull/76318#issuecomment-4364990281

Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: Ricardo-M-L <69202550+Ricardo-M-L@users.noreply.github.com>
This commit is contained in:
clawsweeper[bot]
2026-05-03 02:21:10 +00:00
committed by GitHub
parent f74983e442
commit cb31616d88
9 changed files with 276 additions and 15 deletions

View File

@@ -634,6 +634,23 @@ function isVitestConfigTargetForKind(kind, targetArg, cwd) {
return resolveVitestConfigTargetKind(toRepoRelativeTarget(targetArg, cwd)) === kind;
}
function isUnitUiTestTarget(relative) {
if (!relative.endsWith(".test.ts")) {
return false;
}
return (
relative === "ui/src/ui/app-chat.test.ts" ||
relative.startsWith("ui/src/ui/chat/") ||
relative === "ui/src/ui/views/agents-utils.test.ts" ||
relative === "ui/src/ui/views/channels.test.ts" ||
relative === "ui/src/ui/views/chat.test.ts" ||
relative === "ui/src/ui/views/dreaming.test.ts" ||
relative === "ui/src/ui/views/usage-render-details.test.ts" ||
relative === "ui/src/ui/controllers/agents.test.ts" ||
relative === "ui/src/ui/controllers/chat.test.ts"
);
}
function resolveChannelContractTargetKind(relative) {
if (!relative.startsWith("src/channels/plugins/contracts/")) {
return null;
@@ -1037,6 +1054,9 @@ function classifyTarget(arg, cwd) {
return "plugin";
}
if (relative.startsWith("ui/src/")) {
if (isUnitUiTestTarget(relative)) {
return "unitUi";
}
return "ui";
}
if (relative.startsWith("src/utils/")) {