fix: queue loading Cancel button and launch abort (OPEN-10)#176
fix: queue loading Cancel button and launch abort (OPEN-10)#176
Conversation
…anly Raise StreamLoading z-index above StreamView so Cancel receives clicks. Add launch abort ref: cancel during queue/setup skips exit dialog, sets abort before stopSession, and exits the poll loop without duplicate cleanup. Co-authored-by: Zortos <zortosdev@proton.me>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| if (launchAbortRef.current) { | ||
| return; | ||
| } | ||
|
|
There was a problem hiding this comment.
Catch block ignores abort flag, shows spurious error
Medium Severity
The catch block in handlePlayGame doesn't check launchAbortRef.current. When the user cancels during loading, handleStopStream stops the session server-side. If pollSession was already in-flight, the server may return an error for the now-stopped session, causing pollSession to throw. That exception bypasses the abort-aware return statements in the polling loop and falls into the catch block, which calls setLaunchError(...) and resetLaunchRuntime({ keepLaunchError: true }), showing a "Launch Failed" error to a user who intentionally clicked Cancel.
Additional Locations (1)
Co-authored-by: Zortos <zortosdev@proton.me>


Description
Fixes the queue/setup Cancel flow in
handlePlayGameto avoid showing a false launch failure after an intentional cancel.Cause: if cancel stops the server-side session while
pollSessionis in-flight,pollSessioncan throw. That exception reached the outercatchpath, which unconditionally set launch error state and displayed "Launch Failed".Changes:
handlePlayGame'scatchblock (if (launchAbortRef.current) return;).Linear Issue: OPEN-10