PR 342: delete confirmations in Liz

torchiaf's PR, review requested from you. Two passes at 6294b1a: Cody's process and ours (a fresh agent), then merged and re-checked. Nothing was posted to GitHub.

Preview: rancheraipr342r, built from 6294b1a, backend mf-rancher-16 (v2.16 head). Baseline: rancher-ai-main at 28ae86d (rebuilt 10:19 UTC today), backend mf. Neither backend has the MCP delete tools, so the chat was driven by a stubbed WebSocket whose frames copy agent main + rancher-ai-mcp main. It proves the UI, not a real agent run. The live previews will only show the generic "Calling tool" card (mf-rancher-16) or nothing.

Where it stands: the UI works, the new e2e can't pass yet

The fix does what the issue asks. On main a delete confirmation has no buttons and the chat is stuck. With the PR it says what will be deleted and offers Cancel / Delete, and both answer the agent.

  1. The new e2e fails 3/3 and would fail on main after a merge: no rancher-ai-mcp release has the delete tools yet (blocker, both passes)
  2. Delete turns green on keyboard focus (look-only, both passes: your call)
  3. The MCP plan's detail caution about bound users isn't shown (question, both passes)
  4. The delete e2e doesn't check the reply (optional nit, Pass B)

Suggested verdict: Comment, holding the approval until the e2e can pass. oboc-sts approved bf73ad1, before the last force-push.

How the two passes compare

#FindingPass A (Cody)Pass B (ours)Lands as
1New delete e2e can't pass (MCP tools unreleased)Acceptance verify (AC6), filedBlocker, test + readingInline, blocker
2Delete loses its red on keyboard focusSide-effects + a11y, filedSuggestion 1, liveInline, if you OK the look comment
3detail caution droppedBase review, filedSuggestion 2, test (stub) + readingInline, as a question
4Delete e2e doesn't check the replyNo (no-nit rule)Nit 2Inline, optional
–Double <br> in the delete stringNoNit 1Dropped: spacing matches update/external
–Dark contrast 3.42:1A11y pass, then removed by the pre-existing passFYINot posted (shell token)
–DeleteChatCard green DeleteNoFYINot posted (main)
–No View YAML on delete cardsPre-existing pass removed itFYINot posted (agent side)
Pass A (Cody, ai-skills c04c11a, in this session)Pass B (ours, fresh agent)
OutputBefore/after videos, acceptance table (6 criteria), 7 passes, 3 comments after the rewrite phases, pre-existing recordreview.md, 7-row coverage grid, 12 live cases, draft with 5 inlines
Found only hereNothing beyond BNit 2 (reply not checked), DeleteChatCard FYI, Harvester's deleteVirtualMachinePlan returns type: delete
Missed / wrongNit 2 (by design, no nits)Nit 1 doesn't hold
CostIn this session, not metered on its own; about 75 min with the setup both passes used235k tokens, 96 tool calls, 22 min (fresh agent)

Before and after (Pass A demos)

Before this change (main 28ae86d): no buttons, stuck in "Awaiting confirmation"
With this change (6294b1a): Cancel / Delete, then Confirmed
Same delete confirmation: main (left), PR (right)
Same delete confirmation: main (left), PR (right)

Findings

1

The new delete e2e can't pass: no MCP release has the delete tools

Blocker
Pass A (Cody)Pass B (ours)

"Confirm single-resource delete action" failed all 3 attempts in run 42832546002 ("Expected to find content: 'I will delete the GlobalRole my-role in the local cluster.'"). The spec has llm-mock make the real agent call deleteGlobalRole, so it needs two backend pieces:

CI clones the agent repo and installs whatever its chart pins. When the PR ran (11-10) that was agent alpha.6 + MCP alpha.4, neither with delete. Today it's agent alpha.7 + MCP alpha.5: the agent now interrupts, but finds no deleteGlobalRolePlan, so it falls back to the generic "Calling tool" card with a Confirm button and the spec still fails. After a merge, main's e2e would fail the same way until an MCP release with ccad0ae is pinned.

The earlier pushes (bf73ad1, 011d2f1) were green because they had no delete e2e; it arrived with the 6294b1a force-push. Evidence: CI log (images printed in the job), agent and MCP git history and tags.

What I'd post (inline, message.spec.ts:345)

This spec fails on all 3 attempts in CI. It has the real agent call deleteGlobalRole, but no rancher-ai-mcp release has the delete tools yet (they landed on main in ccad0ae, after v1.2.0-alpha.5), and CI installs the MCP image the agent chart pins. So the delete confirmation never arrives, and main's e2e would fail the same way after a merge.

2

Delete loses its red on keyboard focus

pkg/rancher-ai-ui/components/message/Confirmation.vue:245-254 (and the variant="tertiary" at :158-161)
Suggestion look-only
Pass A (Cody)Pass B (ours)

Tab to Delete and it turns into the tertiary focus look: rgb(217,233,224) background with green text in light, rgb(42,79,60) / rgb(114,238,179) in dark. That is exactly a focused Confirm, so the destructive cue is gone right when Enter would delete. The PR's .confirmation-buttons .delete-action sets idle and :hover only, and RcButton's .variant-tertiary:focus rule is more specific. The shell's destructive button (btn bg-error, what PromptRemove and the other delete dialogs render) keeps its red on focus in the same build. Mouse users don't see it: a click sends the answer and the buttons go away.

PR, light: idle, then keyboard focus
PR, light: idle, then keyboard focus
PR, dark: idle, then keyboard focus
PR, dark: idle, then keyboard focus
Shell <code>btn bg-error</code> with keyboard focus, light and dark: stays red
Shell btn bg-error with keyboard focus, light and dark: stays red

Look-only: torchiaf is UI team and oboc-sts (designer) approved bf73ad1, before the last force-push. Your call whether to post it or hand it to oboc-sts.

What I'd post (inline, Confirmation.vue:245)

With keyboard focus, Delete switches to the tertiary focus colors (pale green in light, dark green in dark), so it looks like a normal Confirm right when Enter would delete. This override covers idle and hover only, and RcButton's tertiary :focus rule wins. The shell's delete buttons (btn bg-error, as in PromptRemove) stay red on focus.

[PR idle | PR focused] [shell delete button focused]

3
Question
Pass A (Cody)Pass B (ours)

rancher-ai-mcp's PlanResource has a detail field, documented as "shown to the user with the confirmation of the operation, e.g. to warn about the effects of the operation on other resources". deleteGlobalRolePlan fills it with "There is/are N users and M groups bound to the role(s) about to be deleted.", because Rancher deletes the role's GlobalRoleBindings with it. The agent passes the plan to the UI unchanged and formatConfirmationActions keeps it, but the card is built from kind, name, namespace and cluster only. Checked with a frame carrying detail: the DOM text has no trace of it.

The field landed in the MCP on 11-12, two days after this push, so it may be meant for a follow-up. That's why it's a question.

What I'd post (inline, Confirmation.vue:82)

The MCP delete plan also sends a detail text for this confirmation. For a GlobalRole it says how many users and groups are bound to it, since Rancher removes those bindings with the role. The card only shows kind, name, namespace and cluster, so the user confirms without seeing that others lose access. Is that planned for a follow-up? (detail reached rancher-ai-mcp after your last push.)

4

The delete e2e never checks the reply it queued

Nit (optional)
Pass B (ours)

The spec queues "GlobalRole my-role deleted." but stops at isConfirmed(), while the create spec right above checks "Pod created successfully.". Cody's process files no nits, so only Pass B has it.

What I'd post (inline, message.spec.ts:369)

nit: this stops at Confirmed and never checks the reply it queued, while the create test checks its result message.

Dropped and FYI

–

The delete string ends with <br> and the component adds one

Dropped
Pass B (ours)

True in the markup, but the rendered result is .<br> <br>Are you sure…, the same two breaks update (. <br><br>) and external (<br><br>) get. Without it, delete would be the only card with no blank line before the question. No visible problem, so not posted.

–

Dark theme: Delete text is 3.42:1

shell theme token --error-text: #FFAC99 (dark)
FYI, not this PR
Pass A (Cody)Pass B (ours)

#FFAC99 on #B13333 is 3.42:1, under the 4.5:1 for 14px text (WCAG 1.4.3). The shell's own btn bg-error measures exactly the same in the same build, so it's the shell's dark token, not this PR. Light is 6.19:1, hover 8.76:1.

PR, dark, idle
PR, dark, idle
–

The repo's own "Delete chat" button is green, not red

FYI, not this PR
Pass B (ours)

DeleteChatCard puts class="btn bg-error" on an RcButton, and the default primary variant wins, so its Delete renders primary green (rgb(0,134,87)). Same on main. Worth knowing if the designer looks at destructive buttons in Liz.

–

Delete cards have no "View YAML"

rancher-ai-agent human_validation.py _build_interrupt_ui_tools
FYI, agent side
Pass A (Cody)Pass B (ours)

For anything that isn't create, the agent sends show-yaml-diff with only kind/name/namespace. ShowYamlDiff hides itself without original/patched, so a delete card has no YAML button even though the plan carries the full object. Agent behavior, and the empty tools block is the same on main.

–

hooks.spec "Easter egg" also failed 3/3

cypress/e2e/tests/features/hooks.spec.ts
FYI, CI
Pass A (Cody)Pass B (ours)

"Hooks › Sliding badge hook › Easter egg › It should show all sliding badges in a page" failed all attempts here, and the same way on feature-token-consumption (run 43454747041). Main passes it. Unrelated to this PR, so not raised.

Pass A: acceptance criteria (issue 341 + harvester 12127)

CriterionAsked inVerdictHow
AC1A delete confirmation has buttons to confirm or cancel341 body; harvester 12127 "no confirm/cancel buttons for confirmations of type delete"Metlive, PR vs main
AC2Confirm resumes the agent, Cancel declines; the chat leaves "Awaiting confirmation"12127 "stays in Awaiting confirmation with the input disabled"Metlive: yes / no sent with the confirmation tag, status + reply shown, input unlocked
AC3The card says what will be deleted (kind, name, namespace when namespaced, cluster)impliedMetlive: GlobalRole and a Pod in default
AC4Create, update and external confirmations unchangedimpliedMetlive: Confirm label, same colors as main
AC5Light and darkimpliedMet (FYI)dark 3.42:1 is the shell token
AC6Works end to end with the real agent + MCP delete toolsthe PR's own e2eCould not checkno MCP release has the tools; CI e2e red

Out of scope: re-enabling deleteVirtualMachine in the Harvester MCP server (12127's own ask, other repo; Pass B read that its plan returns type: delete, so it will go through this card). Passes: simplify, component reuse and design fidelity had nothing in scope (no new component, no design linked). Side effects: the removed wrapper classes have no other users, test ids unchanged, en-us is the only locale.

Pass B: coverage

DimensionResult
BehaviorWorks as asked; detail dropped (#3)
SecurityNo new HTML sink; same v-clean-html path as the create text
i18nAll new text in en-us.yaml; CI i18n green
Styling / UI consistencyIdle and hover match the shell's destructive button; focus doesn't (#2)
AccessibilityNames OK, focus ring visible, Tab order Cancel → Delete, Enter works, focus returns to the input; dark 3.42:1 is the shell token
Tests and CIUnit 48/48 at the head; e2e blocker (#1); hooks flaky elsewhere; reply not asserted (#4)
Code hygieneOld wrappers and CSS removed cleanly; value passed to the delete string unused (harmless, shared case)

What was checked

BuildCase (stubbed socket)ThemeResult
PRDelete GlobalRole (cluster-scoped) with the agent's show-yaml-diff tool and detaillightText right; red Delete 6.19:1, hover 8.76:1; Enter sends yes, "Confirmed", reply shown; focus turns green; detail not shownshot
PRSame, then CancellightSends no, "Canceled", reply shown, input unlockedshot
PRSamedarkIdle 3.42:1 (shell token), hover 8.76:1, focus turns dark greenshot
PRDelete Pod in defaultlight"…the Pod my-pod in the default namespace of the local cluster."shot
PRCreate Pod with show-yamllightUnchanged: Confirm (tertiary), View YAML shownshot
PRUpdate (patch replace)lightUnchanged, Confirmshot
PRExternal tool deleteGlobalRole (custom agent, no plan)lightConfirm, not red (no type: delete), as on mainshot
PRCreate + delete in one confirmationlightBoth lines; one red Delete for the bundle, as the code comment saysshot
mainDelete GlobalRolelightQuestion only, no buttons, input disabled
PR buildShell btn bg-error injected on the pagelight + dark6.19:1 / 3.42:1; stays red on focusshot

Not checked: a real agent conversation with the delete tools (no backend has them; the shared mf-rancher-16 was in use by the PR 319 review, so I changed nothing there); the 250px panel width; reloading a delete confirmation from chat history; screen reader; Firefox/Safari.

What I'd post

Body

Thanks, this fixes the stuck delete confirmation: the card says what will be deleted, and Cancel and Delete both answer the agent. I checked it in light and dark with the chat socket stubbed, since no MCP release has the delete tools yet. A few points inline.

Optional for the body, Cody's shape: "Before this change:" + issue-demo, "With this change:" + change-demo (URL band cropped before upload). Inlines are on the cards above: #1 message.spec.ts:345, #2 Confirmation.vue:245 (if you OK the look comment), #3 Confirmation.vue:82, #4 message.spec.ts:369 (optional). No code, no preview link.

Left running

Preview rancher-ai-pr342 (cleanup: bash preview/cleanup-branch.sh rancher-ai pr342). Nothing changed on mf-rancher-16 or mf. Pass B's quoting slip left three admin login tokens on mf (from API logins on the main preview); they expire on their own.