## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.
YES
## What kind of change does this PR introduce?
Feature
## What is the current behavior?
Standalone queries in the Explorer "Quick Query" surface have editable
titles (defaulting to "Untitled query") without clear indication that
they are temporary and not saved, similar to the old SQL Editor snippet
model.
## What is the new behavior?
The Quick Query tab now clearly indicates that standalone queries are
temporary. The title is no longer editable and displays "Temporary space
for one-off queries" as static muted italic text. The default query name
has been changed from "Untitled query" to "Quick query" for clarity.
## Additional context
Resolves FE-4297. Notebook cells (variant === 'embedded') remain
unchanged with editable titles.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **UI Improvements**
* Renamed new one-off queries from **“Quick query”** to **“Run SQL”**
when no title is provided.
* Updated viewport query editor toolbars to display the fixed **“Run
SQL”** label.
* Preserved editable titles for embedded query editors.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Context
Adds the prettify SQL CTA to Explorer Notebook and Query Tab
Query tab: Prettify CTA is within the dropdown menu here
<img width="1092" height="272" alt="image"
src="https://github.com/user-attachments/assets/3b4f3514-69cc-4c24-a127-da1555ee905e"
/>
Query cell: Prettify CTA sits between the buttons in the toolbar
<img width="1085" height="306" alt="image"
src="https://github.com/user-attachments/assets/e503ad6c-5dda-4c2b-a824-8c1049d5e9fb"
/>
Also added shortcut tooltip for the run button
<img width="183" height="103" alt="image"
src="https://github.com/user-attachments/assets/729055b8-8e2c-4cf7-8f2e-c5726e828644"
/>
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added SQL prettification to Explorer query editors through the
overflow menu, query toolbar, editor action, and keyboard shortcut.
* Displays the configured formatting shortcut alongside the prettify
action.
* Prevents formatting while an AI proposal is pending.
* Added a keyboard shortcut hint to the query run action.
* Enhanced toolbar tooltips to support richer formatted content.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary
- Unify Explorer toolbar actions: 16px / 2px Lucide icons,
`text-tertiary-foreground` that becomes `text-foreground` on hover
(Analyze icon goes brand on hover).
- Soften chat scroll edges with top/bottom fades, and align the composer
width with the conversation content (`px-7` + `max-w-3xl`).
- Put **Run SQL** first on Explorer home, and rename the tab-bar new-tab
item from “New query” to **Run SQL** so it matches.
## Test plan
- [ ] Open Explorer and check query, notebook, and chat toolbars: icons
are 16px, muted by default, and go to foreground on hover. Analyze on a
notebook with cells: icon goes brand on hover; empty notebook still
disables Analyze.
- [ ] Open a query tab: source menu, result settings, save, and
more-options all look like the other toolbar actions (including while
the dropdown is open).
- [ ] Open Explorer chat: scroll a long thread and confirm top/bottom
fades sit on the chat surface. Composer lines up with message width (not
inset extra).
- [ ] On Explorer home, **Run SQL** is the first card; clicking it still
opens a SQL tab.
- [ ] From the tab bar **+** menu, the first item is **Run SQL** (not
“New query”); it still creates a SQL tab. **New notebook** and **New
chat** still work.
Made with [Cursor](https://cursor.com)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **UI Improvements**
* Standardized Explorer toolbar icons for consistent sizing and visual
weight.
* Updated toolbar action colors, hover states, and keyboard-focus
visibility.
* Reordered Explorer home actions so “Run SQL” appears first.
* Renamed “New query” to “Run SQL” in the new-tab menu.
* Improved query source and settings toolbar controls.
* Refined AI assistant chat layout with centered content, decorative
gradients, and improved focus styling.
* Added hover styling for the notebook Analyze action.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
## Context
Adds a "Save" action for query tabs in the explorer, which opts for 2
options to either add to an existing notebook, or create a new notebook.
Both of these actions just opens the notebook in a new tab with unsaved
changes - the changes will only be persisted in the DB when the user
hits "Save" on the notebook.
For adding to an existing notebook, the snippet will be appended to the
bottom of the notebook - UI will scroll to the bottom after navigating
to the notebook.
<img width="469" height="368" alt="image"
src="https://github.com/user-attachments/assets/19d16940-89e2-4d10-b71e-8d501f749668"
/>
Currently Query tabs in explorer do not support view options e.g. table
vs chart. This adds display state to query tabs to match the behaviour
of Notebooks
## To test
- create a query in explorer
- Run a query
- Set the display options via toolbar
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Query results can now be displayed as either a table or chart.
* Chart settings are saved with each query draft and restored when
reopened.
* Display preferences are maintained independently across query drafts.
* Editing a preview query now converts it into a permanent tab.
* **Bug Fixes**
* Invalid or legacy display settings safely fall back to the table view
without removing saved drafts.
* Charts and empty states now use the available editor space more
effectively.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
## Context
Improves the tab behaviour for explorer to follow the SQL Editor
- Tabs now start as preview tabs and become permanent once you start
interacting with them
- Query Tabs become permanent as soon as you start typing in the editor
- Chat tabs become permanent as soon as you start typing in the chat
input
- Notebook tabs become permanenet as soon as you make any changes to the
notebook
- Notebooks with unsaved changes will show the orange dot indicator
<img width="197" height="67" alt="image"
src="https://github.com/user-attachments/assets/3005c379-a49a-4cd8-8d90-65406b186141"
/>
- Closing a notebook tab with unsaved changes will show a confirmation
dialog
- Except if the new notebook has no content (no changes)
<img width="375" height="218" alt="image"
src="https://github.com/user-attachments/assets/6ad10779-6415-4c55-bb4f-61d938e744c9"
/>
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Explorer chat, query, and notebook tabs now begin as previews and
become permanent when edited or saved.
* Added unsaved-change indicators and close confirmation for edited
notebook tabs.
* Confirmed closure of edited notebooks now discards unsaved changes.
* **Bug Fixes**
* Improved restoration and persistence of Explorer drafts.
* Notebook saves now reflect the latest edits and tab state.
* Prevented stale save responses from incorrectly marking newer edits as
saved.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<img width="2326" height="1257" alt="image"
src="https://github.com/user-attachments/assets/d0f63793-ff58-4f48-971f-0622d375b3c7"
/>
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.
YES
## What kind of change does this PR introduce?
Studio UI improvement.
## What is the current behavior?
Explorer notebook query cells can extend beyond the intended reading
width, and saved notebooks open with SQL code expanded.
## What is the new behavior?
- Caps Explorer notebook query cells at `max-w-6xl`.
- Hides SQL code by default in saved notebooks.
- Keeps SQL visible by default for new notebooks.
## To test
1. Open a saved Explorer notebook with query cells. Confirm each cell is
capped at the wider notebook width and its SQL editor is initially
collapsed.
2. Expand a saved query cell and confirm the existing SQL and result
remain available.
3. Create a new notebook, add a query cell, and confirm its SQL editor
is initially visible.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added controls to show or hide SQL for individual query cells.
* Query visibility is preserved when switching notebook tabs or
reopening them.
* New notebooks display SQL by default, while saved notebooks can hide
SQL editors.
* Expanded the query editor width for improved readability.
* **Bug Fixes**
* Prevented visibility settings from affecting notebook save status or
unrelated cells.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Context
Just reorganizing the files under the Explorer folder as details are a
bit more clearer
Mainly shifting related and exclusive files into their own folder and
tests into `__tests__` folder + renaming some files
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Added query result display settings for switching between table and
chart views.
- Added chart configuration options for chart type, axes, scaling,
cumulative mode, and labels.
- Automatically prevents invalid logarithmic scaling when chart data is
incompatible.
- **Refactor**
- Standardized Explorer tab and query source naming across the interface
without changing existing behavior.
- Updated Explorer navigation, routing, and page wiring to use the
standardized components.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->