fix: cancel running query reliably and preserve selection when running while busy#567
Conversation
…g while busy - Cancel button could open the run-all modal instead of cancelling when a multi-statement selection was active; it now always cancels while running. - Triggering a selection run while a query was running dropped the selection and ran all queries; the selection is now preserved (dialog reflects it). - The new-tab button stayed clickable during a script run despite looking disabled; gated via logic (button + Alt+T) and CSS. - Removed dead pending-action code and a race in the run-confirmation ref. Adds e2e coverage for the cancel-while-selected flow and the new-tab guard. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
IssuesNo critical, production-blocking issues found. Every draft finding from the parallel review was traced to source and dismissed (see False-positives). The three fixes in this PR are correct and verified:
Non-blocking observation (not critical, not a must-fix): the two new e2e tests lean on fixed False-positives
SummaryVerdict: Approve. No production blockers.
|
…hecks, port to pi - rename .claude/skills/review-change -> review-pr - add O(n)-where-O(1)-is-possible algorithmic optimality to Agent 6 + verification step - add pi port at .pi/skills/review-pr (subagent/bash/read wiring, spawning section)
Review: PR #567 (level 3 — full mission-critical pass)Scope: ButtonBar cancel handler, Monaco script-run/confirmation refactor, new-tab guard during script runs, dead-code removal, 2 new e2e tests. Reviewed at HEAD The three claimed fixes are real and correctly implemented — corroborated independently by the query-execution, async, cross-context, and fresh-context adversarial passes, plus an end-to-end trace of the cancellation path ( Issues
False-positives (verified and dismissed)
SummaryVerdict: Approve, with test improvements requested before merge. No production-blocking product defect.
🤖 Generated via the |
- Gate selection propagation deterministically via the redux store (exposed on window under Cypress only) instead of fixed cy.wait(150). - Split the cancel test and assert a strict-subset selection runs exactly 2 queries, so the selection-preservation fix actually fails on regression. - Add run-all-while-busy coverage (Ctrl/Cmd+Shift+Enter -> Run all modal). - Harden the new-tab guard test (wait for in-flight exec + settle before the negative assertion) and add an Alt+T add_new_tab command guard test.
Review: PR #567 (level 3 — full mission-critical pass)Scope: ButtonBar cancel handler, Monaco run/confirmation refactor ( The three claimed product fixes are real and correctly implemented — corroborated by the React/async, cross-context, and fresh-context adversarial passes plus an end-to-end trace of the cancel path ( Issues
False-positives (verified and dismissed)
SummaryVerdict: Approve, with test fixes requested before merge. No production-blocking product defect.
🤖 Generated via the |
…usy e2e - Button: when a disabled button has a disabledTooltip, set pointer-events:none on the button so hover falls through to the Radix tooltip trigger (the wrapping span). Browsers suppress pointer events on disabled buttons, so the tooltip previously did not open reliably on hover (flaky tableDetails e2e and a real UX gap on the Schema AI buttons). - editor.spec: focus the editor before setSelection in the run/cancel-while-busy tests. The editor is read-only and blurred while a query runs, so a selection set on the blurred editor did not reliably propagate to queriesToRun in headless CI, timing out waitForSelectedQueries. - editor.spec: drop the 'Cancelled by user' assertion from the run-all-while-busy test; run-all intentionally clears the buffer notifications (cleanupBufferNotifications), so the notice is expected to be gone. The selection-run test still covers the cancel notification.
The OSS mergeability check requires the questdb submodule to point at one of the last few commits of questdb master. The previous pin (292630bc) went stale as master advanced; bump to current HEAD (1e56d6ee, a questdb CI-only change).
Problems
Fixes
Tests
Added e2e coverage for the cancel-while-all-selected flow (incl. run-while-busy -> modal -> confirm -> old query cancelled, selected queries run one by one) and the new-tab guard during a script run.
🤖 Generated with Claude Code