Skip to content

feat(people): add status filter to team members page#2379

Open
tofikwest wants to merge 1 commit intomainfrom
sale-6-people-status-filter
Open

feat(people): add status filter to team members page#2379
tofikwest wants to merge 1 commit intomainfrom
sale-6-people-status-filter

Conversation

@tofikwest
Copy link
Copy Markdown
Contributor

Summary

  • Expose deactivated field in the People API response so the client can properly distinguish between deactivated and inactive members
  • Extract display-item building and filtering logic from TeamMembersClient into pure functions (buildDisplayItems, filterDisplayItems) in a new filter-members.ts module
  • Replace lucide-react Loader2 icon with InProgress from @trycompai/design-system/icons
  • Add deactivated field to client-side PeopleResponseDto type

Test plan

  • 17 unit tests for filterDisplayItems and buildDisplayItems covering:
    • Default filter hides deactivated members
    • "Active" filter shows only active members
    • "Deactivated" filter shows deactivated and inactive members
    • "Pending" filter shows only pending invitations
    • "All" filter shows everything
    • Search by name and email (case-insensitive)
    • Role filter
    • Combined filter scenarios
  • API controller test for includeDeactivated=true query parameter
  • Manual verification: navigate to People > All and use the status dropdown

Resolves SALE-6

🤖 Generated with Claude Code

- Add `deactivated` field to API response (MEMBER_SELECT + PeopleResponseDto)
  so the client can properly distinguish deactivated vs inactive members
- Extract filtering logic from TeamMembersClient into testable pure functions
  (buildDisplayItems, filterDisplayItems) in filter-members.ts
- Replace lucide-react Loader2 with InProgress from @trycompai/design-system/icons
- Add deactivated field to client-side PeopleResponseDto
- Add API test for includeDeactivated query parameter
- Add 17 unit tests covering status/search/role filter combinations

Resolves SALE-6

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@linear
Copy link
Copy Markdown

linear bot commented Mar 30, 2026

SALE-6 People > Status

@cursor
Copy link
Copy Markdown

cursor bot commented Mar 30, 2026

PR Summary

Medium Risk
Medium risk because it changes the People API response shape and the query behavior for listing members (via includeDeactivated), which can affect downstream clients and member visibility.

Overview
Adds deactivated-aware member listing support. The People API now includes a deactivated flag in PeopleResponseDto, selects it from the database, and has test coverage ensuring GET /v1/people?includeDeactivated=true passes through to the service.

Refactors and tests People page filtering. TeamMembersClient now delegates list item construction and search/role/status filtering to new pure helpers (buildDisplayItems, filterDisplayItems), with new unit tests covering default hiding of deactivated members and explicit active/pending/deactivated/all modes, and replaces the syncing spinner icon with the design-system InProgress icon. The client PeopleResponseDto type is updated to include deactivated.

Written by Cursor Bugbot for commit 8318695. This will update automatically on new commits. Configure here.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 30, 2026

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

Project Deployment Actions Updated (UTC)
app Ready Ready Preview, Comment Mar 30, 2026 3:25pm
comp-framework-editor Ready Ready Preview, Comment Mar 30, 2026 3:25pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
portal Skipped Skipped Mar 30, 2026 3:25pm

Request Review

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.

1 participant