Commit Graph

20 Commits

Author SHA1 Message Date
Ignacio Dobronich
97ff695ac9 fix: invalidate permissions cache on org invite acceptance (#47247)
- Add `invalidatePermissionsQuery` helper to `permissions-query.ts`
- Invalidate it alongside organizations and projects in
`useOrganizationAcceptInvitationMutation`'s `onSuccess`, so permissions
are refetched before the redirect to the org.

## Testing

1. Invite a user to an org.
2. Accept the invite via the invite link.
3. Navigate to the org's Billing page.
4. Verify the Subscription and Cost Control sections load without "you
need additional permissions" errors (no manual reload needed).


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

## Summary by CodeRabbit

* **Bug Fixes**
* Fixed an issue where user permissions were not properly synchronized
after accepting organization invitations.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-23 21:14:27 +00:00
Charis
3b7052b5a9 cleanup: fix import order and prefixes for studio/data (#44501) 2026-04-03 09:15:57 +02:00
Ivan Vasilov
8b657165b5 chore: Migrate to use custom type for ReactQuery queries and mutations (#40073)
* Add custom types for queries, mutations and infinite queries.

* Migrate all queries to use the new type.

* Migrate all infinite queries to useCustomInfiniteQueryOptions.

* Migrate all mutations to use useCustomMutationOptions.

* Add type to all imports in `types` folder.
2025-11-03 13:18:13 +01:00
Alaister Young
8855d05803 chore(studio): swap react-query to object syntax (#39842)
* chore(studio): swap react-query to object syntax

* Fix small issues found

* Fix realtime settings

* Nit

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-10-27 09:38:27 +01:00
Ivan Vasilov
659fd7195a chore: Don't send every permissions query error to Sentry (#39429)
Don't send every permissions query error to Sentry.
2025-10-10 10:32:05 +00:00
Ivan Vasilov
260d770148 Revert "Add sample rate to fetcher" (#39209)
Revert "Add sample rate to fetcher (#38785)"

This reverts commit 506b20734f.
2025-10-03 10:26:22 +02:00
Jordi Enric
506b20734f Add sample rate to fetcher (#38785)
* add sample rate to fetcher

* 20

* default to always capture and base sample rate of 20%

* rm unnecessray type
2025-09-17 14:39:35 +00:00
Jordi Enric
4236f8781e add status code to tags instead of context (#38706)
* add attachment with error for better filtering

* fix type error

* move status code to tag

* skip 4xxs in sentry

* Update apps/studio/data/permissions/permissions-query.ts

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

* Update apps/studio/data/permissions/permissions-query.ts

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

---------

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
2025-09-17 11:30:57 +02:00
Jordi Enric
33f59a5a4a Add attachment to sentry permission error (#38702)
* add attachment with error for better filtering

* fix type error
2025-09-15 12:19:10 +00:00
Jordi Enric
c61026e530 update handleError to pass sentry context (#38411)
* update handleError to pass sentry context

* no spread

* Fix the types for the sentry context.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-09-03 17:17:52 +02:00
Jordi Enric
b3bae9ec48 add sentry log to permission query error (#38222)
add permissions sentry logs
2025-08-27 12:34:06 +07:00
Jordi Enric
7b640dfab0 reduce stale time for permissions query (#37907) 2025-08-14 14:04:40 +02:00
Alaister Young
d75cb8b45c fix: studio circular imports (#36026)
* fix: studio circular imports

* Fix the import cycle on Wrappers tabs components.

* Remove duplicate declarations of the feature previews array.

* fix feature previews circular import

* Minor nit

* update all project contexts to use useSelectedProject

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-06-06 16:38:25 +08:00
Joshen Lim
e420a48826 Check for profile in projects, organizations and permissions query (#32759)
* Check for profile in projects, organizations and permissions query

* Remove unused telemetry function
2025-01-15 12:21:13 +08:00
Alaister Young
3a27070dc2 chore(perf): table editor query optimisation (#30184)
* chore: table editor query optimisation

* removed unused queries and fix invalidations

* address feedback

* fix filtering for foreign tables

* Update

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-10-31 15:20:40 +08:00
Joshen Lim
9081324666 Chore/fix oauth app api auth (#28093)
* Fix oauth app api auth

* Fix style

* Update codegen

* Fix

* Fix
2024-07-19 20:20:47 +08:00
Joshen Lim
bb6349f34f Second round of wrapping RQ errors with handleError (#26428)
* First round of wrapping RQ errors with handleError

* Remove the throw before the handleError usage.

* Make the handling of an API error more versatile. Add logging in Sentry if the error is of unknown type.

* Remove throwing of the handleError function.

* Add return type to the handleError function to be never so that we're sure it always throws.

* Second round of wrapping RQ errors with handleError

* Temp fix in delete credential mutation, and fix loading state

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2024-05-21 15:51:11 +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
d12332ea5a chore: xmas cleanup (#19938) 2024-01-04 17:27:49 +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