-
Notifications
You must be signed in to change notification settings - Fork 0
feat: implement empty state for server list #111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@claude can you please do a deep review of this PR? |
|
Claude finished @kantord's task —— View job Deep PR Review - Empty State Implementation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements an empty state feature for the server list, enhancing the user experience when no servers are available or when search results are empty. It introduces a mock scenario system for testing different backend states in development, and adds a reusable EmptyState component with contextual illustrations and actions.
- Adds mock scenario infrastructure allowing developers to test different backend states via cookies
- Implements
EmptyStatecomponent with two variants: "no-items" for empty catalog and "no-matching-items" for search results - Updates server list to display contextual empty states with clear search functionality
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/mocks/mockScenario.ts |
New utility using Proxy pattern to create scenario-specific MSW handlers activated by header matching |
src/mocks/scenarios/empty-servers.ts |
Empty servers scenario handler returning empty list for testing |
src/mocks/handlers.ts |
Integrates scenario handlers with correct precedence ordering |
src/lib/api-client.ts |
Adds development-only mock scenario header support based on cookie value |
src/app/catalog/components/empty-state.tsx |
New reusable empty state component with variant-based illustrations |
src/app/catalog/components/servers.tsx |
Implements empty state logic with search-aware variants and clear action |
src/app/catalog/components/servers-wrapper.tsx |
Adds clear search handler and passes it to Servers component |
src/app/catalog/components/__tests__/servers.test.tsx |
Comprehensive test coverage for empty state behavior and user interactions |
src/app/catalog/components/__tests__/servers-wrapper.test.tsx |
Integration test for clear search functionality from empty state |
peppescg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice the empty state 🚀
I have some doubts on the dynamic mock of a empty response, I don't see the value honestly

fixes #94
recording-2025-11-28_12-54-32.mp4
recording-2025-11-28_13-00-09.mp4