Conversation
...app/(app)/authorization/permissions/components/upsert-permission/upsert-permission.schema.ts
Show resolved
Hide resolved
...tion/permissions/components/table/components/actions/keys-table-action.popover.constants.tsx
Show resolved
Hide resolved
...thorization/permissions/components/table/components/actions/components/delete-permission.tsx
Outdated
Show resolved
Hide resolved
apps/dashboard/app/(app)/authorization/permissions/components/upsert-permission/index.tsx
Outdated
Show resolved
Hide resolved
mcstepp
left a comment
There was a problem hiding this comment.
nothing blocking, just a couple nitpicks for optimizations and simplifications
There was a problem hiding this comment.
Actionable comments posted: 3
♻️ Duplicate comments (1)
apps/dashboard/app/(app)/authorization/permissions/components/table/components/assigned-items-cell.tsx (1)
55-58: Still hard-coded, should reflect thetypepropPrevious feedback flagged this; the string is now “permissions…”, but it’s still not dynamic and will be wrong when
type === "slug".- {totalCount - items.length} more permissions... + {totalCount - items.length} more {type}...
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
apps/dashboard/app/(app)/authorization/permissions/components/table/components/assigned-items-cell.tsx(1 hunks)apps/dashboard/lib/trpc/routers/index.ts(2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
apps/dashboard/app/(app)/authorization/permissions/components/table/components/assigned-items-cell.tsx (2)
internal/icons/src/icons/tag.tsx (1)
Tag(15-39)internal/icons/src/icons/hand-holding-key.tsx (1)
HandHoldingKey(15-97)
⏰ Context from checks skipped due to timeout of 90000ms (8)
- GitHub Check: Test Packages / Test ./packages/cache
- GitHub Check: Test Packages / Test ./packages/nextjs
- GitHub Check: Test Packages / Test ./apps/dashboard
- GitHub Check: Test Packages / Test ./packages/hono
- GitHub Check: Test Packages / Test ./internal/clickhouse
- GitHub Check: Test Packages / Test ./internal/hash
- GitHub Check: autofix
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (1)
apps/dashboard/lib/trpc/routers/index.ts (1)
175-180: ```shell
#!/bin/bash
set -eecho "Routers directory contents:"
ls apps/dashboard/lib/trpc/routersecho -e "\nShowing apps/dashboard/lib/trpc/routers/index.ts around the permissions block (lines 160-200):"
sed -n '160,200p' apps/dashboard/lib/trpc/routers/index.tsecho -e "\nFinding any occurrences of 'rbac' in routers folder:"
rg "rbac" -n apps/dashboard/lib/trpc/routersecho -e "\nChecking for middleware chaining in routers folder:"
rg ".middleware" -n apps/dashboard/lib/trpc/routers</details> </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
...oard/app/(app)/authorization/permissions/components/table/components/assigned-items-cell.tsx
Show resolved
Hide resolved
...oard/app/(app)/authorization/permissions/components/table/components/assigned-items-cell.tsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Actionable comments posted: 6
♻️ Duplicate comments (1)
apps/dashboard/app/(app)/authorization/permissions/components/upsert-permission/index.tsx (1)
113-115: Replaceconsole.errorwith user-facing feedback (comment still unresolved)The earlier review pointed this out; the raw console log remains. Show a toast or field error instead so the user understands why the action failed.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (3)
apps/dashboard/app/(app)/authorization/permissions/components/table/components/actions/components/delete-permission.tsx(1 hunks)apps/dashboard/app/(app)/authorization/permissions/components/upsert-permission/index.tsx(1 hunks)apps/dashboard/app/(app)/authorization/permissions/components/upsert-permission/upsert-permission.schema.ts(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (25)
- GitHub Check: Test Go API Local / Test (Shard 7/8)
- GitHub Check: Test Go API Local / Test (Shard 3/8)
- GitHub Check: Test Go API Local / Test (Shard 8/8)
- GitHub Check: Test Go API Local / Test (Shard 6/8)
- GitHub Check: Test Go API Local / Test (Shard 5/8)
- GitHub Check: Test Go API Local / Test (Shard 4/8)
- GitHub Check: Test Go API Local / Test (Shard 2/8)
- GitHub Check: Test Go API Local / Test (Shard 1/8)
- GitHub Check: Build / Build
- GitHub Check: Test API / API Test Local
- GitHub Check: Test Packages / Test ./packages/hono
- GitHub Check: Test Packages / Test ./internal/resend
- GitHub Check: Test Packages / Test ./internal/clickhouse
- GitHub Check: Test Packages / Test ./internal/keys
- GitHub Check: Test Packages / Test ./internal/billing
- GitHub Check: Test Packages / Test ./internal/encryption
- GitHub Check: Test Packages / Test ./packages/cache
- GitHub Check: Test Packages / Test ./internal/hash
- GitHub Check: Test Packages / Test ./packages/api
- GitHub Check: Test Packages / Test ./packages/rbac
- GitHub Check: Test Packages / Test ./apps/dashboard
- GitHub Check: Test Packages / Test ./packages/nextjs
- GitHub Check: Test Packages / Test ./internal/id
- GitHub Check: autofix
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (2)
apps/dashboard/app/(app)/authorization/permissions/components/table/components/actions/components/delete-permission.tsx (1)
52-56: 👍 Previous nested‐conditional concern resolvedYou applied the suggested early-exit pattern (
if (!open && !isConfirmPopoverOpen)) which removes the previous indentation level and keeps the callback tidy.apps/dashboard/app/(app)/authorization/permissions/components/upsert-permission/upsert-permission.schema.ts (1)
7-12:trim()would make this refine unreachableBecause the slug schema below uses
.trim(), consider also trimming the name or removing this refine; otherwise the UX between the two fields is inconsistent.
...thorization/permissions/components/table/components/actions/components/delete-permission.tsx
Show resolved
Hide resolved
...thorization/permissions/components/table/components/actions/components/delete-permission.tsx
Show resolved
Hide resolved
...thorization/permissions/components/table/components/actions/components/delete-permission.tsx
Show resolved
Hide resolved
...app/(app)/authorization/permissions/components/upsert-permission/upsert-permission.schema.ts
Show resolved
Hide resolved
apps/dashboard/app/(app)/authorization/permissions/components/upsert-permission/index.tsx
Show resolved
Hide resolved
apps/dashboard/app/(app)/authorization/permissions/components/upsert-permission/index.tsx
Show resolved
Hide resolved
|
@mcstepp we are good to go 🫡 |
|
Some tests are failing in dashboard |
I'll fix that in another PR. |
|
|
Shit you got me. I promise I’ll fix it tomorrow 😁 |
What does this PR do?
This PR refactors
/authorization/permissionspage.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
Introduced a redesigned permissions management interface with enhanced filtering, search (including AI-powered natural language search), and sorting capabilities.
Added a virtualized permissions table with improved selection controls, batch actions, and real-time status indicators.
Provided dialogs for creating, editing, and deleting permissions, with validation and confirmation flows.
Enabled detailed permission and role assignment views, including visual indicators and skeleton loaders for loading states.
Bug Fixes
Refactor
Simplified navigation and page components for permissions, removing server-side data fetching in favor of client-side rendering.
Streamlined empty state and modal management for a more intuitive user experience.
Chores
Updated backend APIs to support advanced querying, batch deletion, and AI-driven search for permissions and roles.
Enhanced schema validation and filtering logic for robust data handling and consistency.
Summary by CodeRabbit
New Features
Refactor
Bug Fixes
Chores