Commit Graph
82 Commits
Author SHA1 Message Date
ner 0824090c6d feat(show-type): global movie/series toggle, type-aware pages and search, ?type=tv in URL 2026-09-24 15:40:01 +03:00
nerandClaude Opus 5 66776c582f refactor(analytics): send titles alongside ids, drop comments
Bare ids are unreadable in the dashboard, so every event that points at a
show or a person now carries its title or name. Ids stay for disambiguation,
since titles collide across remakes.

- ShowRef gains showTitle, so show_viewed, library_toggled, torrents_searched,
  torrent_selected, playback_started and playback_failed all report it
- person_viewed sends personName
- random_shuffled sends the title of the movie scrolled to
- torrent_selected sends the torrent title next to the show title
- subtitles_selected sends the track label, such as English, rather than the
  internal track value

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 12:44:38 +03:00
nerandClaude Opus 5 01753d4eb6 refactor(analytics): method per event instead of track(name, props)
analytics.showViewed({...}) reads better than track('show_viewed', {...}) and
drops the track_ alias Captions needed, where vidstack already exports track.

The methods are derived from the event catalogue with a mapped type plus a
Proxy rather than written out, so the catalogue stays the only place an event
is declared and the two cannot drift. Names stay snake_case on the wire.
Emitters are cached so a method is referentially stable and safe to pass to a
hook or use as an effect dependency.

Events with no payload are typed void and take no arguments.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 12:39:54 +03:00
nerandClaude Opus 5 d67a0d4df6 feat(analytics): self-hosted openpanel with a typed event catalogue
Replaces Vercel Analytics with OpenPanel, driven entirely by env vars so the
whole layer is inert until NEXT_PUBLIC_OPENPANEL_CLIENT_ID is set.

Zero initial load cost. next/script emits a rel=preload even on lazyOnload,
which pulls the sdk during the first paint, so the component skips it: it
inlines the 416 byte official stub (window.op queues calls immediately) and
appends the real script itself on window load plus requestIdleCallback. The
built html carries no preload and no script src for the analytics host.

Events live in one typed catalogue (lib/analytics/events.ts) and track() is
keyed to it, so a wrong name or payload is a type error rather than a silent
bad row. Emitters sit in the hooks that already own the behaviour instead of
being sprinkled through components:

- useShowState covers every favourite and watchlist toggle
- useInfiniteList covers pagination for all six lists
- useTorrents covers all three providers
- Preview, Person and useSearch use a shared useTrackOnce hook

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 12:08:16 +03:00
nerandClaude Opus 5 0186c793f2 feat(seo): crawlable card links, listing metadata, similar prefetch
Following links reached only 37 of 1873 urls and the frontier was exhausted
at depth 3, because detail pages rendered no internal links server side.

- Prefetch similar shows on detail pages so their links land in the ssr html.
  Crawl reach goes from 37 pages to 782 and keeps growing. Credits are left
  client side on purpose: dehydrating aggregate_credits pushed a series page
  from 52kb to 600kb to surface only ten person links.
- Replace the aria-label on poster links with sr-only text, so the anchors
  carry real anchor text instead of being empty. Text content is also a
  better accessible name than aria-label.
- Give popular and top their own openGraph and twitter tags. They inherited
  the generic homepage title and description.
- Add og:image:alt on movie, tv and person pages.
- Add ItemList json-ld to the listing pages.
- Drop favorites, watchlist and opengraph-image from the sitemap, and remove
  the robots.txt disallow that kept crawlers from reading their noindex.
- Raise detail revalidate to a week. Cast and release dates barely move, and
  it cuts regenerations, isr writes and origin transfer sevenfold now that
  more pages get crawled.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 11:23:00 +03:00
nerandClaude Opus 5 01792a9669 perf(cache): edge-cache tmdb proxy, call tmdb directly on server, enable ISR
Three exceeded Vercel free tier limits (edge requests, function invocations,
fast origin transfer) all traced back to nothing being cached.

- Http defaults preventCache to false and the tmdb proxy now sends a real
  Cache-Control, so public responses are edge cached instead of missing on
  every request. Session scoped calls keep private, no-store.
- On the server movieAdvisor talks to tmdb directly. It used to fetch its own
  public /api/tmdb url, billing a second edge request, a second function
  invocation and the whole payload as origin transfer per server render.
- Add generateStaticParams to movie, tv and person pages. Without it Next
  treats the segment as fully dynamic and ignores revalidate, so the pages
  re-rendered on every request instead of using ISR.
- Trim credits and person payloads in the proxy: credits 72kb to 13kb,
  aggregate_credits 308kb to 102kb, person 191kb to 124kb. Only fields no
  mapper reads are dropped, mapped output is unchanged.
- Detail pages are cached now, so only a real tmdb 404 becomes notFound and
  other failures bubble up instead of being baked in as a 404 for a day.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 10:41:09 +03:00
nerandClaude Fable 5 735c63471a feat(seo): slugged show urls, sr-only homepage intro, ISR detail pages
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-07 17:46:01 +03:00
nerandClaude Fable 5 ce630cd029 feat(seo): JSON-LD for movies, series, persons, website
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-07 17:11:50 +03:00
nerandClaude Fable 5 cd34f4eb5f feat(seo): heading structure + SSR person profile
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-07 17:07:48 +03:00
nerandClaude Fable 5 9b64f137f1 feat(seo): metadata API migration, canonicals, og images
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-07 17:02:20 +03:00
nerandClaude Fable 5 8b56268430 refactor(preview): restore in-place modal, keep crawlable links
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-07 16:48:11 +03:00
nerandClaude Fable 5 25a5d535a4 feat(seo): crawlable show links, intercepted preview modal, real 404s
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-07 16:33:59 +03:00
ner 16601f20f3 fix(person): unblock page streaming by removing await on prefetchQuery 2026-08-05 19:11:56 +03:00
nerandClaude Opus 5 3dc2ebfe53 feat: replace the starring page with a person page
A credit now opens /person/{id}: portrait, name, department, life dates and
birthplace, the biography, and the full filmography ranked by vote count.
One request carries all of it — combined_credits rides along on the person
call — so the discover based starring query and its with_people filter go.

The biography fills whatever height the portrait leaves and fades where it
is cut, with the whole text in a tooltip on hover; a phone has no height to
respect there, so it simply runs on.

Route level and query level skeletons stand in while it loads, built from
the shadcn primitive.

Development server side fetches go over the loopback rather than SITE_URL,
which is a LAN address meant for other devices: once that address moves the
fetch hangs until undici times out, ten seconds per navigation.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04 22:09:33 +03:00
nerandClaude Sonnet 4.6 692f5ab4e3 fix: apply fetchpriority=high to the actual LCP carousel poster
The hero overlay only renders when the random-movie index is non-zero,
but the index atom defaults to 0 — so on a fresh load the LCP element
was actually the first Virtuoso carousel item, which lacked `priority`.
Track the initial index and mark only that item's poster as high
priority, covering both the index===0 and index!==0 first-paint paths.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 23:17:37 +03:00
nerandClaude Sonnet 4.6 07bbb576f6 perf: mark hero poster image as high fetch priority
Lighthouse flagged the LCP carousel poster for missing fetchpriority=high.
Adds a priority prop to Poster that emits the lowercase fetchpriority
attribute (untyped in this @types/react version, so React forwards it
through as a custom attribute) only on the eagerly-rendered hero image.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 23:08:32 +03:00
ner 0f5c73c183 fix: favourites pages -> clien side 2025-07-19 12:16:35 +03:00
ner 3615d5538d fix: titles 2024-11-19 14:44:17 +02:00
ner 74bfe5726e fix: preview layout 2024-11-16 20:36:50 +02:00
ner ca40872b98 feat: show page meta 2024-11-16 19:23:21 +02:00
ner 063a2494ae feat: show page meta 2024-11-16 18:50:18 +02:00
ner bbae7abaf5 fix: auth retry 2024-11-16 15:43:37 +02:00
ner a2c5ba5184 fix: poster aspect ratio 2024-11-07 17:27:20 +02:00
ner 418ab2cf15 fix: slide flickering 2024-11-07 17:00:45 +02:00
ner af942149af fix: prevent slider flickering 2024-11-07 12:56:43 +02:00
ner 183c7231a1 feat: show page 2024-11-06 22:12:19 +02:00
ner e5c44fe359 feat: static generation 2024-11-04 12:47:15 +02:00
ner 25866b9eb9 feat: static generation 2024-11-04 12:35:39 +02:00
ner 99255f4f13 fix: search 2024-11-03 19:22:19 +02:00
ner 995342f18a feat: proxy cache 2024-11-03 17:42:40 +02:00
ner 4e11c5228a fix: meta descriptions 2024-10-30 13:58:13 +02:00
ner 3b954279f7 fix: proper prefetch 2024-10-29 19:39:41 +02:00
ner c9ca262da8 fix: back to prefetch 2024-10-29 18:25:52 +02:00
ner a268f7c38d feat: change torrents search query 2024-10-29 16:45:32 +02:00
ner 731d658740 fix: streamed hydration => providers 2024-10-29 12:16:41 +02:00
ner e9c0f3bef3 feat: ReactQueryStreamedHydration 2024-10-29 09:33:42 +02:00
ner dfdfb79169 fix: SITE_URL 2024-10-28 17:20:05 +02:00
ner 5cbf93b3b8 refactoring: server actions data fetching -> api routes 2024-10-26 21:33:39 +03:00
ner 0cface89bf refactoring: first render improvements 2024-10-21 18:57:49 +03:00
ner 38aebcbe28 refactoring: improvements for lighthouse 2024-10-21 15:35:08 +03:00
ner dc8dde4dbb fix: modal frame 2024-10-19 23:31:45 +03:00
ner 9702f027ed fix: border radius 2024-10-19 23:00:53 +03:00
ner 38f0ca26da fix: favorites pagination 2024-10-19 19:33:02 +03:00
ner 8858e47d38 feat: favorite & watch lists 2024-10-19 16:09:15 +03:00
ner 8cb7fed6ef feat: husky 2024-10-16 18:25:10 +03:00
ner a747461505 fix: search autocomplete 2024-10-15 20:06:10 +03:00
ner 0f5ccd185b feat: used advanced video player 2024-10-13 01:45:34 +03:00
ner c31058c4f7 feat: vidstack 2024-10-12 22:26:39 +03:00
ner 3b03df3ff5 fix: order of tailwind classes 2024-10-05 17:23:37 +03:00
ner ebf599eed6 refactor: clean code and remove unnecessary dependencies 2024-09-30 18:54:13 +03:00