Skip to content

feat: add bounty page search bar#1329

Open
MolhamHamwi wants to merge 2 commits into
SolFoundry:mainfrom
MolhamHamwi:bounty-823-search-bar
Open

feat: add bounty page search bar#1329
MolhamHamwi wants to merge 2 commits into
SolFoundry:mainfrom
MolhamHamwi:bounty-823-search-bar

Conversation

@MolhamHamwi
Copy link
Copy Markdown

Summary

  • add a debounced search input to the bounties page
  • filter bounties by title, description, category, org/repo, and skills
  • add clear-search behavior and search-aware empty-state messaging
  • add missing shared frontend utility modules required by the current app build

Closes #823

Test Plan

  • npm run build

Notes

  • Existing bounty-board tests reference legacy components under components/bounties/* that are absent on main; I did not change those unrelated test imports.

Copilot AI review requested due to automatic review settings May 23, 2026 06:52
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a debounced search input to the /bounties page that filters loaded bounties by title, description, category, org/repo, and skills, with a clear button and search-aware empty-state messaging. Also introduces shared lib/utils.ts and lib/animations.ts modules that several existing components already import.

Changes:

  • Add Search/clear UI and 250ms debounced query state to BountyGrid, with client-side filtering via a new bountyMatchesQuery helper.
  • Update the empty-state copy to be search-aware while keeping existing skill/status filter behavior.
  • Add frontend/src/lib/utils.ts (LANG_COLORS, formatCurrency, timeAgo, timeLeft) and frontend/src/lib/animations.ts (framer-motion variants) consumed by bounty/home/profile/leaderboard components.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
frontend/src/components/bounty/BountyGrid.tsx Adds debounced search input, clear button, client-side filtering, and search-aware empty state.
frontend/src/lib/utils.ts New shared utilities (LANG_COLORS, formatCurrency, timeAgo, timeLeft) referenced by existing components.
frontend/src/lib/animations.ts New shared framer-motion Variants used across pages and components.

Comment on lines +53 to +56
const filteredBounties = useMemo(
() => allBounties.filter((bounty) => bountyMatchesQuery(bounty, debouncedSearch)),
[allBounties, debouncedSearch]
);
@MolhamHamwi
Copy link
Copy Markdown
Author

Follow-up update: addressed the Copilot search-scope concern in 1306dfe by routing active search queries through the backend /api/bounties/search endpoint via listBounties (q, status, skill, pagination) instead of filtering only the already-loaded client pages. The grid now receives server-search paginated results, so the empty state and Load More behavior reflect the full matching result set rather than just locally loaded cards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

missing-wallet PR is missing a Solana wallet for bounty payout

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🏭 Bounty T1: Add Search Bar to Bounties Page

2 participants