Commit Graph
64 Commits
Author SHA1 Message Date
Mohammed Abad 63fdc00ac2 feat: entry details overhaul, navigation, rating half-stars, library growth "all", accuracy field
- SeasonPage: add back navigation link to entry details page
- EpisodePage: add breadcrumb navigation back to entry and season pages
- EntryCard: non-library entries now open a details dialog on click with overview, rating, and add-to-library button
- EntryDetailsPage: move favorite and mark-watched buttons into grouped dropdown menu with separators
- EntryDetailsPage: add favorite badge (heart icon) on top-left of poster
- EntryDetailsPage: add "mark as watched" clickable text next to runtime for unwatched movies
- EntryDetailsPage: genre pills are now clickable links that navigate to library page with genre filter
- EntryDetailsPage: hide status pill for movies; show status as text next to release date for TV series
- EntryDetailsPage: add delete entry option in dropdown menu with confirmation dialog and redirect to library
- EntryDetailsPage: add TMDB and IMDb external links under poster using entry.entryIds
- EntryDetailsPage: group all dropdown actions by relevance (Watch/Rate, Organize, Manage, Danger) with separators
- RatingDialog: support half-star ratings (0.5 increments) with left/right click zones per star
- RatingDialog: fix clear rating button by syncing state on dialog open and using dedicated handleClear function
- LibraryGrowthChart: add "All" option to year selector (default) showing cumulative growth across all years
- Frontend: add SeenAccuracy type to types/index.ts, update API layers and hooks to support accuracy
- EntrySeenDialog: add Date Accuracy selector (Exact/Estimated/Unknown) with EXACT default
- EpisodeSeenEditDialog: add Date Accuracy selector, updated overrideSubmit signature
- SeasonPage: pass accuracy through bulk mark-all-watched flow
2026-04-20 01:24:55 +01:00
Mohammed Abad 9a8ee181e5 Complete frontend refactoring: UI enhancements, pagination, filtering, search architecture, and data management improvements
# Phase 1: Feature Implementation
- Add "Create new..." option in `AddEntryToCollectionDialog` for inline collection creation with auto-select
- Implement lazy loading pagination with IntersectionObserver for Watchlist, Collections, and Media pages
- Add reusable useDebounce hook (300-400ms) and apply to all search inputs across pages
- Reset scroll position to top when switching between sidebar navigation pages via useLocation()
- Reorganize MediaPage with horizontal control layout, add Media Type filter (All/Audio/Video), and Custom Media filter (Show All/Official Only/Custom Only)
- Add three-dot menu (MoreHorizontal icon) to collection cards with Edit/Delete options and "Get all parts" feature
- Replace numeric rating input with interactive star rating component in EditCollectionDialog (0-10 stars with half-star support)
- Display entry type badges ("Movie" / "TV Series") on home page trending/popular sections and search results
- Create PeopleSearchResult component with profile images; integrate useTmdbSearchPeople hook linking to `/people/tmdb/:tmdbId`
- Add TMDB Rating and User Rating filters to Library page with range sliders (0-10, step 1) and state persistence in useLibraryStore
- Add All/Movies/TV Series type filter to Watchlist page with filtered count display
- Improve People Details page mobile UI: optimize header, info section sizing, and filmography card layouts for touch

# Phase 2: Architecture Refactoring & Bug Fixes
- Fix scroll-to-top on sidebar navigation by constraining AppLayout root to `h-screen overflow-hidden` so `<main>` becomes proper scroll container
- Extract search from HomePage into dedicated SearchPage component with `/search` route, debounced input, and URL query sync via SearchParams
- Add Search nav item with icon to sidebar for easy search access
- HomePage search input now navigates to `/search?q=...` instead of handling inline, separating concerns and enabling search bookmarking
- Entry type pill badges now conditionally render via `showTypeBadge` prop on EntryCard—only SearchPage passes this to prevent display on home/discover pages
- Fix people ID bug: people search results now link to `/people/tmdb/:tmdbId` (TMDB redirect route) instead of `/people/:id`, correctly mapping TMDB IDs to local database IDs through PersonTmdbRedirectPage
- Enhance People Details filmography sorting: "Not in Library" section now detects self roles (self/themselves/himself/herself) and sorts non-self by release date (new→old) with all self roles pushed to end of list

# Summary
- Created new files: SearchPage.tsx, useDebounce.ts
2026-04-12 01:33:00 +01:00
Mohammed Abad d28b4caa7e docs(react_frontend): add comprehensive documentation & AGENTS.md
- docs/README.md: overview and table of contents
- docs/tech_stack.md: full dependency inventory and design decisions
- docs/project_structure.md: directory tree with conventions
- docs/architecture.md: data flow, layer responsibilities, key patterns
- docs/routing.md: route table, code splitting, discover categories
- docs/state_management.md: Zustand stores and React Query conventions
- docs/api_layer.md: all API modules with endpoint mappings
- docs/components.md: layout, entries, collections, charts, dialogs, UI primitives
- docs/pages.md: all 16 pages with features and routes
- docs/styling.md: theming, CSS tokens, responsive breakpoints, animations
- AGENTS.md: architecture summary, code conventions, data flow, key files
2026-04-10 02:44:06 +01:00
Mohammed Abad 6bff2055b4 fix: season episode dialog, mark season watched, episode 404 handling
Seasons Page:
- Episode watch button now opens EpisodeSeenEditDialog instead of
  directly marking as watched, allowing date/seen-with input
- Added "Mark Season as Watched" button that sequentially marks all
  unwatched episodes in the season

Episode Page:
- Fixed UI not updating after deleting the last episode seen record;
  the backend returns 404 when no records exist for an episode, which
  caused the query to error instead of resolving to an empty array.
  The API layer now catches 404 and returns [] gracefully.
2026-04-03 17:49:16 +01:00
Mohammed Abad 984e2c8b50 feat(dashboard): enhance charts with improved data handling and user interaction 2026-04-03 02:48:03 +01:00
Mohammed Abad fac8ba1d19 fixed Library Slider 2026-04-02 03:39:49 +01:00
Mohammed Abad ab20a5e64f feat: multi-page improvements, bug fixes, and new features
Library:
- Exclude hidden entries from all/movies/tv/favorites tabs (only show in hidden tab)

Entry Details:
- Move favorite, mark watched, and more actions to top-right as icon-only buttons with tooltips
- Fix season card play button — marks next unwatched episode as seen

Seasons Page:
- Fix episode watch button (was a TODO stub, now calls createEpisodeSeen)

Episode Page:
- Fix UI not updating after deleting the last watch record — invalidate season episodes query on delete

Dashboard:
- Fix Top Genres 404 — was calling non-existent GET /statistics, now uses /statistics/watch-time
- Fix TopGenresChart genre counting (Genre objects were wrongly cast as strings)
- Add LibraryGrowthChart (cumulative titles added over time)
- Add MediaTypeChart (Movies vs TV Series donut chart)

Home Page:
- Add TrendingSlider hero at top of page with auto-advance, dots, and prev/next nav
- Fix slider prev/next buttons (stable callbacks via ref, plain buttons, reactive library state)
- Add debounce (400ms) to search input
- Add Top Rated section (movies & TV)
- Add Upcoming section (movies)
- Replace inline "More" expand with link to /discover/:category

Discover Page (new):
- Full-page TMDB browser per category (trending/popular/top-rated/upcoming)
- Movie/TV tab toggle
- IntersectionObserver infinite scroll

Calendar:
- Fix large season numbers — use season.season_number instead of season_id (DB primary key)

Backend:
- Add fetchTopRated() and fetchUpcoming() to tmdbService
- Add GET /entries/tmdb/top-rated/:type and /entries/tmdb/upcoming/movie routes
2026-04-02 03:29:54 +01:00
Mohammed Abad d60d142d17 feat(react): add toasts, loading states, skeletons, animations, and mobile responsiveness
- Toast notifications (sonner): success/error toasts on all mutations
- Loading spinners: EntryCard add/remove, ConfirmDialog, EntrySeenDialog, favorite/refresh buttons
- Page skeletons: 13 page-specific Suspense fallbacks replacing generic skeleton
- CSS animations: card-enter (staggered), page-enter, slide-up-fade keyframes
- Mobile layout: hamburger menu with sheet sidebar, responsive entry details
- Mobile controls: separate compact filter/sort popovers for Library and Watchlist
- Desktop sort: popover menu replacing Select dropdown on Library and Watchlist
- Filter ranges: year 1950-2100, rating 0-10
2026-04-02 03:00:49 +01:00
Mohammed Abad ae67663623 feat(dashboard): add recharts data visualizations
- Install recharts
- Add WatchActivityChart (AreaChart, movies + episodes/month, year filter)
- Add WatchTimeChart (stacked BarChart, hours/month, synced year filter)
- Add RatingsChart (BarChart, user ratings distribution 1–10, color ramp)
- Add TopGenresChart (horizontal BarChart, top 10 genres, type filter)
- Add CouchDayChart (BarChart, watch count by weekday, peak day highlight)
- Add GET /statistics/watch-weekday backend endpoint (DAYOFWEEK aggregation)
- Extend statisticsApi with getYearlyWatchCount, getYearlyWatchTime, getWatchdayDistribution
- Add useYearlyWatchCount, useYearlyWatchTime, useWatchdayDistribution hooks
- Wire all charts into DashboardPage with responsive two-column grid layout
2026-04-01 16:04:43 +01:00
Mohammed Abad 3648c41cfd fix(frontend): clean up imports and remove unused createEpisodeSeen hook 2026-04-01 01:06:01 +01:00
Mohammed Abad 191f4d6aae fix(frontend): calendar thumbnail, episode delete confirm, mark-as-watched dialog
- CalendarPage: restore poster/still thumbnail (h-8 w-5) in episode items;
  add getTmdbPosterUrl import; extend EpisodeWithEntry type with poster_path
- EpisodeSeenEditDialog: add mode 'create'|'edit' support; record prop is now
  optional; create mode uses useCreateEpisodeSeen with today as default date
- EpisodePage: Mark as Watched button now opens EpisodeSeenEditDialog (create
  mode) instead of firing mutation directly; delete shows ConfirmDialog before
  deleting; remove unused useCreateEpisodeSeen import
2026-04-01 00:59:09 +01:00
Mohammed Abad 3ca24434d7 feat(frontend): Entry details redesign, people filmography, calendar improvements
- EntryDetailsPage: sticky poster layout, centered max-w-4xl, director by-line
  with link, rating pills (IMDb/TMDB/You), quick actions under poster, RatingDialog
  with star UI, In Collections section using backdrops, EntrySettingsDialog with
  show_in_calendar / auto_sync / rating options
- RatingDialog: new component with 10-star interactive rating
- AddEntryToCollectionDialog: optimistic cache updates so checkbox state reflects
  immediately and In Collections section on entry details page refreshes
- PersonDetailsPage: filmography section showing library vs. non-library entries
  via person.roles, TMDB combined credits for non-library titles
- PersonTmdbRedirectPage: new redirect page for TMDB person IDs to local person ID
- PeoplePage: fix person card links to use /people/tmdb/:tmdbId
- CalendarPage: full-height layout, larger episode thumbnails, episode items
  clickable, improved tooltip, show_in_calendar backend filter
- Fix useUpdateEntry to also invalidate entryKeys.all (favorite button reactivity)
- Fix updateRatings API body wrapping
- Add useUpdateEntryRatings, usePersonCredits, useFetchPersonByTmdbId hooks
- Add getCollectionBackdropUrl to media-utils
- Types: show_in_calendar, auto_sync on Entry; id on EntryRatings; roles on People
- Backend: fix fetchPersonData alias in peopleService; remove duplicate
  getPersonCredits; add show_in_calendar filter to episodeService
2026-04-01 00:25:30 +01:00
Mohammed Abad ffe7e52527 Implemented the new react version of the frontend 2026-03-31 01:56:38 +01:00
Mohammed Abad 35835e9187 Created the react frontend project and added some basic component 2026-03-30 20:56:59 +01:00