Repository navigation
fix(web-ui): scope TurnProcess collapse focus transfer to process members - #1337
Conversation
…bers Follow-up to #1322: TurnProcessNodeView previously checked active.closest("[data-chat-turn]") when collapsing a completed turn, which also matched visible final assistant answers and other non-collapsible nodes in the same turn. Narrow the selector to "[data-turn-process-member], [data-step-process]" so focus transfers to the toggle button only when activeElement is inside collapsible process nodes or process group containers (including group headers) belonging to that turn.
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
Summary
Follow-up to #1322 addressing a review finding on
TurnProcessNodeView: collapsing a completed turn's process section previously matchedactive.closest("[data-chat-turn]"), which also includes visible final assistant answers and other non-collapsible nodes in the same turn, unnecessarily moving focus away from visible answer controls when collapsing the process header.Changes
apps/web-ui/packages/client/ui-chat/src/client/chat/TurnProcessNodeView.tsx: Narrow the collapse focus-transfer check from[data-chat-turn]to[data-turn-process-member], [data-step-process](still matched againstdata-chat-turn === String(node.data.turn)). This covers bothChatNodeSeat[data-turn-process-member]andChatGroupSeat[data-step-process](including nestedProcessGroupHeaderbuttons that live outsideChatNodeSeatand would otherwise triggeruseSearchableHiddenreveal on collapse), while leaving focus untouched on visible final answers and independent turn nodes.Visual Changes
No visual changes: narrows focus-transfer scope on Turn process collapse without altering layout, styling, or visual presentation.
Validation
pre-commitPrettier formatting check onapps/web-ui/packages/client/ui-chat/src/client/chat/TurnProcessNodeView.tsx: passed.ChatNodeSeat(data-turn-process-member,data-chat-turn) andChatGroupSeat(data-step-process,data-chat-turn) DOM attributes directly againstmain.AGENTS.md.