Skip to content

fix(sdk): remove role change from invitation#1463

Open
rsbh wants to merge 1 commit intomainfrom
fix_sdk_remove_invitation_actions
Open

fix(sdk): remove role change from invitation#1463
rsbh wants to merge 1 commit intomainfrom
fix_sdk_remove_invitation_actions

Conversation

@rsbh
Copy link
Member

@rsbh rsbh commented Mar 18, 2026

Summary

Changes

Technical Details

Test Plan

  • Manual testing completed
  • Build and type checking passes

@vercel
Copy link

vercel bot commented Mar 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
frontier Ready Ready Preview, Comment Mar 18, 2026 10:15am

@coderabbitai
Copy link

coderabbitai bot commented Mar 18, 2026

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes

    • Corrected display of member role modification options in the member dropdown menu; options are now appropriately hidden based on member invitation status.
  • Refactor

    • Simplified the structural organization of the member management dropdown component for improved code maintainability and clarity.
    • Optimized the positioning and presentation of member actions within the dropdown menu for better user interaction flow.

Walkthrough

Refactors 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

Cohort / File(s) Summary
DropdownMenu Refactoring
web/sdk/react/views/members/member-columns.tsx
Restructured DropdownMenu from fragment-wrapped to direct component with Trigger and Content at top level. Added guard condition to gate excludedRoles rendering for invited members. Kept Remove action as dropdown item with unchanged behavior. Adjusted indentation and simplified DOM structure.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • paanSinghCoder
  • rohanchkrabrty
📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 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

📥 Commits

Reviewing files that changed from the base of the PR and between 4af281d and b08bcd3.

📒 Files selected for processing (1)
  • web/sdk/react/views/members/member-columns.tsx

@coveralls
Copy link

Pull Request Test Coverage Report for Build 23239705704

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 40.775%

Totals Coverage Status
Change from base Build 23232431365: 0.0%
Covered Lines: 14321
Relevant Lines: 35122

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants