Skip to content

test(workbench): guard new chat session isolation - #401

Merged
AprilNEA merged 1 commit into
masterfrom
xuan/code-103
Aug 3, 2026
Merged

test(workbench): guard new chat session isolation#401
AprilNEA merged 1 commit into
masterfrom
xuan/code-103

Conversation

@AprilNEA

@AprilNEA AprilNEA commented Aug 3, 2026

Copy link
Copy Markdown
Member

What changed

  • provision a real chat workspace in the wire-compatible workbench mock
  • extend the browser smoke flow to create a chat from an existing chat and submit its first prompt
  • record every rendered conversation title during submission and reject any frame that returns to the previous session

Root cause

The retired View Transition path left useDeferredValue(selectedId) in the shared workbench session resolver. When a new-chat draft exited, the draft cleared immediately while the deferred selection still named the previous session, so React committed one frame of the previous conversation before rendering the new session.

The live-selection fix is already present on master; this PR adds the missing chat-creation regression boundary. Restoring the deferred selection makes the new assertion fail with New chat rendered the previous conversation after submission.

Impact

Desktop and webview share the guarded workbench session path. A future change can no longer reintroduce the stale-session frame without failing the browser smoke gate.

Verification

  • pnpm check:ci
  • pnpm test — 302 files passed, 3 skipped; 2,435 tests passed, 5 skipped
  • pnpm -F @linkcode/webview e2e:browser
  • mutation check: restoring useDeferredValue(selectedId) fails the new-chat isolation assertion

Tracks CODE-103.

@linear-code

linear-code Bot commented Aug 3, 2026

Copy link
Copy Markdown

CODE-103

@AprilNEA
AprilNEA marked this pull request as ready for review August 3, 2026 11:43
@AprilNEA
AprilNEA merged commit bcf57db into master Aug 3, 2026
10 checks passed
@AprilNEA
AprilNEA deleted the xuan/code-103 branch August 3, 2026 11:49
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.

1 participant