Commit Graph

16 Commits

Author SHA1 Message Date
Ali Waseem 6be596ea34 feat: add user preference to enable queue operations (#44366)
## 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?

- Remove queue operations from feature preview into settings
- Refactor dashboard settings 
- Resolves DEPR-434

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Dashboard settings panel in Account preferences with toggles for
Inline Editor and Queue Operations; “Dashboard” added to project
Configuration.

* **Removed**
* Old Inline Editor settings UI and the Queue Operations feature-preview
UI removed.

* **Refactor**
* Consolidated dashboard preferences into a single settings surface;
banners and actions now navigate to preferences; account/preferences
layouts and back-navigation behavior adjusted for platform vs
self-hosted.

* **Tests**
* Added tests for settings UI, menu generation, redirects, and
local-storage.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com>
2026-04-06 13:52:53 +00:00
Charis 4a0bb36ca8 style: require sorted imports in studio/components (#44408)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2026-04-01 10:22:37 +02:00
Jordi Enric 233c2d4a4c feat(inline sql editor): snippet management in editor panel (#43011)
- EditorPanel can now load, save, and rename SQL snippets inline
- New SaveSnippetDialog component for saving snippets with AI-generated
titles
- EditorPanel state tracks active snippet ID and pending reset
- EditQueryButton opens the inline editor panel instead of navigating to
SQL editor page
- AIEditor exposes onMount callback for editor instance access
- SnippetDropdown label updated to "Create snippet"


## TO TEST 

### Normal CRUD
- open inline SQL Editor
- try creating a new snippet
- try editing an existing snippet

### Homepage V2 Report
- Try adding a new block → create snippet
- create the snippet in inline sql editor
- select the snippet in the report block section
2026-02-23 10:11:58 +01:00
Saxon Fletcher 50255605ec Moves inline editor from feature preview to setting (#39892)
* sidebar-manager

* storage keys

* tests

* more ai spots

* test fix

* revert to default

* remove ref

* Update apps/studio/state/sidebar-manager-state.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update apps/studio/components/ui/AIAssistantPanel/AIAssistant.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix ts

* fix

* fux

* fux query param

* clean

* fix

* more

* mock local storage

* simplify

* remove provider test

* remve useopensidebar

* fix(new homepage): open ai assistant on advisor card button clicks

* Update apps/studio/components/layouts/ProjectLayout/LayoutSidebar/index.tsx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* Update apps/studio/state/sidebar-manager-state.tsx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* refine

* editor sidebar manager

* reset results

* move inline editor to account setting

* update analytics to standard

* copy

* add tracking

* update copy

* fixes

* Update apps/studio/pages/project/[ref]/database/functions.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update apps/studio/pages/project/[ref]/auth/policies.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* zod resolver

* Nit refacotr

* Small fixes

* missed two pieces

* change event

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-11-07 03:04:37 +00:00
Saxon Fletcher 738c568e6b Sidebar manager (#39795)
* sidebar-manager

* storage keys

* tests

* more ai spots

* test fix

* revert to default

* remove ref

* Update apps/studio/state/sidebar-manager-state.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update apps/studio/components/ui/AIAssistantPanel/AIAssistant.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix ts

* fix

* fux

* fux query param

* clean

* fix

* more

* mock local storage

* simplify

* remove provider test

* remve useopensidebar

* fix(new homepage): open ai assistant on advisor card button clicks

* Update apps/studio/components/layouts/ProjectLayout/LayoutSidebar/index.tsx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* Update apps/studio/state/sidebar-manager-state.tsx

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>

* refine

* FIX

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com>
2025-10-28 10:07:21 +10:00
Saxon Fletcher a224598f1e Decouple editor panel (#37707)
* decouple editor panel from global state

* refactor again

* dont close assistant

* remove async

* onsave props

* Fix TS errors

* Remove editorPanel state from app-state, use useHotKey hooks for keyboard shortcuts

* Minor UX improvements to EditorPanel

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-08-06 15:03:53 +07:00
Joshen Lim cab0585533 Fe 1799/consolidate to useselectedprojectquery and (#37684)
* Replace all usage of useProjectContext with useSelectedProjectQuery

* Replace all usage of useSelectedProject with useSelectedProjectQuery

* Replace all usage of useProjectByRef with useProjectByRefQuery

* Replace all usage of useSelectedOrganization with useSelectedOrganizationQuery

* Deprecate useSelectedProject, useSelectedOrganization, and useProjectByRef hooks

* Deprecate ProjecContext
2025-08-06 10:53:10 +07:00
Saxon Fletcher 94c45c2863 AI UI refine and renaming (#36819)
* ui refinements

* rename chat

* copy

* prose message styles

* add icon back

* fix message save

* simplify empty state

* update suggestions

* pass through props

* button styles

* onboarding icons

* name button

* remove results

* current chat name

* use type

* fix down arrow

* re-add chat name
2025-07-08 12:09:11 +10:00
Joshen Lim 8239e2f27b Cache results in assistant panel (#34509)
* Cache results in assistant panel

* Small fixes

* fix

* disable switching chats while new messages are streaming in

* small comment

* Fix Create new snippet CTA in query block

* Add useCallbacks

* Update

* Remove console log

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
2025-03-31 19:24:21 +08:00
Long Hoang 69726689c9 chore: remove event enums (#33730)
* chore: remove event enums

* chore: remove more event enums

* chore: remove unused HomepageHeroRequestDemoClickedEvent

* chore: remove unused HomepageHeroRequestDemoClickedEvent

* chore: rename custom_report events to use underscores

* chore: remove telemetry enum

* chore: remove unused imports

* chore: remove enums from merged events

* chore: remove unused imports

* chore: add typedocs for module and hide exported types that are not events
2025-02-25 13:08:31 +08:00
Saxon Fletcher 28fe5811de Inline editor feature preview (#33541)
* add edge function knowledge

* deploy edge function mutaton

* add edge function block with deploy

* update function url

* update tools

* editor sql

* add templates

* use monaco editor

* hook up templates

* fixes

* add behind feature flag

* preview docs

* move editor

* initialPrompt

* consolidate widgets

* remove generic editor

* move logic

* fix ts

* include schema metadata

* Fix width of save snippet button

* Set tooltip position

* Use inlineLink component

* Remove unnecessary z index

* Lint

* Lint import statements in EditorPanel

* fixes

* fix keyboard shortcut

* show/hide results and invalidation

* fix focus issues in widget

* fixes

* fix ts

* Support cmd enter shortcut to run query in InlineEditor

* Update InlineEditorPreview to use admonition

* prompt updates

* add discussion url to preview

* schemas array

* One last clean up

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-02-19 14:58:58 +10:00
Alaister Young 30c390c19c chore: unify telemetry event sending (#32861)
* chore: unify telemetry event sending

* organize some imports

* remove final useTelemetryProps

* add www telemetry actions typing and docs

* remove gaevents

* fix build

* move telemetry identify into PageTelemetry

* fix telemetry constants import

---------

Co-authored-by: Pamela Chia <pamelachiamayyee@gmail.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-01-22 23:52:32 +08:00
Long Hoang feaf64e55d Fix event grouping (#32928)
* fix: pass ref and slug for event grouping

* fix: add missing imports

* fix: correct types

* remove duplicate import

* fix: duplicates and extra events from merge

---------

Co-authored-by: Pamela Chia <pamelachiamayyee@gmail.com>
2025-01-22 22:41:41 +08:00
Ivan Vasilov 52735e38bf chore: Rename all uses of Tooltip_Shadcn_ to just Tooltip (#32860)
* Rename all uses of Tooltip_Shadcn_ to just Tooltip.

* Fix a leftover change.
2025-01-20 22:23:45 +01:00
Joshen Lim 0129c94cf1 ReportsV2 P2: Support adding SQL snippets to Reports (#32851)
* midway

* Render, save, and save configuration of SQL blocks

* Fix re ordering of blocks not showing save UI

* Remove console log

* Smol fix

* Add queryHeight param to queryBlock

* Reinstate telemetry for run query clicked from assistant

* Add

* Add resizing

* Change compactType

* Fix switching reports doesnt update

* ONly show date picker if theres a chart thats using daily stats or infra monitoring

* Fix client crash

* Smol update
2025-01-20 15:49:32 +08:00
Joshen Lim 0710d62665 ReportsV2 P1: Add Query block component (#32738)
* Create QueryBlock component which will be a shared component used in AI Assistant and Reports

* Deprecate AIAssistantPanel/SqlSnippet.ts

* Fix user messages not getting persisted, only assistant messages

* Add loading state to for query results in QueryBlock + hide block view configuration if query block is not chart

* Address feedback

* Fix TS

* fix double border

---------

Co-authored-by: Saxon Fletcher <saxonafletcher@gmail.com>
2025-01-15 13:08:26 +08:00