fix(chat-e2e): scope panel/textarea selectors to #panel-chat (second hidden ChatTab in ConciergeShell) #2597
Reference in New Issue
Block a user
Delete Branch "fix/chat-e2e-scope-panel-chat"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
E2E Chat red again on main
035123b— third distinct mechanism in the same suite, same root:ConciergeShellstays mounted (hidden) and embeds the SAMEChatTab(ConciergeShell.tsx:512), so[data-testid='chat-panel']and baretextareaselectors resolve to the invisible concierge copy first:(run 349213, all 7 desktop tests; mobile green — no concierge mount.)
Fix (test-only): scope every chat selector to
#panel-chat— the map SidePanel tabpanel, instance-unique since #2587's idPrefix fix. 3 waitForSelector sites, 9 textarea sites, div-count, file input. Mechanism documented in-spec.Follow-up flagged in commit: ChatTab's inner
aria-controlsids (chat-panel-my-chat/chat-panel-agent-comms) are duplicated DOM ids whenever two ChatTabs mount — same invalid-HTML class #2587 fixed for WorkspacePanelTabs; ChatTab needs the same idPrefix treatment (production change, separate PR).🤖 Generated with Claude Code
5-axis review on head
9076eaad5a. Correctness: test-only change scopes the desktop chat spec to #panel-chat, the unique visible SidePanel tabpanel, so hidden ConciergeShell's second ChatTab no longer captures chat-panel/textarea/file-input locators. Robustness: all relevant chat-panel, textarea, history-count, and file-input selectors in the desktop spec are now scoped; mobile and production code are untouched. Security: no app/runtime permissions or auth behavior change; this does not hide the flagged production follow-up around duplicated ChatTab inner aria-controls ids, which remains correctly separate. Performance: selector scoping reduces ambiguous locator retries and adds no product cost. Readability: the in-spec comment documents the hidden duplicate mechanism and #2587 dependency. E2E Chat is green on this head. Approved as agent-reviewer-cr2.