mirror of
https://github.com/supabase/supabase.git
synced 2026-09-08 19:08:44 +08:00
Offshoot from https://github.com/supabase/supabase/pull/47743. [Linear issue](https://linear.app/supabase/issue/FE-3939/add-user-logs-filter-to-the-logs-page) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a `user` filter to Unified Logs with a user picker (email or ID). * Added “View user logs” actions from the Users table to jump to Unified Logs. * **Bug Fixes** * Updated Unified Logs searching so default log-type restrictions no longer block user-attributed results. * **UI Updates** * Unified Logs filter bar and reset behavior now include clearing the user filter. * Improved empty-state messaging when the selected user filter isn’t supported. * Refreshed highlighted styling in command list items. * **Tests** * Expanded coverage for user filter configuration and query edge cases. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: kemal.earth <606977+kemaldotearth@users.noreply.github.com> Co-authored-by: kemal <hello@kemal.earth> Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
39 lines
1.4 KiB
TypeScript
39 lines
1.4 KiB
TypeScript
import type { OptimizedSearchColumns } from '@supabase/pg-meta'
|
|
|
|
export const authKeys = {
|
|
user: (projectRef: string | undefined, userId?: string | null) =>
|
|
['projects', projectRef, 'user', userId] as const,
|
|
usersInfinite: (
|
|
projectRef: string | undefined,
|
|
params?: {
|
|
keywords?: string
|
|
filter?: string
|
|
providers?: string[]
|
|
sort?: string
|
|
order?: string
|
|
column?: OptimizedSearchColumns
|
|
}
|
|
) => ['projects', projectRef, 'users-infinite', params].filter(Boolean),
|
|
usersSearch: (projectRef: string | undefined, keywords: string) =>
|
|
['projects', projectRef, 'users-search', keywords] as const,
|
|
usersCount: (
|
|
projectRef: string | undefined,
|
|
params?: {
|
|
keywords?: string
|
|
filter?: string
|
|
providers?: string[]
|
|
forceExactCount?: boolean
|
|
column?: OptimizedSearchColumns
|
|
}
|
|
) => ['projects', projectRef, 'users-count', params].filter(Boolean),
|
|
|
|
usersIndexStatuses: (projectRef: string | undefined) =>
|
|
['projects', projectRef, 'users-index-statuses'] as const,
|
|
indexWorkerStatus: (projectRef: string | undefined) =>
|
|
['projects', projectRef, 'index-worker-status'] as const,
|
|
authConfig: (projectRef: string | undefined) => ['projects', projectRef, 'auth-config'] as const,
|
|
accessToken: () => ['access-token'] as const,
|
|
overviewMetrics: (projectRef: string | undefined) =>
|
|
['projects', projectRef, 'auth-overview-metrics'] as const,
|
|
}
|