Conversation
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
📝 WalkthroughWalkthroughThis change introduces a comprehensive rewrite and expansion of the authorization roles management feature in the dashboard application. It replaces server-side logic and legacy components with a fully client-driven, modular, and virtualized roles table, supporting advanced filtering, searching (including LLM-based queries), role creation/editing dialogs, and action menus. The backend is extended with new tRPC endpoints for querying, searching, upserting, and deleting roles, keys, and permissions, along with schema validation and audit logging. Several new UI components, hooks, schemas, and icons are added, while obsolete files and server components are removed. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant RolesPage (Client)
participant RolesList (Client)
participant useRolesListQuery (Hook)
participant trpc.authorization.roles.query (API)
participant DB
User->>RolesPage (Client): Visit /authorization/roles
RolesPage->>RolesList: Render roles table
RolesList->>useRolesListQuery: Request roles (filters, cursor)
useRolesListQuery->>trpc.authorization.roles.query: Fetch roles
trpc.authorization.roles.query->>DB: Query roles with filters, pagination
DB-->>trpc.authorization.roles.query: Return roles data
trpc.authorization.roles.query-->>useRolesListQuery: Return roles, total, nextCursor
useRolesListQuery-->>RolesList: Provide roles data
RolesList-->>User: Display roles table
User->>RolesList: Click "Create new role"
RolesList->>UpsertRoleDialog: Open dialog
User->>UpsertRoleDialog: Fill form, submit
UpsertRoleDialog->>trpc.authorization.roles.upsert: Upsert role
trpc.authorization.roles.upsert->>DB: Insert/update role, keys, permissions
DB-->>trpc.authorization.roles.upsert: Success
trpc.authorization.roles.upsert-->>UpsertRoleDialog: Return result
UpsertRoleDialog-->>RolesList: Close dialog, refresh roles
User->>RolesList: Search/filter roles
RolesList->>useFilters: Update filters
useFilters->>useRolesListQuery: Update query params
useRolesListQuery->>trpc.authorization.roles.query: Fetch filtered roles
trpc.authorization.roles.query->>DB: Query with new filters
DB-->>trpc.authorization.roles.query: Return filtered roles
trpc.authorization.roles.query-->>useRolesListQuery: Return data
useRolesListQuery-->>RolesList: Update table
User->>RolesList: Click "Delete" on a role
RolesList->>DeleteRole: Open confirmation
User->>DeleteRole: Confirm deletion
DeleteRole->>trpc.authorization.roles.delete: Delete role(s)
trpc.authorization.roles.delete->>DB: Delete role(s), related keys/permissions, audit log
DB-->>trpc.authorization.roles.delete: Success
trpc.authorization.roles.delete-->>DeleteRole: Return result
DeleteRole-->>RolesList: Remove role from table
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (3)
⏰ Context from checks skipped due to timeout of 90000ms (16)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
we never heard any complaints about case sensetivity yet 😄 |
...app)/authorization/roles/components/upsert-role/components/assign-key/create-key-options.tsx
Show resolved
Hide resolved
...app)/authorization/roles/components/upsert-role/components/assign-key/create-key-options.tsx
Show resolved
Hide resolved
...app)/authorization/roles/components/upsert-role/components/assign-key/create-key-options.tsx
Show resolved
Hide resolved
mcstepp
left a comment
There was a problem hiding this comment.
just some nitpicks. use your own discretion if you want to address them, none of them are blocking.
|
@mcstepp could you approve again? I had to check the staging one more time with merged master |
What does this PR do?
Replaces old /roles page with new one.
Fixes # (issue)
If there is not an issue for this, please create one first. This is used to tracking purposes and also helps use understand why this PR exists
Type of change
How should this be tested?
Checklist
Required
pnpm buildpnpm fmtconsole.logsgit pull origin mainAppreciated
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
Chores