Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughSummary by CodeRabbit
WalkthroughRefactors the DropdownMenu component structure in member-columns.tsx from a fragment-wrapped layout to a direct component hierarchy. Introduces a conditional guard to hide per-member role options when a member is invited, while preserving existing removal functionality and behavior. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
📝 Coding Plan
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
web/sdk/react/views/members/member-columns.tsx (1)
225-228: Gate policy refetch to non-invited members (or remove explicit refetch).Line 227 refetches policies on every open, but invited rows do not render role actions (Line 236), so this call is unused there and adds avoidable API traffic. Also, the query is already tied to
isMenuOpen, so this may cause redundant requests.Proposed adjustment
const { data: policiesData, refetch: refetchPolicies } = useQuery( FrontierServiceQueries.listPolicies, create(ListPoliciesRequestSchema, { orgId: organizationId, userId: member.id }), { - enabled: isMenuOpen && !!member.id, + enabled: isMenuOpen && !!member.id && !member.invited, staleTime: 60_000, gcTime: 300_000 } ); <DropdownMenu placement="bottom-end" open={isMenuOpen} onOpenChange={(open: boolean) => { setIsMenuOpen(open); - if (open) refetchPolicies(); + if (open && !member.invited && member.id) refetchPolicies(); }} >
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 6ad7b991-c019-4782-97f6-9992d61788db
📒 Files selected for processing (1)
web/sdk/react/views/members/member-columns.tsx
Pull Request Test Coverage Report for Build 23239705704Details
💛 - Coveralls |
Summary
Changes
Technical Details
Test Plan