From 82d7d347c42d697f71835e0733dbba3d360d7da4 Mon Sep 17 00:00:00 2001
From: Charis <26616127+charislam@users.noreply.github.com>
Date: Fri, 11 Sep 2026 02:02:28 -0400
Subject: [PATCH 01/28] fix(studio): eliminate per-row query duplication on org
team page (#50238)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
## Summary
* Fixes extreme slowness (browser-crashing on filter) on
`/org/[slug]/team` for orgs with 200+ members.
* Root cause: `MemberRow`/`MemberActions` each independently subscribed
to org-wide React Query data (roles, projects, permissions, feature
flags) and rendered a hidden `UpdateRolesPanel` per row. Filtering
caused hundreds of duplicate query observers to mount/unmount on every
keystroke, each scheduling its own stale-timeout bookkeeping and
blocking the main thread for multiple seconds.
* Hoisted all org-wide data fetching (`useOrganizationRolesV2Query`,
`useOrgProjectsInfiniteQuery`, `usePermissionsQuery`,
`useSelectedOrganizationQuery`, `useIsFeatureEnabled`) to `MembersView`
and passed the results down as props.
* Replaced the per-row `useAsyncCheckPermissions` hook calls in
`MemberActions` with the underlying pure `doPermissionsCheck` function
memoized locally, removing their internal query subscriptions.
* Simplified `useGetRolesManagementPermissions` to stop calling a
query-fetching fallback hook that was unreachable given all current call
sites already pass `permissions`/`orgSlug` directly.
* Replaced 200 hidden per-row `UpdateRolesPanel` instances with a single
shared instance owned by `MembersView`, opened via an `onManageAccess`
callback.
* Cached the regex built by `doPermissionsCheck`'s `toRegexpString`
instead of rebuilding it on every permission check.
Diagnosed from two Chrome performance traces of the team page while
typing in the filter box (multi-second main-thread blocking tasks traced
to React Query `QueryObserver` mount/unmount storms).
## Test plan
- [X] `tsc --noEmit` clean (only one pre-existing, unrelated error in
`packages/ui-patterns`)
- [X] `eslint` clean on all changed files (only pre-existing warnings)
- [X] `vitest run tests/components/Organization/TeamSettings` — 51 tests
pass
- [X] Manually verify filtering is smooth on an org with 200+ members
## Summary by CodeRabbit
* **New Features**
* Team Settings provides centralized member access and role management.
* Members can update roles through the access-management panel.
* **Improvements**
* Permission checks now more accurately handle organization and project
scopes, including wildcard patterns.
* Member search is debounced for smoother filtering while typing.
* Access-management actions use current organization members, roles,
permissions, and feature settings.
---------
Co-authored-by: Joshen Lim
This page does not have any data
{error.message}
- {email}
{selectedFeature?.name}
The SMS hook will be used in place of the SMS provider configured
-Instance "{instanceName}" does not exist in this project
-Preview of SQL statement
-Restarting your project can help resolve timeout errors or stale connections.
-{description}
}Select which edge function to trigger
{isLoading ? ( -With RLS enabled, anonymous users will not have access to this queue.
Manage
) : ( @@ -260,7 +260,7 @@ export const IntegrationConnectionOption = forwardRef{item.description}
-{errorMessage} Update your billing address or tax ID before upgrading your plan.
EXPLAIN ANALYZE output
Consider resetting the analysis after optimizing any queries
-0 ? config.channelName : ''} @@ -220,7 +220,6 @@ export const ChooseChannelPopover = ({ If you leave this channel, all of the messages populated on this page will disappear
Send your first realtime message from your database, application code or edge function
-Send messages to a channel from your client application or database via triggers.
-Set up Row Level Security policies to control who can see messages within a channel
-Tables must have realtime enabled
Reach out to us via support if you're interested
-{ip}
{projectAccessDescription}
Please resolve all outstanding invoices first before deploying a new read replica.
-If you'd like to use read replicas, please contact us via support.
-{description}
diff --git a/apps/studio/components/interfaces/SignIn/SignInForm.tsx b/apps/studio/components/interfaces/SignIn/SignInForm.tsx
index e602bf4db9a..ac85aefc03f 100644
--- a/apps/studio/components/interfaces/SignIn/SignInForm.tsx
+++ b/apps/studio/components/interfaces/SignIn/SignInForm.tsx
@@ -184,7 +184,6 @@ export const SignInForm = () => {
/>
The Iceberg Wrapper integration is required in order to query analytics tables.
-Columns