Skip to content

fix(sdk): change the members empty state copy for filtered results - #2032

Open
rohanchkrabrty wants to merge 1 commit into
mainfrom
fix/members-filter-empty-state
Open

rohanchkrabrty wants to merge 1 commit into
mainfrom
fix/members-filter-empty-state

Conversation

@rohanchkrabrty

@rohanchkrabrty rohanchkrabrty commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • The members table showed "Get started by adding your first member" when the filters matched no members.
  • Change the empty state description to "No members match the selected filters. Try adjusting or clearing your filters."
  • The DataTable already shows the clear filters action, so no new button is added.

@vercel

vercel Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
frontier Ready Ready Preview Oct 30, 2026 6:39am UTC

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • Updated the members table’s empty-state message to clarify that no members match the selected filters and suggest adjusting or clearing them.

The members table empty-state subheading now says that no members match the selected filters and suggests adjusting or clearing them. It replaces the prompt to add a first member.

Changes: Members empty-state wording

Layer / File(s) Summary
Empty-state subheading
web/sdk/client/views/members/members-view.tsx
The subheading now describes members not matching the selected filters and suggests adjusting or clearing them.

Priority: Low

Estimated code review effort: 1 (Trivial) | ~2 minutes

Change: Bug fix

Merge Risk: Low · up to 34ba6

Empty member lists can incorrectly tell users to adjust filters, and whitespace-only searches can leave the table difficult to recover. These are bounded issues to fix or explicitly accept before merging.

Pre-merge checks: Passed 2
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@coveralls

coveralls commented Oct 29, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 41015351870

Coverage remained the same at 55.992%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 42145
Covered Lines: 23598
Line Coverage: 55.99%
Coverage Strength: 19.68 hits per line

💛 - Coveralls

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1


Review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 8190c1f and c24ac8a.

Files selected for processing: 4
  • web/sdk/client/components/members-filter-empty-state/index.ts
  • web/sdk/client/components/members-filter-empty-state/members-filter-empty-state.tsx
  • web/sdk/client/views/members/members-view.tsx
  • web/sdk/client/views/projects/project-details-view.tsx

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

subHeading="Get started by adding your first member"
/>
zeroState={
roleFilter === 'all' ? (

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Minor · Functional Correctness · Quick win

Handle whitespace-only searches in the zero state.

When a search contains only spaces and matches no rows, Apsara treats it as an inactive query but still filters the rows. This branch then shows the onboarding message. Apsara also disables the search input, so the user cannot edit it or use the new clear button. (raw.githubusercontent.com)

Handle this case in both member tables, including project-details-view.tsx at Line 377. Keep search editable and distinguish a whitespace search from an empty member list, or normalize whitespace consistently before filtering.

The members table shows its empty state when the filters match no members, so the onboarding text did not fit. The table already adds the clear filters action.
@rohanchkrabrty
rohanchkrabrty force-pushed the fix/members-filter-empty-state branch from c24ac8a to 34ba60b Compare October 30, 2026 06:39
@rohanchkrabrty rohanchkrabrty changed the title fix(sdk): show a filter empty state when no members match fix(sdk): change the members empty state copy for filtered results Oct 30, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Follow-up Comments

Outside diff Use the role filter state to choose the zero-state copy.

190-190: Minor · Functional Correctness · Quick win

Use the role filter state to choose the zero-state copy.

zeroState takes priority over emptyState when no rows remain and no table query is active. The role Select is local state. It filters data before DataTable receives it, so it never reaches tableQuery. Adding onboarding copy as zeroState alone would show "Get started by adding your first member" when a selected role has no members.

The current code shows the filter copy for every empty result. That includes an empty result with roleFilter === 'all', which has no active filter. Show the onboarding copy only in that case.

Suggested fix
+  const filteredEmptyState = (
+    <EmptyState
+      icon={<ExclamationTriangleIcon />}
+      heading="No members found"
+      subHeading="No members match the selected filters. Try adjusting or clearing your filters."
+    />
+  );
+
   return (
           <DataTable.Content
+            zeroState={
+              roleFilter === 'all' ? (
+                <EmptyState
+                  icon={<ExclamationTriangleIcon />}
+                  heading="No members found"
+                  subHeading="Get started by adding your first member"
+                />
+              ) : (
+                filteredEmptyState
+              )
+            }
             emptyState={
-              <EmptyState
-                icon={<ExclamationTriangleIcon />}
-                heading="No members found"
-                subHeading="No members match the selected filters. Try adjusting or clearing your filters."
-              />
+              filteredEmptyState
             }

Open the source location


Review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between c24ac8a and 34ba60b.

Files selected for processing: 1
  • web/sdk/client/views/members/members-view.tsx
Files skipped from review as they are similar to previous changes: 1
  • web/sdk/client/views/members/members-view.tsx

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

This branch was successfully deployed

1 active deployment
Preview — 34ba60b3 Deployed Oct 30, 2026 by vercel[bot]
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