fix(chat-e2e): scope panel/textarea selectors to #panel-chat (second hidden ChatTab in ConciergeShell) #2597

Merged
devops-engineer merged 1 commits from fix/chat-e2e-scope-panel-chat into main 2026-06-11 17:55:07 +00:00
Member

E2E Chat red again on main 035123bthird distinct mechanism in the same suite, same root: ConciergeShell stays mounted (hidden) and embeds the SAME ChatTab (ConciergeShell.tsx:512), so [data-testid='chat-panel'] and bare textarea selectors resolve to the invisible concierge copy first:

waiting for locator('[data-testid=\'chat-panel\']') to be visible
  15 × locator resolved to 2 elements. Proceeding with the first one

(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-controls ids (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

E2E Chat red again on main `035123b` — **third distinct mechanism in the same suite, same root**: `ConciergeShell` stays mounted (hidden) and embeds the SAME `ChatTab` (ConciergeShell.tsx:512), so `[data-testid='chat-panel']` and bare `textarea` selectors resolve to the **invisible concierge copy first**: ``` waiting for locator('[data-testid=\'chat-panel\']') to be visible 15 × locator resolved to 2 elements. Proceeding with the first one ``` (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-controls` ids (`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](https://claude.com/claude-code)
core-devops added 1 commit 2026-06-11 17:50:47 +00:00
fix(chat-e2e): scope panel/textarea selectors to #panel-chat (second hidden ChatTab in ConciergeShell)
CI / Python Lint & Test (pull_request) Successful in 4s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 7s
CI / Detect changes (pull_request) Successful in 8s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 4s
E2E Chat / detect-changes (pull_request) Successful in 8s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 7s
Harness Replays / detect-changes (pull_request) Successful in 5s
Lint forbidden tenant-env keys / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 5s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 6s
sop-checklist / review-refire (pull_request_target) Has been skipped
CI / Shellcheck (E2E scripts) (pull_request) Successful in 1s
CI / Platform (Go) (pull_request) Successful in 3s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 7s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 2s
Harness Replays / Harness Replays (pull_request) Successful in 2s
sop-checklist / all-items-acked (pull_request) acked: 0/7 — missing: comprehensive-testing, local-postgres-e2e, staging-smoke, +4 — body-unfilled: comprehensive-testing, local-postgres-e2
gate-check-v3 / gate-check (pull_request_target) Successful in 8s
sop-checklist / na-declarations (pull_request) N/A: (none)
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 3s
E2E API Smoke Test / detect-changes (pull_request) Successful in 19s
E2E Chat / E2E Chat (pull_request) Successful in 5s
sop-checklist / all-items-acked (pull_request_target) Successful in 7s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 3s
reserved-path-review / reserved-path-review (pull_request_target) Successful in 18s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (stub) (pull_request) Successful in 37s
qa-review / approved (pull_request_target) Approved via pull_request_review trigger
reserved-path-review / reserved-path-review (pull_request_review) Successful in 4s
qa-review / approved (pull_request_review) Successful in 4s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 56s
security-review / approved (pull_request_target) Approved via pull_request_review trigger
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (real image + MiniMax LLM, advisory) (pull_request) Failing after 19s
security-review / approved (pull_request_review) Successful in 9s
CI / Canvas (Next.js) (pull_request) Successful in 3m30s
CI / Canvas Deploy Status (pull_request) Successful in 1s
CI / all-required (pull_request) Successful in 1s
audit-force-merge / audit (pull_request_target) Successful in 6s
9076eaad5a
E2E Chat went red again on main 035123b — third distinct mechanism in
the same suite, all from the ConciergeShell staying mounted (hidden):

  waiting for locator('[data-testid="chat-panel"]') to be visible
    15 x locator resolved to 2 elements. Proceeding with the first one

ConciergeShell.tsx:512 embeds the SAME ChatTab component for the
concierge conversation, so [data-testid='chat-panel'] (and bare
`textarea`) match the invisible concierge copy first; waitForSelector
proceeds with the first match and times out.

Fix: scope every chat selector in chat-desktop.spec.ts to #panel-chat
(the map SidePanel tabpanel, instance-unique since the #2587 idPrefix
fix): 3 waitForSelector sites, 9 textarea sites, the chat-panel div
count, the file input. Mobile suite untouched (no concierge mount).

NOTE for a follow-up: ChatTab's INNER ids (aria-controls
"chat-panel-my-chat"/"chat-panel-agent-comms") are duplicated DOM ids
whenever two ChatTabs mount — same invalid-HTML class #2587 fixed for
WorkspacePanelTabs; needs the same idPrefix treatment inside ChatTab.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
agent-reviewer-cr2 approved these changes 2026-06-11 17:51:48 +00:00
agent-reviewer-cr2 left a comment
Member

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.

5-axis review on head 9076eaad5a3a43a7c8a8f1446257c5ea76c7f5a2. 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.
devops-engineer merged commit ad24de9ce2 into main 2026-06-11 17:55:07 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#2597