Skip to content

fix(editor): cancel from the keyboard, and a failed cancel that clobbered what replaced it (#282, #287, #283) - #646

Merged
EVWorth merged 1 commit into
mainfrom
fix/editor-cancel-and-timeout
Sep 11, 2026
Merged

EVWorth merged 1 commit into
mainfrom
fix/editor-cancel-and-timeout

Conversation

@EVWorth

@EVWorth EVWorth commented Sep 11, 2026

Copy link
Copy Markdown
Owner

#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: 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. (Mutation-checked.)

#283 — already fixed, now tested

query_timeout_secs was 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

…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]>
@EVWorth
EVWorth merged commit c6d55b8 into main Sep 11, 2026
12 checks passed
@EVWorth
EVWorth deleted the fix/editor-cancel-and-timeout branch September 11, 2026 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant