Repository navigation
fix(editor): cancel from the keyboard, and a failed cancel that clobbered what replaced it (#282, #287, #283) - #646
Merged
Conversation
…ering what replaced it FR-2.2.4 specifies Ctrl+. for cancel and nothing registered it, so the only way to stop a running query was the toolbar button (#282). It is not gated on Monaco having focus: a query gets cancelled because it is taking too long, and by then the user may be anywhere — including still in the editor. The shortcuts dialog lists it now, which it did not. #287 is half right. Its scenario — run, cancel, run again, first response lands last — does not lose the second query's result: the generation counter is monotonic and each execution compares against its own snapshot, so only the cancelled query's own response is dropped. Tests for both halves of that are added, and they pass against the unmodified store. What is real is one step further along. `cancelActiveQuery` captured no generation, so when `cancelQuery` rejected it wrote "Query cancelled, but the server did not confirm" over whatever was on screen — including a query the user had started since. Telling the server to stop can outlast the query it was about; the message now only appears while that cancel is still what the user is looking at. Also added: five live-server tests for the per-connection query timeout. `query_timeout_secs` was on the profile, in the migration, and in the connection dialog long before anything read it (#283). It was wired up in #512 — but nothing tested it, which is what let it be cosmetic for as long as it was. The tests cover the limit being hit, the statement being killed on the server rather than abandoned, a statement inside the limit being untouched, a batch being bounded rather than each statement, and no configured timeout meaning none. Co-Authored-By: Claude Opus 5 <[email protected]>
This was referenced Sep 11, 2026
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.
#282 — Ctrl+. did nothing
FR-2.2.4 specifies it and nothing registered it, so the only way to stop a running query was the toolbar button. Not gated on Monaco having focus: a query gets cancelled because it's taking too long, and by then the user may be anywhere — including still in the editor. The shortcuts dialog lists it now, which it didn't.
#287 — half right
Its scenario (run → cancel → run again, first response lands last) does not lose the second query's result. The generation counter is monotonic and each execution compares against its own snapshot, so only the cancelled query's own response is dropped. I added tests for both halves of that; they pass against the unmodified store.
What is real is one step further along:
cancelActiveQuerycaptured no generation, so whencancelQueryrejected it wrote "Query cancelled, but the server did not confirm" over whatever was on screen — including a query the user had started since. Telling the server to stop can outlast the query it was about. The message now only appears while that cancel is still what the user is looking at. (Mutation-checked.)#283 — already fixed, now tested
query_timeout_secswas on the profile, in the migration, and in the connection dialog long before anything read it. It was wired up in #512 — but nothing tested it, which is what let it be cosmetic for as long as it was.Five live-server tests now cover: the limit being hit and the error saying so; the statement being killed on the server rather than abandoned (checked against
PROCESSLIST— abandoning the stream leaves it holding locks); a statement inside the limit being untouched; a batch being bounded rather than each statement; and no configured timeout meaning none.2627 unit + 341 browser tests.
Closes #282
Closes #283
Closes #287
🤖 Generated with Claude Code