Overview
The bounty catalog has filters but no way for a user to mark a bounty as "interesting" and revisit it later. Contributors browsing 20–50 active bounties at a time often want to compare a few before applying. Add a bookmark system so users can save bounties to a personal list and optionally receive notifications when those bounties change status.
Goals
- Allow authenticated users to bookmark/unbookmark any bounty
- Show a bookmark icon on bounty cards and the bounty detail page that toggles state
- Provide a "Saved Bounties" view (sidebar widget on the profile page, or a dedicated
/saved route) that lists everything the user has bookmarked
- Trigger notifications (via the existing notification center) when a bookmarked bounty changes status (deadline approaching, status moves to
IN_REVIEW, etc.)
Implementation Details
1. Bookmark mutations and query
Create: hooks/use-bookmarks.ts
useBookmarks() returns the current user's bookmarks
useToggleBookmark(bountyId) adds or removes with optimistic update
- Uses a new
bookmarkKeys factory in lib/query/query-keys.ts
2. Bookmark icon component
Create: components/bounty/bookmark-button.tsx
- Renders a bookmark icon (filled when active, outline when not)
- Click toggles via
useToggleBookmark
- Accessible:
aria-pressed, keyboard activatable
3. Wire into existing surfaces
Modify: components/bounty/bounty-card.tsx
- Add
BookmarkButton to the card header (top-right corner)
Modify: components/bounty-detail/bounty-detail-header-card.tsx
- Add
BookmarkButton next to the StatusBadge
4. Saved Bounties view
Create: app/saved/page.tsx
- Lists bookmarked bounties with the same
BountyCard grid as /bounty
- Empty state with a primary CTA back to
/bounty
- Server-side guard: redirect to sign-in if unauthenticated
5. Notification integration
Extend: hooks/use-notifications.ts and hooks/use-bounty-subscription.ts
- When
bountyUpdated fires for a bounty in the user's bookmarks, push a notification of type saved-bounty-updated
- Notification links back to
/bounty/[id]
Files Affected
Created
hooks/use-bookmarks.ts
components/bounty/bookmark-button.tsx
app/saved/page.tsx
Modified
components/bounty/bounty-card.tsx
components/bounty-detail/bounty-detail-header-card.tsx
hooks/use-notifications.ts
hooks/use-bounty-subscription.ts
lib/query/query-keys.ts
Acceptance Criteria
Additional Notes
- For optimism: write through to the cache so the icon flips immediately, then reconcile on success/error
- If the backend mutation isn't ready, the issue can land with a localStorage fallback gated by a TODO, but the persistence layer should be server-backed before this ships to production
- Consider a small "saved" count badge in the navbar next to the bookmark icon (optional polish)
Overview
The bounty catalog has filters but no way for a user to mark a bounty as "interesting" and revisit it later. Contributors browsing 20–50 active bounties at a time often want to compare a few before applying. Add a bookmark system so users can save bounties to a personal list and optionally receive notifications when those bounties change status.
Goals
/savedroute) that lists everything the user has bookmarkedIN_REVIEW, etc.)Implementation Details
1. Bookmark mutations and query
Create:
hooks/use-bookmarks.tsuseBookmarks()returns the current user's bookmarksuseToggleBookmark(bountyId)adds or removes with optimistic updatebookmarkKeysfactory inlib/query/query-keys.ts2. Bookmark icon component
Create:
components/bounty/bookmark-button.tsxuseToggleBookmarkaria-pressed, keyboard activatable3. Wire into existing surfaces
Modify:
components/bounty/bounty-card.tsxBookmarkButtonto the card header (top-right corner)Modify:
components/bounty-detail/bounty-detail-header-card.tsxBookmarkButtonnext to the StatusBadge4. Saved Bounties view
Create:
app/saved/page.tsxBountyCardgrid as/bounty/bounty5. Notification integration
Extend:
hooks/use-notifications.tsandhooks/use-bounty-subscription.tsbountyUpdatedfires for a bounty in the user's bookmarks, push a notification of typesaved-bounty-updated/bounty/[id]Files Affected
Created
hooks/use-bookmarks.tscomponents/bounty/bookmark-button.tsxapp/saved/page.tsxModified
components/bounty/bounty-card.tsxcomponents/bounty-detail/bounty-detail-header-card.tsxhooks/use-notifications.tshooks/use-bounty-subscription.tslib/query/query-keys.tsAcceptance Criteria
/savedlists all bookmarked bounties for the current userAdditional Notes