Skip to content

feat: add watchlist feature with localStorage persistence#6

Open
tandp-star wants to merge 1 commit intosudeepmahato16:mainfrom
tandp-star:main
Open

feat: add watchlist feature with localStorage persistence#6
tandp-star wants to merge 1 commit intosudeepmahato16:mainfrom
tandp-star:main

Conversation

@tandp-star
Copy link
Copy Markdown

Summary

  • Add WatchlistProvider context with addToWatchlist, removeFromWatchlist, isInWatchlist API
  • Persist watchlist to localStorage via saveWatchlist/getWatchlist helpers (mirrors existing theme persistence pattern)
  • Add WatchlistButton component to MovieCard hover overlay and Detail page hero
  • Add /watchlist route displaying saved items as a grid with an empty state
  • Add watchlist nav link with live count badge in header and sidebar (desktop + mobile)
  • No new dependencies — uses existing React Context, Tailwind, Framer Motion, react-icons, React Router

Test plan

  • Hover a movie card — bookmark icon appears at top-right of overlay
  • Click bookmark — icon fills yellow and item is saved
  • Refresh page — saved state persists (check localStorage key watchlist in DevTools)
  • Navigate to a detail page — bookmark button appears below genres, stays in sync with card
  • Nav shows "watchlist" link with a live count badge
  • /watchlist page renders saved items as a grid
  • Removing an item from the watchlist page updates the grid immediately
  • Empty state shows when watchlist is cleared
  • All of the above work on mobile (375px viewport)

🤖 Generated with Claude Code

- Add WatchlistProvider context with add/remove/isInWatchlist API
- Persist watchlist to localStorage via saveWatchlist/getWatchlist helpers
- Add WatchlistButton component to MovieCard hover overlay and Detail page
- Add /watchlist route displaying saved items as a grid with empty state
- Add watchlist nav link with live count badge in header and sidebar
- Add feature spec at spec/watchlist.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Feb 21, 2026

Someone is attempting to deploy a commit to the sudeepmahato's projects Team on Vercel.

A member of the Team first needs to authorize it.

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