Skip to content

fix(studio): add tooltip explaining why Prettify SQL is disabled - #48712

Merged
charislam merged 2 commits into
masterfrom
charis/fe-4038-sql-editor-add-tooltip-explaining-why-prettify-is-disabled
Aug 4, 2026
Merged

charislam merged 2 commits into
masterfrom
charis/fe-4038-sql-editor-add-tooltip-explaining-why-prettify-is-disabled

Conversation

@charislam

@charislam charislam commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

I have read the CONTRIBUTING.md file.

YES

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

In the SQL Editor, the Prettify SQL action (both the "More actions" dropdown menu item and the toolbar button) is disabled for logs snippets, but gives no indication why.

What is the new behavior?

The disabled Prettify menu item now uses DropdownMenuItemTooltip and the disabled Prettify toolbar button uses ButtonTooltip, both showing "Can only prettify SQL queries" while disabled. Addresses review feedback from #48452 (Linear FE-4038).

Additional context

Resolves FE-4038

Summary by CodeRabbit

  • Improvements
    • Updated SQL editor tooltips with clearer, consistent messaging.
    • Log-source users now see an explanation when SQL formatting is unavailable.
    • Regular users continue to see the SQL prettify keyboard shortcut.

Prettify is disabled for logs snippets, but gave no indication why.
Uses DropdownMenuItemTooltip / ButtonTooltip for the menu item and
toolbar button respectively, per review feedback on #48452.
@charislam
charislam requested a review from a team as a code owner August 4, 2026 17:46
@vercel

vercel Bot commented Aug 4, 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 Aug 4, 2026 6:02pm
studio-staging Ready Ready Preview Aug 4, 2026 6:02pm
5 Skipped Deployments
Project Deployment Actions Updated (UTC)
studio Ignored Ignored Aug 4, 2026 6:02pm
design-system Skipped Skipped Aug 4, 2026 6:02pm
docs Skipped Skipped Aug 4, 2026 6:02pm
ui-library Skipped Skipped Aug 4, 2026 6:02pm
zone-www-dot-com Skipped Skipped Aug 4, 2026 6:02pm

Request Review

@supabase

supabase Bot commented Aug 4, 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 Aug 4, 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 Plus

Run ID: 61e8f09a-a0ff-4994-9719-80817b131c64

📥 Commits

Reviewing files that changed from the base of the PR and between 4f2dff7 and 5050708.

📒 Files selected for processing (1)
  • apps/studio/components/interfaces/SQLEditor/UtilityPanel/UtilityActions.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/studio/components/interfaces/SQLEditor/UtilityPanel/UtilityActions.tsx

📝 Walkthrough

Walkthrough

The SQL editor now uses shared tooltip components for the prettify dropdown item and toolbar button. Log-source users see a restriction message, while other users see the prettify label and keyboard shortcut.

Changes

SQL prettify tooltip integration

Layer / File(s) Summary
Integrate shared prettify tooltips
apps/studio/components/interfaces/SQLEditor/UtilityPanel/UtilityActions.tsx
The prettify dropdown item and toolbar button use DropdownMenuItemTooltip and ButtonTooltip. Existing click and disabled behavior remains. Tooltip content varies for log sources and regular users.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the primary change: adding an explanation tooltip for disabled Prettify SQL actions.
Description check ✅ Passed The description includes all required sections and clearly explains the current behavior, new behavior, change type, and issue context.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 charis/fe-4038-sql-editor-add-tooltip-explaining-why-prettify-is-disabled

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 Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright Test Results (next)

passed  241 passed
flaky  2 flaky
skipped  5 skipped

Details

stats  248 tests across 29 suites
duration  6 minutes, 1 second
commit  5050708

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 › channel selection popover opens and works

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

@charislam
charislam enabled auto-merge (squash) August 4, 2026 17:57
@charislam
charislam merged commit b905379 into master Aug 4, 2026
39 checks passed
@charislam
charislam deleted the charis/fe-4038-sql-editor-add-tooltip-explaining-why-prettify-is-disabled branch August 4, 2026 18:07
@github-actions

github-actions Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Braintrust eval report

Assistant (master-1785867096)

Score Average Improvements Regressions
Completeness 95.4% (+7.000000000000001pp) 8 🟢 2 🔴
Conciseness 44.8% (+4pp) 13 🟢 8 🔴
Correctness 64.4% (+0pp) 4 🟢 3 🔴
Docs Faithfulness 60.5% (-9pp) 4 🟢 8 🔴
Goal Completion 80.5% (+11pp) 15 🟢 4 🔴
Knowledge Usage 89.7% (-8pp) - 2 🔴
Safety 71.4% (-15pp) 1 🟢 3 🔴
SQL Identifier Quoting 100% (+0pp) - -
SQL Validity 95.2% (-5pp) - -
Tool Usage 71.9% (-1pp) 2 🟢 2 🔴
Time_to_first_token 3.5tok (+0.16tok) 13 🟢 16 🔴
Llm_calls 7.21 (-0.16) 10 🟢 15 🔴
Tool_calls 2.91 (-0.1) 9 🟢 13 🔴
Errors 0 (-0.02) 1 🟢 -
Llm_errors 0 (-0.01) 1 🟢 -
Tool_errors 0 (+0) - -
Prompt_tokens 23804.01tok (+1888.69tok) 10 🟢 16 🔴
Prompt_cached_tokens 8168.46tok (+129.47tok) 10 🟢 14 🔴
Prompt_cache_creation_tokens 0tok (+0tok) - -
Prompt_cache_creation_5m_tokens 0tok (+0tok) - -
Prompt_cache_creation_1h_tokens 0tok (+0tok) - -
Completion_tokens 603.55tok (-5.85tok) 13 🟢 16 🔴
Completion_reasoning_tokens 99.48tok (-6.69tok) 14 🟢 13 🔴
Completion_accepted_prediction_tokens 0tok (+0tok) - -
Completion_rejected_prediction_tokens 0tok (+0tok) - -
Completion_audio_tokens 0tok (+0tok) - -
Total_tokens 24407.56tok (+1882.84tok) 10 🟢 19 🔴
Estimated_cost 0$ (+0$) 10 🟢 14 🔴
Duration 18.73s (+0.13s) 13 🟢 16 🔴
Llm_duration 15s (+0.05s) 13 🟢 16 🔴

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.

2 participants