PR 319, round two

rancher/rancher-ai-ui, torchiaf. Your review 5960352352 (request changes at 4cc8590) → 6 new commits, head 7bff0f3, re-review requested 2026-11-19. Two passes: Cody's my-pr-review-new-commits (A) and ours (B, fresh agent).

Verdict: request changes again, for one point. 7 of 10 comments are fixed and 2 got answers that hold. The one still open is the main one from round 1: a notification still goes out on every </message>. The new specific texts for errors and plans get replaced a moment later by the generic one, and a running plan still pings before its answer. The author's reply agreed with the target. The three new points are all optional.

What I'd post

Thanks for the updates. The default, the permission flow, the sign-in notification and the e2e test work now. Errors and plans still end on the generic notification (see the thread below), and the description still says notifications close after 5 seconds, are opt-in and are cleared before unload.

Replies on your round-1 threads (posted as direct replies, not inside the review)

1. Reply on round-1 thread useChatMessageComposable.ts:636

Confirmations, plan approvals and sign-in read right now, but every </message> still sends one too. So an error shows "Response failed" and right after it "Response complete", which replaces it (same tag), and a running plan still notifies after each step, before its answer arrives.

2. Optional Reply on round-1 thread Chat.vue:470

Agreed, nothing should clear them on unload. My point was only the name: clearBeforeUnload also runs on unmount and doesn't clear notifications.

New inline comments (on the new commits)

3. Optional pkg/rancher-ai-ui/components/DesktopNotificationsInfo.vue:19

The pending state is read once, when the welcome message mounts. After "Turn them off", turning the option back on from the menu grants the permission, but the message comes back saying the browser still needs it.

4. Optional pkg/rancher-ai-ui/components/DesktopNotificationsInfo.vue:43

"Allow Notifications" and "Turn them off" are <a> without href, so they can't be reached with the keyboard. This message is where a new user grants the permission, so a keyboard user can only do it by turning the option off and on in the menu. RequiredAction's links have the same problem.

5. Optional pkg/rancher-ai-ui/components/header/ChatPanelMenu.vue:119

t() escapes the text, so the warning's aria-label, and with it the menu item's accessible name, ends with "the browser&#39;s site settings". The tooltip shows it correctly.

Your round-1 comments

#Your commentAuthor's answerPass APass BChecked
1index.ts:73
Dot and bell-off icon only on Rancher 2.17; extension declares >= 2.13
Expected: older Rancher shows neitherAnsweredAnsweredProduct call. The unread count still works without the dot. Label stays out of line on 2.13-2.16 (cosmetic).
2storage.ts:15
Default depends on saved data; Auto-Scroll flips it on
Fixed (19b19e8)AddressedAddressedLive: saved {enable_auto_scroll:false} reads ON; toggling Auto-Scroll keeps it ON. Defaults now merged in the getter.
3useChatMessageComposable.ts:636
Fires on every </message>: errors, confirmations, plan steps
Agrees; text per kind, plans only on completion. "Fixed a155756"Not addressedNot addressedLive, scripted frames: error = "Response failed" then "Response complete" 0.3 s later (same tag replaces it); running plan notifies at 4.1 s, answer at 10.8 s, "Plan completed" replaced at once. Unit test "should notify the messages of a plan step" expects the per-step one. Confirmation, approval, sign-in now right.
4channel/index.ts:69
Permission asked without a gesture (Firefox 72+/Safari block)
Fixed: welcome message + menu ask from a click (f1ac542)AddressedAddressedLive: no request at reply end; Allow and menu Enable each make one request with user activation.
5channel/index.ts:93
close() after 5 s removes it from the notification center
Timeout disabled (a5a4759)AddressedAddressedLive: no close() on any notification.
6notifications.spec.ts:100
e2e stub never catches the socket
Done: frames go through the socket's own handler (140cf1c)AddressedAddressedRead in code + replayed by B; CI e2e on 7bff0f3 green, notifications.spec.ts 11/11.
7message.ts:16
Question: MCP sign-in never notifies
Good catch, added (7bff0f3)AddressedAddressedLive: one "Sign-in required to continue".
8notification.ts:35
Optional: dead store members
Keep them for the futureAnsweredAnsweredAuthor's call; nothing to reply.
9notification.ts:1
Optional: no unit tests
Added for permissions and focusAddressedAddressedstorage, message channel, new component and composable tests; CI unit green.
10Chat.vue:470
Optional: comments repeat the code; clearBeforeUnload name
"We don't want to clear notifications on unload"Answered (let go)Not addressed (optional)The reply answers a different point. Name and repeated comments unchanged. Your call.

Comparison

FindingPass A (Cody)Pass B (ours)Merged
Thread 3: every </message> still notifies (errors, plan steps, Plan completed replaced)found (2-step plan: 4 notes)found (3-step: 5; failed plan: 3; unit test expects it)post as reply
Thread 10: name / repeated commentslet go (optional)found (optional reply)post, optional
Bubble back after permission grantedfoundfoundpost, optional
aria-label carries &#39;foundfoundpost, optional
Bubble links not keyboard-reachabledropped: same pattern as RequiredAction/ApprovalInfo on mainfound (suggestion)post, optional (mentions RequiredAction)
Dead timer code with timeout 0not looked atfound, not drafteddropped (author keeps unused code)
PR description stalefoundfound (+ issue 301 not linked)in the intro
Cost
Pass A (this session, Cody's my-pr-review-new-commits at ai-skills 946515a)about 35 min; 1 not addressed, 2 new optional points
Pass B (fresh agent, our process)33 min, 108 tool uses, 324k tokens; 1 not addressed + 1 optional, 1 suggestion, 3 optional

The passes agreed on every state except thread 10, which is optional either way. B alone flagged the keyboard links; A had dropped them because RequiredAction.vue and ApprovalInfo.vue on main use the same link pattern. Kept as optional, naming RequiredAction. B also found the unit test that expects the per-step notification, which contradicts the author's reply.

Pass A: live checks (unfocused page unless noted, times from the send)

CaseResult
text"You have unread messages" @8.0 s
error (round-1 real frames)"Response failed" @0.84 s, "Response complete" @1.14 s
confirmation"Waiting for your confirmation" @2.0 s
plan awaiting approval"Planning message ready: 2 tasks" @2.0 s
running plan, 2 subtasks, answer shown @10.8 s"Response complete" @4.2 s, "Plan completed" @9.15 s, "Response complete" @9.26 s, "You have unread messages" @11.8 s
same after Start on the approval planidentical sequence
MCP sign-in"Sign-in required to continue" @1.2 s
permission defaultbubble shown; no request at reply end; Allow → 1 request with user activation; bubble hidden
Turn them off → menu Enablerequest from the click; stored true; bubble back although granted
saved {enable_auto_scroll:false}reads ON; Auto-Scroll toggle keeps it ON
permission deniedno bubble; menu warning icon; aria-label with &#39;; no notification
focused, chat closed mid-answerdot shown, unread 1, no desktop notification
auto-closenone on any notification
Desktop Notifications are ON message with Allow Notifications and Turn them off links

Pass B: summary

6 addressed, 2 answered, 2 not addressed (one optional). Thread 3 counted with a 3-step plan (5 notifications), a plan with a failing step (3, ending on "Response complete") and an error (2), and replayed with the spec's own receiveFromAgent. New: keyboard links (suggestion), stale bubble, aria-label entity, dead timer code (optional). Description vs code: 5-second close, opt-in, permission on the first notification, cleared before unload all stale; issue 301 still not linked. Files: scratchpad/r2/passB/review.md, threads.md, checked.md, coverage.md, draft.md.

Environment notes