Repository navigation
feat(ui): confirm before archiving or deleting conversations with automations - #184818
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR warns users before archiving or deleting conversations with enabled automations. Example: Archive “Nightly owner,” which has the enabled “Nightly digest” automation.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review The earlier selected-delete finding is fixed, and no actionable defects remain in this PR; pending CI still needs to complete. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherControl UI session actions consume Gateway session metadata, optionally read bound automation names through cron.list, and present confirmation before existing archive or delete operations. flowchart TD
A[Sidebar and chat header] --> C[Session action owners]
B[Sessions page] --> C
C --> D[Shared automation notice]
D --> E[Scoped cron list read]
D --> F[Existing confirmation dialog]
F --> G[Existing session mutation]
Technical reviewBest possible solution: Keep the shared automation warning integrated with existing confirmations and leave native resume to its separate follow-up. Do we have a high-confidence way to reproduce the issue? Current-main source establishes the missing idle-archive warning, supported by the supplied before screenshot; no target code was executed during this review. Is this the best way to solve the issue? The change uses existing session metadata, scoped cron reads, and confirmation owners, covering the affected callers without adding persistent state or changing pause behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against cfb41dddac89. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +323, Tests +286, Docs +2. Total +611 across 14 files. Added test files: 1. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 26, 2026, 3:12 PM ET / 19:12 UTC (Revision 2). |
|
Addressed the P2 "Read current automation metadata for selected delete targets" in e9ddedf.
Evidence: |
|
@clawsweeper review Head 030fc1e: removed the CLI re-enable copy, fixed the P2 (selected deletes now read the current automation flag for the captured session incarnation, with a regression test), and fixed test typings that failed check-test-types. |
|
🦞👀 Re-review progress:
|
…omations (openclaw#184818) * feat(ui): confirm before archiving or deleting conversations with automations * fix(ui): drop CLI re-enable hint from archive automation warning * fix(ui): read current automation flag for selected session deletes * test(ui): fix archive automation test typings
What Problem This Solves
Archiving or deleting a conversation pauses the automations bound to it, but the Control UI archives with no warning, so users find out only when a scheduled job stops running.
User Impact
User impact: before archiving or deleting a conversation that has an enabled bound automation, the Control UI shows a confirmation that names those automations and says they will pause. Users choose Cancel or Archive anyway / Delete anyway. Conversations without automations keep the current flow: archive with Undo and no dialog, and the existing delete confirmation.
Pause behavior does not change.
Why This Change Was Made
Session rows already carry
hasAutomation, the flag behind the sidebar clock badge. When a target row has it set, the UI names the jobs with the existing session-filteredcron.listread (sessionKey+sessionAgentId,enabled: "enabled", compact). There is no new Gateway method. If that read fails or isn't permitted, the dialog still warns, just without names.The warning is merged into any confirmation that would already appear: the active-work confirm, the nested-tree choice (which keeps Archive all and Archive only this session), the offline nested-archive confirm, and every delete confirm. It is never skippable, so it still shows if the user turned off delete confirmations. When no target has an automation, the existing dialogs open at the same point in the flow as before.
Visibility: each warning logs
[session-automation-confirm] <archive|delete> shownto the browser console, thenconfirmedorcancelled. The log includes the automation count, never names. The Gateway already logs the jobs it disables on archive.Covered entry points: sidebar and chat-header single archive, sidebar batch archive, nested-tree archive, Sessions page archive, sidebar and chat-header delete, sidebar batch delete, and Sessions page single and selected delete.
Accepted edge cases
Evidence
Before (main): archiving a conversation with an automation gives no warning, only the Undo toast.
After, sidebar archive:
After, Sessions page archive:
pnpm tsgo:ui: cleanoxlinton the changed files: 0 warnings, 0 errors.run-format --check: clean.pnpm ui:i18n:verify: clean.vitest --config ui/vitest.config.ts ui/src/components/session-organizer ui/src/pages/sessions ui/src/pages/chat/chat-pane-session: 27 files, 404 tests passed. New unit tests cover: named warning with cancel and confirm (and their log lines), no dialog and nocron.listwithout automations, warning when the read fails, the nested-tree choice, and the delete warning shown even after opting out of delete confirmations.pnpm test:ui:e2eon the newsession-management.archive-automationsuite plus the existing archive, delete, nested-archive, archive-batch and bulk-delete-scope suites: 6 files, 25 tests passed. The new suite exercises Cancel → no patch, then Archive anyway →sessions.patch {archived: true}, from the sidebar and from the Sessions page. A third test checks that a conversation without automations archives with no dialog and nocron.listread.Autoreview (Claude engine, branch vs
origin/main, P2): scoped-clean, no actionable findings.