Commit Graph

22 Commits

Author SHA1 Message Date
Ali Waseem
3d9fb2f98d feat(realtime): shortcuts for realtime (#46001)
## What kind of change does this PR introduce?

Feature — adds keyboard shortcuts for the Realtime section in Studio.

## What is the current behavior?

No keyboard shortcuts exist for Realtime navigation or inspector
actions.

## What is the new behavior?

### Navigation chords (layout-scoped, active on any Realtime page)

| Shortcut | Action |
|---|---|
| `R I` | Go to Inspector |
| `R P` | Go to Policies |
| `R S` | Go to Settings |

### Inspector actions (active on the Inspector page)

| Shortcut | Action | Gating |
|---|---|---|
| `Shift+J` | Join a channel | Only when no channel is joined |
| `Shift+L` | Start/Stop listening | Only when a channel is joined |
| `Shift+F` | Open filter popover | Only when a channel is joined |
| `Shift+B` | Broadcast a message | Only when listening |
| `Mod+Shift+C` | Copy selected message | Only when a message is
selected |


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

* **New Features**
* Realtime Inspector: new keyboard shortcuts (join channel, toggle
listening, toggle filters, broadcast) and a copy-message shortcut with
toast feedback.
* Channel & Filter popovers support controlled/uncontrolled open state;
header now wires popover state through props.
* Shortcut tooltips added to copy and broadcast actions; realtime page
navigation shortcuts and menu shortcuts added.
* **Tests**
* Shortcut reference sheet tests updated to include realtime navigation
and inspector groups.

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/46001?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com>
2026-05-19 11:12:54 -06: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
Danny White
7d6995bbfe refactor(studio): clean up ProjectLayout title API (#43742)
## What kind of change does this PR introduce?

Refactor, cleanup, and docs update.

## What is the current behavior?

After the page-title rollout, `ProjectLayout` is still in a transitional
state:

- it accepts a deprecated `title` prop
- it still supports a separate `browserTitle.surface`
- wrapper layouts are split between passing `title` directly and passing
`browserTitle.section`

That makes the API harder to reason about than it needs to be, even
though the rendered titles are already correct.

## What is the new behavior?

This cleanup finishes the API simplification that came out of the
stacked PR review:

- wrapper layouts stay `title`-first for DX
- `ProjectLayout` no longer accepts `title`
- `product` is now the single source of truth for the project-surface
title segment
- `browserTitle` is now only used for extra browser-title metadata
(`entity`, `section`, `override`)
- the remaining project-scoped callers now pass `browserTitle.section`
when they need a section label
- docs now reflect the final pattern instead of the transitional one

Rendered page titles stay the same.

## Additional context

Checks run:

- `pnpm --filter studio exec vitest --run lib/page-title.test.ts
components/layouts/ProjectLayout/index.test.tsx`
- `pnpm --filter studio typecheck`
- `pnpm exec prettier --check ...` on touched files

This is intended as the post-rollout cleanup PR based on Joshen's review
feedback across the stacked title changes.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-03-16 18:03:10 +11:00
Francesco Sansalvadore
23c827bdda feat: nested mobile nav menu (#43333)
- consolidate `top level menu` and `contextual menu` into nested menu on
mobile
- remove legacy mobile submenu
2026-03-11 13:55:20 +01:00
Joshen Lim
75e1717a02 Remove barrel files part 02 (#39956)
* Remove barrel files part 02

* Clean up
2025-10-30 23:50:14 +08:00
Charis
3eb7da7766 feat(preferences): allow disable hotkeys (#39573)
* feat(preferences): allow disable hotkeys

Add a section in /account/me for disabling hotkeys. Only added one
hotkey for now (Cmd + E for toggling editor side panel) but we can add
more with the same pattern.

* refactor: remove default export on ProjectLayout

* feat(hotkeys): allow toggling of command menu and ai assistant hotkeys

* Nit

* PRettier lint

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-10-17 08:09:38 -04:00
Filipe Cabaço
a8a5e68512 realtime: remove feature preview flag (#38864)
* realtime: remove feature preview flag

* Fix TS

* Smol fix

* NIt

* add back proper link in docs

* Neeeet

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-09-22 17:56:38 +07:00
Joshen Lim
39639a4073 chore/disable-more-sections-03 (#38060)
* Add flags for policies, third party auth, and manual linking + providers in sign in page

* Add flag for rate limitm page

* Add UnknownInterface components

* Update comment

* Flip flags to true

* Add flags for realtime policies and reports page

* Temp

* Add flag for sign in providers page

* Add flag for stripe wrapper

* Add flag for custom domains

* Add flag for dedicated ipv4 address addon

* Add empty state for realtime policies

* Add empty state for reports page

* Add flag for disable legacy JWT keys section

* Add flag for legacy jwt keys

* nit

* Remove ConnectionStringMoved call out

* Add flag for project settings log drains

* Add flag for subscription link in project settings

* Deprecate settings/auth page and redirect directly to auth page

* Flip back flags

* Add flags for account preferences analytics marketing and account deleetion

* Remove 'table_editor:enable_rls_toggle' flag and revert UI changes

* Remove 'authentication:policies' flag and revert UI changes

* Update flags

---------

Co-authored-by: Terry Sutton <saltcod@gmail.com>
2025-08-20 21:50:53 +08:00
Joshen Lim
c4b36d9ab0 Chore/disable more sections 01 (#38057)
* Add flags for policies, third party auth, and manual linking + providers in sign in page

* Add flag for rate limitm page

* Add UnknownInterface components

* Update comment

* Flip flags to true

* Add flags for realtime policies and reports page

* Temp

* Add flag for sign in providers page

* Add flag for stripe wrapper

* Add empty state for realtime policies

* Add empty state for reports page

* nit

* Hide realtime configuration section in side nav if neither policies nor settings are visible
2025-08-20 19:59:43 +08: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
Wen Bo Xie
2f6977edc3 feat: add Realtime private only feature flag (#37026)
* feat: add Realtime private only feature flag

* Chore/patch realtime private only (#37040)

* Fix feature preview logic for toggling visibility of private channel toggle in realtime settings

* Refactor feature preview to control realtime settings visibility, clean up old feature preview images

* Add image for realtime settings feature preview

* Fix TS

* Check FF as well for showing realtime settings on top of feature preview

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-07-11 11:47:05 +01:00
Filipe Cabaço
d959b10124 realtime: Limit access to settings based on project (#36860)
* realtime: Limit access to settings based on project

* fix linter

* Fix the realtime layout to work with two flags.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-07-07 11:22:55 +02:00
Joshen Lim
1655a17e70 Add support for configuring realtime settings (#33875)
* Add support for configuring realtime settings

* Refactor

* Fix TS

* Fix TS

* Smol update

* Hide new UI for local selfhosted

* Add feature flag

* Fix reset logic

* Fix

* minor refactor

* Fix package.json

* Simplify
2025-03-03 20:08:15 +08:00
Filipe Cabaço
d5fa457bce realtime: Remove realtime authorization flag (#28437)
realtime: Remove realtime authorization flag
2024-08-07 09:47:49 +01:00
Alaister Young
70da0f1d1d chore: cleanup packages (#27770)
* chore: cleanup packages

- Avoid circular imports
- Export API-types as types
- pg-format without depending on Node internal Buffer (not browser-compatible)
- Avoid importing from barrel files in ui dir

* chore: avoid barrel file imports in studio (#27771)

* chore: avoid barrel file imports

- Removes some unused imports
- Avoids barrel file import for faster builds + less memory

* add eslint rule

* type fixes

* delete layouts barrel

* delete components/grid barrel file

* delete components/grid/utils barrel file

* delete components/grid/components/common barrel file

* delete components/grid/components/editor barrel file

* delete components/grid/components/formatter barrel file

* delete components/grid/components/grid barrel file

* delete components/grid/components/header/filter barrel file

* remote components/grid/store barrel file

* remove components/interfaces/Auth/Policies barrel file

* delete components/interfaces/Settings/Logs barrel file

* delete components/ui/CodeEditor barrel file

* delete components/ui/Forms barrel file

* delete components/ui/Shimmers barrel file

* delete data/analytics barrel file

* delete hooks barrel file

* cleanup lib/common/fetch barrel file

* final * barral files cleanup

* global react-data-grid styles

* remove console.log

---------

Co-authored-by: Kevin Grüneberg <k.grueneberg1994@gmail.com>

* fix build

---------

Co-authored-by: Kevin Grüneberg <k.grueneberg1994@gmail.com>
2024-07-04 14:48:10 +08:00
Ivan Vasilov
ee8f901bfd feat: RLS policies for realtime channels (#27490)
* Add queries and mutations for realtime channels.

* Change the layout, add a link for policies and modal for creating a channel.

* Add a page for policies.

* Add templates for realtime tables.

* Fix the spacing in the PolicyDetails component. Add better types.

* Pass templateData to the template generating functions.

* Various CSS fixes.

* Add components for rendering the realtime policies page.

* Fix the editing policy flow.

* Fix refetching when adding or deleting policies.

* Minor various fixes.

* Remove an old console.log.

* More fixes for templates.

* Make the realtime policies open by default when clicking on realtime.

* Update the realtime policy templates.

* Use a dropdown button for the three types of policies.

* Fix a copy-paste mistake.

* Fix icons.

* Fix the toast.

* Clean up the previous components.

* Clean up more unneeded code.

* Remove templateData prop.

* Remove unneeded queries and mutations.

* More cleanup.

* Reuse the components from the Auth Policies.

* Minor fixes for the new components.

* Add a feature flag for AuthZ.

* Revert some changes.

* Fix a build error.

* Fix all definitions.

* Fix an issue with copying large lines which from templates which are word-wrapped.

* Addressed various comments by Joshen.

* Revert the UI changes in the Policy Editor.

* Update the template names.

* Small style fix

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-06-26 13:27:29 +02:00
Ivan Vasilov
845167ca14 chore: Delete MetaStore and RootStore (#20034)
* Replace all methods of MetaStore with react queries.

* Remove unneeded usages of MetaStore.

* Remove RootStore completely. The only thing left from these stores is uiStore.

* Remove unnecessary comments.

* Delete MetaStore.

* Fix the usage of the wrong toaster.

* Remove unused variables

* Remove onSqlQuery

* Convert some ui setNotification calls to direct toast calls

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-03-08 14:56:28 +08:00
Kevin Grüneberg
f9a55935f5 chore: use type imports for types/interfaces (#21738) 2024-03-04 20:48:22 +08:00
Kevin Grüneberg
13cfc0abb5 fix: barrel imports (#21728)
Avoid importing all components via barrel files that lead to bloated bundles/chunks
2024-03-04 18:39:53 +08:00
Joshen Lim
da792ba0ba Chore/show rr UI only if project is enabled (#19642)
* Only show RR UI if project is enabled

* Only show RR UI if project has read replicas enabled, shift DatabaseSelector state to valtio, add Database Selector to API URl

* Update usage of Project interface from types to Project from project-details-query

* Fix ts errors

* Another one

* Another one...

* God one more

* Fingers crossed

* jesus

* Add deprecate mark on ProjectBase

* Resolve conflicts

* Rename ProjectState from valtio to DatabaseSelectorState

* Rename file

* fix imports

* tiny code changes

* Fixes

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
2023-12-20 16:49:53 +07:00
Joshen Lim
7473a65361 Chore/realtime inspector fixes 051223 (#19430)
* Fix broken URLs

* Limit realtime inspector to only the public schema as any other schema won’t work out of the box due to missing permissions

* Hide copy to clipboard for realtime message panel timestamp

* Add placeholder value for sending test message and fix sending test message to be sent as JSON

* Change channel name input to form

* Add join channel empty state

* Update copy writing

* Shift broadcast, presence, db changes toggle to filter message popover

* Add cursor-default

* Small style fix

* Fix toggles

* Address some feedback

* Fix the impersonation UI.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2023-12-05 13:50:59 +01:00
Ivan Vasilov
436bdb10ae chore: Move the studio app to apps/studio (#18915)
* Move all studio files from /studio to /apps/studio.

* Move studio specific prettier ignores.

* Fix the ui references from studio.

* Fix the css imports.

* Fix all package.json issues.

* Fix the prettier setup for the studio app.

* Add .turbo folder to prettierignore.

* Fix the github workflows.
2023-11-15 12:38:55 +01:00