Repository navigation
Wait for /new session switch in Playwright e2e - #1
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Sending /new clears the composer before activateSession writes shadow:selected, so the new-task test was reading the old id during the Opening task overlay. Wait for that switch like the delete path. Co-authored-by: Bob Corbin <ShadowfetchLinux@users.noreply.github.com>
cursor
Bot
force-pushed
the
cursor/fix-e2e-new-task-selection-d786
branch
from
September 20, 2026 11:13
16c08cb to
92f05f8
Compare
Sending /new used to empty the prompt immediately, then activate the session and only then write shadow:selected. The e2e contract — and the UI — treat an empty composer as "already on the new task". Commit the selected id when createSession returns, skip persisting /new as a draft, and let openSession clear the composer so selection is in place before the prompt looks idle. Co-authored-by: Bob Corbin <ShadowfetchLinux@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Main
Checks/verifyfailed on Playwright e2e (run 35506536999).new-task shortcuts and deletion keep task selection usablefailed atexpect(toDelete).not.toBe(first)./newdid create a session, but it cleared the composer first and only wroteshadow:selectedafteractivateSession. The empty prompt made the UI look switched while localStorage still held the old id.This restores the product contract: sending
/newcommits the new session id as soon ascreateSessionreturns, does not persist/newas a draft, and letsopenSessionclear the composer. The original assertion — empty prompt means selection already changed — holds again. The test still waits for the “Opening task…” overlay before delete so palette actions do not run mid-switch.Root cause
0.19.0 made session activation async.
/newemptied the composer before that activation finished, so selection lagged the visible idle composer.Verified locally
npm --prefix ui run buildnpm --prefix ui test— 5 passedcd ui && npm run test:e2e— 7 passednew-task shortcuts and deletion keep task selection usable— passed 3 times (full suite + 2 isolated reruns)Do not merge from this agent.