gitoriaLog in with ident

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit1cda451d1cda451dtracker: Hybriel master 190aa11d (#127 both shapes, GC correctness fc838894) — conductor adopts despite /my/series 2.4x after jobs (memory 8.0 → 1.7 GB boot); see reports/071mre1cda451d/components/show.hl

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

Branches

Latest commits

  • 1cda451dtracker: Hybriel master 190aa11d (#127 both shapes, GC correctness fc838894) — conductor adopts despite /my/series 2.4x after jobs (memory 8.0 → 1.7 GB boot); see reports/071mre
  • c1fa2f2etracker (mission 071): Hybriel master 190aa11d measured on the real copy vs the live binary 8590df63 — NOT adopted (after the first-start jobs /my/series 2.4x slower, /series 1.6x, RSS swings 7.4-12.2 GB; fresh it is flat at 1.7-2.2 GB and /my/unwatched faster), vendor stays 8efba065, candidate kept in .scratch/w071/vendor-190aa11d; tests/kinds.mjs: collection seed off (its TMDB request broke check 1 in 1 of 4 runs); tests/realdata-071.sh + realdata-071-bench.mjs + tools/realdata-071-table.py; README + STATUS (numbers, how to repeat); gates 325/0, 32/0, 50/0mre
  • 8081350atracker docs (mission 070): README (summary, Config HL_GC_BYTES — kept at Hybriel's default, the 256 MiB setting is taken out of docker-compose.yml again: the jobs grew to 12+ GB with it too, see STATUS), Test (three gates), Deploy (first start ~50 min: kinds then seed, restart once after collections done, memory numbers), Vendored Hybriel 8efba065 + #48 audit, Files; STATUS mission 070 entry (merges, migrated counts, lambda audit, gates, RSS old vs new, how to repeat, open points); docs/kinds.md + docs/franchises.md job order; tests/realdata-070-*.sh, tools/count-migrated.hl, tools/ref-params.py, tools/lambda-audit.pymre
  • 1ad19c8ctracker: re-vendor Hybriel master 8efba065 (#126 GC by bytes, #48 lambda parameters copy) (mission 070): bin/hybriel sha256 50361e95…, plugins core crypto data fetch fs http http1 mpackdb proc smtp time web; lambda audit: 13 lambdas change a passed record/list (11 through a local alias), no caller relies on it — unchanged; 319 read-only lambda parameters get & (no copy per call: /my/schedule 2.35 → 0.46 s, /my/unwatched 13.7 → 5.7 s on the real copy); /my/unwatched one merge sort instead of n² inserts; docker-compose HL_GC_BYTES=268435456; deploy.sh runs kinds.mjs + franchises.mjs too (default ports 8700–8710); tests/realdata-070.mjs; gates browser 325/0, kinds 32/0, franchises 50/0mre
  • 46b21389tracker (mission 070, conductor): the sync never destroys migrated data — the one-time summary step MOVES a copied summary to migratedSummary (marker summaries-moved.txt) instead of clearing it; a migrated record's first title/genres/homepage/tagline TMDB replaces → migratedTitle/migratedGenres/migratedHomepage/migratedTagline, a migrated season's/episode's title/summary → migratedTitle/migratedSummary (set once); tests/peek-shows.hl prints them; gate 325/0mre
  • 749019b0Merge t19 (tracker#19 franchises + timelines) into main (mission 070): conflicts README/STATUS/show.hl/project.hl/browser.mjs/faketmdb.mjs, both sides kept; franchise/timeline pages get #20's typed heading (Franchise | …, Timeline | …), their title links via titlePath (/movies|/series|/shows); the collection seed waits for repair, kinds and credits too; franchises.mjs URLs + 2 new checks; gates browser 323/0, kinds 32/0, franchises 50/0mre
  • daf49feaMerge t20 (tracker#20 typed headings + #21 series/shows split) into main (mission 070): conflicts README/STATUS/show.hl/project.hl/search.hl/components/search.hl/browser.mjs/faketmdb.mjs, both sides kept; clock order backfill → repair → kinds → credits; withDetailsFields stores tmdbType + kind; gates: browser.mjs URLs → /series|/movies, typed h1 selectors; kinds.mjs repair/credits off, fixture name = seed name; browser 323/0, kinds 32/0mre
  • 20e09d89Merge t18 (tracker#18 delta sync) into main (mission 070): conflicts README/STATUS/show.hl/project.hl/browser.mjs, both sides kept; pageShowOf summary = summaryOfmre
  • f83571c3tracker#18 (mission 067): daily sync by change lists — TMDB /tv|movie/changes (since the stored day, paged) + TVmaze /updates/shows → only our changed titles (followed: full step, unfollowed: light step — changed seasons, no TVmaze), full walk on first run / gap > 14 days / failed list; show record refreshed (title, tmdbSummary, tagline, status, genres …; renamed titles re-indexed); summary = the creator's own text (page: summary > tmdbSummary > tvmazeSummary), one-time clear of copied summaries (9,647 on the live copy); gate 261, tests/realdata-018*.mjs, README + STATUSmre
  • 1ed5457etracker#20 + #21 (mission 068): typed headings "<Type> | <name>" in type colours; TV titles split into Series (/series) and Shows (/shows) by TMDB type + Reality/Talk/News genres — kind stored by sync/import/adult backfill + new kind backfill (resumes), /movies/<slug>, /shows/<slug> of a series/movie → 301, /my/series + /my/shows, home 5 tiles + 3 rows, search/filmography labels; gates kinds 32 + browser 266, tests/realdata-068.mjs, tools/count-kinds.hl, docs/kinds.md, README + STATUSmre
  • f2b00674Merge t26 (tracker#26 + #28) into main (mission 062): short ids for every new person (castPersonId, guest route), guest stars stored on the title and created as people only when opened (/person/tmdb/<id>?show=<id> → 302), lean watch/follow clicks (showRow a small object, cast/crew from the slug, watches cached per user, face rows only after a season toggle); gate 311, tests/realdata-062.mjs, README + STATUSmre
  • 0553b51ftracker#19 (mission 066): franchises and timelines — tables, /franchises, /franchises/<slug>, /timelines/<slug> (Timeline | Release sort, series by last episode), the Prequel | Timeline | Sequel widget with the franchise above, the creator's editor, TMDB collection seed in the app (resumes, paced); gate tests/franchises.mjs 48/0 + browser.mjs 266/0, tests/realdata-066.mjs, docs/franchises.md, README + STATUSmre
  • fa1f9dfatracker#29 (mission 063): unwatched check muted grey outline + check (accent only on hover), watched stays solid — no code regression, the accent outline read as ticked; gate checks real checks visibly (computed style + screenshot pixel) on /my/unwatched, show, movie, /my/movies; gate 266, tests/realdata-063.mjs, README + STATUSmre
  • 10bb3f93tracker#28 (mission 061): full cast (all seasons, main cast by episodes, guest stars) + crew (created by, directed by, written by, screenplay, story, music) — stored by the details completion, the daily sync, the search import (one details request) and a background credits job (resumes, RSS limit); show page collapsed after 20 with client-side Show all; showBySlug via a slug map; gate 249, tests/realdata-028.mjs, README + STATUSmre
  • d8b12d67tracker#27 (mission 060): short ids for movies, series and persons — old 702 kept (data/old-short-ids.json), new random [a-z0-9]{5} unique across both, claimed at creation, background backfill (resumes), shown under poster/photo, /<shortId> → 301; gate 259, tests/realdata-060*, README + STATUSmre
  • 25a50bc4tracker#26 (mission 059): titles from a filmography are completed — on open (skeleton, step-wise face showComplete, no reload) and by the in-app details repair (resumes, TMDB-paced, series in parts); cast from TMDB credits; gate 231, tests/realdata-026.mjs, README + STATUSmre
  • f14db671tracker#22-#25 (mission 058): episode air dates, season check = all episodes watched, movie watched check (+ /my/movies count), /genres/<genre> pages (movies + series, newest first, paginated); gate 238, tests/realdata-058.mjs, README + STATUSmre
  • 1704ec45tracker#17 (mission 057): season caret down/up, skeleton rows while a season loads, sessionless showSeasonEpisodes face (no page re-mount), client-only close; gate 214, tests/realdata-057.mjs, README + STATUSmre
  • f2fe3e36mission 056: README + STATUS (merge, fixes, Hybriel 8590df63, real-data check), tests/realdata-056.mjs, tools/check-public-slugs.hlmre
  • f40c250emission 056: re-vendor hybriel master 8590df63 (#121, #122); an adult title's page is Not found for non-followers; gate: leave the page before stopping the servermre