tracker
All repositories: gitoria
23.3 KB
// lib/franchises.hl — FRANCHISES AND TIMELINES (tracker.worldapi.org#19, mission 066). The creator: "we have franchises, and// timelines, and some franchises have multiple timelines ... make them sortable by timeline or release date at shows the// release date of the last episode counts. in a show or movie page we show a franchise widget with < Prequel | TimelineName// | Sequel > and if the timeline is part of a franchise that franchise is above it and when you click on it you get the// franchise index."//// franchisesTable pk @id index !slug { name, slug, shortId (null: not given out yet), summary, created }// timelinesTable pk @id index !slug { name, slug, franchise (@id | null), order [show @id …], source ('tmdb' |// 'editor' | 'seed'), tmdbCollection (TMDB collection id | null), orderKind// ('in-universe' | 'release' | null: not said, tracker#40), supersededBy (@id | null),// created }// storage/mpackdb/{franchises,timelines}.db (new tables; nothing in shows.db changes; the seed's collectionchecks.db is// collections.hl's, the curated seed's franchiseseed.db franchiseseed.hl's)//// A TITLE MAY BE IN SEVERAL TIMELINES (Star Trek Prime and Kelvin, or a TMDB collection and a hand-made one): `byShow` (show// @id → [timeline @id]) is built once at start (`ensureFranchises`, one scan of the timelines) and kept up to date by every// edit — the show page's widget reads only its own timelines, never all of them.//// THE ORDER of a timeline is its in-world order (`order`, editable). The pages can sort it by RELEASE instead: a movie by its// `release`, a SERIES by the release date of its LAST episode (the newest one already out; none out yet → the newest// announced one; no episode dates at all → the series' own `release`). Titles without any date go last.//// SUPERSEDED (tracker#40): a TMDB collection timeline whose every title is in ONE curated (seed) timeline is hidden — no widget,// not on /franchises or a franchise's index — but kept (its own page and the editor's finder still reach it): `supersededBy` =// that curated timeline. Set by the collection seed when it makes one (collections.hl) and by the curated seed's build// (franchiseseed.hl), which also lifts it when the cover is gone; `seededCoverOf` decides.//// PUBLIC LIKE THE OTHER LISTS (mission 054): the pages and the widget's prequel/sequel links show only titles with// `adult == false` (shows.hl isPublicTitle); the order keeps them, they are just skipped.//// THE SEEDS: TMDB movie collections → timelines (collections.hl); the curated franchises of data/franchises.json, movies AND// series (franchiseseed.hl, tracker#40) — both write through the functions here.//// ONE PROCESS PER STORAGE (hybriel#21): the tables are opened here, in the app's process only.import { MPackDB } from 'hl:mpackdb'import { env } from 'hl:proc'import { now } from 'hl:time'import { storageDir, newId, todayStr, dateOr, firstOf } from './util.hl'import { showById, seasonsOfShow, episodesOfSeason, titleWithYear, posterUrlOf, isPublicTitle, titlePath } from './shows.hl'import { userOfSession } from './users.hl'import { dbSearch } from './search.hl'import { slugBaseOf } from './search-helpers.hl'static franchisesTable = new MPackDB(file = storageDir + '/franchises.db', primaryKey = '@id', indexes = ['!slug'])static timelinesTable = new MPackDB(file = storageDir + '/timelines.db', primaryKey = '@id', indexes = ['!slug'])// a name as typed: trimmed, null when there is none (the editor's names and summaries)static trimmedOr = (&v) => { return v != null && hlTypeName(v) == 'String' && v.trim() != '' ? v.trim() : null }// ---- who may edit: the creator (ident short id az5b2); TRACKER_EDITORS = a comma list of ident ids (the gate sets its own) ----static editorIds = () => {v = env('TRACKER_EDITORS')raw = v != null && v.trim() != '' ? v : 'az5b2'out = []for (p of raw.split(',')) { if (p.trim() != '') { out.push(p.trim()) } }return out}static editors = editorIds()static isEditorSession = (&session) => {if (session == null || hlTypeName(session) != 'Instance') { return false }u = userOfSession(session)return u != null && u.identity != null && editors.includes(u.identity)}// a list's index of x, -1 when it is not in it (hand-written: list helpers beyond includes/push are not trusted, hybriel#1)static posOf = (&list, &x) => {let i = 0while (i < list.length) {if (list[i] == x) { return i }i = i + 1}return -1}// ---- slugs: "Star Trek" → "Star-Trek" (the shows' urlSegment form, search-helpers.hl slugBaseOf; none → 'timeline') -------static freeSlug = (&table, &name) => {base = slugBaseOf(name, 'timeline')// 'edit' is the editor's own address (/franchises/edit)if (firstOf(table.find('slug', base)) == null && base != 'edit') { return base }let n = 2while (firstOf(table.find('slug', base + '-' + n)) != null) { n = n + 1 }return base + '-' + n}static franchiseBySlug = (&slug) => {if (slug == null || hlTypeName(slug) != 'String' || slug == '') { return null }return firstOf(franchisesTable.find('slug', slug))}static timelineBySlug = (&slug) => {if (slug == null || hlTypeName(slug) != 'String' || slug == '') { return null }return firstOf(timelinesTable.find('slug', slug))}static franchiseById = (&id) => { return id == null || hlTypeName(id) != 'String' || id == '' ? null : franchisesTable.fetch(id) }static timelineById = (&id) => { return id == null || hlTypeName(id) != 'String' || id == '' ? null : timelinesTable.fetch(id) }// ---- byShow: show @id → [timeline @id] ------------------------------------------------------------------------------------static byShow = {}static state = { built = false timelines = 0 ms = 0 }static indexAdd = (&showId, &timelineId) => {let l = byShow[showId]if (l == null) { l = [] }if (!l.includes(timelineId)) { l.push(timelineId) }byShow[showId] = lreturn true}static indexRemove = (&showId, &timelineId) => {l = byShow[showId]if (l == null) { return true }out = []for (x of l) { if (x != timelineId) { out.push(x) } }byShow[showId] = outreturn true}static ensureFranchises = () => {if (state.built) { return true }state.built = truet0 = now()let n = 0for (t of timelinesTable.find(null, null)) {n = n + 1if (t.order != null) { for (sid of t.order) { indexAdd(sid, t.id) } }}state.timelines = nstate.ms = now() - t0console.log('franchises: ' + n + ' timelines, ' + franchisesTable.count() + ' franchises (' + state.ms + ' ms)')return true}static timelineIdsOfShow = (&showId) => {ensureFranchises()l = byShow[showId]return l != null ? l : []}// ---- a title as the pages list it ------------------------------------------------------------------------------------------// the date the release sort uses: a movie's release; a series' LAST episode (newest out ≤ today, else newest announced, else// its own release)static releaseKeyOf = (&show) => {if (show.type != 'series') { return dateOr(show.release) }today = todayStr()let lastOut = ''let lastAny = ''for (s of seasonsOfShow(show)) {for (e of episodesOfSeason(s)) {let d = dateOr(e.release)if (d != '') {if (d > lastAny) { lastAny = d }if (d <= today && d > lastOut) { lastOut = d }}}}if (lastOut != '') { return lastOut }if (lastAny != '') { return lastAny }return dateOr(show.release)}static itemOf = (&show, pos) => {series = show.type == 'series'd = releaseKeyOf(show)label = d == '' ? 'no date' : (series ? 'last episode ' + d : d)return { id = show.id pos = pos title = titleWithYear(show) href = titlePath(show) posterUrl = posterUrlOf(show)kind = series ? 'Series' : 'Movie' date = d dateLabel = label }}// the public titles of a timeline, in its order (`pos` = the place in the in-world order, 1-based)static itemsOf = (&t) => {out = []let pos = 0if (t.order == null) { return out }for (sid of t.order) {let s = showById(sid)if (s != null && isPublicTitle(s)) {pos = pos + 1out.push(itemOf(s, pos))}}return out}// release order: oldest first, no date last; equal dates keep the timeline order (a stable insertion)static byReleaseOf = (&items) => {let out = []for (it of items) {let next = []let done = falsefor (x of out) {if (!done && it.date != '' && (x.date == '' || it.date < x.date)) { next.push(it) done = true }next.push(x)}if (!done) { next.push(it) }out = next}return out}// tracker#40: what the timeline's own order is, said beside its count ("23 titles · in-universe order"); none when not knownstatic orderNoteOf = (&t) => {if (t.orderKind == 'in-universe') { return ' · in-universe order' }if (t.orderKind == 'release') { return ' · release order' }return ''}static blockOf = (&t) => {items = itemsOf(t)return { id = t.id name = t.name slug = t.slug href = '/timelines/' + t.slug items = items byRelease = byReleaseOf(items)countText = (items.length == 1 ? '1 title' : items.length + ' titles') + orderNoteOf(t) first = items.length > 0 ? byReleaseOf(items)[0].date : '' }}// ---- the pages -------------------------------------------------------------------------------------------------------------// /franchises: every franchise (name, how many timelines), then the timelines WITHOUT one (TMDB's collections, by name)static byNameOf = (&rows) => {let out = []for (r of rows) {let next = []let done = falselet k = r.sortNamefor (x of out) {if (!done && k < x.sortName) { next.push(r) done = true }next.push(x)}if (!done) { next.push(r) }out = next}return out}static franchiseIndex = () => {counts = {}loose = []for (t of timelinesTable.find(null, null)) {let n = t.order != null ? t.order.length : 0// tracker#40: a superseded collection timeline is not listed (nor counted for its franchise)if (t.supersededBy != null) { n = 0 }else if (t.franchise != null && t.franchise != '') { counts[t.franchise] = (counts[t.franchise] != null ? counts[t.franchise] : 0) + 1 }else if (n > 0) { loose.push({ id = t.id name = t.name href = '/timelines/' + t.slug countText = n == 1 ? '1 title' : n + ' titles' sortName = ('' + t.name).toLowerCase() }) }}fr = []for (f of franchisesTable.find(null, null)) {let c = counts[f.id] != null ? counts[f.id] : 0fr.push({ id = f.id name = f.name href = '/franchises/' + f.slug summary = f.summary != null ? f.summary : ''countText = c == 1 ? '1 timeline' : c + ' timelines' sortName = ('' + f.name).toLowerCase() })}return { franchises = byNameOf(fr) timelines = byNameOf(loose) }}// /franchises/<slug>: the franchise and its timelines (oldest first by their first release) — or nullstatic franchisePage = (slug) => {f = franchiseBySlug(slug)if (f == null) { return null }let blocks = []for (t of timelinesTable.find(null, null)) {if (t.franchise == f.id && t.supersededBy == null) {let b = blockOf(t)let next = []let done = falsefor (x of blocks) {if (!done && b.first != '' && (x.first == '' || b.first < x.first)) { next.push(b) done = true }next.push(x)}if (!done) { next.push(b) }blocks = next}}return { kind = 'franchise' name = f.name slug = f.slug summary = f.summary != null ? f.summary : '' franchiseName = '' franchiseHref = '' blocks = blocks editHref = '' }}// /timelines/<slug>: one timeline, its franchise above it — or nullstatic timelinePage = (slug) => {t = timelineBySlug(slug)if (t == null) { return null }f = franchiseById(t.franchise)return { kind = 'timeline' name = t.name slug = t.slug summary = '' franchiseName = f != null ? f.name : '' franchiseHref = f != null ? '/franchises/' + f.slug : ''blocks = [blockOf(t)] editHref = '/timelines/' + t.slug + '/edit' }}// ---- the widget on a show / movie page: one per timeline the title is in ----------------------------------------------------// { id, name, href, hasFranchise, franchiseName, franchiseHref, hasPrev, noPrev, prevHref, prevTitle, hasNext, noNext, … }:// prequel / sequel = the nearest PUBLIC title before / after this one in the timeline's orderstatic widgetsOf = (&showId) => {out = []if (showId == null) { return out }for (tid of timelineIdsOfShow(showId)) {let t = timelinesTable.fetch(tid)if (t != null && t.supersededBy == null && t.order != null && t.order.includes(showId)) {let at = posOf(t.order, showId)let prev = nulllet i = at - 1while (prev == null && i >= 0) {let s = showById(t.order[i])if (s != null && isPublicTitle(s)) { prev = s }i = i - 1}let next = nulllet j = at + 1while (next == null && j < t.order.length) {let s = showById(t.order[j])if (s != null && isPublicTitle(s)) { next = s }j = j + 1}let f = franchiseById(t.franchise)out.push({ id = t.id name = t.name href = '/timelines/' + t.slughasFranchise = f != null franchiseName = f != null ? f.name : '' franchiseHref = f != null ? '/franchises/' + f.slug : ''hasPrev = prev != null noPrev = prev == null prevHref = prev != null ? titlePath(prev) : '' prevTitle = prev != null ? titleWithYear(prev) : ''hasNext = next != null noNext = next == null nextHref = next != null ? titlePath(next) : '' nextTitle = next != null ? titleWithYear(next) : '' })}}return out}// ---- the editor (the creator only — every caller checks isEditorSession first) ----------------------------------------------static createFranchise = (name, summary) => {n = trimmedOr(name)if (n == null || n.length > 120) { return { error = 'a franchise needs a name (at most 120 characters)' } }s = trimmedOr(summary)rec = { id = newId() name = n slug = freeSlug(franchisesTable, n) shortId = null summary = s != null ? s : '' created = now() }if (franchisesTable.put(rec) == null) { return { error = 'not stored: ' + franchisesTable.lastError() } }franchisesTable.persist()console.log('franchises: new franchise "' + n + '" /franchises/' + rec.slug)return { ok = true slug = rec.slug id = rec.id }}// a new timeline (the editor's, the collection seed's with its collection id, the curated seed's with its order kind)static putTimeline = (name, &franchiseId, order, source, &collection, &orderKind) => {rec = { id = newId() name = name slug = freeSlug(timelinesTable, name) franchise = franchiseId order = order source = sourcetmdbCollection = collection orderKind = orderKind created = now() }if (timelinesTable.put(rec) == null) { return null }for (sid of order) { indexAdd(sid, rec.id) }return rec}static createTimeline = (&name) => {n = trimmedOr(name)if (n == null || n.length > 120) { return { error = 'a timeline needs a name (at most 120 characters)' } }rec = putTimeline(n, null, [], 'editor', null, null)if (rec == null) { return { error = 'not stored: ' + timelinesTable.lastError() } }timelinesTable.persist()console.log('franchises: new timeline "' + n + '" /timelines/' + rec.slug)return { ok = true slug = rec.slug id = rec.id }}// the editor's view of one timeline: every title in its order (adult ones too — the creator sees what is there)static editRowsOf = (&t) => {out = []if (t == null || t.order == null) { return out }let i = 0last = t.order.length - 1for (sid of t.order) {let s = showById(sid)if (s != null) {out.push({ id = s.id pos = i + 1 title = titleWithYear(s) posterUrl = posterUrlOf(s) typeLabel = s.type == 'series' ? 'Series' : 'Movie'upClass = i == 0 ? 'quiet mv off' : 'quiet mv' downClass = i == last ? 'quiet mv off' : 'quiet mv' })}i = i + 1}return out}static chipsOf = (&t) => {out = [{ id = '' name = 'None' cls = t == null || t.franchise == null || t.franchise == '' ? 'chip on' : 'chip' }]list = []for (f of franchisesTable.find(null, null)) { list.push({ id = f.id name = f.name cls = t != null && t.franchise == f.id ? 'chip on' : 'chip' sortName = ('' + f.name).toLowerCase() }) }for (c of byNameOf(list)) { out.push(c) }return out}static editPageOf = (slug) => {t = timelineBySlug(slug)if (t == null) { return { found = false id = '' name = '' slug = '' viewHref = '' rows = [] chips = [] } }return { found = true id = t.id name = t.name slug = t.slug viewHref = '/timelines/' + t.slug rows = editRowsOf(t) chips = chipsOf(t) }}static storeOrder = (t, order) => {old = t.order != null ? t.order : []rec = trec.order = orderif (timelinesTable.update(rec.id, rec) == null) { return { error = 'not stored: ' + timelinesTable.lastError() } }timelinesTable.persist()for (sid of old) { if (!order.includes(sid)) { indexRemove(sid, rec.id) } }for (sid of order) { indexAdd(sid, rec.id) }return { ok = true rows = editRowsOf(rec) }}// tracker#31 (merge.hl): a duplicate title merged into its keeper — in every timeline that lists it, the keeper takes its place// (once: a timeline that already lists the keeper just drops it) → the number of timelines changedstatic titleMerged = (&fromId, &toId) => {ensureFranchises()let n = 0tids = []if (byShow[fromId] != null) { for (x of byShow[fromId]) { tids.push(x) } }for (tid of tids) {let t = timelinesTable.fetch(tid)if (t != null && t.order != null) {let order = []for (sid of t.order) {let want = sid == fromId ? toId : sidif (!order.includes(want)) { order.push(want) }}let r = storeOrder(t, order)if (r.error != null) { console.log('merge: timeline ' + tid + ': ' + r.error) } else { n = n + 1 }}}return n}static addToTimeline = (&timelineId, &showId) => {t = timelineById(timelineId)if (t == null) { return { error = 'no such timeline' } }if (showById(showId) == null) { return { error = 'no such title' } }order = []for (sid of t.order) { order.push(sid) }if (order.includes(showId)) { return { ok = true rows = editRowsOf(t) } }order.push(showId)return storeOrder(t, order)}static removeFromTimeline = (&timelineId, &showId) => {t = timelineById(timelineId)if (t == null) { return { error = 'no such timeline' } }order = []for (sid of t.order) { if (sid != showId) { order.push(sid) } }return storeOrder(t, order)}// one place up (delta -1) or down (+1); at an end nothing changesstatic moveInTimeline = (&timelineId, &showId, &delta) => {t = timelineById(timelineId)if (t == null) { return { error = 'no such timeline' } }at = posOf(t.order, showId)to = at + (delta < 0 ? -1 : 1)if (at < 0 || to < 0 || to >= t.order.length) { return { ok = true rows = editRowsOf(t) } }order = []let i = 0while (i < t.order.length) {if (i == at) { order.push(t.order[to]) } else if (i == to) { order.push(t.order[at]) } else { order.push(t.order[i]) }i = i + 1}return storeOrder(t, order)}static setTimelineFranchise = (&timelineId, franchiseId) => {t = timelineById(timelineId)if (t == null) { return { error = 'no such timeline' } }let fid = nullif (franchiseId != null && franchiseId != '') {if (franchiseById(franchiseId) == null) { return { error = 'no such franchise' } }fid = franchiseId}rec = trec.franchise = fidif (timelinesTable.update(rec.id, rec) == null) { return { error = 'not stored: ' + timelinesTable.lastError() } }timelinesTable.persist()return { ok = true chips = chipsOf(rec) }}// the editor's title search: our database (search.hl's index), the titles not in the timeline yetstatic editSearch = (&timelineId, text) => {t = timelineById(timelineId)have = t != null && t.order != null ? t.order : []out = []r = dbSearch(text != null ? '' + text : '')for (x of r.titles) {let s = showById(x.id)if (s != null && !have.includes(s.id)) { out.push({ id = s.id title = titleWithYear(s) posterUrl = posterUrlOf(s) typeLabel = s.type == 'series' ? 'Series' : 'Movie' }) }}return { text = text rows = out note = r.tooShort ? 'Type at least 2 letters.' : (out.length == 0 ? 'Nothing found.' : '') }}// the editor's timeline finder: by name, at most 30static findTimelines = (&text) => {q = text != null ? ('' + text).trim().toLowerCase() : ''out = []if (q.length < 2) { return out }for (t of timelinesTable.find(null, null)) {if (out.length < 30 && ('' + t.name).toLowerCase().includes(q)) {let n = t.order != null ? t.order.length : 0let hidden = t.supersededBy != null ? ' · hidden: all in ' + nameOfTimeline(t.supersededBy) : ''out.push({ id = t.id name = t.name href = '/timelines/' + t.slug + '/edit' countText = (n == 1 ? '1 title' : n + ' titles') + hidden })}}return out}// ---- the curated seed's reads and writes (franchiseseed.hl, tracker#40) ----------------------------------------------------// a franchise / timeline by its name, any case — or null (the creator's own of that name is adopted by the seed, never doubled)static franchiseByName = (&name) => {q = ('' + name).toLowerCase()let hit = nullfor (f of franchisesTable.find(null, null)) { if (hit == null && ('' + f.name).toLowerCase() == q) { hit = f } }return hit}static timelineByName = (&name) => {q = ('' + name).toLowerCase()let hit = nullfor (t of timelinesTable.find(null, null)) { if (hit == null && ('' + t.name).toLowerCase() == q) { hit = t } }return hit}// the timeline the collection seed made from TMDB collection `collection`, or nullstatic timelineOfCollection = (&collection) => {let hit = nullfor (t of timelinesTable.find(null, null)) { if (hit == null && t.tmdbCollection != null && '' + t.tmdbCollection == '' + collection) { hit = t } }return hit}// a seeded timeline rewritten (the data file changed, or titles were imported since): its order and franchise in one updatestatic storeSeeded = (t, order, &franchiseId) => {old = t.order != null ? t.order : []rec = trec.order = orderrec.franchise = franchiseIdif (timelinesTable.update(rec.id, rec) == null) { return { error = 'not stored: ' + timelinesTable.lastError() } }for (sid of old) { if (!order.includes(sid)) { indexRemove(sid, rec.id) } }for (sid of order) { indexAdd(sid, rec.id) }return { ok = true }}static persistFranchises = () => {franchisesTable.persist()timelinesTable.persist()return true}// ---- superseded collection timelines (tracker#40) --------------------------------------------------------------------------------static nameOfTimeline = (&id) => {t = timelineById(id)return t != null ? t.name : '?'}// for a collection's titles: `cover` = the curated (seed) timeline holding ALL of them, or null; `franchise` = the cover's// franchise, else the franchise of a curated timeline holding at least ONE of them (a partly covered collection joins it), or nullstatic seededCoverOf = (&order) => {let whole = nulllet part = nullfor (t of timelinesTable.find(null, null)) {if (t.source == 'seed' && t.order != null) {let all = order.length > 0let any = falsefor (sid of order) { if (t.order.includes(sid)) { any = true } else { all = false } }if (all && whole == null) { whole = t }if (any && part == null && t.franchise != null && t.franchise != '') { part = t.franchise }}}// (locals not named like the answer's entries: inside a record literal an entry shadows that name for the entries after it)return { cover = whole != null ? whole.id : null franchise = whole != null && whole.franchise != null ? whole.franchise : part }}// hidden behind `byId` (null: shown again)static setSuperseded = (t, &byId) => {rec = trec.supersededBy = byIdif (timelinesTable.update(rec.id, rec) == null) { return { error = 'not stored: ' + timelinesTable.lastError() } }return { ok = true }}
Branches
- mainmain branch
Latest commits
- 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
- 71e0fd7dtracker missions 029 + 030: README (What it does, Files, gate count), STATUS (real-copy numbers, how to repeat, open points), LOGmre