Extract shared Auth user cards and copyable detail fields, and use the
shared raw-JSON display in the user panel. The existing Logs view
remains available; unified activity timelines and log-user filtering
arrive separately in #50837.
This includes display-name/initials coverage and the Auth panel's
component and browser tests. The browser test now verifies keyboard
copying and Escape panel dismissal separately: the existing Auth Escape
shortcut closes the details panel, so expecting it to restore focus to a
field was incorrect. Its Raw JSON check reads the copied JSON's fields,
since the code view's text includes line numbers.
`UserCard` is Studio's first `Avatar`, so `vite.config.ts` pins
`avatar.tsx` to its own chunk, like `field`, `drawer` and `slider`.
Otherwise Rolldown pools it into the Auth `users` page chunk that the
`ui` barrel then imports back, a chunk cycle that fails the TanStack
build.
### How to test
1. Open an existing user in Authentication → Users. Check the profile
card, overview fields, and name/avatar fallbacks for a user without
profile metadata.
2. Open a copyable field using both mouse and keyboard (Enter), choose
Copy, and check the clipboard value.
3. Open Raw JSON, scroll, and use the floating copy button. Confirm the
existing Logs tab still opens and Escape closes the user panel.
### Validation
- Final head `f4f8cb22e97fefac56c68b4676184d8358d8080e` targets master
without conflicts.
- Focused local tests: 13 passed across three files, retries disabled,
including independent shuffled seed 5084131. Real panel/MSW tests cover
field copying and complete nested JSON; fallback and Unicode regressions
detect the original broken behavior.
- Browser QA passed on `6b49434339`: nameless profile fallback, overview
fields, mouse/keyboard copying, Raw JSON scrolling/copying, existing
Logs tab, and Escape dismissal. Later commits change only the E2E test;
application code is identical.
- All GitHub checks passed on the final head, including four unit-test
shards, four Next/TanStack E2E shards, typecheck, formatting, lint
ratchet, knip, and Studio Docker build.
- Independent review found no remaining issues; all review threads are
resolved.
- Fresh final-head studio-staging preview is blocked during dependency
installation: the registry returns HTTP 451 for
`react-hook-form@7.72.1`. The earlier matching application preview
passed browser QA; this deployment failure remains visible.
### Stack
Based on the logs table building blocks stack, which merges first:
#50953 → #50954 → #50955 → #50957 → #50958 → #52281. Then merge in
order:
1. #50835 — grouped log overviews and raw JSON
2. #50840 — request correlation queries
3. #50836 — request timeline UI and folding
4. #50841 — shared Auth user details
5. #50837 — log user correlation and Auth activity
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Jordi Enric <jordi.err@gmail.com>
## Context
We reached to a consensus that we'll keep manually written queries
within the `pg-meta` package
I'll shift queries over in several PRs but wanted to double check if the
changes here is a good folder structure
## Changes involved
- Am organizing dashboard queries in `pg-meta` based on product
- So folder structure will be `/sql/studio/[product]/*.ts`
- Every constant will be exported directly from `pg-meta`'s index
- So consumption in dashboard will just be `import { xxx } from
'@supabase/pg-meta`
cc @avallete and @soedirgo on this one - lemme know if this is alright,
or if there's a preferred way to do this
* Updated to use optimized search columns when getting user counts
* added unit tests for query builders
* minor
* Nit fix keywords URL param not getting loaded into search input field
* removed user footer
* updated tests for upstream
* updated integration tests
* updated tests to be int for paginated
* updated schema
* updated types
* updated type imports
* updated type imports
* Apply suggestion from @avallete
Co-authored-by: Andrew Valleteau <avallete@users.noreply.github.com>
* updated literal import
* refactor: use common escaping (#40186)
refactor: use utils for sql escaping
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Andrew Valleteau <avallete@users.noreply.github.com>
* feat: optimized users page
* Update UI
* Reinstate footer with count if mode is freeform
* Simplify disabled sort in performance mode
* Clean
* Small fix
* Final fixes
* Shift users SQL query to packages/pg-meta
* Nit unrelated: Clear query params from useLogsUrlState when going to logs tab of a selected user
* Shift user count SQL and get count estimate SQL into packages/pg-meta
* Fix
* Nit
* Nit
* Minor nits
* Refactor UX for searching
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* 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>
* Set up banning and unbanning user, although untested due to API CORs issue
* Update search filter UI for users management V2
* Update API types
* Minoir
* Small fix
* Update UI
* Add support for resizing and re-ordering columns
* Add google profile image url to csp
* Revert test button
* Implement toggling of columns
* Fix loading
* Fully implement banning/unbanning user
* Fix
* Update apps/studio/components/interfaces/Auth/Users/UserOverview.tsx
Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
* Fallback non CSP supported avatar urls to user icon
* Fix some bugs
* Remove prism-react-renderer from studio, add to ui patterns
* Migrate users query from API to studio
* Address some feedback
---------
Co-authored-by: Alaister Young <alaister@users.noreply.github.com>