Commit Graph

11 Commits

Author SHA1 Message Date
Charis 0433eeb5f5 feat(studio): mark sql provenance for safety (#45336)
Mark provenance of SQL via the branded types SafeSqlFragment and
UntrustedSqlFragment. Only SafeSqlFragment should be executed;
UntrustedSqlFragments require some kind of implicit user approval (show
on screen + user has to click something) before they are promoted to
SafeSqlFragment.

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

* **New Features**
* Editor and RLS tester show loading states for inferred/generated SQL
and include a dedicated user SQL editor for safer edits.

* **Refactor**
* Platform-wide SQL handling tightened: snippets and AI-generated SQL
are treated as untrusted/display-only until promoted, improving safety
and consistency.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-05-04 13:08:06 -04:00
Joshen Lim 7f5865872a Enforce noUnusedLocals and noUnusedParameters in tsconfig.json + fix all related issues (#45264)
## Context

Enforce `noUnusedLocals` and `noUnusedParameters` in tsconfig.json + fix
all related issues
2026-04-27 17:42:34 +08: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
Charis 92db6bf4fa fix(studio): support for language feature in Storage.utils.ts (#41402)
Iterator.prototype.map() is only newly baseline available, which is
causing problems with older browsers.

Switched to Array.from(<iterator>) since that (and Map as an iterable)
date from 2015/2016
2025-12-16 16:30:09 +00:00
Joshen Lim 77944aca9a Decouple foreign schema creation from vector buckets (#41258)
* Decouple foreign schema creation from vector buckets

* Clean up

* Fix ts

* Fix issues
2025-12-12 14:42:56 +08:00
Charis 85dde8f7db fix(studio): use older supported syntax rather than Map.groupBy (#41284)
Some users' browsers do not support Map.groupBy (used in
Storage.utils.ts)
2025-12-11 22:02:43 +00:00
Charis c0c824809e feat(studio): add infinite pagination for buckets policies (#41277)
## Summary of changes

Buckets policies page at /project/_/storage/files/policies now uses the
paginated buckets endpoint to fetch buckets.

## Before

Used a non-paginated query.

## After

To support a paginated query, we now have:
- Infinite scroll loading behavior
- Fixed some of the buckets utilities to account for policy references
to buckets that haven't loaded yet
2025-12-11 15:45:16 -05:00
Charis d08f4c6aca refactor(studio): remove unnecessary buckets query (#41211)
Remove unnecessary unpaginated buckets query from bucket delete modal.
2025-12-09 16:54:59 -05:00
Danny White eaf35c14c6 chore(studio): filter policies by bucket name (#40456)
* filter buckets

* Simplify

* General refactors

* Smol

* Add missing empty state for search

* Clean up 😬

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-11-14 17:47:16 +08:00
Danny White 6f54cf8a57 feat(studio): inline storage buckets (#39154)
* chore: separate interfaces per bucket type

* chore: reuse existing bucket creation modal for files

* chore: allow external trigger for new bucket modal

* chore: minor fixes

* chore: full-size empty state

* chore: files other tabs

* fix: show tab bar when on file subroute

* chore: use existing table component to list buckets

* fix: tests

* fix: build error

* chore: remove future bucket type components from PR

* fix: dependency

* Couple of refactors to simplify implementation

* Fix TS

* chore: move s3 settings out to sidebar

* fix: minor nits

* fix: reuse existing loading spinners from schema visualiser

* fix: loading for files

* fix: prevent loading of table for zero buckets

* chore: improved loading state

* chore: shimmer on table

* chore: copywriting on S3

* chore: improve empty states

* fix: deprecated input instructions

* fix: filter/search bucket table

* chore: tidy

* fix: tests

* Minor refactors

* Rename

* Nit

* Shift V2 re-routing logic to layout level

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-10-07 10:59:37 +11:00
Drake Costa 57cd26ac77 Move non-layout Storage components to components/interfaces (#37381)
* Update studio testing setup files

Improves API mocking type safety and polyfills browser APIs necessary to run tests with framer-motion components

* fix missing listen call for msw, resolve test type error

* fix imports

* Update studio testing setup files

Improves API mocking type safety and polyfills browser APIs necessary to run tests with framer-motion components

* fix missing listen call for msw, resolve test type error

* fix imports

* Move non-layout Storage related components to `components/interfaces`

* Fix paths

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-07-22 23:48:20 +08:00