Skip to content

fix: resolve misleading empty state when searching in TaskLibrary#1386

Open
Abhishek2005-ard wants to merge 18 commits into
aryandas2911:mainfrom
Abhishek2005-ard:fix/task-library-search-empty-state
Open

fix: resolve misleading empty state when searching in TaskLibrary#1386
Abhishek2005-ard wants to merge 18 commits into
aryandas2911:mainfrom
Abhishek2005-ard:fix/task-library-search-empty-state

Conversation

@Abhishek2005-ard
Copy link
Copy Markdown
Contributor

Description

This PR improves the user experience in the TaskLibrary.jsx component by resolving an edge case with the search functionality.

Previously, searching for a task that yielded zero results would trigger the generic <EmptyState /> component. Since the EmptyState component is designed to prompt users to add their first task when their entire library is empty, displaying it during a failed search was confusing and made it look like the user's tasks were deleted.

Changes Made

  • Updated the conditional rendering logic in the Task List container.
  • If the entire library is empty (tasks.length === 0), it renders the standard EmptyState component.
  • If the user has tasks but the search yields no results, it now renders a contextual "No tasks found" message showing their specific search query.

Testing

  • Verified that a completely empty task library still shows the correct "Add Task" empty state.
  • Verified that searching for a non-existent task now shows the contextual "We couldn't find anything matching '[query]'" message instead.

close #1383

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.

Fix React Hook dependency warnings and stale closures in ForgeMode

1 participant