Skip to content

perf(explain): parse the plan once, and offer Cancel from the panel - #514

Merged
EVWorth merged 1 commit into
mainfrom
fix/explain-panel-polish
Aug 28, 2026
Merged

EVWorth merged 1 commit into
mainfrom
fix/explain-panel-polish

Conversation

@EVWorth

@EVWorth EVWorth commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Closes #425, closes #427.

Last of three PRs for area/explain. Stacked on #513, which is stacked on #512 — review those first; this retargets to main once they land.

#425 — ExplainTable, ExplainTreeView and the maxRows calculation each called parseExplainRows on the same result, so one render walked every row three times and did three times the colNames.indexOf lookups. Parsed once in ExplainPanel and passed down; the views now take data rather than re-deriving it.

#427 — EXPLAIN ANALYZE runs the statement, so a slow one left the user watching a spinner with the only Cancel button on the editor toolbar, out of view. Surfaced in the panel header — on the plan view too, since a plan can be slow to come back on a busy server.

Worth noting the issue hedged that "cancel doesn't actually work per editor F1". It does now: #512 made the executor issue KILL QUERY server-side, so this button really stops the query rather than just hiding it.

1626 frontend tests pass; clippy/tsc/dprint clean.

After this lands

area/explain is closed out except #424 (EXPLAIN FORMAT=JSON / FORMAT=TREE), left open by design — it's a feature rather than a fix, and it's the piece that would deliver the FR-2.2.5 cost annotations currently logged as doc-drift in #459. The P2/P3 backlog items listed in #411 (F10–F16) are also still open, though F15 (the unused NULL rank) went away as a side effect of the #426 cleanup.

🤖 Generated with Claude Code

@EVWorth
EVWorth force-pushed the fix/explain-plan-rendering branch from a27c42f to 320359f Compare August 28, 2026 23:18
@EVWorth
EVWorth force-pushed the fix/explain-panel-polish branch from 0cc288c to a61948f Compare August 28, 2026 23:19
@EVWorth
EVWorth force-pushed the fix/explain-plan-rendering branch from 320359f to afa9f42 Compare August 28, 2026 23:22
Base automatically changed from fix/explain-plan-rendering to main August 28, 2026 23:33
ExplainTable, ExplainTreeView and the maxRows calculation each called
parseExplainRows on the same result, so one render walked every row three
times and did three times the column lookups. Parse once in ExplainPanel
and pass the rows and their maximum down; the views now take data rather
than re-deriving it. (#425)

EXPLAIN ANALYZE runs the statement, so a slow one left the user watching a
spinner with the only Cancel button on the editor toolbar, out of view.
Surface it in the panel header — on the plan view too, since a plan can be
slow to come back on a busy server. It is a real cancel now that the
executor issues KILL QUERY. (#427)

Refs #425, #427

Co-Authored-By: Claude Opus 5 <[email protected]>
@EVWorth
EVWorth force-pushed the fix/explain-panel-polish branch from a61948f to bf64703 Compare August 28, 2026 23:34
@EVWorth
EVWorth merged commit da10560 into main Aug 28, 2026
9 checks passed
@EVWorth
EVWorth deleted the fix/explain-panel-polish branch August 28, 2026 23:37
@EVWorth EVWorth mentioned this pull request Aug 28, 2026
9 of 16 tasks
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