tracker
All repositories: gitoria
6.7 KB
# Typed headings and the Series / Shows split (tickets #20, #21 — mission 022 (old 068))Creator: "make the page headings have types in their headings: Movie | Riddick, Series | Reacher, Genre | Action — and havethem use their colors but the title in white" (#20) and "i want to split series and shows - all that game show and realityand talkshow stuff goes into shows and the real series are Series and /series" (#21).## Kinds* A TV title (`shows.type = 'series'`) has a **kind**: `series` or `show`. Movies (`type = 'movie'`) have none.* **Rule** (`shows.hl kindOfTitle`, architect's reading in the ticket): a **show** when TMDB's TV `type` is Reality, Talk Show,News or Video, OR the title has one of our genres Reality / Talk / News; everything else is a **series** (TMDB typesScripted, Miniseries, Documentary — and "type not known").* **tracker#43 (mission 038)**: also a **show** when TVmaze's type (`tvmazeType`) is Variety, Talk Show, Reality, Game Show, News,Panel Show, Award Show or Sports — TMDB calls Saturday Night Live UK, MADtv, The Oscars … "Scripted". TVmaze's Scripted /Animation / Documentary decide nothing. `tvmazeType` comes from the daily sync's TVmaze request and the TVmaze status backfill(once per series with a TVmaze id; `''` = TVmaze gave none); then `shows.hl kindWithTvmaze` stores the kind and the title moveslists at once. A title without a TVmaze id never gets one (1,652 of 15,026 TV titles on the live copy have one).* **Stored** on the title: `kind` and TMDB's `tmdbType`; `kindCheck` = why no type is known (`TMDB 404`, `no tmdbId`,`TMDB gave no type`). `shows.hl titleKind(show)` = stored `kind`, else the rule from the genres alone.* **Who stores it**:* the **kind backfill** (below), once for every TV title;* the **daily sync** (`tmdbsync.hl syncShow`: the details answer has `type`);* the **adult backfill** (`backfillTitle`, a TV title's details);* the **search import** (`search.hl importTitle`).* Titles the person fill adds (`people.hl addMinimalTitle`) get no kind: the genres decide until the next start's backfill.## Kind backfill (`project.hl kindTick` → `tmdbsync.hl kindTitle`)* Queue at start = every TV title without a stored kind (resumes after a restart).* Starts after the adult backfill is done (or off); waits while the daily sync runs; ONE title per step on the shared 0.1 s clock.Since the merge (mission 023 (old 070)) the shared clock's order is: adult backfill → details repair (#26) → kind backfill → credits job(#28); the collection seed (#19) waits for all of them. The daily sync / delta step and the #26 completion store `tmdbType` +`kind` too (details.hl `withDetailsFields`).* A title with a show genre or without `tmdbId`: kind from the stored data, **no request**.* Else `GET /tv/<tmdbId>` (one request), then 260 ms pause. 404 → kind from the genres + `kindCheck`, not asked again.No answer / 429 / 5xx → back of the queue, ≤ 2 retries per start.* A title TMDB's type makes a show moves from /series to /shows at once (`catalog.hl refreshCatalogShow`).* Log: `kind backfill: start, N TV titles without a kind`, every `TRACKER_KINDS_LOG_EVERY` (500) titles,`kind backfill done: n/N titles, series= shows= fromGenre= moved= requests= errors= retries= seconds=`, or `nothing to do`.* `TRACKER_KINDS=0` = off (also off without `TMDB_READ_TOKEN`; the lists still split by genre).## Addresses| Path | What ||---|---|| `/series`, `/series/page/<n>` | every series (components/allseries.hl), newest released episode first, 24 per page || `/shows`, `/shows/page/<n>` | every show (components/allshows.hl), same order || `/series/<slug>`, `/movies/<slug>` | the title page (components/show.hl, a component route) || `/shows/<slug>` | FUNCTION route `project.hl showsRoute`: a series → **301** `/series/<slug>`, a movie → **301** `/movies/<slug>`; a show (or an unknown slug → the page's "Not found") is rendered as the Show component || `/my/series`, `/my/shows` | `/my/:tv` → components/myshows.hl; any other word → "Not found" |* **Why a function route**: hl:web cannot answer a redirect from a component route, and one pattern cannot be"component for shows, 301 for series".* So `showsRoute` renders the page the way hl:web's own `on http.request` component branch does:`server.router.match('/series/<slug>')` (same component and params), `server.page(m, session, host, headers)`,and a new session + cookie when the browser brought none.* This uses hl:web internals (`router`, `page`, `hostOf`, `requestHeaders`, `sessions`): **re-check after re-vendoring hl:web**(the kinds gate covers it).* Effect in the browser: a link to `/shows/<slug>` is a full page load (the client router only navigates component routesitself). Every other title page is still a client-side navigation.* All links use `shows.hl titlePath(show)`: lists, tiles, search, filmography, /my/*, /<shortId>, the import's landing page.Movies moved from `/shows/<slug>` to `/movies/<slug>` (my decision: `/shows/` now means TV shows; the old movie URLs answer 301).## Headings and colours (#20)* Markup: `h1 { class = "typed" typeWord { class = "type-word type-<kind>" "Series" } typeSep { "|" } typeName { <name> } }`.* Pages: title page (Movie / Series / Show), `/genres/<g>` (Genre), `/person/<slug>` (Person).List pages `/movies`, `/series`, `/shows` show only the word; `/my/series` and `/my/shows` say "My Series" / "My Shows".* `h1.typed` is a flex row with a gap, so the server's whitespace and a client-built page look the same.A long name wraps in its own column right of "Show |".* Colours (styles.hl, palette tokens; one per type, everywhere the type word appears — headings, homepage row headings,search labels, filmography labels):| Type | Token | Colour ||---|---|---|| Movie | `yellow` | `#dcdcaa` || Series | `greenDark` (the accent) | `#4ec9b0` || Show | `purple` | `#c586c0` || Genre | `blueDark` (the pills) | `#569bd4` || Person | `orange` (artist links) | `#ce9178` || Franchise | `blueLight` | `#9cdcfe` || Timeline | `greenLight` | `#b5cea8` |The name is `colorTextStrong` (white), the bar `colorTextMuted`.* Franchise / Timeline: the classes `type-franchise` / `type-timeline` exist for tracker#19's pages (branch t19). Those pagesare not on this branch; their headings get the same markup when the branches are merged.* TMDB results in the search ("Fetch from web") say **TV** (TMDB's search tells no TV type) or Movie.## Home* Signed in: five tiles — Unwatched, Schedule, Series → `/my/series`, Shows → `/my/shows` (a microphone icon), Movies.Three per row on a phone, five from 40rem.* Three rows: Movies, Series, Shows (10 each, `catalog.hl latestMovies / latestSeries / latestShows`).
Branches
Latest commits
- 45163bd4log: person/tmdb error hypothesismre
- cb38de2blog: swap 503 causemre
- fd10c3d5log: CB livemre
- 7557c025log: CB deploy try 2mre
- 06a7534aMerge branch 'cb'mre
- 2f8030d6log: CB gates greenmre
- 498bf644log: CB gates startmre
- f59c2847gc1: bound the five request caches (shows.hl cacheLimit)mre
- 6ea2c6d6log: morning re-measure 11-04mre
- 446290f0log: GC1 livemre
- 8e6aa91dlog: GC1 deploy retrymre
- 87ad2dc1log: GC1 deployingmre
- 53f10fb8Merge branch 'gc1-deploy'mre
- 7fcbf1d2log: GC1 deploy GOmre
- 1fb6664bcompose: TRACKER_QSTATS=1 (GC1 measurement)mre
- 6576c1cdgc1: release the people-view scan lists once the view is builtmre
- 94f8a373gc1: back out the kept episode-id set (no measurable gain on /my/unwatched: 4.69 -> 4.61 GB per 150 loads)mre
- a1a88bd4gc1: search skips the stale-key string while no entry is stale; /my/unwatched asks a kept id set instead of building a key string per episode rowmre
- cd830744gc1: dbSearch: no split / map / list copy per candidate (scores from the stored text, top list touched only when the hit can enter)mre
- 451db7cdgc1: show page and check clicks read the kept watched set instead of building one from a by-value copy of every watchmre