Skip to content

Add frontend for search#2656

Closed
szokeasaurusrex wants to merge 1 commit into07-28-demo_7cb8dd19__demo_add_server_apifrom
07-28-demo_08faa39b_add_frontend_for_search
Closed

Add frontend for search#2656
szokeasaurusrex wants to merge 1 commit into07-28-demo_7cb8dd19__demo_add_server_apifrom
07-28-demo_08faa39b_add_frontend_for_search

Conversation

@szokeasaurusrex
Copy link
Copy Markdown
Member

No description provided.

@szokeasaurusrex szokeasaurusrex marked this pull request as ready for review July 28, 2025 14:27
@szokeasaurusrex szokeasaurusrex requested a review from a team as a code owner July 28, 2025 14:27
Copy link
Copy Markdown
Member Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@szokeasaurusrex szokeasaurusrex marked this pull request as draft July 28, 2025 14:27
setError(error.message);
setLoading(false);
});
}, [searchQuery]); // Depend on searchQuery
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: TaskSearch Hook Issues: Unnecessary Calls, Debouncing, Error Persistence

The TaskSearch component's useEffect hook has several issues:

  • It makes an unnecessary initial API call on mount with an empty search query.
  • It triggers an API request on every keystroke without debouncing, leading to excessive network traffic and race conditions where out-of-order API responses can display outdated search results.
  • The error state is not cleared before new requests, causing previous errors to persist despite successful subsequent searches.
Locations (1)

Fix in Cursor Fix in Web

@szokeasaurusrex szokeasaurusrex force-pushed the 07-28-demo_08faa39b_add_frontend_for_search branch from 507789e to 7c70a74 Compare July 28, 2025 14:29
@szokeasaurusrex szokeasaurusrex force-pushed the 07-28-demo_7cb8dd19__demo_add_server_api branch from 27b1b84 to 28ef4f5 Compare July 28, 2025 14:29
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