gitoriaLog in with ident

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitfbb903ccfbb903cctracker#33/#37 (mission 032): a title without a TMDB poster gets its backdrop (w780, posterFromBackdrop, shown 2:3 centre-cropped); movies store runtime, the page shows release date + runtime; art backfill (public titles without poster file / movies without runtime) and person photo backfill (tmdbProfile / photoCheck) as the last start jobs (TRACKER_ART, TRACKER_PHOTOS; off in every gate start); gates 379/0, 32/0, 53/0, 229/0, 26/0, check-theme 0; live copy: art 4977 titles in 42 min (115 posters, 15 backdrops, 4609 runtimes), The Remaining shows its backdrop + 7 minmrefbb903cc/components/show.hl

40.2 KB

  1. // components/show.hl — a title's own page (tracker.worldapi.org#4): since tracker#21 (mission 068) `/series/:slug`, `/movies/:slug`
  2. // and `/shows/:slug` (the last through project.hl showsRoute: a show is rendered there, a series or movie answers 301 to its
  3. // own address). tracker#20: the heading is "<Type> | <title>" — Series / Show / Movie in the type's colour (styles.hl
  4. // `type-*`), the title white. Creator's words:
  5. // "the poster on the left, right of it the title of the show, the genre pills, below the plot summary,
  6. // below that the artists just as normal links, separated with comma color red, genres are blue" (the
  7. // header) — "then all seasons in reverse order, latest on top, below them collapsable their episodes,
  8. // episodes first the round check icon, if the episode was watched by the user looking its solid, if
  9. // not its regular, then the episode number, then the title. the last season is not collapsed. click on
  10. // the check adds a watch. the season also has a check, if the season is checked or unchecked all its
  11. // episodes get checked or unchecked. artists link to /person/<artist-slug> the genre to /genre/<genre-slug>."
  12. //
  13. // THE ROWS ARE ONE FLAT LIST, not a nested for-loop over seasons > episodes: the vendored build may
  14. // still lack the fix for hybriel#86 (a nested for over a reassigned outer list keeps stale inner
  15. // cells) — a single-level `for (row of rows)` with a `kind` field, reassigned whole on every click,
  16. // is the same proven-safe shape components/main.hl's own header and ident's inbox.hl already use.
  17. // `rows` is rebuilt from scratch (seasons/episodes refetched by id, watch rows refetched) on every
  18. // toggle — cheap: a show has at most a few dozen episodes per season.
  19. //
  20. // Mission 047 (the creator, 2026-10-01): a caret at the season header's right edge (down = open, right = collapsed); episode
  21. // rows not indented; on a phone the title first, then the poster at full width, then genres/plot/cast; a Follow toggle
  22. // next to the title (tracker#34, mission 030: under the poster, as wide as the poster; next to the title the status pill, #35). SIGNED OUT the checks and Follow are visible too: a click opens the "sign in" modal (modal.hl, copied
  23. // from components.hybriel) and writes nothing.
  24. //
  25. // tracker.worldapi.org#17 (mission 057): the caret points DOWN while a season is closed and UP while it is open. Opening a
  26. // season shows SKELETON rows at once (min(episodes, 8), a CSS shimmer, styles.hl) and then its episodes from the face
  27. // `showSeasonEpisodes`, which takes NO session: a face with `session` makes hl:web re-mount the whole page on the server and
  28. // ship every session-derived member back as a `sync` (WebFramework.hl `inbound`) — that, not the episodes, was most of the
  29. // old 250–450 ms (real data). The watched state comes from `watchedEpisodes` (this show's watched episodes per season, rendered
  30. // with the page and re-synced after every watch face). Closing is client-only (no request). An ADULT show (only its
  31. // followers see it) keeps the session face `showRows`: the public face refuses adult seasons.
  32. //
  33. // tracker.worldapi.org#12: link icons under the title — the show on TMDB, IMDb, TheTVDB, TVmaze (a movie: TMDB + IMDb),
  34. // only for the ids it has (shows.hl externalLinksOf), each in a new tab.
  35. //
  36. // mission 058: #22 every episode row shows its air date (`release`, 'YYYY-MM-DD' like /my/unwatched; none → empty). #23 a
  37. // season's check is DERIVED: solid exactly when every one of its episodes is watched (a season without episodes: its own
  38. // season watch) — unchecking one episode turns the season off with the face's answer, checking it again turns it on; the
  39. // season click watches all when not all are watched, else unwatches all. #24 a MOVIE's page has its own watched check
  40. // (watch `targetType = 'movie'`, target = the title's id; face `showToggleMovie`), signed out → the sign-in modal.
  41. //
  42. // tracker.worldapi.org#26: an INCOMPLETE title (one a person page added from a filmography — details.hl `needsDetails`) shows
  43. // what it has plus skeletons (poster, cast line, season rows for a series) and completes itself WITHOUT a reload: the
  44. // invisible `showProbe` (endless short CSS animation — hl:web has no mount hook, the person page's trick) calls the face
  45. // `showComplete` until it is done — one step per call (details.hl completeStep: TMDB details + ids + cast; a series' seasons/
  46. // episodes in parts; poster, TVmaze) — and the last answer's parts replace the skeletons. No session (no page re-mount); adult
  47. // refused.
  48. //
  49. // tracker.worldapi.org#28: the WHOLE cast and the key crew (details.hl stores them: a series' cast of every season, main cast
  50. // first by episode count, then "Guest stars"; crew = Created by / Directed by / Written by / Screenplay / Story / Music). The
  51. // cast shows its first `castShown` (20) and a "Show all (N)" toggle, each crew job its first `crewShown` (6) and one "Show all
  52. // crew (N)" toggle — CLIENT-SIDE (the rows are all rendered, CSS hides the rest; `castClass`/`crewClass`, no request). Names
  53. // link to /person/<slug>; the character in brackets after the name (CSS `attr(data-role)` — one element per name: the SSR's
  54. // line breaks inside a wrapper element put a space before the comma).
  55. parent './main.hl'
  56. import Modal from './modal.hl'
  57. import FranchiseWidget from './franchisewidget.hl'
  58. import { appTitle } from '../project.hl'
  59. import { userIdOfSession, loginHref } from '../lib/users.hl'
  60. import { isFollowing, toggleFollowed } from '../lib/follows.hl'
  61. import { showBySlug, showById, genreById, personById, seasonsOfShow, episodesOfSeason, seasonById, posterName, externalLinksOf, summaryOf, titleKind, statusOf } from '../lib/shows.hl'
  62. import { watchesOfUser, isWatched, watchedSet, watchClassOf, seasonAllWatched, toggleWatched, toggleSeasonWatched } from '../lib/watches.hl'
  63. import { needsDetails, completeStep, completeLine, persistDetails } from '../lib/details.hl'
  64. import { widgetsOf } from '../lib/franchises.hl'
  65. import { listOr } from '../lib/util.hl'
  66. import { dateText } from '../lib/people.hl'
  67. // ---- pure helpers ----------------------------------------------------------------------------
  68. // `static`, like calendar.hl's `soonOf` — a PLAIN instance member function that calls an
  69. // hl:mpackdb-backed import (seasonsOfShow, episodesOfSeason, watchesOfUser, …) comes back null
  70. // when called from an `on server` face (confirmed by running the gate: "'buildRows' is not
  71. // callable — it holds null" at the face's call site, even though the SAME call works fine as a
  72. // member's own initializer at the top of this file). `static` is the proven-safe shape (calendar's
  73. // `soonOf`, called from `calLoad`/`calSettingsLoad`, an mpackdb-backed helper exactly like this one).
  74. static initialCollapsed = (&seasons) => {
  75. m = {}
  76. let i = 0
  77. while (i < seasons.length) {
  78. if (i > 0) { m[seasons[i].id] = true }
  79. i = i + 1
  80. }
  81. return m
  82. }
  83. static genreRowsOf = (&show) => {
  84. out = []
  85. for (gid of show.genres) {
  86. let g = genreById(gid)
  87. if (g != null) { out.push({ id = g.id name = g.name href = '/genres/' + g.urlSegment }) }
  88. }
  89. return out
  90. }
  91. // tracker#28: how many names show before "Show all" (cast; per crew job)
  92. static castShown = 20
  93. static crewShown = 6
  94. // the cast as flat rows (no nested for, see THE ROWS above): `isPerson` rows { name, href, roleText (' (Character)' or ''),
  95. // itemClass } and before the first guest one `isLabel` row "Guest stars". itemClass: `more` = hidden until "Show all", `end` =
  96. // no comma after it (the last of a group), `cut` = the last one shown while collapsed (no comma then)
  97. static castRowsOf = (show) => {
  98. people = []
  99. for (c of listOr(show.cast)) {
  100. let p = c != null && c.person != null ? personById(c.person) : null
  101. // mission 062: a guest without a person record — the link creates it on the first open (project.hl guestRoute)
  102. if (p != null) { people.push({ name = c.actor != null ? c.actor : p.name href = '/person/' + p.urlSegment role = c.character != null ? c.character : '' guest = c.guest == true }) }
  103. else if (c != null && c.person == null && c.tmdbId != null && c.actor != null) { people.push({ name = c.actor href = '/person/tmdb/' + c.tmdbId + '?show=' + show.id role = c.character != null ? c.character : '' guest = true }) }
  104. }
  105. out = []
  106. let k = 0
  107. let guests = false
  108. while (k < people.length) {
  109. let c = people[k]
  110. if (c.guest && !guests && k > 0) {
  111. guests = true
  112. out.push({ isLabel = true isPerson = false text = 'Guest stars' name = '' href = '' roleText = '' itemClass = k >= castShown ? 'more' : '' })
  113. }
  114. let last = k == people.length - 1 || (people[k + 1].guest && !c.guest)
  115. let cls = (k >= castShown ? ' more' : '') + (last ? ' end' : '') + (k == castShown - 1 ? ' cut' : '')
  116. out.push({ isLabel = false isPerson = true text = '' name = c.name href = c.href roleText = c.role != '' ? ' (' + c.role + ')' : '' itemClass = 'artist-link' + cls })
  117. k = k + 1
  118. }
  119. return out
  120. }
  121. static castCountOf = (&rows) => {
  122. let n = 0
  123. for (r of rows) { if (r.isPerson) { n = n + 1 } }
  124. return n
  125. }
  126. static crewLabels = { creator = 'Created by' director = 'Directed by' writer = 'Written by' screenplay = 'Screenplay' story = 'Story' composer = 'Music' }
  127. // the crew as flat rows: per job (in stored order) an `isLabel` row, then its people (itemClass as for the cast, `more` after
  128. // the first crewShown of a job)
  129. static crewRowsOf = (&show) => {
  130. people = []
  131. for (c of listOr(show.crew)) {
  132. let p = c != null ? personById(c.person) : null
  133. if (p != null && crewLabels[c.job] != null) { people.push({ name = c.name != null ? c.name : p.name href = '/person/' + p.urlSegment job = c.job }) }
  134. }
  135. out = []
  136. let k = 0
  137. let inJob = 0
  138. while (k < people.length) {
  139. let c = people[k]
  140. if (k == 0 || people[k - 1].job != c.job) {
  141. inJob = 0
  142. out.push({ isLabel = true isPerson = false text = crewLabels[c.job] name = '' href = '' itemClass = '' })
  143. }
  144. let last = k == people.length - 1 || people[k + 1].job != c.job
  145. out.push({ isLabel = false isPerson = true text = '' name = c.name href = c.href itemClass = 'crew-link' + (inJob >= crewShown ? ' more' : '') + (last ? ' end' : '') + (inJob == crewShown - 1 ? ' cut' : '') })
  146. inJob = inJob + 1
  147. k = k + 1
  148. }
  149. return out
  150. }
  151. // how many crew names are hidden while collapsed (0 = no toggle) and how many there are
  152. static crewHiddenOf = (&rows) => {
  153. let n = 0
  154. for (r of rows) { if (r.isPerson && r.itemClass.includes(' more')) { n = n + 1 } }
  155. return n
  156. }
  157. static crewCountOf = (&rows) => {
  158. let n = 0
  159. for (r of rows) { if (r.isPerson) { n = n + 1 } }
  160. return n
  161. }
  162. // a View attribute must be a literal, a member or a field path — never an inline expression — so
  163. // every ternary (watched -> icon class, collapsed -> row class) is resolved HERE, once, into a
  164. // plain field the View just reads (row.watchClass, row.rowClass); `watchClassOf` itself lives in
  165. // watches.hl (shared with /unwatched and /schedule, "reuse, don't copy")
  166. // #22: an episode's air date as the lists show it ('YYYY-MM-DD'), '' when it has none
  167. static airDateOf = (&e) => { return e.release != null && hlTypeName(e.release) == 'String' ? e.release : '' }
  168. static buildRows = (&show, &uid, collapsed) => {
  169. watched = watchedSet(uid != null ? watchesOfUser(uid) : [])
  170. out = []
  171. for (s of seasonsOfShow(show)) {
  172. let isCollapsed = collapsed[s.id] == true
  173. let label = s.title != null && s.title != '' ? s.title : 'Season ' + s.seasonNumber
  174. let seasonWatched = seasonAllWatched(s, watched)
  175. out.push({ kind = 'season' isSeason = true isEpisode = false isSkeleton = false id = s.id skeletonCount = s.episodes.length < 8 ? s.episodes.length : 8 label = label episodeCountText = s.episodes.length == 1 ? '1 episode' : s.episodes.length + ' episodes' watched = seasonWatched watchClass = watchClassOf(seasonWatched) collapsed = isCollapsed rowClass = isCollapsed ? 'collapsed' : 'expanded' })
  176. if (!isCollapsed) {
  177. for (e of episodesOfSeason(s)) {
  178. let epWatched = watched['episode:' + e.id] == true
  179. out.push({ kind = 'episode' isSeason = false isEpisode = true isSkeleton = false id = e.id seasonId = s.id episodeNumber = e.episodeNumber title = e.title != null ? e.title : '' airDate = airDateOf(e) watched = epWatched watchClass = watchClassOf(epWatched) })
  180. }
  181. }
  182. }
  183. return out
  184. }
  185. // what the client marks the rows of a season it opens with (tracker#17) — only this show's, never the user's whole watch
  186. // list (every member is shipped to the browser). Per season with a watched episode: `{ all, except }` — `all` = most of
  187. // it is watched, then `except` holds the UNwatched ids, else the watched ones (a fully watched 142-episode season is
  188. // `{ all = true except = {} }`, not 142 ids). No entry = nothing watched.
  189. static watchedEpisodesOf = (&show, &uid) => {
  190. m = {}
  191. if (uid == null) { return m }
  192. watched = watchedSet(watchesOfUser(uid))
  193. for (s of seasonsOfShow(show)) {
  194. let yes = {}
  195. let no = {}
  196. let n = 0
  197. for (eid of s.episodes) {
  198. if (watched['episode:' + eid] == true) { yes[eid] = true n = n + 1 } else { no[eid] = true }
  199. }
  200. if (n > 0) { m[s.id] = n * 2 > s.episodes.length ? { all = true except = no } : { all = false except = yes } }
  201. }
  202. return m
  203. }
  204. // is this episode watched, by that per-season shape (client-side, pure)
  205. static watchedIn = (&entry, &episodeId) => {
  206. if (entry == null) { return false }
  207. listed = entry.except[episodeId] == true
  208. return entry.all ? !listed : listed
  209. }
  210. // ---- the rows as the CLIENT changes them (tracker#17) — pure: no import is reached, so they run in the browser ----------
  211. // (`watchClassOf` is an import of the mpackdb-backed watches.hl, so `filledRows` writes its two classes itself)
  212. static seasonRowAs = (&row, &isCollapsed) => {
  213. return { kind = 'season' isSeason = true isEpisode = false isSkeleton = false id = row.id skeletonCount = row.skeletonCount label = row.label episodeCountText = row.episodeCountText watched = row.watched watchClass = row.watchClass collapsed = isCollapsed rowClass = isCollapsed ? 'collapsed' : 'expanded' }
  214. }
  215. // the season opened: its caret up at once, `skeletonCount` placeholder rows under it
  216. static openingRows = (&rows, seasonId) => {
  217. out = []
  218. for (row of rows) {
  219. if (row.isSeason && row.id == seasonId) {
  220. out.push(seasonRowAs(row, false))
  221. let i = 0
  222. while (i < row.skeletonCount) {
  223. out.push({ kind = 'skeleton' isSeason = false isEpisode = false isSkeleton = true id = seasonId + '-skeleton-' + i seasonId = seasonId })
  224. i = i + 1
  225. }
  226. } else { out.push(row) }
  227. }
  228. return out
  229. }
  230. // the season closed: its episode (and skeleton) rows gone, caret down
  231. static closedRows = (&rows, &seasonId) => {
  232. out = []
  233. for (row of rows) {
  234. if (row.isSeason && row.id == seasonId) { out.push(seasonRowAs(row, true)) }
  235. else if (!row.isSeason && row.seasonId == seasonId) { }
  236. else { out.push(row) }
  237. }
  238. return out
  239. }
  240. // the episodes arrived: they replace the season's skeleton rows. No skeleton of it left (closed meanwhile, or a watch face
  241. // already rebuilt every row) → the rows stay as they are (no double rows)
  242. static filledRows = (&rows, seasonId, &episodes, watched) => {
  243. out = []
  244. let done = false
  245. for (row of rows) {
  246. if (row.isSkeleton && row.seasonId == seasonId) {
  247. if (!done) {
  248. for (e of episodes) {
  249. let w = watchedIn(watched[seasonId], e.id)
  250. out.push({ kind = 'episode' isSeason = false isEpisode = true isSkeleton = false id = e.id seasonId = seasonId episodeNumber = e.episodeNumber title = e.title airDate = e.airDate watched = w watchClass = w ? 'checkicon solid' : 'checkicon regular' })
  251. }
  252. done = true
  253. }
  254. } else { out.push(row) }
  255. }
  256. return out
  257. }
  258. // a LOCAL static like buildRows (an imported mpackdb helper called straight from a member's initializer came back false
  259. // after a client-side navigation to the page — the gate's follow check)
  260. static followingOf = (&show, &uid) => { return uid != null && isFollowing(uid, show.id) }
  261. // #24: has this user watched this movie (a watch `movie:<title id>`)?
  262. static movieWatchedOf = (&show, &uid) => { return uid != null && isWatched(watchesOfUser(uid), 'movie', show.id) }
  263. // mission 056: an ADULT title's page (TMDB's flag `adult == true`, mission 054) is "Not found" for everyone who does not
  264. // follow it (signed out too); a follower sees it as before. Unknown (`null`) is not hidden here — only in the lists.
  265. // With hybriel ≥ 73267707 (#121/#122) `showRow`/`found` are server sites re-derived after every session face with the page's
  266. // slug, so an Unfollow on the page hides it at once (the gate proves it; the old build left the page up until a reload).
  267. // Mission 054's try (`found = … && !adultHiddenFor(showRow, me)`, `collapsed`/`rows` from `found`) broke the checks.
  268. static adultHiddenFor = (&show, &uid) => { return show.adult == true && !followingOf(show, uid) }
  269. // the page's show — null when there is none OR it is hidden for this user: every member is shipped to the browser, so the
  270. // row of a hidden title must never be one
  271. static visibleShow = (&slug, &uid) => {
  272. s = showBySlug(slug)
  273. return s != null && adultHiddenFor(s, uid) ? null : s
  274. }
  275. // tracker.worldapi.org#19 (mission 066): the franchise widget(s), one per timeline the title is in (components/franchisewidget.hl)
  276. static franchiseWidgetsOf = (&show) => { return widgetsOf(show.id) }
  277. // tracker#33 (mission 032): a movie's release date and runtime under its title — "17 September 2026 · 7 min", "… · 2 h 15 min";
  278. // what is missing is left out ('' = no line)
  279. static runtimeText = (&m) => {
  280. if (m == null || hlTypeName(m) != 'Number' || m <= 0) { return '' }
  281. mins = m % 60
  282. hours = (m - mins) / 60
  283. if (hours == 0) { return mins + ' min' }
  284. return mins == 0 ? hours + ' h' : hours + ' h ' + mins + ' min'
  285. }
  286. static movieFactsOf = (&s) => {
  287. if (s.type != 'movie') { return '' }
  288. parts = []
  289. d = dateText(s.release)
  290. if (d != null) { parts.push(d) }
  291. r = runtimeText(s.runtime)
  292. if (r != '') { parts.push(r) }
  293. return parts.join(' · ')
  294. }
  295. // mission 062: what the page shows of the title, as a SMALL object — `showRow` reads the session, so hl:web ships it with the page
  296. // AND re-sends it after every watch/follow click (SESSION SYNC below): the whole record was ~1 MB on The Simpsons (300 cast + crew
  297. // entries). null = not found / hidden.
  298. static pageShowOf = (&slug, &uid) => {
  299. s = visibleShow(slug, uid)
  300. if (s == null) { return null }
  301. movie = s.type == 'movie'
  302. st = statusOf(s)
  303. return { id = s.id title = s.title summary = summaryOf(s) type = s.type adult = s.adult == true shortId = s.shortId != null ? '' + s.shortId : '' statusText = st.text statusTone = st.tone
  304. poster = posterName(s) genreRows = genreRowsOf(s) linkRows = externalLinksOf(s) completing = completingOf(s) following = followingOf(s, uid)
  305. movieWatched = movie ? movieWatchedOf(s, uid) : false facts = movieFactsOf(s) }
  306. }
  307. // the seasons/episodes rows and the per-season watch state by the slug (the record itself stays on the server)
  308. static rowsOfSlug = (&slug, &uid, &collapsed) => {
  309. s = showBySlug(slug)
  310. return s != null ? buildRows(s, uid, collapsed) : []
  311. }
  312. static watchedEpisodesOfSlug = (&slug, &uid) => {
  313. s = showBySlug(slug)
  314. return s != null ? watchedEpisodesOf(s, uid) : {}
  315. }
  316. // the initial open/closed seasons and the title's kind (tracker#20/#21: the heading's type word) from the SLUG alone (not from
  317. // `showRow`, which reads the session — see `collapsed`) — one slug lookup for both
  318. static slugInfoOf = (&slug) => {
  319. s = showBySlug(slug)
  320. return s != null ? { collapsed = initialCollapsed(seasonsOfShow(s)) kind = titleKind(s) } : { collapsed = {} kind = 'series' }
  321. }
  322. // mission 062: the cast and crew rows by the SLUG alone (not from `showRow`, which reads the session — see `castRows`). An
  323. // ADULT title (its page only for its followers) shows none: every member is shipped to the browser, and adult titles never get
  324. // credits anyway (details.hl skips them; at most a migrated cast)
  325. static publicShowOf = (&slug) => {
  326. s = showBySlug(slug)
  327. return s != null && s.adult != true ? s : null
  328. }
  329. static castOfSlug = (&slug) => {
  330. s = publicShowOf(slug)
  331. return s != null ? castRowsOf(s) : []
  332. }
  333. static crewOfSlug = (&slug) => {
  334. s = publicShowOf(slug)
  335. return s != null ? crewRowsOf(s) : []
  336. }
  337. // tracker#26: the page loads this title's full details on open
  338. static completingOf = (&show) => { return needsDetails(show) }
  339. // the face's work: ONE step of completing the title (details.hl completeStep — a series takes a few; a second viewer drives the
  340. // same job or finds it complete); when done, every part of the page that changes — the rows without anyone's watch state (a
  341. // title that was incomplete had no episodes to watch)
  342. static completedPageOf = (&slug) => {
  343. let show = showBySlug(slug)
  344. if (show == null || show.adult == true) { return { error = 'no such show' } }
  345. if (needsDetails(show)) {
  346. let r = completeStep(show.id)
  347. if (r.retry || r.adult == true) { return { error = r.error != '' ? r.error : 'no such show' } }
  348. if (!r.done) { return { done = false steps = r.sum.steps } }
  349. if (!r.skipped) {
  350. persistDetails()
  351. console.log('details on open: ' + completeLine(show.title, r.sum))
  352. }
  353. show = showById(show.id)
  354. }
  355. cl = initialCollapsed(seasonsOfShow(show))
  356. pn = posterName(show)
  357. crew = crewRowsOf(show)
  358. cast = castRowsOf(show)
  359. return { done = true title = show.title summary = summaryOf(show) poster = pn genreRows = genreRowsOf(show) castRows = cast
  360. castCount = castCountOf(cast) castMore = castCountOf(cast) > castShown crewRows = crew crewCount = crewCountOf(crew) crewMore = crewHiddenOf(crew) > 0
  361. linkRows = externalLinksOf(show) collapsed = cl rows = buildRows(show, null, cl) }
  362. }
  363. // ---- reactive members -----------------------------------------------------------------------
  364. slug = null
  365. session = null
  366. userId = userIdOfSession(session)
  367. signedIn = userId != null
  368. // SESSION SYNC (mission 047; since hybriel #121/#122, mission 056): a face taking `session` answers with a `sync` of every
  369. // member derived from session that reaches an import (here `showRow`, `found`, `following`, `rows`, …), re-derived on the
  370. // server with the page's route params but the MOUNT's other state — so client state (`collapsed`) must never derive from
  371. // them. `me` stays the plain copy mission 047 introduced.
  372. me = userId
  373. showRow = pageShowOf(slug, me)
  374. found = showRow != null
  375. notFound = showRow == null
  376. // the Follow toggle: "Follow" = the inverted button (accent text on a surface, no border since tracker#32), "Following" = the
  377. // filled one (the theme's `primary`)
  378. following = found ? showRow.following : false
  379. followClass = following ? 'follow primary' : 'follow inverted'
  380. followText = following ? 'Following' : 'Follow'
  381. signInHref = loginHref
  382. // #24: a movie's watched check (same icon/classes as the episodes); the classes written out, not `watchClassOf` (an import of
  383. // the mpackdb-backed watches.hl cannot run in the browser when the member is re-derived there)
  384. isMovie = found && showRow.type == 'movie'
  385. movieWatched = isMovie ? showRow.movieWatched : false
  386. movieWatchClass = movieWatched ? 'checkicon solid' : 'checkicon regular'
  387. movieWatchText = movieWatched ? 'Watched' : 'Not watched'
  388. signInText = isMovie ? 'You need to sign in to follow movies and mark them watched.' : 'You need to sign in to follow shows and mark episodes.'
  389. title = found ? showRow.title : ''
  390. // tracker#35: the status pill next to a series' title — TVmaze's status, else TMDB's (shows.hl statusOf); none on a movie
  391. statusText = found ? showRow.statusText : ''
  392. hasStatus = statusText != ''
  393. // tracker#33: a movie's release date + runtime (movieFactsOf)
  394. factsText = found ? showRow.facts : ''
  395. hasFacts = factsText != ''
  396. statusClass = found ? 'status-pill status-' + showRow.statusTone : 'status-pill'
  397. // tracker#20: "Series | Reacher" — the kind from the slug (pure strings here: they are re-derived in the browser too)
  398. slugInfo = slugInfoOf(slug)
  399. pageKind = slugInfo.kind
  400. typeText = pageKind == 'movie' ? 'Movie' : (pageKind == 'show' ? 'Show' : 'Series')
  401. typeClass = 'type-word type-' + pageKind
  402. // tracker#18: the creator's own text, else TMDB's, else TVmaze's (pageShowOf → shows.hl summaryOf)
  403. summary = found && showRow.summary != null ? showRow.summary : ''
  404. poster = found ? showRow.poster : null
  405. hasPoster = poster != null
  406. posterUrl = hasPoster ? '/posters/' + poster : ''
  407. // mission 060 (tracker.worldapi.org#27): the short id under the poster (none yet while the backfill has not reached it)
  408. shortId = found ? showRow.shortId : ''
  409. hasShortId = shortId != ''
  410. genreRows = found ? showRow.genreRows : []
  411. hasGenres = genreRows.length > 0
  412. // mission 062: cast + crew from the SLUG (`castOfSlug`, `crewOfSlug`), never from `showRow` — a member derived from the session is
  413. // re-derived and re-SENT after every watch/follow click (SESSION SYNC above): The Simpsons' 300 names took 0.7 s per click
  414. castRows = castOfSlug(slug)
  415. hasCast = castRows.length > 0
  416. // tracker#28: "Show all (N)" — the toggles' state is CLIENT state: literals, never derived from `showRow` (session sync)
  417. castCount = castCountOf(castRows)
  418. castMore = castCount > castShown
  419. castAllText = 'Show all (' + castCount + ')'
  420. castClass = 'collapsed'
  421. crewRows = crewOfSlug(slug)
  422. hasCrew = crewRows.length > 0
  423. crewCount = crewCountOf(crewRows)
  424. crewMore = crewHiddenOf(crewRows) > 0
  425. crewAllText = 'Show all crew (' + crewCount + ')'
  426. crewClass = 'collapsed'
  427. linkRows = found ? showRow.linkRows : []
  428. franchiseWidgets = found ? franchiseWidgetsOf(showRow) : []
  429. hasLinks = linkRows.length > 0
  430. // NOT from `showRow`/`found`: they read the session (via `me`), so a member derived from them is re-derived on the server
  431. // after every session face with the MOUNT's state — `collapsed` (client state) would snap back to the initial seasons (mission
  432. // 056: the 2nd episode click in a re-opened season did nothing). The season ids of a hidden page are no secret.
  433. collapsed = slugInfo.collapsed
  434. // mission 062: has this page opened/closed a season (client state) — then a watch face sends its own rows (toggleEpisode)
  435. collapsedChanged = false
  436. rows = found ? rowsOfSlug(slug, me, collapsed) : []
  437. hasRows = rows.length > 0
  438. watchedEpisodes = found ? watchedEpisodesOfSlug(slug, me) : {}
  439. // an adult page (followers only) opens its seasons through the session face `showRows`
  440. adultShow = found && showRow.adult == true
  441. // tracker#26: incomplete → skeletons + the probe until `showComplete` answered
  442. completing = found ? showRow.completing : false
  443. // tracker#33: a title TMDB has no poster for (The Remaining) shows the placeholder in the poster's place — the column was empty
  444. // but for the short id, the page looked unfinished; while an incomplete title loads, the skeleton instead
  445. posterLoading = completing && !hasPoster
  446. noPoster = !hasPoster && !completing
  447. completeBusy = false
  448. isSeries = found && showRow.type != 'movie'
  449. skeletonSeasons = ['1', '2', '3']
  450. __title = found ? title + ' — ' + appTitle : appTitle
  451. View {
  452. showPage {
  453. if (notFound) {
  454. article { class = "main"
  455. h1 { "Not found" }
  456. p { "This show doesn't exist." }
  457. }
  458. }
  459. if (found) {
  460. showHeader {
  461. showPoster {
  462. if (hasPoster) { img { src = posterUrl alt = title } }
  463. if (noPoster) { img { class = "no-poster" src = "/posters/none" alt = "no poster" } }
  464. if (posterLoading) { skeletonPoster { "aria-hidden" = "true" } }
  465. // tracker#34: Follow directly under the poster, as wide as the poster (creator: "the follow button should go below
  466. // the picture … and expand to the size o the poster")
  467. button { id = "follow" type = "button" class = followClass followText on click(e) { emit toggleFollow(e) } }
  468. if (hasShortId) { shortIdLabel { id = "shortid" title = "Short id" shortId } }
  469. }
  470. showMeta {
  471. showTitle {
  472. h1 { class = "typed" typeWord { class = typeClass typeText } typeSep { "|" } typeName { title } }
  473. if (hasStatus) { statusPill { class = statusClass statusText } }
  474. if (hasFacts) { showFacts { id = "moviefacts" factsText } }
  475. }
  476. if (isMovie) {
  477. movieWatch {
  478. button { id = "moviewatch" type = "button" class = movieWatchClass "aria-label" = "mark movie watched"
  479. svg { viewBox = "0 0 24 24" width = "22" height = "22" "aria-hidden" = "true"
  480. circle { cx = "12" cy = "12" r = "10" }
  481. path { d = "M7 12.5 L10.5 16 L17 8.5" }
  482. }
  483. on click(e) { emit toggleMovie(e) }
  484. }
  485. movieWatchLabel { movieWatchText }
  486. }
  487. }
  488. if (hasLinks) {
  489. showLinks {
  490. for (l of linkRows) { a { class = "extlink" href = l.href target = "_blank" rel = "noopener" title = l.title "aria-label" = l.title "data-site" = l.site l.label } }
  491. }
  492. }
  493. // mission 025: the franchise widget right under the title/poster block — on a phone (showMeta dissolves, see styles.hl)
  494. // after the poster and before the genres, plot and cast; from 40rem in the right column under the title
  495. FranchiseWidget { widgets = franchiseWidgets }
  496. if (hasGenres) {
  497. showGenres {
  498. for (g of genreRows) { a { class = "genre-pill" href = g.href g.name } }
  499. }
  500. }
  501. showSummary { summary }
  502. if (hasCrew) {
  503. showCrew { class = crewClass
  504. for (r of crewRows) {
  505. if (r.isLabel) { crewLabel { r.text } }
  506. if (r.isPerson) { a { class = r.itemClass href = r.href r.name } }
  507. }
  508. if (crewMore) {
  509. button { id = "crewtoggle" type = "button" class = "quiet showall"
  510. whenCollapsed { crewAllText }
  511. whenAll { "Show less" }
  512. on click(e) { emit toggleCrewAll(e) }
  513. }
  514. }
  515. }
  516. }
  517. if (hasCast) {
  518. showCast { class = castClass
  519. castHeading { "Cast" }
  520. for (c of castRows) {
  521. if (c.isLabel) { castLabel { class = c.itemClass c.text } }
  522. if (c.isPerson) { a { class = c.itemClass href = c.href "data-role" = c.roleText c.name } }
  523. }
  524. if (castMore) {
  525. button { id = "casttoggle" type = "button" class = "quiet showall"
  526. whenCollapsed { castAllText }
  527. whenAll { "Show less" }
  528. on click(e) { emit toggleCastAll(e) }
  529. }
  530. }
  531. }
  532. }
  533. if (completing) { skeletonCast { "aria-hidden" = "true" } }
  534. }
  535. }
  536. if (completing) {
  537. showLoading { id = "showloading" "aria-busy" = "true"
  538. if (isSeries) {
  539. for (k of skeletonSeasons) {
  540. skeletonRow { "aria-hidden" = "true"
  541. skeletonCheck { }
  542. skeletonTitle { }
  543. }
  544. }
  545. }
  546. showProbe { "aria-hidden" = "true" on animationiteration(e) { emit completeTick(e) } }
  547. }
  548. }
  549. if (hasRows) {
  550. showSeasons {
  551. for (row of rows) {
  552. if (row.isSeason) {
  553. seasonRow { class = row.rowClass
  554. button { type = "button" class = row.watchClass value = row.id "aria-label" = "mark season watched"
  555. svg { viewBox = "0 0 24 24" width = "22" height = "22" "aria-hidden" = "true"
  556. circle { cx = "12" cy = "12" r = "10" }
  557. path { d = "M7 12.5 L10.5 16 L17 8.5" }
  558. }
  559. on click(e) { emit toggleSeason(row.id) }
  560. }
  561. button { type = "button" class = "season-toggle" value = row.id
  562. seasonLabel { row.label }
  563. seasonCount { row.episodeCountText }
  564. seasonCaret { "aria-hidden" = "true"
  565. svg { viewBox = "0 0 24 24" width = "20" height = "20"
  566. path { d = "M6 9 L12 15 L18 9" }
  567. }
  568. }
  569. on click(e) { emit toggleCollapse(row.id) }
  570. }
  571. }
  572. }
  573. if (row.isEpisode) {
  574. episodeRow {
  575. button { type = "button" class = row.watchClass value = row.id "aria-label" = "mark episode watched"
  576. svg { viewBox = "0 0 24 24" width = "22" height = "22" "aria-hidden" = "true"
  577. circle { cx = "12" cy = "12" r = "10" }
  578. path { d = "M7 12.5 L10.5 16 L17 8.5" }
  579. }
  580. on click(e) { emit toggleEpisode(row.id) }
  581. }
  582. episodeNumber { row.episodeNumber }
  583. episodeTitle { row.title }
  584. episodeDate { row.airDate }
  585. }
  586. }
  587. if (row.isSkeleton) {
  588. skeletonRow { "aria-hidden" = "true"
  589. skeletonCheck { }
  590. skeletonNumber { }
  591. skeletonTitle { }
  592. }
  593. }
  594. }
  595. }
  596. }
  597. Modal { id = "signin" title = "Sign in"
  598. p { signInText }
  599. footer {
  600. button { type = "button" value = "close" "Close" }
  601. a { id = "signin-link" class = "button primary" href = signInHref "Sign in with ident" }
  602. }
  603. }
  604. }
  605. }
  606. }
  607. // Every rebuild of `rows` happens SERVER-SIDE, never by calling `buildRows` from a client handler:
  608. // a member function whose body reaches an hl:mpackdb-backed import (seasonsOfShow, episodesOfSeason,
  609. // watchesOfUser, …) compiles to nothing on the client (no case ever assigns it — a genuine Hybriel
  610. // gap, filed under `issues`) even though the client bundle still calls it, so `this.buildRows(...)`
  611. // throws "not a function" in the browser. The client here only ever ASSIGNS the `rows` the server
  612. // already built (`rows = r.rows`) — never calls a tainted local helper itself. `slug` goes along so
  613. // the face can refetch the show without depending on implicit access to a sibling member.
  614. //
  615. // tracker#17: opening shows the skeleton rows BEFORE the request; the answer replaces them unless the season was closed
  616. // meanwhile (then nothing). An error closes the season again. Closing never asks the server.
  617. on toggleCollapse(seasonId) {
  618. collapsedChanged = true
  619. m = collapsed
  620. if (collapsed[seasonId] != true) {
  621. m[seasonId] = true
  622. collapsed = m
  623. rows = closedRows(rows, seasonId)
  624. return null
  625. }
  626. m[seasonId] = false
  627. collapsed = m
  628. rows = openingRows(rows, seasonId)
  629. if (adultShow) {
  630. let a = emit server showRows(slug, collapsed)
  631. if (collapsed[seasonId] == true) { return null }
  632. if (a == null || a.error != null) { m[seasonId] = true collapsed = m rows = closedRows(rows, seasonId) return null }
  633. rows = a.rows
  634. return null
  635. }
  636. let r = emit server showSeasonEpisodes('' + seasonId)
  637. if (collapsed[seasonId] == true) { return null }
  638. if (r == null || r.error != null) { m[seasonId] = true collapsed = m rows = closedRows(rows, seasonId) return null }
  639. rows = filledRows(rows, seasonId, r.episodes, watchedEpisodes)
  640. }
  641. // tracker#26: the probe's tick — `showComplete` step by step until `done` (once per page: `completeBusy`; other requests are
  642. // served between two calls); the last answer replaces the skeletons. A lost answer (null) lets the next tick go on where the
  643. // server is; an error (TMDB down, adult) ends the loading and keeps what the page has.
  644. on completeTick(e) {
  645. if (completeBusy || !completing) { return null }
  646. completeBusy = true
  647. s = slug
  648. let r = emit server showComplete(s)
  649. while (r != null && r.error == null && r.done != true && slug == s) { r = emit server showComplete(s) }
  650. completeBusy = false
  651. if (r == null || slug != s) { return null }
  652. if (r.error != null) { completing = false return null }
  653. title = r.title
  654. summary = r.summary
  655. poster = r.poster
  656. genreRows = r.genreRows
  657. castRows = r.castRows
  658. castCount = r.castCount
  659. castMore = r.castMore
  660. castAllText = 'Show all (' + r.castCount + ')'
  661. crewRows = r.crewRows
  662. crewCount = r.crewCount
  663. crewMore = r.crewMore
  664. crewAllText = 'Show all crew (' + r.crewCount + ')'
  665. linkRows = r.linkRows
  666. collapsed = r.collapsed
  667. collapsedChanged = true
  668. rows = r.rows
  669. completing = false
  670. }
  671. // tracker#28: the cast / crew "Show all" toggles — client-only, no request (CSS shows the hidden names)
  672. on toggleCastAll(e) {
  673. castClass = castClass == 'all' ? 'collapsed' : 'all'
  674. }
  675. on toggleCrewAll(e) {
  676. crewClass = crewClass == 'all' ? 'collapsed' : 'all'
  677. }
  678. // signed out: the modal, nothing is sent
  679. // mission 062: the new `rows` come with the SAME ack as the session sync (SESSION SYNC above: `rows` derives from the session) —
  680. // but that sync is built with the MOUNT's open seasons. So the face sends its own rows only once this page opened/closed a season
  681. // (`collapsedChanged`, or a completed title); else they came twice (a second buildRows + 14 kB on The Simpsons: ~40 ms per click)
  682. on toggleEpisode(episodeId) {
  683. if (!signedIn) { document.getElementById('signin').showModal() return null }
  684. let r = emit server showToggleEpisode(slug, '' + episodeId, collapsed, collapsedChanged)
  685. if (r == null || r.error != null) { return null }
  686. if (r.rows != null) { rows = r.rows }
  687. }
  688. on toggleSeason(seasonId) {
  689. if (!signedIn) { document.getElementById('signin').showModal() return null }
  690. let r = emit server showToggleSeason(slug, '' + seasonId, collapsed, collapsedChanged)
  691. if (r == null || r.error != null) { return null }
  692. if (r.rows != null) { rows = r.rows }
  693. }
  694. // #24: the movie's own check — signed out the modal, nothing sent
  695. on toggleMovie(e) {
  696. if (!signedIn) { document.getElementById('signin').showModal() return null }
  697. let r = emit server showToggleMovie(slug)
  698. if (r == null || r.error != null) { return null }
  699. movieWatched = r.watched
  700. movieWatchClass = r.watched ? 'checkicon solid' : 'checkicon regular'
  701. movieWatchText = r.watched ? 'Watched' : 'Not watched'
  702. }
  703. on toggleFollow(e) {
  704. if (!signedIn) { document.getElementById('signin').showModal() return null }
  705. let r = emit server showToggleFollow(slug)
  706. if (r == null || r.error != null) { return null }
  707. following = r.following
  708. followClass = r.following ? 'follow primary' : 'follow inverted'
  709. followText = r.following ? 'Following' : 'Follow'
  710. }
  711. // ---- the faces (the trailing `session` is always the server's: hybriel#16) ----
  712. // tracker#26: complete an incomplete title and answer the page's parts — public data, NO session (no page re-mount)
  713. on server showComplete(slug) {
  714. return completedPageOf(slug != null ? '' + slug : '')
  715. }
  716. // every row for these open/closed seasons — only an ADULT show's page still uses it (its followers; tracker#17)
  717. on server showRows(slug, collapsed, session) {
  718. show = showBySlug(slug)
  719. uid = userIdOfSession(session)
  720. if (show == null || adultHiddenFor(show, uid)) { return { error = 'no such show' } }
  721. return { ok = true rows = buildRows(show, uid, collapsed) }
  722. }
  723. // tracker#17: one season's episodes, in order — public data, so NO `session` (no page re-mount, no sync: the fast path).
  724. // Refuses a season of an adult title (those pages use showRows above).
  725. on server showSeasonEpisodes(seasonId) {
  726. if (seasonId == null || hlTypeName(seasonId) != 'String') { return { error = 'no such season' } }
  727. season = seasonById(seasonId)
  728. if (season == null) { return { error = 'no such season' } }
  729. show = showById(season.show)
  730. if (show == null || show.adult == true) { return { error = 'no such season' } }
  731. out = []
  732. for (e of episodesOfSeason(season)) { out.push({ id = e.id episodeNumber = e.episodeNumber title = e.title != null ? e.title : '' airDate = airDateOf(e) }) }
  733. return { ok = true episodes = out }
  734. }
  735. on server showToggleEpisode(slug, episodeId, collapsed, withRows, session) {
  736. show = showBySlug(slug)
  737. if (show == null) { return { error = 'no such show' } }
  738. uid = userIdOfSession(session)
  739. if (uid == null) { return { error = 'you are not signed in' } }
  740. if (adultHiddenFor(show, uid)) { return { error = 'no such show' } }
  741. if (toggleWatched(uid, 'episode', episodeId) == null) { return { error = 'could not save the watch' } }
  742. return withRows == true ? { ok = true rows = buildRows(show, uid, collapsed) } : { ok = true }
  743. }
  744. on server showToggleSeason(slug, seasonId, collapsed, withRows, session) {
  745. show = showBySlug(slug)
  746. if (show == null) { return { error = 'no such show' } }
  747. uid = userIdOfSession(session)
  748. if (uid == null) { return { error = 'you are not signed in' } }
  749. if (adultHiddenFor(show, uid)) { return { error = 'no such show' } }
  750. season = seasonById(seasonId)
  751. if (season == null) { return { error = 'no such season' } }
  752. // #23: not all episodes watched → watch them all; all watched → unwatch them all (lib/watches.hl)
  753. if (toggleSeasonWatched(uid, season) == null) { return { error = 'could not save the watch' } }
  754. return withRows == true ? { ok = true rows = buildRows(show, uid, collapsed) } : { ok = true }
  755. }
  756. // #24: a movie's watched check (only a movie: a series is watched by its episodes)
  757. on server showToggleMovie(slug, session) {
  758. show = showBySlug(slug)
  759. if (show == null || show.type != 'movie') { return { error = 'no such movie' } }
  760. uid = userIdOfSession(session)
  761. if (uid == null) { return { error = 'you are not signed in' } }
  762. if (adultHiddenFor(show, uid)) { return { error = 'no such movie' } }
  763. watched = toggleWatched(uid, 'movie', show.id)
  764. if (watched == null) { return { error = 'could not save the watch' } }
  765. return { ok = true watched = watched }
  766. }
  767. on server showToggleFollow(slug, session) {
  768. show = showBySlug(slug)
  769. if (show == null) { return { error = 'no such show' } }
  770. uid = userIdOfSession(session)
  771. if (uid == null) { return { error = 'you are not signed in' } }
  772. follow = toggleFollowed(uid, show.id)
  773. if (follow == null) { return { error = 'could not save the follow' } }
  774. return { ok = true following = follow }
  775. }

Branches

Latest commits

  • fbb903cctracker#33/#37 (mission 032): a title without a TMDB poster gets its backdrop (w780, posterFromBackdrop, shown 2:3 centre-cropped); movies store runtime, the page shows release date + runtime; art backfill (public titles without poster file / movies without runtime) and person photo backfill (tmdbProfile / photoCheck) as the last start jobs (TRACKER_ART, TRACKER_PHOTOS; off in every gate start); gates 379/0, 32/0, 53/0, 229/0, 26/0, check-theme 0; live copy: art 4977 titles in 42 min (115 posters, 15 backdrops, 4609 runtimes), The Remaining shows its backdrop + 7 minmre
  • 4ecc67b2tracker: STATUS/LOG for the t38 + t40 merge (gates 374/0, 32/0, 53/0, 229/0, 26/0, check-theme 0; live copy checks)mre
  • e5945d2fMerge t40 (tracker#40 curated franchises, Franchises menu, superseded collections) into main: deploy.sh lists all six gates (browser, kinds, franchises, pager, franchiseseed, check-theme); search.hl keeps #37's personPhotoOf + #40's importWithCredits; pager gate runs with TRACKER_FRANCHISE_SEED=0; gates 374/0, 32/0, 53/0, 229/0, 26/0, check-theme 0mre
  • b638e99dMerge t38 (tracker#38 pagination, #35 Returning/Airing label) into main: LOG/STATUS keep both sides; pager gate follows #37's /people (everyone, last updated first: seed updatedAt); gates pager 229/0, browser 374/0mre
  • f8ffa4dbtracker: report 032 + The Remaining + #39mre
  • 7565a863tracker: LOG timemre
  • b10f00c8tracker#39: double episodes — migrated episodes whose TMDB id TMDB replaced are adopted by their number in the sync (old id -> migratedTmdbId); merge.hl step 3 merges each season's doubles at start (keeper: most watches > synced > first; watches moved/parked; tombstones into mergedEpisodes, nothing deleted); tools/count-duplicate-episodes.hl; gate fixture + paths-m039; live copy 850 -> 0 in 64 s; gates 373/0, 32/0, 52/0mre
  • 8f1d4542tracker#40: superseded collections — a TMDB collection timeline whose titles are all in one curated timeline is hidden (supersededBy; kept: own page + editor finder), set by the collection seed when it makes one and by the curated build (lifted when the cover is gone); partly covered ones join that franchise; no second widget (First Contact: only Star Trek — Prime); gate franchiseseed 26/0, browser 365/0, kinds 32/0, franchises 53/0, check-theme 0; real copy 24 supersededmre
  • 9448d643tracker#35 follow-up (mission 033): TVmaze 'Running' is labelled 'Returning', or 'Airing' while a non-special episode of the two newest seasons is released within today +-7 days (data unchanged); gate fixtures Running/Airing/Aired + a special; browser 366/0, kinds 32/0, franchises 52/0, pager 229/0, check-theme 0mre
  • 7d4b293dtracker#40: "Franchises" in the main menu (desktop header after People, phone sidebar) → /franchises, marked on franchise and timeline pages; gates 365/0, 32/0, 53/0, 24/0, check-theme 0mre
  • 8751adb8tracker: report 032mre
  • 9bce1f65tracker mission 032: STATUS gate files + the hour-boundary flakemre
  • 718bfb89tracker#37 (mission 032): /people = everyone, last updated first (updatedAt stamped by the person fill; view built at boot, touched people first at once), photo + name tiles (person colour) with the /movies pagination, /people/<letter> removed; photo = our file, tmdbProfile, a cast/crew entry's profile (in-memory map at boot), else the new 'no photo' placeholder; new cast/crew/created_by people keep tmdbProfile; search people rows with the photo; /settings = the heading only; util.hl sortDesc starts from sorted runs (same result, 105k: 1.6 s -> 0.15 s); gates 369/0, 32/0, 52/0, check-theme 0; README/STATUS/LOGmre
  • 93dfb0batracker#40 (mission 034): the curated franchises — data/franchises.json (17 franchises, 31 timelines, 285 TMDB titles, movies + series, in-universe/release order, 12 TMDB collections attached); lib/franchiseseed.hl + jobs.hl franchiseSeedTick (last start job, imports missing titles via details.hl importWithCredits = the search's Add, one per step paced, then one build; franchiseseed.db: editor changes win, the creator's same-name franchise adopted / timeline left alone, 404 remembered, resumable, idempotent); timeline heads 'N titles · in-universe order' (orderKind) and wrap on a phone; series pages show the widget; new gate tests/franchiseseed.mjs (5th in deploy.sh), the others run with TRACKER_FRANCHISE_SEED=0; gates 365/0, 32/0, 52/0, 24/0, check-theme 0; real copy 196 imported, 0 failed, 7 min, restart unchanged=31mre
  • 03ec792ftracker#38 (mission 033): pagination goes exactly to the clicked page — tilelist read the clicked button's text after pagination.hl's own handler had rebuilt the buttons (real clicks only); now li.current, else the button's own text; new gate tests/pager.mjs (5 lists x 11 pages, 390/1280, real + script clicks, Back/Forward) 229/0; browser 365/0, kinds 32/0, franchises 52/0, check-theme 0mre
  • 96ba683adeploy.sh: a gate without a 'passed,' line (check-theme) no longer ends the scriptmre
  • eb3b9205tracker: report 031mre
  • 9b5d2e89tracker mission 031: README (What it does, Test: four gates + the #32 checks, Files: theme/, new pages), STATUS (real copy, A/B load, how to repeat, open points), LOGmre
  • 39950e4ctracker#32 (mission 031): the WorldAPI theme (theme/ vendored verbatim from layouts.worldapi.org 85b5654; styles.hl inherits it: accent green-dark, type colours 1-6; own base/header rules, row lines, genre-pill and inverted-button frames removed, the season foldable keeps its line; check-theme 21 -> 0, 4th deploy gate; main actions class primary) and the #32 header (theme AppHeader/MainMenu/UserMenu/Sidebar/ContentFirst: desktop brand, search, Series|Shows|Movies|Genres|People, user icon with Unwatched..Settings, Logout; signed out the ident selector, phone the iD icon dropdown; phone menu in the sidebar overlay; marked entry by :has); /find -> /search/<q>, /genres, /people(/<letter>), /settings; main { ContentFirst { slot } } works around the hl:web one-line slot bug; gates 365/0, 32/0, 52/0, check-theme 0mre
  • a386dc92tracker: reports 029 + 030mre