Skip to content

FIX Conversation drawer races - #3123

Merged
Richard Lundeen (richlundeen) merged 2 commits into
microsoft:mainfrom
romanlutz:romanlutz-conversation-selection-reliability
Oct 11, 2026
Merged

Richard Lundeen (richlundeen) merged 2 commits into
microsoft:mainfrom
romanlutz:romanlutz-conversation-selection-reliability

Conversation

@romanlutz

Copy link
Copy Markdown
Contributor

Description

The recurring merge-queue image-recovery timeout happens before recovery, while selecting another conversation (failure log). A delayed send refresh can auto-open the drawer after the helper checks visibility. Its pending toggle click then closes the drawer, moving and detaching the conversation row.

Apply the initial drawer default once per attack so later refreshes cannot override the operator's open/closed choice. The selection helper checks aria-expanded, uses normal accessible clicks, and verifies the destination URL and selected row. Historical attacks still auto-open on desktop after asynchronous metadata loading; narrow screens remain closed until requested and close after selection. Creating, copying, and repeating conversations retain their existing drawer behavior.

No API, image-conversion, recovered-draft, or FileReader serialization changes. No forced clicks, fixed sleeps, disabled motion, timeout increases, or weakened recovery assertions.

Tests and Documentation

Adds controlled real-backend coverage for delayed send refreshes, closing drawers, and delayed historical metadata on desktop and narrow viewports. The pre-fix closing-drawer regressions reproduced the original unstable-element/detached-row timeout. Updates the frontend README with drawer defaults and selection synchronization guidance.

Validation ran from frontend on Windows. Seeded runs used the real in-memory backend with a scrubbed environment and only loopback provider fixtures with placeholder keys. No real provider APIs were called. CI merge-group runs were not rerun locally.

Command Result
npm test -- --runTestsByPath src\components\Chat\ChatWindow.test.tsx src\components\Chat\ConversationPanel.test.tsx --runInBand 219 passed
npm run test:e2e -- --project seeded --grep "delayed send refresh|drawer is closing|preserves an image converter|repeats and nests|waits for the selected conversation" --repeat-each=3 --retries=0 --workers=1 --reporter=list --trace=on --output="C:\Users\romanlutz\.copilot\session-state\882ee962-a436-4346-ba02-d175591b3053\files\selection-final" 18 passed, including 3 repetitions of the unchanged image-recovery assertions
npm run test:e2e -- --project seeded --grep "historical drawer defaults" --repeat-each=3 --retries=0 --workers=1 --reporter=list --trace=on --output="C:\Users\romanlutz\.copilot\session-state\882ee962-a436-4346-ba02-d175591b3053\files\selection-historical" 6 passed
npm run type-check Passed
npx eslint src\components\Chat\ChatWindow.tsx src\components\Chat\ChatWindow.test.tsx e2e\chat-recovery.spec.ts --max-warnings 0 Passed

Playwright used E2E_FRONTEND_PORT=19388, PYRIT_BACKEND_URL=http://127.0.0.1:19387, the worktree's virtual-environment Python, and CI unset. An additional E2E TypeScript comparison found exactly the same two upstream TS2339 errors for original_prompt_id in untouched repeat-history assertions, with no new diagnostics. Production type-check and commit hooks passed.

JupyText was not run because no Python documentation or notebooks changed.

Apply the historical drawer default once per attack so late send refreshes cannot override the operator's panel choice. Synchronize selection on expanded state and verify destination routing and current rows. Cover closing drawers and delayed historical metadata on desktop and narrow screens without weakening recovered-image assertions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@richlundeen
Richard Lundeen (richlundeen) added this pull request to the merge queue Oct 11, 2026
Merged via the queue into microsoft:main with commit 5b2e104 Oct 11, 2026
76 of 78 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants