Skip to content

chore(sql-editor): remove Pretty Explain feature - #47981

Merged
joshenlim merged 1 commit into
masterfrom
aliwaseem/fe-3930-remove-full-pretty-explain-feature-from-sql-editor
Jul 16, 2026
Merged

joshenlim merged 1 commit into
masterfrom
aliwaseem/fe-3930-remove-full-pretty-explain-feature-from-sql-editor

Conversation

@awaseem

@awaseem awaseem commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

Removes the SQL Editor Pretty Explain feature — the Explain tab, the Run EXPLAIN ANALYZE action + shortcut, and its dead plumbing. It's been gated off behind the DisablePrettyExplainOnSqlEditor kill switch for weeks with no usage or complaints.

ExplainVisualizer / isExplainQuery are kept — they're used independently by Query Insights, Query Performance, and the EditorPanel quick-runner. Manually-run EXPLAIN queries still render as raw rows in the Results tab.

Typecheck, lint, and all affected unit tests pass.

Closes FE-3930

Summary by CodeRabbit

  • Changes
    • Removed the SQL editor’s EXPLAIN execution workflow, including its toolbar action, keyboard shortcut, utility tab, and visual query-plan display.
    • Simplified query execution to focus on standard results and charts.
    • Improved result clearing when switching databases and refined execution error handling.
    • Updated SQL editor state and tests to reflect the streamlined experience.

Removes the SQL Editor Pretty Explain surface, gated off behind the
DisablePrettyExplainOnSqlEditor kill switch for weeks with no usage:
the Explain tab, the Run EXPLAIN ANALYZE Monaco action, and the
Cmd/Ctrl+Shift+Enter shortcut, plus the now-dead plumbing
(useSqlEditorExplain, UtilityTabExplain, explainResults session state,
buildExplainSql, and unused explain utils).

ExplainVisualizer, isExplainQuery, and QueryPlanRow are preserved for
Query Insights, Query Performance, and the EditorPanel quick-runner.
@awaseem
awaseem requested a review from a team as a code owner July 15, 2026 20:06
@vercel

vercel Bot commented Jul 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
studio-self-hosted Ready Ready Preview, Comment Jul 15, 2026 8:12pm
studio-staging Ready Ready Preview, Comment Jul 15, 2026 8:12pm
5 Skipped Deployments
Project Deployment Actions Updated (UTC)
studio Ignored Ignored Jul 15, 2026 8:12pm
design-system Skipped Skipped Jul 15, 2026 8:12pm
docs Skipped Skipped Open in v0 Jul 15, 2026 8:12pm
ui-library Skipped Skipped Jul 15, 2026 8:12pm
zone-www-dot-com Skipped Skipped Open in v0 Jul 15, 2026 8:12pm

Request Review

@supabase

supabase Bot commented Jul 15, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitai Bot commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: cd13f970-7744-493b-8509-bf99b707e899

📥 Commits

Reviewing files that changed from the base of the PR and between 963182f and d6a6eb5.

📒 Files selected for processing (20)
  • apps/studio/components/interfaces/ExplainVisualizer/ExplainVisualizer.utils.ts
  • apps/studio/components/interfaces/SQLEditor/MonacoEditor.tsx
  • apps/studio/components/interfaces/SQLEditor/SQLEditor.types.ts
  • apps/studio/components/interfaces/SQLEditor/SQLEditor.utils.test.ts
  • apps/studio/components/interfaces/SQLEditor/SQLEditor.utils.ts
  • apps/studio/components/interfaces/SQLEditor/SQLEditorControllers.tsx
  • apps/studio/components/interfaces/SQLEditor/SQLEditorEditorPanel.tsx
  • apps/studio/components/interfaces/SQLEditor/SQLEditorLayout.tsx
  • apps/studio/components/interfaces/SQLEditor/UtilityPanel/UtilityActions.tsx
  • apps/studio/components/interfaces/SQLEditor/UtilityPanel/UtilityPanel.tsx
  • apps/studio/components/interfaces/SQLEditor/UtilityPanel/UtilityTabExplain.tsx
  • apps/studio/components/interfaces/SQLEditor/UtilityPanel/UtilityTabResults.tsx
  • apps/studio/components/interfaces/SQLEditor/useSqlEditorExecution.ts
  • apps/studio/components/interfaces/SQLEditor/useSqlEditorExplain.ts
  • apps/studio/components/interfaces/SQLEditor/useSqlEditorShortcuts.ts
  • apps/studio/state/shortcuts/registry/sql-editor.ts
  • apps/studio/state/sql-editor/sql-editor-session-state.test.ts
  • apps/studio/state/sql-editor/sql-editor-session-state.ts
  • apps/studio/tests/components/SQLEditor/SQLEditor.test.tsx
  • apps/studio/tests/features/explain-visualizer/ExplainVisualizer.utils.test.ts
💤 Files with no reviewable changes (8)
  • apps/studio/components/interfaces/SQLEditor/useSqlEditorExplain.ts
  • apps/studio/components/interfaces/SQLEditor/UtilityPanel/UtilityTabExplain.tsx
  • apps/studio/components/interfaces/ExplainVisualizer/ExplainVisualizer.utils.ts
  • apps/studio/components/interfaces/SQLEditor/MonacoEditor.tsx
  • apps/studio/components/interfaces/SQLEditor/SQLEditor.utils.test.ts
  • apps/studio/state/shortcuts/registry/sql-editor.ts
  • apps/studio/tests/features/explain-visualizer/ExplainVisualizer.utils.test.ts
  • apps/studio/tests/components/SQLEditor/SQLEditor.test.tsx

📝 Walkthrough

Walkthrough

This change removes SQL Editor EXPLAIN execution, shortcuts, Explain tabs, parsing helpers, persisted EXPLAIN state, and related tests. Standard query execution, Results/Chart panels, debugging, and remaining editor behavior are retained.

Changes

SQL editor EXPLAIN removal

Layer / File(s) Summary
Remove EXPLAIN contracts and state
apps/studio/components/interfaces/ExplainVisualizer/ExplainVisualizer.utils.ts, apps/studio/components/interfaces/SQLEditor/SQLEditor.types.ts, apps/studio/components/interfaces/SQLEditor/SQLEditor.utils.ts, apps/studio/state/sql-editor/sql-editor-session-state.ts
EXPLAIN detection, SQL splitting, SQL wrapping, the Explain utility-tab type, and persisted EXPLAIN results are removed.
Simplify execution controllers
apps/studio/components/interfaces/SQLEditor/SQLEditorControllers.tsx, apps/studio/components/interfaces/SQLEditor/useSqlEditorExecution.ts
Run context and execution hooks no longer expose or process EXPLAIN-specific handlers, flags, tabs, or results.
Remove editor EXPLAIN actions
apps/studio/components/interfaces/SQLEditor/MonacoEditor.tsx, apps/studio/components/interfaces/SQLEditor/SQLEditorEditorPanel.tsx, apps/studio/components/interfaces/SQLEditor/useSqlEditorShortcuts.ts, apps/studio/state/shortcuts/registry/sql-editor.ts
The Monaco action, keyboard shortcut, registry entry, and editor prop wiring for EXPLAIN are deleted.
Remove Explain panel UI
apps/studio/components/interfaces/SQLEditor/SQLEditorLayout.tsx, apps/studio/components/interfaces/SQLEditor/UtilityPanel/*
The Explain tab and component are removed; Results and Chart remain, with singular result-reset calls used on database changes.
Update validation coverage
apps/studio/components/interfaces/SQLEditor/*.test.ts, apps/studio/state/sql-editor/*.test.ts, apps/studio/tests/components/SQLEditor/*, apps/studio/tests/features/explain-visualizer/*
Tests remove EXPLAIN helper, fixture, UI, tab-switching, and session-state assertions.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

Suggested labels: autofix

Suggested reviewers: charislam

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description gives the gist, but it does not follow the required template sections or include the CONTRIBUTING.md confirmation. Add the template headings and fill in YES/NO, change type, current behavior, new behavior, and additional context/issue link.
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: removing the SQL editor Pretty Explain feature.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch aliwaseem/fe-3930-remove-full-pretty-explain-feature-from-sql-editor

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright Test Results (next)

passed  235 passed
flaky  3 flaky
skipped  5 skipped

Details

stats  243 tests across 28 suites
duration  7 minutes, 18 seconds
commit  d6a6eb5

Flaky tests

Features › queue-table-operations.spec.ts › Queue Table Operations › pending changes persist when switching between tables
Features › realtime-inspector.spec.ts › Realtime Inspector › Basic Inspector UI › start/stop listening button works
Features › table-editor.spec.ts › table editor › should show rls accordingly

Skipped tests

Features › auth-users.spec.ts › should show web3 users as enabled when the matching web3 provider is enabled
Features › sql-editor.spec.ts › SQL Editor › snippet favourite works as expected
Features › sql-editor.spec.ts › SQL Editor › share with team works as expected
Features › sql-editor.spec.ts › SQL Editor › folders works as expected
Features › sql-editor.spec.ts › SQL Editor › other SQL snippets actions work as expected

@joshenlim
joshenlim merged commit b100272 into master Jul 16, 2026
37 checks passed
@joshenlim
joshenlim deleted the aliwaseem/fe-3930-remove-full-pretty-explain-feature-from-sql-editor branch July 16, 2026 03:04
@github-actions

github-actions Bot commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

Braintrust eval report

Assistant (master-1784171239)

Score Average Improvements Regressions
Completeness 100% - -
Conciseness 39.1% - -
Correctness 73.3% - -
Docs Faithfulness 63.3% - -
Goal Completion 78.7% - -
Knowledge Usage 89.7% (-5pp) 1 🟢 2 🔴
Tool Usage 69.9% (-1pp) 1 🟢 2 🔴
Safety 100% - -
SQL Identifier Quoting 100% (+0pp) - -
SQL Validity 100% (+0pp) - -
Time_to_first_token 2.45tok (-1.2tok) 29 🟢 -
Llm_calls 7.01 (+3.82) 29 🟢 -
Tool_calls 3.14 (+0.14) 11 🟢 6 🔴
Errors 0 (-5.21) 29 🟢 -
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 23735.45tok (+1513.61tok) 10 🟢 15 🔴
Prompt_cached_tokens 8156.69tok (+1112.28tok) 18 🟢 8 🔴
Prompt_cache_creation_tokens 0tok (+0tok) - -
Prompt_cache_creation_5m_tokens 0tok (+0tok) - -
Prompt_cache_creation_1h_tokens 0tok (+0tok) - -
Completion_tokens 593.06tok (-31.15tok) 18 🟢 11 🔴
Completion_reasoning_tokens 101.43tok (-9.4tok) 16 🟢 10 🔴
Completion_accepted_prediction_tokens 0tok - -
Completion_rejected_prediction_tokens 0tok - -
Completion_audio_tokens 0tok - -
Total_tokens 24328.51tok (+1482.46tok) 12 🟢 17 🔴
Estimated_cost 0$ (+0$) 12 🟢 14 🔴
Duration 14.32s (-5.13s) 27 🟢 2 🔴
Llm_duration 9.23s (-3.95s) 28 🟢 1 🔴

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants