PR 342, round 2: delete confirmations in Liz

torchiaf pushed 414ca95 "Show details warning in Confirmation messages" on 11-18, then rebased to 471902a (identical patches). Round 1 was never submitted, so he hasn't seen any of it. Two passes again: Cody's new-commits process and ours (a fresh agent), merged and re-checked. The pending review was replaced; nothing was submitted.

Preview: rancheraipr342r, built from 414ca95 (the reviewed files are byte-identical at 471902a), backend mf 13.48. mf-rancher-16, the usual backend, was stopped by a user on 11-17 18:35 and I left it stopped. The chat was driven by a stubbed WebSocket (frames shaped like agent main + MCP alpha.6), and mf's agent is faked as active in the browser. Real-backend evidence comes from CI.

Where it stands: the delete flow works, but the new layout breaks an e2e

The MCP release fixed round 1's blocker, and the warning banner fixed round 1's question. The delete e2e now passes against the real agent + MCP. But moving "Are you sure…" into its own block makes an unchanged multi-agent e2e fail 3/3.

  1. The question block breaks the multi-agent message e2e (blocker, Pass B, verified)
  2. Delete still turns green on keyboard focus (look-only, kept)
  3. The delete e2e still doesn't check the reply (optional nit, kept)

Suggested verdict: Request changes for #1. Both passes agree now that the CI evidence is in. The e2e on the head (471902a) never ran: the agent Deployment didn't come up in "Deploy Rancher AI charts". Main got past that step with the same script, so it looks like a flake; the evidence above is from the earlier runs of the same code.

Round-1 points

#Round-1 pointStateProofPending review
1Blocker: delete e2e needs unreleased MCP toolsResolved by the MCP releaseDelete test passed on attempt 1 in 44332198607Removed
2Delete green on keyboard focus (look-only)Not addressedRe-measured, light + darkKept (Confirmation.vue:275)
3MCP detail caution not shown (you dropped it)Addressed by 414ca95Banner seen live; e2e asserts it against the real MCP–
4Delete e2e doesn't check the reply (nit)Not addressedStill ends at isConfirmed()Kept (message.spec.ts:377)

How the two passes compare

#FindingPass A (Cody)Pass B (ours)Lands as
1Question block breaks an unchanged e2eMissedFound (CI logs + live repro)Inline, blocker
2Delete green on keyboard focusRe-checked, still thereRe-checked, still thereInline, look-only (kept)
3Delete e2e doesn't check the replyNo (no-nit rule)Still thereInline, optional (kept)
–Non-string detail blanks the cardNoFound (live, stubbed)Not posted (edge case)
–Who sends detail on external?Noted, not filedQuestionNot posted
–HTML in detailLead, then dropped (escaped)Checked, escapedDropped
–Round-1 blocker resolvedPending CI (missed run 44332198607)Resolved, with the runRemoved
Pass APass B
HowCody's my-pr-review-new-commits (ai-skills c04c11a), in this sessionOur checklist, fresh agent (no access to Pass A)
Live cases9 (stubbed socket, light/dark, confirm/cancel)11 (stubbed socket, light/dark, CI viewport, edge cases)
CIHead run only (died in deploy)3 runs of this commit + 8 others today
Unit tests80/8080/80
CostIn-session~247k tokens, 112 tool calls, ~29 min

In the pending review

1

Moving the question into its own block breaks an unchanged e2e

Blocker
Pass B (ours)

"Are you sure…" used to be the tail of the description <span>. 414ca95 renders it as its own div.confirmation-message. Unchanged specs scroll the confirmation's top into view and then containsText('Are you sure…'), which asserts visibility. With a create payload the question now sits wholly below the chat panel, and Cypress reports expected <div.confirmation-message> to be visible … clipped.

Users still see the question: the chat scrolls to the newest message. The damage is CI: the e2e job stays red now that the MCP release is out, and main's multi-agent spec would fail after a merge. Pass A missed it: its CI check looked only at the delete test and waited on the head run, which never got past the deploy.

CI (3360db9), attempt 3: the question is below the chat panel
CI (3360db9), attempt 3: the question is below the chat panel
Preview at 1000x660 after scrolling the message top into view (Pass B)
Preview at 1000x660 after scrolling the message top into view (Pass B)

What I'd post (inline, Confirmation.vue:149, with the CI screenshot)

Moving the question into its own block breaks the multi-agent message e2e: "manual and default agent is selected" failed all 3 attempts in this run, where the delete test passed, and it passes on main. The test scrolls the confirmation's top into view and expects "Are you sure…" to be visible, and with a create payload the question now sits below the chat panel. The create test in message.spec fails its first attempts the same way.

[CI failure screenshot]

2

Delete still loses its red on keyboard focus (round 1, unchanged)

Suggestion look-only
Pass A (Cody)Pass B (ours)

Re-measured on the new build by both passes: focus turns Delete rgb(217,233,224) with green text in light, rgb(42,79,60) / rgb(114,238,179) in dark. CSS unchanged. You kept this one in the round-1 draft, so it is in the new pending review; delete it if you would rather leave it to oboc-sts.

New build, light: idle, then keyboard focus
New build, light: idle, then keyboard focus
New build, dark: idle, then keyboard focus
New build, dark: idle, then keyboard focus

What I'd post (inline, Confirmation.vue:275, same text as round 1, new screenshots)

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 | focused] [shell delete button focused]

3

The delete e2e still never checks the reply it queued (round 1, unchanged)

Nit (optional)
Pass B (ours)

Still ends at isConfirmed(); the create test checks "Pod created successfully.". Kept in the pending review as in round 1.

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

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

Not in the pending review (your call)

–

A detail that isn't a string blanks the whole confirmation

Edge case, not in the pending review
Pass B (ours)

Pass B sent detail: 5: .trim() throws outside the try/catch that confirmationText has, the card renders no text and no buttons, and the chat sits on "Awaiting confirmation" with the input disabled. Only malformed agent output gets there: the MCP's Detail is a Go string, and no agent sends detail on external payloads today. Left out as an edge case; say if you want it.

Stubbed frame with detail: 5 (Pass B)
Stubbed frame with detail: 5 (Pass B)
–

Which agent sends detail on an external confirmation?

Question, not in the pending review
Pass B (ours)

The agent's generic external payload (human_validation.py _should_interrupt) has only type, name and args, and no agent branch or open PR adds detail. So only the e2e sends one. Harmless; left out because you trimmed the last question.

Resolved, dropped and FYI

–

Round 1's blocker: the delete e2e needed unreleased MCP tools

rancher-ai-mcp v1.2.0-alpha.6
Resolved
Pass A (Cody)Pass B (ours)

MCP v1.2.0-alpha.6 (5ddd8d5, 11-18) contains ccad0ae, and the agent chart pins it since e16946a (15:21 UTC). With it, "Confirm single-resource delete action" passed on attempt 1 in 44332198607, warning assertion included. Removed from the pending review.

–

Round 1's question: the MCP detail caution wasn't shown

Confirmation.vue:155-162 (Banner)
Resolved
Pass A (Cody)Pass B (ours)

414ca95 shows each action's detail as a warning banner under the question, one per action, none when blank, kept after the answer. Light and dark checked.

External tool with a detail (the e2e's text)
External tool with a detail (the e2e's text)
Two deletes, two details
Two deletes, two details
–

HTML in detail (Pass A's lead)

shell Banner v-clean-html="nlToBr(label)"
Dropped
Pass A (Cody)Pass B (ours)

Banner renders its label through v-clean-html, which only limits tags, so I suspected markup in an external detail would render while the args on the same card are escaped (PR 336). It doesn't: the shell's nlToBr escapes first. A hidden span, <none>, a link and <img onerror> all show as literal text.

Markup in detail shows as text, like the args above it
Markup in detail shows as text, like the args above it
–

Spacing before the question differs by action type

en-us.yaml strings
FYI, look-only
Pass A (Cody)Pass B (ours)

Create and delete get 8px before the question; update and external still end in <br><br>, so they get a blank line too (32–37px). Same difference as before this commit, only tighter on delete now. For the designer, not a comment.

Update card: blank line before the question
Update card: blank line before the question
–

The warning banner is a Tab stop

shell Banner.vue
FYI, shell
Pass B (ours)

The shell Banner sets tabindex="0" when it has no role, so Shift+Tab from Cancel lands on it (focus ring visible). Shell default, not this PR.

What was checked

Case (stubbed socket on the preview)ThemeResult
Delete GlobalRole + detail, confirm (Enter)lightBanner under the question; sends yes; Confirmed; banner stays
Delete GlobalRole + detail, canceldarkSends no; Canceled; banner 9.8:1
External + detail (e2e text)lightBanner after the question; Confirm not red
External + HTML in detaillightShown as text, nothing runs
Two deletes, two details; blank detaillightTwo banners in order; blank one skipped
Delete without detail; namespaced deletelightNo banner; text right
Create / update / external without detaillightUnchanged apart from the spacing (FYI d4)
Create at the CI viewport, message top scrolled into viewlight 1000x660Question below the panel (blocker)
Detail as a numberlightCard blank, chat stuck (edge case n1)
Keyboard: focus Deletelight, darkTurns tertiary green (#2)
Unit tests Confirmation.test.ts + format.test.ts–80/80

Not checked: a real agent conversation (none available; CI 44332198607 is the real-backend evidence), reloading a confirmation with a detail from history (read only: the parser keeps it), screen reader, Firefox/Safari.

What changed since round 1

What's in the pending review

Body

Thanks, the delete confirmation works now, and the warning shows who is still bound to the role before it goes. I checked it in light and dark with the chat socket stubbed. A few points inline.

Pending review 5961338831 on 471902a: the body plus #1 Confirmation.vue:149 (CI screenshot), #2 Confirmation.vue:275 (focus pair + shell button), #3 message.spec.ts:377. No code, no preview link. The old pending review (5919973058, on 6294b1a) was deleted while still pending.

Left running

Preview rancher-ai-pr342, now pointing at mf (cleanup: bash preview/cleanup-branch.sh rancher-ai pr342), the round-1 page pr342-review and this page pr342-round-two (static-preview namespace on created-dashboard-2). Nothing was written to mf or any agent.