gitoriaLog in with ident

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit749019b0749019b0Merge 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/0mre749019b0/STATUS.md

128.9 KB

  1. # STATUS — tracker.worldapi.org
  2. ## 2026-10-01 — ticket #19 (mission 066): franchises and timelines (branch t19 from fa1f9df, NOT merged, NOT deployed)
  3. **Built** (details [docs/franchises.md](docs/franchises.md)): tables `franchises.db`, `timelines.db`, `collectionchecks.db`
  4. (`franchises.hl`); `/franchises`, `/franchises/<slug>` (each timeline: Timeline | Release toggle, a series by its LAST released
  5. episode), `/timelines/<slug>`; the widget `‹ Prequel | Timeline | Sequel ›` with the franchise above on every show/movie page
  6. (one per timeline); the creator's editor `/franchises/edit` + `/timelines/<slug>/edit` (`TRACKER_EDITORS`, default az5b2,
  7. checked in every face); the TMDB collection seed in the app (own clock, one movie per step, 260 ms per request, waits for the
  8. daily sync and the adult backfill, resumes).
  9. **Decisions**: a collection becomes a timeline only with ≥ 2 of our non-adult movies (a 1-title widget says nothing); seeded
  10. timelines get no franchise (franchises are hand-made); pages/widget skip non-public titles (adult != false), the editor shows
  11. all; sort toggle client-side; styles in styles.hl (own section), the widget a composed component so show.hl changes by 4 lines.
  12. **Merge notes** (existing files touched): `components/show.hl` (1 import, 1 static, 1 member, 1 View line before
  13. `showSeasons`), `project.hl` (4 component imports, 1 franchises import, 5 routes after `/genre/:genre`, `franchisesReady` at
  14. boot, the seed clock block before `on Error`), `styles.hl` (a section before "/ (tracker.worldapi.org#13)" + 2 lines in the
  15. media block), `tests/browser.mjs` (`TRACKER_COLLECTIONS: '0'` in startServer), `tests/faketmdb.mjs` (`collections`,
  16. `belongs_to_collection`, `at` on requests), `README.md`, `STATUS.md`. New: franchises.hl, components/{franchises,franchise,
  17. franchisewidget,franchiseedit,timelineedit}.hl, tests/{franchises.mjs,seed-franchises.hl,realdata-066.mjs}, docs/franchises.md.
  18. **Gates** (both must be green):
  19. ```
  20. TRACKER_GATE_SHOTS=/tmp/w066/shots TRACKER_GATE_PORT=8732 TRACKER_GATE_IDENT_PORT=8733 TRACKER_GATE_CHROME=8734-8736 TRACKER_GATE_TMDB_PORT=8737 node tests/franchises.mjs
  21. 48 passed, 0 failed
  22. TRACKER_GATE_SHOTS=/tmp/w066/main-shots TRACKER_GATE_PORT=8732 TRACKER_GATE_IDENT_PORT=8733 TRACKER_GATE_CHROME=8734-8736 TRACKER_GATE_TMDB_PORT=8737 node tests/browser.mjs
  23. 266 passed, 0 failed
  24. ```
  25. Shots looked at: Loreana /tmp/w066/shots/{franchises,franchise,timeline,widget-*,franchise-edit,timeline-edit*}-{390,1280}.png.
  26. **Real data** (copy of Byrodin `storage/` 2026-10-01 ~22:47, :8738, real TMDB): seed **4,774 movies** checked in **2,459 s**
  27. (~41 min), 4,957 TMDB requests, **110 timelines / 272 titles**, 235 collections with < 2 of our movies, 4,143 movies without a
  28. collection, 124 TMDB 404, 0 retries, slowest step 860 ms. Pages during the seed (curl ×40): `/` avg 0.08 s (one 2.2 s outlier),
  29. `/movies` 0.01, `/shows/Foundation` 0.18, `/franchises` 0.11. No Star Wars / Alien MOVIES in our data (only series) → checked
  30. Star Trek: The Next Generation (4), Harry Potter (7), Lord of the Rings (3): order right, widget right on the middle title
  31. (e.g. First Contact: ‹ Generations | TNG Collection | Insurrection ›). Full loads: `/franchises` 74–109 ms (83 KB, 110
  32. timelines), timeline pages 49–213 ms, movie pages with widget 403–464 ms (curl: 0.38 s vs 0.34 s for a movie without a
  33. timeline). Creator (az5b2): Edit link + editor forms present. 0 console problems. Shots /tmp/w066/real/*.png (looked at).
  34. How to repeat:
  35. ```
  36. tar czf - -C /CONTAINERS/projects/tracker.worldapi.org storage | ssh loreana 'tar xzf - -C <wt>/.scratch/realdata' # from Byrodin
  37. ln -s ../tracker.worldapi.org/.env .env # the real TMDB token for the worktree (never read it); rm afterwards
  38. TRACKER_PORT=8738 TRACKER_SYNC=0 TRACKER_WATCH=0 TRACKER_BACKFILL=0 TRACKER_STORAGE=$PWD/.scratch/realdata/storage/mpackdb TRACKER_SESSIONS=$PWD/.scratch/realdata-sessions/ TRACKER_URL=http://127.0.0.1:8738 TRACKER_OLD_SHORT_IDS=$PWD/data/old-short-ids.json HL_HOST=127.0.0.1 nohup ./bin/hybriel project.hl > /tmp/w066/real/server.log 2>&1 &
  39. grep '^collections' /tmp/w066/real/server.log # wait for "collections done"
  40. # session file for 0mujqspn0aqb (name sha256(id)) in .scratch/realdata-sessions/, id → .scratch/real-sid
  41. REAL_MATCH='Star Trek|Harry Potter|Lord of the Rings' REAL_PORT=8738 REAL_CHROME=8739 REAL_OUT=/tmp/w066/real node tests/realdata-066.mjs
  42. kill <pid>; rm -f .env; rm -rf .scratch/realdata .scratch/realdata-sessions .scratch/real-sid
  43. ```
  44. **Open**: (1) deploy: the first start runs the seed ~40 min (TMDB pace), after the adult backfill. (2) Not built: rename /
  45. delete franchises and timelines, edit a franchise summary, franchise `shortId` (field null). (3) New parts of a collection that
  46. already has a timeline are not added by a later seed; titles imported later are not seeded unless their check row is
  47. removed. (4) The widget sits under the whole header — on a phone after the cast (the creator may want it higher). (5) A
  48. timeline page shows its name twice (page title + block head). (6) A show page costs ~40 ms more with a widget.
  49. ## 2026-10-02 — tickets #20 + #21 (mission 068): typed headings, Series / Shows split (branch t20, NOT merged, NOT deployed)
  50. **Built** (details: [docs/kinds.md](docs/kinds.md)):
  51. - #20: headings "<Type> | <name>" on the title page (Movie / Series / Show), genre, person. The type word is in its colour, the
  52. bar muted, the name white. /movies, /series, /shows, /my/series, /my/shows show their type word; so do the homepage row
  53. headings, the search labels and the filmography labels.
  54. - Colours: Movie yellow, Series greenDark (the accent), Show purple, Genre blueDark, Person orange. Franchise blueLight and
  55. Timeline greenLight are classes only (for t19).
  56. - #21: TV titles get `kind` = series | show, rule in `shows.hl kindOfTitle`:
  57. - show = TMDB type Reality / Talk Show / News / Video, or one of our genres Reality / Talk / News;
  58. - everything else = series.
  59. - Who stores `kind` + `tmdbType`: the daily sync, the adult backfill, the import, and a new kind backfill (`TRACKER_KINDS`,
  60. after the adult backfill, 1 request per title without a show genre, resumes).
  61. - Pages: /series and /shows (+ /page/N); /series/<slug>, /shows/<slug>, /movies/<slug>; /my/series + /my/shows; home has
  62. 5 tiles and 3 rows.
  63. - Old /shows/<slug> of a series → 301 /series/<slug>; of a movie → 301 /movies/<slug>.
  64. **Decisions**:
  65. - **Movies moved to /movies/<slug>**: /shows/ now means TV shows; old links answer 301.
  66. - **/shows/<slug> is a FUNCTION route** (`project.hl showsRoute`), because hl:web cannot redirect from a component route. For a
  67. show it renders the Show component itself through hl:web internals (`server.router.match`, `server.page`, `hostOf`,
  68. `requestHeaders`, `sessions`). Re-check when hl:web is re-vendored; the kinds gate covers it.
  69. - Consequence: a link to a show is a full page load. Series and movie pages stay client-side navigations.
  70. - Search "Fetch from web" rows say **TV** (TMDB's search has no TV type).
  71. - `/my/series` signed out: "Sign in to see the series you follow."
  72. **Gates**:
  73. ```
  74. mkdir -p /tmp/w068/shots /tmp/w068/main-shots
  75. TRACKER_GATE_SHOTS=/tmp/w068/shots TRACKER_GATE_PORT=8761 TRACKER_GATE_IDENT_PORT=8762 TRACKER_GATE_CHROME=8763-8765 TRACKER_GATE_TMDB_PORT=8766 node tests/kinds.mjs
  76. 32 passed, 0 failed
  77. TRACKER_GATE_SHOTS=/tmp/w068/main-shots TRACKER_GATE_PORT=8761 TRACKER_GATE_IDENT_PORT=8762 TRACKER_GATE_CHROME=8763-8765 TRACKER_GATE_TMDB_PORT=8766 node tests/browser.mjs
  78. 266 passed, 0 failed (URLs, h1 selectors and the home checks updated; TRACKER_KINDS=0 in its startServer)
  79. ```
  80. One run of browser.mjs failed once at the short-id resume check (`count-short-ids.hl`: mpackdb LockTimeout right after
  81. stopServer, under load). The rerun passed; nothing of #21 is involved.
  82. **Real data** (copy of Byrodin `storage/` 2026-10-01 ~23:35, :8760, real TMDB through a `.env` symlink that was removed afterwards):
  83. ```
  84. ssh [email protected] 'tar czf - -C /CONTAINERS/projects/tracker.worldapi.org storage' | tar xzf - -C .scratch/realdata
  85. ln -s ../tracker.worldapi.org/.env .env # token only, never read; rm .env afterwards
  86. .scratch/w068/start.sh 8760 TRACKER_BACKFILL=0 TRACKER_KINDS=1 # = TRACKER_SYNC=0, TRACKER_STORAGE=copy, own sessions dir
  87. # session file for 0mujqspn0aqb in .scratch/w068/sessions (as mission 060), id → .scratch/w068/real-sid
  88. REAL_PORT=8760 REAL_CHROME=8767 REAL_OUT=/tmp/w068/real node tests/realdata-068.mjs
  89. TRACKER_STORAGE=$PWD/.scratch/realdata/storage/mpackdb ./bin/hybriel tools/count-kinds.hl # server stopped
  90. ```
  91. - **Backfill**: 1,789 TV titles in **838 s** (1,613 requests).
  92. - Kinds: series 1,577, shows 212 (176 by genre without a request, 36 by TMDB type).
  93. - 11 TMDB 404s, 0 retries, no slow step.
  94. - TMDB types: Scripted 1,337, Miniseries 179, Documentary 50, Reality 16, Talk Show 15, Video 4, News 1.
  95. - **Public lists**: before (genres only) 1,601 series / 173 shows; after **1,565 series / 209 shows**; 4,650 movies.
  96. - **Spot checks** (search label → link):
  97. - Show: Saturday Night Live, The Tonight Show Starring Jimmy Fallon, Last Week Tonight, The Late Show with Stephen Colbert,
  98. Hot Ones.
  99. - Series: Reacher, Foundation, Doctor Who (both), Chernobyl (Miniseries), Severance (2022).
  100. - All correct.
  101. - **Pages**, curl every 5 s during the backfill (156 each, avg / max):
  102. | Page | avg | max |
  103. |---|---|---|
  104. | `/` | 0.094 s | 3.5 s |
  105. | `/series` | 0.055 s | 2.6 s |
  106. | `/shows` | 0.024 s | 0.21 s |
  107. | `/series/Reacher` | 0.187 s | 0.48 s |
  108. - 4 answers over 1 s, about every 170 s. Idle afterwards: avg 0.029, max 1.0 (1 of 196).
  109. - Cause not found; probably mpackdb rewriting shows.db.
  110. - Before the backfill: /series/Reacher 0.17 s, /shows/Saturday-Night-Live (function route) 0.28 s.
  111. - **Browser** (signed in as the creator, full load to hydrated, ms 390 | 1280):
  112. | Page | 390 | 1280 |
  113. |---|---|---|
  114. | `/` | 74 | 98 |
  115. | `/series` | 97 | 43 |
  116. | `/shows` | 351 | 43 |
  117. | `/movies` | 123 | 43 |
  118. | `/series/Reacher` | 290 | 243 |
  119. | `/shows/Saturday-Night-Live` | 395 | 380 |
  120. | `/movies/Star-Trek-First-Contact` | 251 | 246 |
  121. | `/genres/Drama` | 46 | 44 |
  122. | `/person/Alan-Ritchson` | 94 | 35 |
  123. | `/my/series` (126 rows) | 1410 | 384 |
  124. | `/my/shows` (3) | 220 | 217 |
  125. | `/search/reacher` | 37 | 90 |
  126. - Every heading's text and colour is right, nothing scrolls sideways, 0 console problems.
  127. - Shots `/tmp/w068/real/*-{390,1280}.png` on Loreana (looked at).
  128. - Copy, sessions and the `.env` link were removed and the server stopped.
  129. **Open**:
  130. 1. Merge with main (062) and t19 / t26. They also change `components/show.hl`, `project.hl`, `styles.hl`, `tests/browser.mjs`,
  131. `tests/faketmdb.mjs`. t19's franchise pages need the typed h1 (`type-franchise` / `type-timeline`), and its links to
  132. `/shows/<slug>` should become `titlePath`.
  133. 2. TMDB type **Video** = anime OVAs here (Halo Legends, .hack//Liminality, Carnival Phantasm, Halo: The Fall of Reach). They
  134. became Shows by the architect's rule; maybe Video → Series (creator).
  135. 3. Deploy: the first start runs the kind backfill after the adult backfill (~14 min).
  136. 4. The 2–3.5 s answers during the backfill (above).
  137. 5. Titles added by the person fill have no stored kind until the next start (the genres decide meanwhile).
  138. ## 2026-10-02 — ticket #18 (mission 067, branch t18 from t26's head 10bb3f9, worktree tracker-wt18): daily sync by change lists, show record refresh, summary priority (NOT merged, NOT deployed)
  139. **Built**: `deltasync.hl` (new): the daily run first reads TMDB `/tv/changes` + `/movie/changes` (since the stored day, all pages)
  140. and TVmaze `/updates/shows?since=day|week|month`, one request per clock step → our changed titles (search index lookups, no scan),
  141. followed first. Followed → full `syncShow` (as before); unfollowed → `syncShowDelta` (light: details + ids + poster + record + only
  142. new/grown/newest seasons, no TVmaze). Full walk on: no `sync-state.txt`, gap > 14 days, failed change list (day not advanced).
  143. `details.hl withDetailsFields` (title, tmdbSummary, homepage, tagline, status, genres, adult; shared with #26's completion) +
  144. `applySynced` (fields + credits) replace `applyCredits` in the sync paths. TVmaze request = `/shows/<id>?embed=episodes` (summary →
  145. `tvmazeSummary`, `stripHtml`). `summary` never written (sync, search import, person fill, completion); page `summaryOf`: summary >
  146. tmdbSummary > tvmazeSummary. One-time boot clear of copied summaries (marker `summaries-cleared.txt`). Search: `searchTitleRenamed`,
  147. `titleIdByTvmaze`. Tool: `tools/sync-tmdb.hl --delta [--since D] [--plan]`. Details: README "What it does (ticket #18)".
  148. **Decisions (mine)**: (1) unfollowed changed series get the LIGHT step — the first real run with full steps blocked the server 20.8 s
  149. for Today (15,716 episodes) and EastEnders (7,349) each and grew RSS to 14 GB + 2.9 GB swap; (2) TVmaze stays a followed-series thing
  150. (its list only brings followed series); (3) the day stored = the day the finished run STARTED (overlapping windows, no gap); (4) light
  151. step's seasons = missing, TMDB count > ours (fewer = TVmaze extras, skipped), newest; (5) a renamed title keeps its slug;
  152. (6) `syncShowPart` reads only its part's seasons' episodes unless it finishes with the TVmaze merge (also speeds up #26's parts).
  153. **Real data** (copy of Byrodin `storage/` 2026-10-01 ~21:45 UTC = pre-#26/#28 live data, real TMDB/TVmaze, :8750, sync-state = 2026-09-30):
  154. - Change lists for one day: TMDB tv 3,088 + movie 9,559 ids (31 + 96 pages), TVmaze 312 → **336 of our titles (28 followed)**
  155. (152 series / 197 movies in the first variant).
  156. - Delta run (final code): `tmdb sync done: mode=delta changeRequests=128 shows=336 newSeasons=79 newEpisodes=4475 updatedEpisodes=1305
  157. updatedSeasons=70 posters=1 ids=0 requests=607 tvmazeRequests=29 errors=0 … seconds=536.359`; slowest step 2.5 s; pages meanwhile
  158. (`/`, `/movies`, `/shows` every 0.5 s, n=925): median 45 / p95 226 / p99 693 / max 2216 ms. Same day again (steady state):
  159. `shows=336 newSeasons=0 newEpisodes=0 updatedEpisodes=0 … requests=605 tvmazeRequests=29 errors=0 seconds=511.205`, slowest 2.06 s,
  160. RSS 2.18 → 5.7 GB.
  161. - OLD full walk on the same copy (no state file): `mode=full shows=128 … requests=259 tvmazeRequests=128 errors=1 seconds=312.241`
  162. (the error: one TLS handshake failure, transient), RSS 2.1 → 4.9 GB.
  163. - First variant (full step for every title): 349 titles, 659 + 155 TVmaze requests, 755 s, 46 slow steps up to 20.8 s, RSS 14 GB.
  164. - Summaries: `summaries: cleared 9647 copies of tmdbSummary, kept 24 own texts, errors 0` (one time; ~+2 GB RSS at that boot). The 24
  165. kept are all FOLLOWED shows whose tmdbSummary the #9 sync changed since the migration → older TMDB texts, likely no rewrites:
  166. The-Flash, Magnum-P.I., Alex-Rider, Star-Trek-Strange-New-Worlds, Star-Trek-First-Contact (its tmdbSummary is ANOTHER title's —
  167. "Kabuhayang Swak na Swak": wrong tmdbId on that record), Night-Sky, Good-Omens, Quantum-Leap-2, His-Dark-Materials, Not-Dead-Yet,
  168. Star-Wars-Andor, The-Rookie, Will-Trent, Unstable-2, Reacher, Wednesday, Citadel, Miracle-Workers, FUBAR, The-Night-Agent,
  169. The-Wheel-of-Time, Ahsoka, Percy-Jackson-and-the-Olympians, The-Daily-Show-with-Trevor-Noah.
  170. - Record refresh, first day: 24 renamed (Star Wars: Andor → Andor, The Daily Show with Trevor Noah → The Daily Show, WWE Raw → Raw,
  171. 편의점 샛별이 → Backstreet Rookie, "Kaun Banega Crorepati(कौन बनेगा करोड़पति)" → "Kaun Banega Crorepati" — the old tracker's
  172. "Name(original)" form goes), 79 tmdbSummary changed, 173 taglines.
  173. - Screenshots (looked at): Loreana `/tmp/w067/real/{Star-Wars-Andor,Breaking-Bad,Kaun-Banega-Crorepati}-{390,1280}.png` (Andor: new
  174. title; Breaking Bad: TMDB's current text after the clear), full load 134–649 ms, 0 console problems; gate `/tmp/w067-shots/`
  175. (delta-show-1280, delta-movie-1280).
  176. How to repeat (ports 8750–8759; ONLY `storage/`; the worktree has no `.env` → `ln -s ../tracker.worldapi.org/.env .env`, remove after):
  177. ```
  178. ssh [email protected] 'tar czf - -C /CONTAINERS/projects/tracker.worldapi.org storage' < /dev/null | tar xzf - -C .scratch/realdata
  179. echo <yesterday> > .scratch/realdata/storage/mpackdb/sync-state.txt # none = the full walk
  180. TRACKER_PORT=8750 TRACKER_SYNC=1 TRACKER_SYNC_HOUR=$(date -u +%-H) TRACKER_WATCH=0 TRACKER_BACKFILL=0 TRACKER_REPAIR=0 TRACKER_CREDITS=0 TRACKER_STORAGE=$PWD/.scratch/realdata/storage/mpackdb TRACKER_SESSIONS=$PWD/.scratch/realdata-sessions/ TRACKER_URL=http://127.0.0.1:8750 HL_HOST=127.0.0.1 ./bin/hybriel project.hl > .scratch/delta.log 2>&1 &
  181. REAL_PORT=8750 REAL_LOG=.scratch/delta.log node tests/realdata-018-poll.mjs # latency until "tmdb sync done"
  182. grep '^tmdb sync\|^summaries' .scratch/delta.log; RSS: grep VmRSS /proc/<pid>/status
  183. REAL_TITLES=Star-Wars-Andor,Breaking-Bad REAL_OUT=/tmp/w067/real node tests/realdata-018.mjs
  184. # afterwards: kill <pid>; rm -rf .scratch/realdata .scratch/realdata-sessions; rm .env
  185. ```
  186. **Gate** (249 → 261; 12 new #18 checks; the TVmaze episode paths are `/tvmaze/shows/<id>?embed=episodes` now; the #26 completion
  187. check now expects TMDB's overview — `summary` is no longer filled by the fill/completion; the seed movie's summary is a copy of its
  188. tmdbSummary; `tests/peek-shows.hl` reads records with the app stopped):
  189. ```
  190. TRACKER_GATE_SHOTS=/tmp/w067-shots TRACKER_GATE_PORT=8751 TRACKER_GATE_IDENT_PORT=8752 TRACKER_GATE_TMDB_PORT=8753 TRACKER_GATE_CHROME=8754-8756 node tests/browser.mjs
  191. 261 passed, 0 failed
  192. ```
  193. **Open (for the architect)**:
  194. - NOT "a handful of requests": movies change a lot on TMDB (9,559 ids/day → 96 pages) — a day = 128 change-list requests + ~480 title
  195. requests + 29 TVmaze ≈ 634 (old full walk: 387) but every title stays current, followed ones only when they changed (28 vs 128).
  196. Dropping unfollowed MOVIES would save ~96 pages + ~200 requests — creator's call.
  197. - MEMORY: ~10 MB per synced title are never freed (Hybriel, see #28) → +3.5 GB RSS per daily run until a restart (old run +2.8 GB);
  198. the live container already used 11.4 GiB. A daily restart or the runtime fix is needed either way.
  199. - Titles: TMDB's en-US name replaces the migrated title (24 on day one, incl. the "Name(original)" form). If the creator wants to keep
  200. some, a creator-title field like `summary` would be needed.
  201. - The 24 kept "own" summaries look like older TMDB copies (list above) — clear them too? (architect's rule was "identical only").
  202. - Merge: t18 is on t26's 10bb3f9; t19 (franchises) and the 062 merge also touch people.hl/search.hl/README/STATUS — expect conflicts
  203. in README/STATUS only (code: people.hl 1 line, search.hl small additions).
  204. ## 2026-10-01 — mission 062: t26 (#26 + #28) merged into main, short ids for new people, lazy guests, lean watch clicks (NOT deployed)
  205. **Merge**: `git merge t26` into main (fa1f9df). Conflicts were in README/STATUS, `components/show.hl` (header comment;
  206. skeleton poster + short id) and `tests/browser.mjs` (startServer env, import checks, #27 + #26/#28 blocks). Both sides kept.
  207. **Fixes**:
  208. 1. **Short ids**: people.hl `castPersonId` calls `claimShortId('person', …)`. It is the only place that creates people:
  209. - #26 completion, credits job, daily sync, `tools/sync-tmdb.hl`, search import;
  210. - the guest route.
  211. - shortids.hl also finds `../data/old-short-ids.json` from tools/.
  212. 2. **Guests are no person records**: details.hl `mergedCast` keeps a guest on the title as
  213. `{ person: null|existing, tmdbId, actor, character, profile, episodes, guest }`.
  214. - Link: `/person/tmdb/<id>?show=<show id>` → project.hl `guestRoute` → people.hl `guestPersonId`.
  215. - It creates the person with a short id (from that title's entry; without `?show=`, from TMDB `/person/<id>`), then 302.
  216. 3. **Watch/follow clicks**:
  217. - `showRow` is a small `pageShowOf` object. The whole record (~300 cast + crew) was shipped with the page and re-sent with
  218. every session sync.
  219. - cast/crew derive from the slug (`castOfSlug`/`crewOfSlug`; adult titles: none).
  220. - `watchesOfUser` is cached per user until `setWatched`.
  221. - The faces return rows only when the page opened/closed a season (`collapsedChanged`). Otherwise the sync's rows answer.
  222. **Gate** (266 main + 35 t26 → 311; mission 062: 10 new checks, the #26 new-person check extended, sync-tool expectation +27 → +25 people):
  223. - count-short-ids runs after the sync tool and after the credits job;
  224. - import and #26 people have short ids at once;
  225. - guest links, guest click → person page with short id + TMDB fill, again → 302, TMDB fallback, 404s;
  226. - a watch click's frames carry no cast/crew;
  227. - a client-side navigation + watch click gets rows by the sync only.
  228. ```
  229. mkdir -p /tmp/w062-shots
  230. TRACKER_GATE_SHOTS=/tmp/w062-shots TRACKER_GATE_PORT=8720 TRACKER_GATE_IDENT_PORT=8721 TRACKER_GATE_CHROME=8722-8726 TRACKER_GATE_TMDB_PORT=8727 node tests/browser.mjs
  231. 311 passed, 0 failed
  232. ```
  233. Shots looked at: `/tmp/w062-shots/guest-person-{390,1280}.png`, `credits-series-all-390.png`.
  234. **Real data** (copy of Byrodin `storage/` 2026-10-01 22:05, real TMDB, :8730; the copy is deleted):
  235. - **Jobs**:
  236. - Details repair: 557/557 in 836 s, 0 failed.
  237. - Credits job: 5,867 titles.
  238. - Run 1 (1,961 titles) ended at ~22:41 with no message; the cause is not known (no OOM line visible).
  239. - The restart resumed: `credits job done: 3906/3906 … people=47242 … seconds=2028`. The next start: nothing to do.
  240. - `short ids: 112298 records, 112298 with a short id, 0 without` (every person created had one at once).
  241. - **RSS** (`ps` every 60 s, `/tmp/w062/rss.log`):
  242. - During the jobs: 1.2–6.3 GB, swinging; it falls back by GBs at times.
  243. - 2 slow steps of 4.9–5.6 s, where RSS dropped too, so probably the runtime freeing memory. Pages wait meanwhile.
  244. - **People / boot**:
  245. | | people | search index | RSS ~30–60 s after boot |
  246. |---|---|---|---|
  247. | main fa1f9df, same copy (no token, no jobs) | 15,157 | 0.66 s | 4.3–4.5 GB |
  248. | merged, after the jobs (jobs off) | 102,424 | 3.0 s | 6.4–7.0 GB |
  249. | merged, after the jobs (jobs on, nothing to do) | 102,287 | 2.7 s | 8.1–8.8 GB |
  250. - w061 (all guests as people): 160,084 people.
  251. - Movie casts (all "main") are most of the 87k new people.
  252. - **Pages** (`REAL_OUT=/tmp/w062/real node tests/realdata-062.mjs`, signed in as az5b2):
  253. - Star Trek: Picard: 202 cast (94 guests linked lazily) + 45 crew, HTML 143 kB. Full load 201–342 ms; the first after boot
  254. took 2.3 s.
  255. - Superman: 90 cast, 8 crew, 117–173 ms.
  256. - Guest click (Stephanie Czajkowski) → person created (short id 401md) + filled from TMDB (18 films) in 0.74–1.3 s. Again: 29–66 ms.
  257. - **Watch click** (page clock, click → answer frame):
  258. | | before | after |
  259. |---|---|---|
  260. | Picard | 184–200 ms (w061) | 159–174 ms, 4.9 kB |
  261. | The Simpsons | 276–731 ms (w061) | 156–214 ms, 15 kB (was 29 kB) |
  262. | Follow | | 119–221 ms |
  263. About 1 in 6 clicks took 550–970 ms (same pauses as above).
  264. - Server timing (temporary logs, removed): the face is ~40 ms, the page's re-mount ~25 ms of our code; the rest (~120 ms) is
  265. hl:web's session-face path.
  266. - Screenshots (looked at): `/tmp/w062/real/{Star-Trek-Picard,Superman}{,-credits}-{390,1280}.png`, `guest-person-{390,1280}.png`.
  267. How to repeat (ports 8730/8731; ONLY `storage/`):
  268. ```
  269. mkdir -p .scratch/realdata && ssh [email protected] 'tar czf - -C /CONTAINERS/projects/tracker.worldapi.org storage' < /dev/null | tar xzf - -C .scratch/realdata
  270. TRACKER_PORT=8730 TRACKER_URL=http://127.0.0.1:8730 TRACKER_STORAGE=$PWD/.scratch/realdata/storage/mpackdb TRACKER_SESSIONS=$PWD/.scratch/realdata-sessions/ TRACKER_WATCH=0 TRACKER_SYNC=0 TRACKER_CREDITS_LOG_EVERY=250 ./bin/hybriel project.hl
  271. # (the runtime reads .env → real TMDB: repair ~14 min, then credits ~50 min; RSS: ps -o rss= -p <pid> every minute)
  272. # session for 0mujqspn0aqb as in mission 060 → .scratch/real-sid; then:
  273. REAL_OUT=/tmp/w062/real REAL_CHROME=8731 node tests/realdata-062.mjs
  274. # afterwards: kill the server; rm -rf .scratch/realdata .scratch/realdata-sessions .scratch/real-sid
  275. ```
  276. **Deploy (what to watch)**:
  277. - After the start: the details repair (~14 min), then the credits job (~50 min).
  278. - `docker stats`: expect RSS to roughly double after boot (4.3 → ~8 GB) and swing during the jobs.
  279. - Log: `details repair done`, `credits job done`, `slow step`, `guest opened`.
  280. **Open**:
  281. 1. Deploy.
  282. 2. 102k people is still ~6.8× the old count. Most are movie cast. If memory is too high, apply the same lazy rule to a
  283. movie's cast after the first N (not built: the mission kept "main cast").
  284. 3. The Hybriel runtime: RSS swings, multi-second pauses, a silent process end in run 1. For the architect.
  285. 4. Watch clicks: about 1 in 6 is slow; the base cost is hl:web's session-face path (~120 ms).
  286. 5. Adult titles show no cast/crew now (they never get credits; at most a migrated cast was hidden).
  287. ## 2026-10-01 — ticket #29 (mission 063): unwatched checks looked "active" (NOT deployed)
  288. **Cause**: NOT a code regression of #23 — on real data (as az5b2) all 1,287 `/my/unwatched` checks are `checkicon regular`
  289. (fill transparent), fresh load and after a client-side navigation; live CSS = HEAD. The look itself was the problem: #11's
  290. "inverted check" (outline circle + outline check) was drawn in the ACCENT colour, so a page full of them read as ticked
  291. (creator: "in /my/unwatched all checkboxes are active"). **Fix** (`styles.hl`): the unwatched outline + check are muted grey
  292. (`colorTextMuted`, rgb(145,150,155)), accent only on hover; watched unchanged (solid accent disc, dark check). Keeps #11's
  293. shape (not a bare empty circle). Applies everywhere the check is used: /my/unwatched, show seasons + episodes, movie page.
  294. /my/schedule has no checks; /my/movies only marks watched movies (#24).
  295. **Gate** (259 → 266): `checkLook(sel)` in tests/browser.mjs measures a REAL check on the page (no hidden copy any more):
  296. computed circle fill/stroke + check stroke, topmost element, and the SCREENSHOT pixel inside the disc (svg 12,6) →
  297. `lookEmpty` / `lookSolid`. On /my/unwatched (both rows), show page (unwatched episode + season, watched episode, #23 mixed
  298. state), movie page (both states), /my/movies (watched mark). Against the old styles.hl it fails 4 checks (stroke accent).
  299. ```
  300. mkdir -p /tmp/w063/shots # the gate needs the shots dir to exist
  301. TRACKER_GATE_SHOTS=/tmp/w063/shots TRACKER_GATE_PORT=8720 TRACKER_GATE_IDENT_PORT=8721 TRACKER_GATE_CHROME=8722-8726 TRACKER_GATE_TMDB_PORT=8727 node tests/browser.mjs
  302. 266 passed, 0 failed
  303. ```
  304. **Real data** (copy of Byrodin `storage/` 2026-10-01 ~19:30; procedure as mission 060 — the inner ssh from Loreana to
  305. Byrodin was refused once, so the tar was piped from Byrodin into Loreana instead; server :8730 also needs
  306. `TRACKER_OLD_SHORT_IDS=$PWD/data/old-short-ids.json`): `REAL_OUT=/tmp/w063/real node tests/realdata-063.mjs` → /my/unwatched
  307. 1,287 checks all regular/muted/unfilled (390: 1913 ms, 1280: 1050 ms full load), Foundation 11 muted + 2 solid, Star Trek:
  308. First Contact movie check muted, /my/movies none (creator has no watched movie); one click 1287 → 1286 rows in 1.5 s, gone
  309. after a reload; 0 console problems. Shots /tmp/w063/real/{my-unwatched,show,my-movies}-{390,1280}.png (looked at).
  310. **Open**: deploy; creator to confirm the muted look (if they want a bare empty circle that reverses #11).
  311. ## 2026-10-01 — ticket #27 (mission 060): short ids for titles and persons (NOT deployed)
  312. **Built** (details README "What it does (mission 060)"): `shortId` (5 × `[a-z0-9]`) on shows (movies + series) and persons, unique
  313. across both through one in-memory map (`shortids.hl`). The 702 old ids come back from `data/old-short-ids.json` (made once by
  314. `tools/old-short-ids.hl` from the old export); they are reserved for new ids. New records get one at creation (search import, the
  315. person fill's titles). A background backfill (own 0.1 s clock, 40 ms batches, resumes) gives everyone else one. `#shortid` under
  316. the poster / photo (no photo: under the facts), small, muted, monospace. `/<shortId>` → 301 to the page, else 404.
  317. **Decisions**: backfill in the background, not at start (all 25k at once ≥ 16 s blocked; batches measured ≤ 62 ms). Uniqueness via
  318. the in-memory map, not an mpackdb `!shortId` index (per table only; adding an index to the live tables is untested, hybriel#21).
  319. Old-id file in the code (`data/`, deployed), not in `storage/`. Upper case in `/<id>` is read as lower case. A record shows no id
  320. until the backfill reaches it (first ~5 min after the deploy).
  321. **Gate** (238 → 259):
  322. ```
  323. TRACKER_GATE_SHOTS=/tmp/w060/shots TRACKER_GATE_PORT=8720 TRACKER_GATE_IDENT_PORT=8721 TRACKER_GATE_CHROME=8722-8726 TRACKER_GATE_TMDB_PORT=8727 node tests/browser.mjs
  324. 259 passed, 0 failed
  325. ```
  326. The gate gets its own old-id file (`TRACKER_OLD_SHORT_IDS`: sh1 → 100jh). Shots looked at: Loreana /tmp/w060/shots/shortid-*.
  327. **Real data** (copy of Byrodin `storage/` taken 2026-10-01 ~14:09 Loreana time: 10,010 shows, 15,157 persons; :8730):
  328. - Backfill: 25,167 records in **297 s** (another run 307 s), 1,859 batches, slowest batch 62 ms, slowest persist 31 ms; boot map 0.12–0.22 s.
  329. - `tools/count-short-ids.hl` afterwards: all 10,010 + 15,157 have one, old kept **702/702**, lost 0, old id on another record 0,
  330. **duplicates 0**; `tools/count-duplicate-ids.hl`: 0 duplicate @ids in all tables.
  331. - Pages by curl, back to back, during the backfill (avg / max / answers > 1 s of ~520 each): `/shows/Foundation` 0.234 / 1.56 / 9,
  332. `/person/Jared-Harris` 0.170 / 1.37 / 9, `/` 0.070 / 1.34 / 2, `/movies` 0.073 / 1.18 / 2. Without a backfill (120 s, 436 each):
  333. 0.173 / 1.34 / 5, 0.046 / 1.10 / 5, 0.022 / 0.99 / 0, 0.015 / 1.01 / 1 — the > 1 s answers happen without it too (Loreana was
  334. busy with other workers); the backfill adds ~0.1 s on average.
  335. - Browser (`node tests/realdata-060.mjs`, signed in as the creator, full loads ms 390 | 1280): Raised by Wolves (via `/100jh`)
  336. 1372/297/310 | 335/266/301, Foundation (`100sp`, an old id too) 302/306/250 | 1246/205/195, Star Trek: First Contact (`aafif`)
  337. 275/287/275 | 211/235/212, Jared Harris (`yg7lk`) 164/138/122 | 104/119/121; each id under its image; every `/<id>` 301 in 1–27
  338. ms and the browser lands on the page; `/zzzzz` 404; 0 console problems. Shots /tmp/w060/real/{old-id,series,movie,person}-{390,1280}.png (looked at).
  339. How to repeat (ONLY `storage/`; inner ssh with `< /dev/null`):
  340. ```
  341. ssh [email protected] 'tar czf - -C /CONTAINERS/projects/tracker.worldapi.org storage' < /dev/null | tar xzf - -C .scratch/realdata
  342. TRACKER_STORAGE=$PWD/.scratch/realdata/storage/mpackdb TRACKER_OLD_SHORT_IDS=$PWD/data/old-short-ids.json ./bin/hybriel tools/count-short-ids.hl
  343. OUT=/tmp/w060 tests/realdata-060-backfill.sh 1 450 "" # starts :8730 on the copy, curl-times 4 pages until "short ids done"
  344. # (3rd arg `full` = keep timing until MAX — the baseline once nothing is left). Then, server still up: session file for user
  345. # 0mujqspn0aqb (name sha256(<32-hex id>), JSON {"created":<now ms>,"data":{"tag":"t"},"id":"<id>","seen":<now ms>,"user":{"id":"0mujqspn0aqb"}}
  346. # in .scratch/realdata-sessions/), id → .scratch/real-sid
  347. REAL_OUT=/tmp/w060/real node tests/realdata-060.mjs # REAL_SERIES, REAL_MOVIE, REAL_PERSON, REAL_OLD, REAL_REPEAT
  348. kill $(cat /tmp/w060/real.pid); TRACKER_STORAGE=… tools/count-short-ids.hl again; rm -rf .scratch/realdata .scratch/realdata-sessions .scratch/real-sid
  349. ```
  350. **Open**: (1) deploy — the first start runs the backfill (~5 min, pages ~0.1 s slower meanwhile; ids appear as it goes).
  351. (2) Inside the app a record costs ~3 ms vs ~0.6 ms in a plain script (cause not found; a big `static` list read through a field
  352. was copied on every access — fixed by keeping the queue a plain `static` list). (3) Nothing creates persons in the app today; if a
  353. later step does, it must call `claimShortId('person', …)`. (4) `/<shortId>` of an adult title redirects; its page says "Not found"
  354. to non-followers as before.
  355. ## 2026-10-01 — tickets #22–#25 (mission 058): air dates, season check, movie watched check, genre pages (NOT deployed)
  356. **Built** (details README "What it does (mission 058)"): #22 every episode row shows its air date (server rows + opened
  357. seasons). #23 a season's check is DERIVED = all its episodes watched (live with the face's answer; a season click on a partly
  358. watched season watches the rest). #24 a movie's page has `#moviewatch` (watch `targetType 'movie'`, face `showToggleMovie`;
  359. signed out → modal), `/my/movies` says "N movies · M watched" + a check per watched row. #25 `/genres/<genre>` (+ `/page/<n>`,
  360. `components/genre.hl`, catalog.hl `index.genres`): movies AND series, newest first, 24 per page, adult hidden; pills link there,
  361. `/genre/<x>` → 301.
  362. **Decisions**: the season record is still written by a season click but no longer read for the check. A series' place in a
  363. genre list = its newest released episode date (else its release), a movie's = its release (one comparable date). Genre by
  364. `urlSegment` (case-insensitive fallback). TMDB's TV and movie genres stay separate (see Open).
  365. **Gate** (214 → 238):
  366. ```
  367. TRACKER_GATE_SHOTS=/tmp/w058/shots TRACKER_GATE_PORT=8720 TRACKER_GATE_IDENT_PORT=8721 TRACKER_GATE_CHROME=8722-8726 TRACKER_GATE_TMDB_PORT=8727 node tests/browser.mjs
  368. 238 passed, 0 failed
  369. ```
  370. One old check changed: "an unwatched check is the inverted icon" now styles a detached copy classed `regular` (with #23 every
  371. check on that page is solid at that point). Fixture: genre Action (`g0000000000000g2`) on Pager Movie 01–30, Pager Future Movie,
  372. Pager Older Series + the adult `Hidden Action Film`. Shots looked at (Loreana /tmp/w058/shots/: show-open-*, movie-watched-*,
  373. genre-action-*, my-movies-*).
  374. **Real data** (copy of Byrodin `storage/` 2026-10-01 12:03 UTC, :8730, creator 0mujqspn0aqb, `node tests/realdata-058.mjs`, full
  375. load goto → hydrated, 3 repeats, ms 390 | 1280): `/shows/Foundation` 549/277/221 | 224/228/225 (10 open rows all dated, top season
  376. check == all its episodes); `/shows/Star-Trek-First-Contact` (movie) 234/250/250 | 237/238/239; `/genres/Action` 118/991/42 |
  377. 92/39/43 (643 titles, 27 pages; server 6–8 ms by curl — the spikes are poster loads); page 2 41/103/749 | 93/48/110; `/my/movies`
  378. 66/63/66 | 68/63/63. Movie check on the copy: click 361 ms → reload solid → click back → reload regular. Genre kinds page 1:
  379. Action 24 movies/0 series, Drama 5/19, Action-Adventure 0/24. 0 console problems. Screenshots /tmp/w058/real/ on Loreana (looked at).
  380. How to repeat (ONLY `storage/`; inner ssh with `< /dev/null`):
  381. ```
  382. ssh [email protected] 'tar czf - -C /CONTAINERS/projects/tracker.worldapi.org storage' < /dev/null | tar xzf - -C .scratch/realdata
  383. TRACKER_PORT=8730 TRACKER_SYNC=0 TRACKER_WATCH=0 TRACKER_BACKFILL=0 TRACKER_STORAGE=$PWD/.scratch/realdata/storage/mpackdb TRACKER_SESSIONS=$PWD/.scratch/realdata-sessions/ TRACKER_URL=http://127.0.0.1:8730 HL_HOST=127.0.0.1 ./bin/hybriel project.hl
  384. # session file for 0mujqspn0aqb (name sha256(id), created/seen = now ms), id → .scratch/real-sid
  385. REAL_OUT=/tmp/w058/real node tests/realdata-058.mjs # REAL_SHOW, REAL_MOVIE, REAL_GENRE, REAL_REPEAT
  386. # afterwards rm -rf .scratch/realdata .scratch/realdata-sessions .scratch/real-sid
  387. ```
  388. **Open**: (1) deploy. (2) TMDB's TV genres ("Action & Adventure", "Sci-Fi & Fantasy", "War & Politics") are separate genres from
  389. the movie ones, so `/genres/Action` has no series on real data — merge them? (creator). (3) A series tile shows its start year
  390. while it is placed by its newest episode (same as /shows). (4) The season's own watch record can now disagree with its episodes
  391. (not read anywhere for the check).
  392. ## 2026-10-01 — ticket #28 (mission 061, branch t26 on top of #26, worktree tracker-wt26): full cast + crew (NOT merged, NOT deployed)
  393. **Found** (live copy 2026-10-01 ~14:40): the page showed `show.cast` — the old tracker's migrated list for 1,820 of 10,011 titles
  394. (Star Trek: Picard **4**: Stewart, Ryan, Hurd, Speleers; Dune (1984) 39), nothing for the rest (Superman 1978: **0**); #26 only
  395. added TMDB's first 20 to filmography titles; no crew anywhere; the daily sync and the search import never stored cast.
  396. **Built**: details.hl `castOf`/`crewOf`/`mainMinOf`/`withCredits`/`applyCredits` + the credits job (`creditsQueue`/`creditsStep`,
  397. project.hl `creditsTick`); tmdbsync.hl asks `external_ids,aggregate_credits|credits` in the details request it makes anyway and
  398. returns it (`res.details`); search.hl `importTitle` asks once (ids + credits) and hands that answer to `syncShowWith` (one request
  399. less), components/search.hl stores the credits; tools/sync-tmdb.hl too; show page: crew block (job labels) + cast `Name (Character)`
  400. collapsed after 20 with a client-only "Show all (N)" (crew: 6 per job, "Show all crew (N)"), "Guest stars" label; shows.hl
  401. `showBySlug` by a slug → id map. Details: README "What it does (ticket #28)".
  402. **Decisions**: cast ≤ 300 (`TRACKER_CAST_MAX`; SNL 2,771 / Grey's 3,243 one-episode guests would each be a person), crew ≤ 30 per
  403. job; guest = fewer than half the series' episodes (≤ 10, ≥ 1) — Picard (30 ep.): ≥ 10; composer = Original Music Composer /
  404. Composer / Music; Writer, Screenplay, Story separate groups (Teleplay not shown). The credits job runs after the backfill and the
  405. repair, only public titles (`adult == false`), one request per title + 260 ms, pauses above `TRACKER_CREDITS_MAX_MB` (16000).
  406. **Hybriel finding (not filed; for the architect)**: the native runtime never gives back what a `fetch` body or a decoded record
  407. took — repro (10 lines): a node server answering a 440 KB JSON; a .hl loop `fetch(url)` + `r.json()` 300× → RSS +2.7 GB (fetch
  408. without `.json()`: +0.43 GB), sampled with `ps -o rss=`; nothing is given back while the process lives. The same
  409. for `showsTable.find(null, null)`: the old `showBySlug` decoded every title per call → run 1 below grew to 20 GB in 20 min. The LIVE
  410. container used **11.4 GiB** today (docker stats, before any of this). Fix in this branch: the slug map (no per-page scan) + the job's
  411. RSS limit; the leak itself is Hybriel's.
  412. **Real data** (copy of Byrodin `storage/` 2026-10-01 ~14:40, real TMDB/TVmaze, :8750; copy deleted):
  413. - Before → after: **Star Trek: Picard 4 → 202 cast** (17 main ≥ 10 episodes incl. season-3 regulars Gates McFadden, Todd Stashwick, then
  414. guests from John de Lancie (9)) + 45 crew (Created by Kurtzman, Beyer, Goldsman, Chabon; Directed by Frakes …; Written by; Story;
  415. Music Jeff Russo …). **Superman (1978) 0 → 90 cast** + Directed by Richard Donner, Written by Tom Mankiewicz, Screenplay Newman /
  416. Benton / Puzo / Newman, Story Puzo, Music John Williams. Dune (1984) 39 → 41. The Simpsons 6 → 300 (cap) + 67 crew.
  417. - Run 1 (`TRACKER_REPAIR=1 TRACKER_CREDITS=1`): `details repair done: 557/557 … cast=30286 … seconds=800`, then the credits job
  418. `start, 5867 titles`; stopped after 714 (RSS 20 GB — pages scanned every show per call, see the Hybriel finding). Run 2 (slug map,
  419. light persist, `TRACKER_CREDITS_MAX_MB=16000`): resumed `start, 5153 titles` → `credits job done: 5153/5153 titles, done=5153
  420. failed=0 cast=262634 crew=39624 people=104614 requests=5153 retries=0 slowestStepMs=1316 seconds=2681` (44.7 min; whole job ≈ 51
  421. min); RSS 3.8 → 6.3 GB (the pause did not trigger; it is gate-tested). Next start: `credits job: start, 0 titles` / `nothing to do`.
  422. - Page latency meanwhile (`/movies`, Picard, Foundation, `/` in turn every 0.5 s, n=4836): median 28 ms, p95 194, p99 436, max 1125 ms.
  423. (Run 1 with the old `showBySlug`: Picard median 318 ms, max 3.8 s; during the repair median 179 ms, max 4.1 s.)
  424. - After (no job running): show page full load 105–235 ms (Picard 206 ms, first after boot 2.1 s = the slug map), Picard HTML 166 kB,
  425. Simpsons 364 kB; "Show all" 2–18 ms, 0 faces sent; no sideways scroll at 390. Signed-in watch click (session face re-derives the cast
  426. rows too): Picard 184–200 ms (first 1.3 s), The Simpsons 276–731 ms. Boot: search index 10,011 titles / **160,084 people** (was
  427. 15,157) in **4.3 s (was 0.66 s)**, RSS after boot **4.9 GB (was 1.6 GB)**.
  428. - Screenshots (looked at) on Loreana `/tmp/w061/real/{Star-Trek-Picard,Superman,Dune,The-Simpsons}-{collapsed,all}-{390,1280}.png`;
  429. gate `/tmp/w061/shots/credits-{movie-1280,series-collapsed-390,series-all-390,series-1280}.png`. 0 console problems.
  430. How to repeat (ports 8750–8753; ONLY `storage/`; the worktree has no `.env` → `ln -s ../tracker.worldapi.org/.env .env`, remove after):
  431. ```
  432. ssh [email protected] 'tar czf - -C /CONTAINERS/projects/tracker.worldapi.org storage' < /dev/null | tar xzf - -C .scratch/realdata
  433. TRACKER_PORT=8750 TRACKER_SYNC=0 TRACKER_WATCH=0 TRACKER_BACKFILL=1 TRACKER_REPAIR=1 TRACKER_CREDITS=1 TRACKER_CREDITS_LOG_EVERY=250 TRACKER_STORAGE=$PWD/.scratch/realdata/storage/mpackdb TRACKER_SESSIONS=$PWD/.scratch/realdata-sessions/ TRACKER_URL=http://127.0.0.1:8750 HL_HOST=127.0.0.1 ./bin/hybriel project.hl
  434. # latency meanwhile: a node loop fetching /movies, /shows/Star-Trek-Picard, /shows/Foundation, / every 0.5 s until 'credits job done'
  435. # (mission 061's: .scratch/w061/poll.mjs); grep '^credits job\|^details repair' in the log; RSS: ps -o rss= -p <pid>
  436. REAL_TITLES=Star-Trek-Picard,Superman,Dune,The-Simpsons REAL_OUT=/tmp/w061/real node tests/realdata-028.mjs
  437. # afterwards: stop the server, rm -rf .scratch/realdata .scratch/realdata-sessions; rm .env
  438. ```
  439. **Gate** (231 → 249; 18 new #28 checks; fake TMDB fixtures: show 1001 aggregate_credits + created_by, movie 1003 credits, import
  440. 1004, Backfill Movies' credits; the sync/import request paths now carry the credits; `TRACKER_CREDITS=0` by default):
  441. ```
  442. TRACKER_GATE_SHOTS=/tmp/w061/shots TRACKER_GATE_PORT=8754 TRACKER_GATE_IDENT_PORT=8755 TRACKER_GATE_CHROME=8756-8758 TRACKER_GATE_TMDB_PORT=8759 node tests/browser.mjs
  443. 249 passed, 0 failed
  444. ```
  445. **Merge notes** (main has missions 058/060 meanwhile): `components/show.hl` — header comment, statics after `genreRowsOf`
  446. (`castShown`…`crewCountOf`, replacing `castRowsOf`), `completedPageOf`'s answer, members after `hasCast`, the View's crew + cast
  447. blocks (replacing the old `showCast` loop), `completeTick` assignments, handlers `toggleCastAll`/`toggleCrewAll` before
  448. `toggleEpisode`. `styles.hl` — the cast/crew block replaces the two `.artist-link` lines. `shows.hl` — `showBySlug`. `tmdbsync.hl` —
  449. details paths + `res.details`. `search.hl` — `importTitle` (one request, `syncShowWith`). `project.hl` — `readFile` import, sync tick
  450. `applyCredits`, the credits job block before the clock, the clock's tick. Gate expectations that name request paths changed (sync tool,
  451. import, failed-import message). **Deploy**: repair (~557 titles, ~13 min) then credits job (~5,900 titles, ~51 min); watch RSS
  452. (`docker stats`) — live already used 11.4 GiB before this.
  453. **Open**: (1) merge + deploy. (2) The Hybriel leak (fetch bodies / decoded records never freed) — architect to file; the live app
  454. grows with every sync/backfill too. (3) 160k people: boot +3.6 s, +3.3 GB RSS — if too much, store cast without creating people for
  455. guests (link resolved on click) — not built. (4) Session faces (watch/follow clicks) re-derive the cast rows (`castRows` derives from
  456. `showRow`, which reads the session): Simpsons click up to 0.7 s; deriving them from the slug would avoid it (adult pages need care).
  457. (5) A followed title's credits refresh with the daily sync; others are never refreshed. (6) Cast persons' slugs as #26 (`-2` rule).
  458. ## 2026-10-01 — ticket #26 (mission 059, branch t26, worktree tracker-wt26): filmography titles complete (NOT merged, NOT deployed)
  459. **Found**: the person fill (#16, people.hl `addMinimalTitle`) stores only title, year/release, overview, type, tmdbId, adult, genres,
  460. language and that one person as cast — no poster, seasons/episodes, imdb/tvdb/tvmaze ids, homepage/tagline/status, `tmdbSync`; the
  461. show page just showed that, forever. A search import (`importTitle` + `syncShow`) has all of it except the cast. Live copy: 321 such
  462. titles (6 people filled so far).
  463. **Built**: `details.hl` (`completeStep`), show page loading state (skeleton poster / cast line / 3 season rows, probe → face
  464. `showComplete` until done, no reload), `project.hl repairTick` (the details repair, after the adult backfill), tmdbsync.hl
  465. `syncShowWith`/`syncShowPart` (sync with a given details answer, a series in parts), people.hl `castPersonId` + `minimal = true`,
  466. search.hl `slugBaseOf`/`indexPerson`. Details: README "What it does (ticket #26)".
  467. **Decisions**: complete = what a full import has + the cast (TMDB's first 20, billing order; series: aggregate_credits; adult
  468. people left out; new people get a record + slug + search entry, their page fills on first visit). Marker `detailsAt`; incomplete =
  469. `minimal` or `imported` without `tmdbSync`. Adult titles are never completed (not on open — the public face refuses them — not by
  470. the repair). TMDB 404 → `detailsCheck`, not asked again. A series in steps (≤ 300 episodes per step) — the first real run did the
  471. Late Show in ONE 10.7 s step, pages waited up to 10.3 s. Titles a fill adds while the app runs: completed on open or at the next
  472. start (the queue is built at start).
  473. **Real data** (copy of Byrodin `storage/` 2026-10-01 ~13:55, real TMDB/TVmaze, :8750, `TRACKER_BACKFILL=0`; copy deleted):
  474. - Click from a person page (fill first), `node tests/realdata-026.mjs` — ms from the click: skeleton shown / complete / poster:
  475. | title (person, width) | shown | complete | poster | server (log) |
  476. |---|---|---|---|---|
  477. | Violent Night 2, movie (Jared Harris, 390) | 186 | 712 | 765 | 1 step, 255 ms, cast 14 |
  478. | Royal Kill List, series (Jared Harris, 390) | 227 | 1361 | 1363 | 3 steps, 592 ms, 1 season / 3 ep |
  479. | Teen Wolf: The Movie (Tyler Hoechlin, 1280) | 216 | 662 | 662 | 1 step, 189 ms, cast 20 |
  480. | Wolf Watch, series (Tyler Hoechlin, 1280) | 258 | 1316 | 1318 | 3 steps, 537 ms, 3 seasons / 28 ep |
  481. | Avengers: Doomsday (Patrick Stewart, 1280) | 178 | 642 | 694 | 1 step, 247 ms |
  482. | Bait, series (Patrick Stewart, 1280) | 181 | 1262 | 1263 | 3 steps, 594 ms |
  483. /movies asked every 100 ms meanwhile: max 283–586 ms. Reload afterwards: complete at once, 157–205 ms full load, same parts.
  484. Direct open (1280): Late Show with David Letterman 11.4 s (23 steps, 4,252 episodes), Watch What Happens Live 11.1 s (18 steps,
  485. 3,220 ep); /movies meanwhile max 1.3 / 1.5 s (before the steps: one 10.7 s step).
  486. - **Repair** (restart with `TRACKER_REPAIR=1` on a fresh copy): `details repair done: 321/321 titles, complete=321 failed=0 adult=0
  487. newSeasons=638 newEpisodes=16528 posters=299 cast=5196 requests=787 tvmazeRequests=218 retries=0 seconds=507.248`; no slow step
  488. (> 1.5 s); /movies + /shows/Foundation every 0.5 s meanwhile: n=1298, median 0.13 s, p95 0.25 s, p99 1.03 s, max 2.35 s. Next
  489. start: `start, 0 incomplete titles` / `nothing to do`. (First try, one step per title: 401 titles in 628 s, max wait 10.3 s.)
  490. - Screenshots (looked at) on Loreana `/tmp/w059/real/`: `{movie,series}-{skeleton,complete,reload}-{390,1280}.png`,
  491. `direct-*-1280.png`, `repaired-{Licorice-Pizza,Late-Show-with-David-Letterman}-{390,1280}.png`. 0 console problems.
  492. How to repeat (ports 8750–8753; ONLY `storage/`; the worktree has no `.env` → `ln -s ../tracker.worldapi.org/.env .env` for the
  493. real token, remove afterwards):
  494. ```
  495. ssh [email protected] 'tar czf - -C /CONTAINERS/projects/tracker.worldapi.org storage' < /dev/null | tar xzf - -C .scratch/realdata
  496. TRACKER_PORT=8750 TRACKER_SYNC=0 TRACKER_WATCH=0 TRACKER_BACKFILL=0 TRACKER_REPAIR=0 TRACKER_STORAGE=$PWD/.scratch/realdata/storage/mpackdb TRACKER_SESSIONS=$PWD/.scratch/realdata-sessions/ TRACKER_URL=http://127.0.0.1:8750 HL_HOST=127.0.0.1 ./bin/hybriel project.hl
  497. REAL_PEOPLE=Jared-Harris:390,Tyler-Hoechlin:1280,Patrick-Stewart:1280 REAL_OUT=/tmp/w059/real node tests/realdata-026.mjs
  498. REAL_PEOPLE= REAL_TITLES=Late-Show-with-David-Letterman node tests/realdata-026.mjs
  499. # repair: restart with TRACKER_REPAIR=1, poll /movies, grep '^details repair' in the log (~8.5 min)
  500. # count incomplete: the log line 'details repair: start, N incomplete titles' (N = 321 on 2026-10-01)
  501. ```
  502. **Gate** (214 → 231; 17 new #26 checks, the offline home check now expects 6 series):
  503. ```
  504. TRACKER_GATE_SHOTS=/tmp/w059/shots TRACKER_GATE_PORT=8754 TRACKER_GATE_IDENT_PORT=8755 TRACKER_GATE_CHROME=8756-8758 TRACKER_GATE_TMDB_PORT=8759 node tests/browser.mjs
  505. 231 passed, 0 failed
  506. ```
  507. Gate env: `TRACKER_REPAIR=0` by default, `TRACKER_DETAILS_PART_EPISODES=1` (a season per step), the repair block sets
  508. `TRACKER_REPAIR_FAST=1`. Shots `title-skeleton-1280.png`, `series-skeleton-1280.png` (looked at).
  509. **Merge notes** (main has mission 058 meanwhile — #22–#25 touch `components/show.hl`): my show.hl changes are additive — an
  510. import, 2 statics before "reactive members", 4 members after `adultShow`, the poster/cast/loading blocks in the View, the
  511. `completeTick` handler before `toggleEpisode`, the face `showComplete` first among the faces. If 058 changes `buildRows`' signature,
  512. `completedPageOf` calls `buildRows(show, null, cl)`. `tmdbsync.hl`: `syncMovie(show, res, pre)` gained a parameter, `syncShow` is
  513. now `syncShowPart(showId, null, null)`. `project.hl`: 1 import, the repair block before the clock, the clock's tick. Gate: fixtures
  514. (movies 2001/2004/2005/2101–2178, tv 2002, TVmaze 602, person 3010), startServer defaults, the #26 block inside #16, the repair
  515. block before #10, the offline home check. **The live deploy**: the repair waits for the adult backfill (~80 min), then ~9 min.
  516. **Open**: (1) merge + deploy. (2) A search import still has no cast (could use `completeStep`). (3) Client-side navigation keeps
  517. the person page's scroll position on the title page (hl:web; seen on the phone shots, not new). (4) Titles added while the app runs
  518. are not queued for the repair (open or next start). (5) Cast persons of a title are never refreshed; people's slugs from cast use
  519. the same `-2` rule as the migration.
  520. ## 2026-10-01 — ticket #17 (mission 057): season caret up/down, skeleton rows, faster opening (NOT deployed)
  521. **Built** (`components/show.hl`, `styles.hl`, gate): caret DOWN closed / UP open. Opening a season: caret up + min(episodes, 8)
  522. shimmering skeleton rows at once (client-side), then the sessionless face `showSeasonEpisodes(seasonId)` → `filledRows`
  523. replaces them. Closing: client-only, no request. Watch state from member `watchedEpisodes` (per season `{ all, except }`).
  524. Adult title pages (followers only) keep the session face `showRows(slug, collapsed)` (signature changed: no toggle inside).
  525. Details: README "What it does (ticket #17)".
  526. **Why it was slow** (measured): server work per open was small (probe on the copy: showBySlug 60–78 ms linear scan,
  527. watchesOfUser 20 ms, watchedSet 6, episodesOfSeason 6) — but the face took `session`, so hl:web RE-MOUNTED the page on the
  528. server and shipped every session-derived member (`rows` with the initial seasons!) as `sync`, which the client repainted,
  529. then the handler repainted again. TRAP for future faces: a face with `session` = a full page re-render server-side + sync.
  530. **Real data** (copy of Byrodin `storage/` 2026-10-01 12:25, :8730, creator az5b2, `node tests/realdata-057.mjs`, ms in the
  531. page from click; 3 repeats; 390 and 1280 alike):
  532. | | Daily Show S30 (142 ep) | Daily Show S28 (123) | LWT S12 (30) | LWT S10 (21) |
  533. |---|---|---|---|---|
  534. | before: episodes visible | 380–450 | 355–385 | 265–1093 | 235–285 |
  535. | after: skeleton visible | 77–106 | 76–90 | 25–54 | 24–38 |
  536. | after: episodes visible | 233–288 | 226–268 | 58–102 | 54–74 |
  537. | close before → after | 420–1388 → 135–175 | 420–500 → 135–165 | 285–390 → 28–45 | 260–370 → 26–30 |
  538. Skeleton rows 8 (cap) on all; faces sent: only showSeasonEpisodes, never showRows; client-filled watch state == the server's
  539. rebuild (Daily Show 296 checks/121 solid, LWT 74/29). Page load unchanged (Daily Show ~310–360 ms warm both; HTML 157 → 167 kB
  540. from `watchedEpisodes` — a plain id map was 274 kB, hence `{ all, except }`). Adult path checked once on a 2nd copy with LWT
  541. set `adult = true` (:8728): signed out "Not found", creator opens seasons via showRows (skeleton 8, rows 300–400 ms, no dup).
  542. The Daily Show's skeleton needs ~80 ms because hl:web re-renders the whole flat row list (~264 rows) on every `rows` write.
  543. How to repeat (ONLY `storage/`; inner ssh with `< /dev/null`):
  544. ```
  545. ssh [email protected] 'tar czf - -C /CONTAINERS/projects/tracker.worldapi.org storage' < /dev/null | tar xzf - -C .scratch/realdata
  546. TRACKER_PORT=8730 TRACKER_SYNC=0 TRACKER_WATCH=0 TRACKER_BACKFILL=0 TRACKER_STORAGE=$PWD/.scratch/realdata/storage/mpackdb TRACKER_SESSIONS=$PWD/.scratch/realdata-sessions/ TRACKER_URL=http://127.0.0.1:8730 HL_HOST=127.0.0.1 ./bin/hybriel project.hl
  547. # session file for user 0mujqspn0aqb (mission 056 entry: name sha256(id), created/seen = now ms), id → .scratch/real-sid
  548. REAL_OUT=/tmp/w057/real-after node tests/realdata-057.mjs # REAL_SHOWS, REAL_SEASONS (indexes, default 1,3), REAL_REPEAT
  549. # afterwards rm -rf .scratch/realdata .scratch/realdata-sessions .scratch/real-sid
  550. ```
  551. **Gate** (208 → 214):
  552. ```
  553. TRACKER_GATE_SHOTS=/tmp/w057/shots TRACKER_GATE_PORT=8720 TRACKER_GATE_IDENT_PORT=8721 TRACKER_GATE_CHROME=8722-8726 TRACKER_GATE_TMDB_PORT=8727 node tests/browser.mjs
  554. 214 passed, 0 failed
  555. ```
  556. Skeleton state tested with a FAKE DELAY: an init script holds the websocket frame naming `showSeasonEpisodes` back 1.5 s
  557. while `window.__delayFace` is set. Shots `show-skeleton/open/closed-{390,1280}.png` looked at (Loreana /tmp/w057/shots/).
  558. **Open**: (1) deploy. (2) Episode/season check clicks still use session faces that rebuild all rows (+ the re-mount sync) —
  559. not measured here; the same split (client patch + a lean face) could speed them up. (3) Big-show skeleton ~80 ms (whole-list re-render in hl:web).
  560. (4) The adult fallback is not in the gate (no fixture series is adult; changing seed-adult shifts many counts).
  561. ## 2026-10-01 — mission 056: #16 merged into main, 3 fixes, Hybriel master 8590df63 (NOT deployed)
  562. **Commits** (main, not pushed): 2c53d5e merge t16-person (worktree tracker-wt16 + branch removed; its `.scratch/w055` moved to
  563. `.scratch/w055-wt16`), 2b7fdd6 header + backfill posters, f40c250 Hybriel + adult show page, + this docs commit.
  564. - **Merge**: all conflicts additive. Filmography (people.hl `filmographyOf`) lists only `isPublicTitle` (`adult == false`)
  565. titles whose credit is not adult — unknown hidden like the public lists.
  566. - **Header** (signed out, phone): ident's "choose ident" + "Log in with ident" wrapped (73 px). Now nowrap, the phone says
  567. "Log in" (`span.wide` " with ident" from 40rem): 46 px at 320/390, 54 px at 1280. TRAP: a style key twice in one block
  568. REPLACES the first (a 2nd `'ident-selector::part(button)'` dropped its padding/border) — merge into one line.
  569. - **Backfill**: an adult title's poster is not downloaded (flag + ids stored). Real data: posters 5,433 (was 8,740), dir
  570. 269 MB (was 459 MB) → ~190 MB saved.
  571. - **Hybriel** master 8590df63 (≥ 73267707: #122 18cf2fb9, #121 426944c7), sha256 `ca830ef8…`; old in `.scratch/pre-056/`.
  572. Duplicate @ids on live copy: 0 in all 8 tables (episodes 232,384, shows 9,453, watches 11,663, …). Workarounds: none removed
  573. (static helpers kept). SVG namespace check already in the gate (047).
  574. - **Adult show page** (components/show.hl `visibleShow`/`adultHiddenFor`): `adult == true` → "Not found" for non-followers,
  575. signed out too; no member carries the row (`showRow` itself is null — every member is shipped to the browser). A follower
  576. sees it; Unfollow on the page hides it at once (session sync, #122; old build: only after reload). Faces showRows/
  577. showToggle* refuse it. TRAP (why 054's try failed): `collapsed` derived from `found`/`showRow` (session-derived) gets
  578. re-derived on the server with MOUNT state after each session face → seasons snap back, 2nd click dead. `collapsed`
  579. now from the slug (`initialCollapsedOf`). Unknown (`null`) pages are not hidden.
  580. - **Gate fixes**: the backfill "start" line comes with the clock's first tick, after the server answers → wait for it
  581. (was a deterministic fail after the merge); every `stopServer()` first sends the tab to about:blank (websocket reconnect
  582. errors failed the console check intermittently).
  583. **Gate** (203 after merge → 208):
  584. ```
  585. TRACKER_GATE_SHOTS=/tmp/w056/shots TRACKER_GATE_PORT=8720 TRACKER_GATE_IDENT_PORT=8721 TRACKER_GATE_CHROME=8722-8726 TRACKER_GATE_TMDB_PORT=8727 node tests/browser.mjs
  586. 208 passed, 0 failed
  587. ```
  588. Proven failing without the fix: poster check (forced download → FAIL), Unfollow-hides check on the old Hybriel (FAIL, page
  589. stayed until reload). Shots `header-signed-out-{320,390,1280}.png`, `person*.png` looked at.
  590. **Real data** (copy of Byrodin `storage/` 2026-10-01 09:47, :8730, real TMDB, backfill run on the copy 78 min, copy deleted):
  591. ```
  592. adult backfill done: 9453/9455 titles, adult=3450 notAdult=5866 unknown=137 posters=5433 ids=6459 requests=9455 errors=139 retries=2 seconds=4701.056
  593. ```
  594. `node tests/realdata-056.mjs` (full load ms 390/1280): `/` 426/91, `/movies` 92/90, `/movies/page/2` 93/37, `/shows` 287/41,
  595. `/shows/page/2` 92/42, `/search/the` 336/126, `/search/sex` 442/91, `/person/Jared-Harris` 242/102 (first visit filled 97
  596. credits, 80 added, 487 ms), `/shows/Foundation` 189/145; signed in (az5b2): `/my/shows` 650/219, `/my/movies` 41/38,
  597. `/my/unwatched` 1478/1655 (repeats 1.5–2.4 s, server 1.33 s, 1,595 rows — the same with the old Hybriel), `/my/schedule`
  598. 457/322, show 170/267. Header one row on every page (46/54–56 px). Adult page `/shows/This-Aint-Star-Trek-XXX`: "Not found"
  599. signed out (slug not in the HTML) and for az5b2 (follows no adult title). Every link of all 251 list pages, `/`, 6 searches
  600. (the, sex, porn, xxx, girl, love) and the person: 5,914 slugs → `tools/check-public-slugs.hl`: notAdult=5914, adult=0,
  601. unknown=0. 0 console problems. Screenshots `/tmp/w056/real/{out,in}-*-{390,1280}.png` on Loreana (looked at).
  602. How to repeat (ports 8730/8731; ONLY `storage/`; inner ssh with `< /dev/null`):
  603. ```
  604. ssh [email protected] 'tar czf - -C /CONTAINERS/projects/tracker.worldapi.org storage' < /dev/null | tar xzf - -C .scratch/realdata
  605. TRACKER_PORT=8730 TRACKER_SYNC=0 TRACKER_WATCH=0 TRACKER_BACKFILL=1 TRACKER_STORAGE=$PWD/.scratch/realdata/storage/mpackdb TRACKER_SESSIONS=$PWD/.scratch/realdata-sessions/ TRACKER_URL=http://127.0.0.1:8730 ./bin/hybriel project.hl
  606. # wait for 'adult backfill done' (~80 min); session file for user 0mujqspn0aqb as in ticket #8 (created/seen = now ms), id → .scratch/real-sid
  607. REAL_PERSON=Jared-Harris REAL_SHOW=/shows/Foundation REAL_ADULT=This-Aint-Star-Trek-XXX node tests/realdata-056.mjs
  608. # stop the server, then: TRACKER_STORAGE=… SLUGS=/tmp/w056/real/slugs.txt USER_ID=0mujqspn0aqb ./bin/hybriel tools/check-public-slugs.hl
  609. # afterwards rm -rf .scratch/realdata .scratch/realdata-sessions .scratch/real-sid
  610. ```
  611. **Open**: (1) deploy: the live backfill (~80 min, now ~270 MB posters). (2) `/my/unwatched` 1.5–2.4 s full load at the 2 s
  612. target (1,595 rows). (3) hl:fetch blocks the server during a slow TMDB answer (max step 5 s in this run). (4) Unfollowing an
  613. adult title on its page turns the page into "Not found" at once (wanted: hidden for non-followers). (5) 137 TMDB-404 titles
  614. stay hidden; adult people are not hidden; people are never refreshed.
  615. ## 2026-10-01 — ticket #16 (mission 055, branch t16-person, worktree tracker-wt16): person pages
  616. **Built**: `/person/<slug>` (`components/person.hl`, `people.hl`, route + `/profiles/:name` in `project.hl`, styles block, search.hl
  617. `titleIdByTmdb`): photo, facts, short bio, filmography (poster, title, year, type, role; newest first; adult hidden). Incomplete
  618. person → "Loading filmography…" and a step-by-step TMDB fill without reload (1 TMDB request + photo, then 40 titles per face
  619. call), missing titles added as minimal records with TMDB's `adult`, person marked `filmographyAt`. Details: README "What it does
  620. (ticket #16)".
  621. **Decisions**: the fill is driven by the page (face `personFill` per step; first step from an invisible CSS-animation tick — hl:web
  622. has no mount hook), so it needs no server timer and other requests are served between steps. No sign-in needed. Credits stored in
  623. the migrated `person.shows` (+ `posterPath`, `adult`); migrated credits TMDB no longer lists are kept. Rows without our poster file
  624. show TMDB's w92 thumb (like search's web rows) — posters of added titles otherwise come later (sync/backfill). Crew credits count
  625. (role = job). New titles get this person in `cast` (other existing titles' `cast` is not touched). Bio clamped to 4 lines, click =
  626. all. Hidden: `show.adult == true` OR the credit's TMDB `adult`.
  627. **Real data** (copy of Byrodin `storage/` 2026-10-01 ~10:00, deleted afterwards; dev server :8777, signed out, `TRACKER_SYNC=0`,
  628. real TMDB; `node tests/realdata-person.mjs`): cast click on the show page → person page shown / filled (ms), titles added, server log:
  629. | person (show) | shown | filled | credits | added | rows | steps | TMDB request | other requests waited max |
  630. |---|---|---|---|---|---|---|---|---|
  631. | Tyler Hoechlin (Superman & Lois, 33 migrated credits) | 131 | 643 | 36 | 7 | 38 | 2 | 249 ms | 678 ms |
  632. | Grant Gustin (The Flash) | 68 | 593 | 33 | 21 | 33 | 2 | 242 ms | 203 ms |
  633. | Jared Harris (Foundation) | 85 | 869 | 97 | 80 | 97 | 4 | 287 ms | 220 ms |
  634. | Niamh Algar (Raised by Wolves) | 76 | 584 | 39 | 20 | 40 | 2 | 250 ms | 209 ms |
  635. | Eric Roberts (stress, direct load) | — | 3.8 s fill | 758 | 712 | 758 | 20 | 646 ms | 612 ms |
  636. Second visit (complete, full load in Chrome): 41–120 ms at 390/1280, no loading, same rows; row → show page client-side 122–149 ms;
  637. 0 console problems, no sideways scroll at 390. Screenshots `/tmp/w055/real/*.png` on Loreana (looked at).
  638. How to repeat (ports 8777–8779; the fill WRITES — use a copy):
  639. ```
  640. mkdir -p .scratch/realdata && ssh [email protected] 'tar czf - -C /CONTAINERS/projects/tracker.worldapi.org storage' | tar xzf - -C .scratch/realdata
  641. TRACKER_PORT=8777 TRACKER_SYNC=0 TRACKER_WATCH=0 TRACKER_STORAGE=$PWD/.scratch/realdata/storage/mpackdb TRACKER_SESSIONS=$PWD/.scratch/realdata-sessions/ TRACKER_URL=http://127.0.0.1:8777 ./bin/hybriel project.hl
  642. node tests/realdata-person.mjs # REAL_CASES='/shows/X:Person-Slug,…' for others; grep 'person fill' in the server log
  643. # afterwards: stop the server, rm -rf .scratch/realdata .scratch/realdata-sessions
  644. ```
  645. **Gate** (167 → 186 checks):
  646. ```
  647. TRACKER_GATE_SHOTS=/tmp/w055/shots TRACKER_GATE_PORT=8770 TRACKER_GATE_IDENT_PORT=8771 TRACKER_GATE_CHROME=8772-8775 TRACKER_GATE_TMDB_PORT=8776 node tests/browser.mjs
  648. 186 passed, 0 failed
  649. ```
  650. Screenshots `/tmp/w055/shots/person{,-complete}-{390,1280}.png` (looked at).
  651. **Merge notes**: shared files touched additively — `project.hl` (1 import, `profilesDir`/`profileRoute` before the "old addresses"
  652. block, 2 routes after `/search/:q?`), `search.hl` (`titleIdByTmdb` before "the query as it comes in the address"), `styles.hl` (one
  653. block before `@media` + 2 lines at the end of it), `tests/faketmdb.mjs` (`persons`, `personRequests`, `personDelayMs`), `tests/seed-show.hl`
  654. (Test Actor gets `tmdbId = 3002`, genre Drama `tmdbId = 18`, two persons), `tests/browser.mjs` (`gatePersons` fixture, a block
  655. before "#10 THE INSTALLABLE APP"), README/STATUS. Mission 054 (`adult`): people.hl already reads `show.adult == true` and writes `adult`
  656. on added titles; if 054 also filters the public lists, the gate's "Hidden Adult Film" (2012) leaves /movies — no gate check here counts it.
  657. **Open**: the TMDB step blocks the server for its request (~0.25–0.65 s; hl:fetch is blocking). People are never refreshed after
  658. complete (the ticket's "daily sync may refresh followed people later" — not built). Adult PEOPLE are not hidden (only titles). Added
  659. titles have no poster file / seasons until synced. Signed-out header at 390 wraps "choose ident" / "Log in with ident" to two lines
  660. (not from #16 — seen in the real-data shots, every page).
  661. ## 2026-10-01 — mission 054: adult titles hidden from the public lists + the adult-flag backfill (NOT deployed)
  662. **Built**: `shows.adult` true/false/null(unknown). Public lists (catalog.hl: homepage rows, `/movies`, `/shows`) and the
  663. search (search.hl `titleOk`; "Fetch from web": `include_adult=false` + only results with `adult: false`) show ONLY
  664. `adult == false` (shows.hl `isPublicTitle`) — unknown is hidden, so the first deploy is safe. `/my/*` and the show page
  665. are not filtered (a followed adult title stays reachable). The daily sync, the search import and the backfill store
  666. TMDB's flag. **Backfill** in the app (project.hl `backfillTick` → tmdbsync.hl `backfillTitle`): one title per step on a
  667. 0.1 s clock shared with the daily sync (which wins), `GET /movie|tv/<id>?append_to_response=external_ids` + the poster
  668. when missing, 260 ms pause per API request; 404 → `adultCheck='TMDB 404'` (hidden, never asked again); no answer/429/5xx
  669. → retried (≤ 2 per start); resumes after a restart (queue = what is still unknown); log every 500 + done line. Env
  670. `TRACKER_BACKFILL=0` off, `TRACKER_BACKFILL_LOG_EVERY`. Details: README "What it does (mission 054)".
  671. **Decision / Hybriel finding**: hiding the SHOW PAGE from non-followers was built and dropped. `found = showRow != null &&
  672. !adultHiddenFor(showRow, me)` (a static reaching mpackdb, reading `me`) → after any session face on the page
  673. (`showToggleEpisode`) the browser re-derives `found` and then `rows`, whose `buildRows` reaches mpackdb → console
  674. `'watchesOfUser' is a static of 'Watches' whose initializer reaches 'watchesTable', a name the realm 'client' … cannot bind`,
  675. the click does nothing (gate: "ep3 solid" timeout). A plain copy in between (`hideAdult = hiddenAdult`) did not stop it.
  676. So the show page of an adult title opens for anyone who has the link (it is in no list and no search).
  677. **Gate** (167 → 184 checks):
  678. ```
  679. TRACKER_GATE_SHOTS=/tmp/w054/shots TRACKER_GATE_PORT=8720 TRACKER_GATE_IDENT_PORT=8721 TRACKER_GATE_CHROME=8722-8726 TRACKER_GATE_TMDB_PORT=8727 node tests/browser.mjs
  680. (backfill second start: 8 titles left, 6.614 s; 285 pages asked during it, slowest 634 ms; adult backfill done: 8/8 titles, adult=0 notAdult=7 unknown=1 posters=7 ids=2 requests=8 errors=1 retries=0 seconds=6.714)
  681. 184 passed, 0 failed
  682. ```
  683. New block (end of the gate, before the PWA part): `tests/seed-adult.hl` (app stopped) = 1 adult movie alice follows +
  684. 14 unknown (fake TMDB: 1 adult, 1 404). Backfill off: none on `/`, `/movies` (2 pages), `/shows`, search; the adult one on
  685. alice's `/my/movies` and its page; web search drops TMDB's adult result. Backfill on with 300 ms per fake answer: stopped
  686. after 6 → restart asks only the other 8 (resume; mpackdb `update` survives SIGTERM without `persist`), pages < 1.2 s
  687. meanwhile (slowest 634 ms), lists + search updated at once, poster served, 3rd start "nothing to do". All other fixtures
  688. are `adult = false` (seed-show.hl); `startServer()` runs with `TRACKER_BACKFILL=0` unless a block switches it on; on a
  689. throw the gate now prints the browser console + server log tail. Screenshot `adult-home-1280.png` (looked at).
  690. **Real data** (copy of Byrodin `storage/` 2026-10-01 07:37, real TMDB, :8730, `TRACKER_SYNC=0`, deleted afterwards):
  691. ```
  692. adult backfill: start, 9453 titles without an adult flag (65 ms to find them)
  693. adult backfill done: 9453/9454 titles, adult=3450 notAdult=5866 unknown=137 posters=8740 ids=6459 requests=9454 errors=140 retries=1 seconds=5935.021
  694. ```
  695. - 98.9 min, ~0.63 s per title. Adult 3,450 (3,448 movies, 2 series), not adult 5,866, unknown 137 (all TMDB 404 →
  696. `adultCheck`), errors 140 = 137 × 404 + 2 poster 404 + 1 TLS "no answer" (retried OK). Posters: 126 → 8,866 files,
  697. 459 MB (adult titles' posters included). A restart afterwards: `start, 0 titles` / `nothing to do`.
  698. - Lists after: `/movies` 4,242 movies (177 pages), `/shows` 1,624 series (68 pages). EVERY slug on `/`, all 245 list
  699. pages and 10 searches (the, sex, porn, slut, milf, girl, xxx, anal, teen, hot): 6,008 links → all `adult == false`
  700. (0 others). TMDB-non-adult titles like "Porn King: The Rise & Fall of Ron Jeremy" (2022 doc) and "Slut." (2004) stay.
  701. - Page latency DURING the run (curl every ~5 s, 1,155 samples each): `/` avg 0.156 s max 4.87 s, `/movies` avg 0.059
  702. max 1.67, `/shows` avg 0.045 max 1.54, `/search/the` avg 0.075 max 1.33; 14 of 4,620 > 1 s. Cause: 13 steps > 1.5 s
  703. (one 5.8 s) — all a slow TMDB/image answer (movies, no catalog work); hl:fetch blocks the one request loop.
  704. - After: full load (Chrome, signed out) 390/1280: `/` 0.57 (cold)/0.09 s, `/movies` 0.07/0.04, `/shows` 0.04/0.04,
  705. `/search/the` 0.46/0.08 s, 0 console problems. Screenshots `/tmp/w054/real/{home,movies,shows,search-the}{,-bottom}-{390,1280}.png`
  706. on Loreana — looked at: no adult title or poster. Logs `/tmp/w054/real-backfill.log`, `real-latency.log`, `real-restart.log`.
  707. How to repeat (ports 8730/8731; ONLY `storage/`; note the inner ssh needs `< /dev/null` inside `ssh loreana bash -s`):
  708. ```
  709. ssh [email protected] 'tar czf - -C /CONTAINERS/projects/tracker.worldapi.org storage' < /dev/null | tar xzf - -C .scratch/realdata
  710. TRACKER_PORT=8730 TRACKER_SYNC=0 TRACKER_WATCH=0 TRACKER_STORAGE=$PWD/.scratch/realdata/storage/mpackdb TRACKER_SESSIONS=$PWD/.scratch/realsess/ TRACKER_URL=http://127.0.0.1:8730 ./bin/hybriel project.hl
  711. # progress: grep 'adult backfill' in its log; afterwards stop it, rm -rf the copy + sessions
  712. ```
  713. **Open**: (1) deploy: the live app starts the backfill at once (~100 min, ~450 MB of posters into `storage/` → the
  714. nightly backup); until it reaches a title the lists are emptier (all unknown at the first start). (2) A slow TMDB answer
  715. blocks pages for its duration (max seen 4.9 s) — needs a non-blocking fetch in Hybriel or shorter timeouts (20 s now).
  716. (3) Posters of adult titles are downloaded too (served only by their file name; could be skipped to save ~170 MB).
  717. (4) The show page of an adult title is not hidden (Hybriel limit above). (5) 137 titles TMDB no longer has stay hidden.
  718. (6) Seen in passing: signed out at 390 px the header buttons wrap to two lines (pre-existing).
  719. ## 2026-10-01 — mission 053: #15 (TVmaze) and #14 (search) merged into main (with #13)
  720. **Merges** (on main, never pushed): `git merge t15-tvmaze` → `03edc78`, then `git merge t14-search` → `dcc5eec`.
  721. Branches t14-search / t15-tvmaze and worktrees tracker-wt14 / tracker-wt15 removed afterwards.
  722. **Conflicts** (both sides kept): README (intro steps 13/14/15, "What it does" sections, Test block, Files rows merged),
  723. STATUS (all entries, newest on top), `tests/realdata-check.mjs` (#13's page list + #15's env REAL_PORT/REAL_CHROME/
  724. REAL_OUT/REAL_SHOW; REAL_SHOTS still works), `project.hl` (imports of both), `styles.hl` (both blocks),
  725. `tests/browser.mjs` (fixtures: movie 1005 + TVmaze episode lists + thetvdb 4004→504; screenshot list = all pages).
  726. **Behaviour fixes from combining**: (1) #13's 32 extra fixture titles were named "Gate …" and flooded #14's "gate"
  727. search checks → renamed "Pager Movie NN / Pager Future Movie / Pager Undated Movie / Pager Older Series"
  728. (`tests/seed-show.hl`). (2) `search.hl` `importTitle` now calls `catalog.hl` `refreshCatalogShow` → an imported title is
  729. on /movies, /shows and the home rows at once (+1 gate check; the offline check's home Shows row is 4 tiles now).
  730. **Gate**:
  731. ```
  732. TRACKER_GATE_SHOTS=/tmp/w053/shots TRACKER_GATE_PORT=8720 TRACKER_GATE_IDENT_PORT=8721 TRACKER_GATE_CHROME=8722-8726 TRACKER_GATE_TMDB_PORT=8727 node tests/browser.mjs
  733. 167 passed, 0 failed
  734. ```
  735. **Real data** (copy of Byrodin `storage/` 2026-10-01, :8730, `az5b2`, `TRACKER_SYNC=0`, deleted afterwards; procedure =
  736. ticket #8; session file `created`/`seen` = now ms): search index 0.58 s at boot. Server (curl): `/` 6 ms, `/movies` 11,
  737. `/shows` 8, `/search/doctor%20who` 14, `/search/the` 56, `/my/shows` 178, `/my/unwatched` 1204, `/my/schedule` 252,
  738. `/my/movies` 6 ms. Full load in Chrome (`REAL_OUT=/tmp/w053/real node tests/realdata-check.mjs` + a search timing),
  739. 390 / 1280: `/` 1.32 (cold) / 0.08 s, `/movies` 0.11 / 0.04, `/shows` 0.10 / 0.09, `/search/doctor%20who` 1.04 (cold) /
  740. 0.06, `/search/the` 0.12 / 0.66, `/my/shows` 1.27 / 0.26, `/my/unwatched` 1.39–2.0 / 1.37–1.39, `/my/schedule` 0.33 /
  741. 0.27, show page 0.11 / 0.11 s; 0 console problems, no sideways scroll. Screenshots `/tmp/w053/real/` + gate shots
  742. `/tmp/w053/shots/` on Loreana (looked at).
  743. **Open**: `/my/unwatched` (1594 rows) is still the slowest page (server 1.2 s); not deployed; open points of #13/#14/#15
  744. below stay (adult titles, imported titles not followed → no daily sync, …).
  745. ## 2026-10-01 — ticket #14 (mission 052, branch t14-search, worktree tracker-wt14): search
  746. **Built**: header magnifier → `/search` / `/search/<text>` (`components/search.hl`), `search.hl` (in-memory word-prefix
  747. index over 9453 titles + 15157 people, built at boot; TMDB `search/multi`; `importTitle` = new show record + the daily
  748. sync's `syncShow`). Signed out: search + web work, "Add" opens the sign-in modal. Details: README "What it does (ticket #14)".
  749. **Decisions**: address `/search/<text>` instead of `/search?q=` (hl:web gives a page no query string; `/search?q=x` opens
  750. the empty page). Min 2 letters. ≤ 30 titles + ≤ 10 people. One TMDB request per "Fetch from web" (button, not per
  751. keystroke). Web list leaves out what we have by TMDB id + kind. Import is not auto-follow (so the daily sync won't
  752. refresh it later — architect's call). Genres matched to ours by name; cast not imported. People link to `/person/<slug>`
  753. (no page yet, like the show page's cast).
  754. **Measured on Hybriel**: a module `static x = f()` is evaluated LAZILY (never, if nothing reads `x`) — the index is built
  755. by `ensureIndex()` called from a `project.hl` member. Static hashes/lists in a module can be mutated in place
  756. (`buckets[k].push(i)` works, 200k pushes 174 ms). The server percent-decodes the path BEFORE routing (`%2F` → 404, invalid
  757. UTF-8 passes through raw); a client-side navigation hands the param still encoded. A record literal entry `id = …`
  758. shadows a local `id` for later entries (bit me: `tmdbId = id` took the new 16-hex id).
  759. **Real data** (copy of Byrodin `storage/` 2026-10-01 ~07:00, deleted afterwards; dev server :8770, az5b2, real TMDB):
  760. index build 0.60 s at boot (log `search index: 9453 titles, 15157 people, 4180 keys, 612 ms`); `dbSearch` 0–1 ms for
  761. "doctor who"/"star trek"/"sopranos", 38–44 ms for "the"/"th" (2000+ candidates); server render `/search/doctor%20who`
  762. 9 ms, `/search/the` 56 ms; browser: per keystroke → results + address 56–76 ms (incl. CDP), `/search` cold 0.85 s / warm
  763. 0.04 s; Fetch from web "pluribus" 0.12–0.23 s (real TMDB); Add "Pluribus (2025)" tv 225171 → `/shows/Pluribus` in
  764. 0.77–1.1 s: Season 1 9 episodes, poster, TMDB/IMDb/TVDB/TVmaze, genres Drama + Sci-Fi & Fantasy; afterwards found in our
  765. database and gone from the web list; 0 console problems. Screenshots `/tmp/w052-t14/real/*.png` on Loreana (looked at).
  766. How to repeat (ports 8770–8772; ONLY `storage/` is copied):
  767. ```
  768. ssh [email protected] 'tar czf - -C /CONTAINERS/projects/tracker.worldapi.org storage' | tar xzf - -C .scratch/realdata
  769. cp -r .scratch/realdata/storage .scratch/probe-store # the import WRITES — work on a second copy
  770. TRACKER_PORT=8770 TRACKER_SYNC=0 TRACKER_WATCH=0 TRACKER_STORAGE=$PWD/.scratch/probe-store/mpackdb TRACKER_SESSIONS=$PWD/.scratch/realdata-sessions/ TRACKER_URL=http://127.0.0.1:8770 ./bin/hybriel project.hl
  771. # AFTER the server is up (it sweeps old session files at boot): session file name = sha256(<32-hex id>), JSON
  772. # {"created":<now ms>,"data":{"tag":"t"},"id":"<id>","seen":<now ms>,"user":{"id":"0mujqspn0aqb"}}; the id into .scratch/real-sid
  773. TRACKER_REAL_WEB=pluribus node tests/realdata-search.mjs # TRACKER_REAL_IMPORT=0: no import
  774. # afterwards: stop the server, rm -rf .scratch/realdata .scratch/probe-store .scratch/realdata-sessions .scratch/real-sid
  775. ```
  776. **Gate** (111 → 136 checks):
  777. ```
  778. TRACKER_GATE_SHOTS=/tmp/w052-t14/shots TRACKER_GATE_PORT=8773 TRACKER_GATE_IDENT_PORT=8774 TRACKER_GATE_CHROME=8776-8778 TRACKER_GATE_TMDB_PORT=8779 node tests/browser.mjs
  779. (in-app run 5.413 s; 12 pages asked during it, slowest 1301 ms)
  780. 136 passed, 0 failed
  781. ```
  782. Fake TMDB: `/3/search/multi` (→ `fake.searchRequests`, w92 thumbs → `fake.thumbRequests`, both kept out of
  783. `fake.requests` so the sync checks are untouched); tv 1004 + movie 1005 importable, tv 1006 in the search but 404 (the
  784. failed import = the hybriel#121/#122 check), TVmaze thetvdb 4004 → 504. Screenshots `/tmp/w052-t14/shots/search*.png`
  785. (+ the existing ones; header still one row at 390 with the magnifier) — looked at.
  786. **Merge notes** (#13 likely touches the same): `project.hl` (imports, one route, `searchIndexReady` before `server`),
  787. `components/main.hl` (the magnifier inside `userBox`), `styles.hl` (one block before the `@media` block),
  788. `tests/browser.mjs` (fixtures at the top, a signed-out block before the "#3 borders" checks, `search` in the 390/1280 page
  789. list, a signed-in block before "#10 THE INSTALLABLE APP"), `tests/faketmdb.mjs`, README (intro, a section, Test, Files).
  790. **Open**: no person page (`/person/<slug>` 404s, like the cast links). Imported titles aren't followed → not re-synced.
  791. Web search is open to signed-out visitors (one TMDB request per click; no rate limit of ours). The field's autofocus is proven
  792. on a full load only (real-data run: `focused: searchinput`); after the client-side click on the magnifier it is not checked,
  793. and not on a real phone.
  794. ## 2026-10-01 — ticket #15 (mission 052, worktree tracker-wt15, branch t15-tvmaze): TVmaze merge in the sync
  795. **Built**: `tmdbsync.hl` `mergeTvmaze` (after the TMDB step, series with a tvmzId): `GET /shows/<tvmzId>/episodes`, by
  796. S/E number: ADD missing episodes/seasons, FILL empty/placeholder titles + empty air dates; never overwrites a TMDB
  797. value; TMDB's own placeholder ("Episode 4") no longer overwrites a real title; TMDB later adopts TVmaze rows by
  798. number. `numberingAgrees` skips shows TVmaze numbers differently (≥ 80 % of shared S/E within 1 day or same title).
  799. Details: README "What it does (step 15)". Tool line + totals: `tvmazeEpisodes tvmazeSeasons tvmazeFilled tvmazeSkipped`.
  800. **Real data** (copy of Byrodin `storage/` 2026-10-01 ~07:00, deleted afterwards; procedure = ticket #8 below, server
  801. on :8739, `REAL_PORT=8739 REAL_CHROME=8738 REAL_OUT=/tmp/w052-tvmaze/real REAL_SHOW=/shows/The-Lord-of-the-Rings-The-Rings-of-Power node tests/realdata-check.mjs`):
  802. ```
  803. run 1: shows=126 newEpisodes=0 updatedEpisodes=0 requests=255 tvmazeRequests=126 errors=0 tvmazeEpisodes=0 tvmazeFilled=21 tvmazeSkipped=7 seconds=178.9
  804. run 2: updatedEpisodes=8 (Greek Salad "Épisode n" → "Episode n", after "Épisode" became a placeholder) tvmazeFilled=0 tvmazeSkipped=6 seconds=174.9
  805. run 3: all 0, tvmazeSkipped=6, seconds=169.9 (idempotent)
  806. ```
  807. Filled: Rings of Power S3E1–8 real titles (TMDB "Episode n", airs 2026-11), Last Week Tonight 8x26–30. No episode
  808. was missing on TMDB that day (tvmazeEpisodes=0) — the add path is proven by the gate only. Skipped (checked by hand,
  809. correct): Daily Show (TVmaze seasons by year), Star Trek: Prodigy + Blood & Treasure (shifted numbering), Alex Rider,
  810. Intergalactic, The Rising (other premiere dates + placeholder titles). Loads (390 / 1280): /my/shows 1.51 / 0.26 s,
  811. /my/unwatched 1.46 / 1.41 s, /my/schedule 0.36 / 0.29 s, Rings of Power 0.13 / 0.13 s direct, 0 console problems.
  812. Screenshots `/tmp/w052-tvmaze/real/*.png` on Loreana (looked at), logs `sync{1,2,3}.log`, `skipped*.txt`, `filled.txt`.
  813. **Gate** (111 → 117 checks):
  814. ```
  815. TRACKER_GATE_SHOTS=/tmp/w052-tvmaze/shots TRACKER_GATE_PORT=8732 TRACKER_GATE_IDENT_PORT=8733 TRACKER_GATE_CHROME=8734-8737 TRACKER_GATE_TMDB_PORT=8738 node tests/browser.mjs
  816. 117 passed, 0 failed
  817. ```
  818. Screenshots `tvmaze-{schedule,show}-{390,1280}.png` looked at.
  819. **Open**: adds a new TVmaze-only episode on real data not yet seen live; the daily run takes ~70 s longer (1 TVmaze
  820. request/series). Shows skipped by the numbering check get no TVmaze help (by design).
  821. ## 2026-10-01 — ticket #13 (mission 050): homepage, /movies, /shows, /my/movies
  822. **Built**: `/` (`components/home.hl`): signed in 4 icon tiles → `/my/unwatched` `/my/schedule` `/my/shows` `/my/movies`;
  823. for everyone the text, "Movies" (→ `/movies`, 10 latest RELEASED movies) and "Shows" (→ `/shows`, 10 series by newest
  824. released episode) as poster rows (phone: sideways scroll inside the row; ≥ 40rem grid of 5). `/movies`, `/shows`
  825. (`components/movies.hl`, `allshows.hl` → shared `components/tilelist.hl`): all, 24 per page, pagination =
  826. components.hybriel `pagination.hl` copied verbatim (4b4dabe). `/my/movies` (`components/mymovies.hl`); `/my/shows` is
  827. series only now. `catalog.hl`: lists built once at start, `refreshCatalogShow` after each synced show (`project.hl`
  828. `syncTick`), day roll on first read of a new day. `follows.hl` `insertByFollowDesc` (moved from myshows.hl),
  829. `shows.hl` `allShows`/`allEpisodes`.
  830. **Decisions**: page in the PATH (`/movies/page/2`), not `?page=2` as the mission said — a component can't read the
  831. query (hybriel#11) and Back drops it (hl:web `popstate` uses `location.pathname`), so `?page` would mean full reloads +
  832. Back to page 1. Pagination click → host: the copied component has no data out (hybriel#87 ruling: a passed function),
  833. so a `pager-box { on click }` around it reads the button text — no edit of the copy. One page → no pagination.
  834. /movies = ALL movies incl. future-dated (first) and undated (last); the homepage row only released ones. Series without
  835. a released episode come after the others, by their own `release`. Home text says episodes come from TMDB (TVmaze is
  836. only used for ids — the mission's "TMDB/TVmaze" would be wrong). Sign-in hint only when signed out.
  837. **Real data** (copy of Byrodin `storage/` 2026-10-01 ~06:45, deleted; `az5b2`, :8730, procedure = ticket #8 below; the
  838. session file needs `created`/`seen` = now in ms, `1` is swept at boot): boot → first answer 1.47 s (catalog build).
  839. Server time (curl) 5–7 ms for `/`, `/movies`, `/movies/page/200`, `/shows`, `/shows/page/30`, `/my/movies`. Full load
  840. in a FRESH Chrome per page (document + modules + socket + every poster in view), signed in / out:
  841. | page | 390 in / out | 1280 in / out |
  842. |---|---|---|
  843. | `/` | 1.11 / 1.34 s | 1.13 / 1.29 s |
  844. | `/movies` | 0.30 / 0.91 s | 0.57 / 0.57 s |
  845. | `/movies/page/2` | 0.53 / 0.63 s | 1.31 / 0.50 s |
  846. | `/shows` (24 real posters) | 1.07 / 1.36 s | 1.37 / 1.11 s |
  847. | `/my/movies` | 0.80 / 0.66 s | 0.83 / 0.58 s |
  848. Same Chrome (`node tests/realdata-check.mjs`): `/movies`, `/shows`, `/my/movies` 0.04–0.45 s; a page change by the
  849. pagination 60–75 ms (client-side); Back works; no sideways scroll; 0 console problems. `refreshCatalogShow` for all
  850. 126 followed shows: 0.31 s (SNL 23 ms). Screenshots `/tmp/w050/real/*-{390,1280}.png` (looked at). Not mine but seen:
  851. `/my/unwatched` 1.47–1.64 s (1594 rows), `/my/shows` 1.25 s cold at 390.
  852. **Gate** (111 → 135 checks):
  853. ```
  854. TRACKER_GATE_SHOTS=/tmp/w050/shots TRACKER_GATE_PORT=8720 TRACKER_GATE_IDENT_PORT=8721 TRACKER_GATE_CHROME=8722-8726 TRACKER_GATE_TMDB_PORT=8727 node tests/browser.mjs
  855. (in-app run 5.415 s; 11 pages asked during it, slowest 1433 ms)
  856. 135 passed, 0 failed
  857. ```
  858. **Session-sync double rows** (team lead: since hybriel 64527baa every face taking `session` also syncs the members derived
  859. from session; a handler that ALSO appends the returned row shows it twice): checked — no tracker handler appends, every
  860. one assigns the whole list (`rows = r.rows`) or a flag; the new #13 pages have no faces. 4 gate checks "row appears
  861. once" (exact count + unique button values, 400 ms after the face for a late sync): /my/unwatched click, show page
  862. expand, episode click, Follow toggles.
  863. Changed existing checks: the three "page stays empty" (now home content), the in-app run expects `newEpisodes=2` (the
  864. fake TMDB adds a released episode to show 2 too, to prove the in-process re-sort). Screenshots `/tmp/w050/shots/`
  865. (home, movies, movies-page-2, shows-list, my-movies at 390/1280 — looked at).
  866. **Open**: (1) **adult titles** — the migrated movie table has many porn titles (e.g. on /movies page 1 and 4); they
  867. are on the public homepage and /movies. No `adult` flag stored; the creator/architect decides (filter via TMDB `adult`,
  868. hide unfollowed movies, …). (2) Movie posters: only followed shows/movies have real posters → nearly every movie tile is
  869. the placeholder until the sync covers more. (3) If `?page=N` links are wanted anyway, that needs hybriel#11's query
  870. half. (4) Real-phone check after deploy.
  871. ## 2026-10-01 — ticket #12 (mission 049): link icons to TMDB, IMDb, TheTVDB, TVmaze
  872. **Built**: show page header badges `TMDB` `IMDb` `TVDB` `TVmaze` (`components/show.hl` `linkRows`, `shows.hl`
  873. `externalLinksOf`, `styles.hl` `showLinks`/`a.extlink`: CSS-only monochrome badges, accent on hover), only for ids the
  874. show has, `target=_blank rel=noopener`; a movie: TMDB (`/movie/<id>`) + IMDb. Phone: between title row and poster;
  875. desktop: under the title. Sync (`tmdbsync.hl`): details request now `?append_to_response=external_ids` (no extra
  876. request) → fills a MISSING imdbId/tvdbId; still no tvmzId → TVmaze `lookup/shows?imdb=`, on 404 `?thetvdb=` (550 ms
  877. pause each, `pauseMsAfter` in both runners); never overwrites. Totals: `ids=`, `tvmazeRequests=`. New
  878. `tools/count-external-ids.hl` (copy only).
  879. **Bug found + fixed**: movies (`type = 'movie'`, 7814 rows, 1 followed: Star Trek: First Contact, tmdbId 199) were
  880. synced as `/tv/199` — another title. Now `/movie/<id>?append_to_response=external_ids`: imdbId + poster only.
  881. **Live data still carries the damage**: that record has `status = 'Ended'` and `tmdbSummary` = the overview of TV
  882. show 199 ("Kabuhayang Swak na Swak…") — not visible (the page shows `summary`), the new sync leaves both alone; a
  883. one-off fix (set `tmdbSummary = null`, `status` back) is the architect's call.
  884. **Decisions**: TheTVDB link = `https://thetvdb.com/dereferrer/series/<id>` (it and `?tab=series&id=` both 301 to the
  885. slug page, checked 2026-10-01); IMDb `/title/<tt>/`; TVmaze `www.tvmaze.com/shows/<id>`. Badges with text, not
  886. drawn pictograms (no logos copied; legible at 0.75rem). An imdb id is only taken as `tt`+digits, a tvdb/TVmaze id
  887. only as a number > 0. A show TVmaze doesn't know is asked again each daily run (2 lookups/day on real data).
  888. **Real data** (copy of Byrodin `storage/` 2026-10-01 ~06:20, deleted afterwards; `tools/count-external-ids.hl`):
  889. | | shows | tmdbId | imdbId | tvdbId | tvmzId |
  890. |---|---|---|---|---|---|
  891. | followed series, before → after 1 sync | 125 | 125 | 125 | 125 | 123 → **124** |
  892. | followed movie | 1 | 1 | 1 | – | – |
  893. | all series (only followed are synced) | 1639 | 1639 | 907 | 910 | 845 → 846 |
  894. | all movies | 7814 | 7814 | 379 | – | – |
  895. Sync: `shows=126 newSeasons=0 newEpisodes=0 updatedEpisodes=0 updatedSeasons=0 posters=1 ids=1 requests=256
  896. tvmazeRequests=4 errors=0 seconds=105.6` (poster = the movie's real one; id = Greek Salad tvmz 60613; Mapping the
  897. World: TVmaze knows neither tt0395050 nor tvdb 109331). TMDB's external ids match ALL 125 stored imdb/tvdb ids (0
  898. differ). Show pages (az5b2, :8730): Librarians 1.08 s cold / 0.13 s, Greek Salad 0.18 s, Star Trek: First Contact
  899. 0.13 s (TMDB movie/199 + IMDb, real poster now); no sideways scroll, 0 console problems. Screenshots
  900. `/tmp/w049/real/*-{390,1280}.png` (looked at). Procedure = ticket #8 below (sync tool with `.env` sourced).
  901. **Gate** (101 → 111 checks):
  902. ```
  903. TRACKER_GATE_SHOTS=/tmp/w049/shots TRACKER_GATE_PORT=8720 TRACKER_GATE_IDENT_PORT=8721 TRACKER_GATE_CHROME=8722-8726 TRACKER_GATE_TMDB_PORT=8727 node tests/browser.mjs
  904. (in-app run 5.416 s; 12 pages asked during it, slowest 1323 ms)
  905. 111 passed, 0 failed
  906. ```
  907. Fixture: show 1 imdb `tt0000001` only (TMDB says tt9999999 + tvdb 4001), show 2 tvdb `4002` only (TMDB: tt0000002 +
  908. 4999), movie `gate-test-movie` (tmdb 1003, followed by a 2nd user so alice's lists are unchanged → the sync now has
  909. 3 shows). Fake TVmaze: imdb tt0000001 → 501, thetvdb 4002 → 502. Screenshots `/tmp/w049/shots/` (show-*, synced-show
  910. {,-390}, synced-movie{,-390} looked at). The new-tab check closes the tab at once (it would load the real site).
  911. **Open**: real-phone tap test after deploy (new tab). Star Trek: First Contact's wrong `tmdbSummary`/`status`
  912. (above). Unfollowed shows never get ids filled (sync covers followed only, by design).
  913. ## 2026-10-01 — mission 047: re-vendor Hybriel (invisible checks), mobile first, show page additions
  914. **Bug** (live, the creator: "i dont see the check marks"): after a CLIENT-SIDE navigation (and after expand/collapse
  915. or a check click) the check `<svg>` was built in the XHTML namespace (circle width 0). Fixed by **re-vendoring Hybriel
  916. master ff51cf46** (bin sha256 `55a724a0…c5`, README "Vendored Hybriel"; old bin/plugins in `.scratch/pre-047/`).
  917. Proof the new check fails on the old build: `/tmp/w047/old-build-gate.log` (`ns: http://www.w3.org/1999/xhtml,
  918. circleWidth: 0`), passes on the new one.
  919. **Built**: `styles.hl` mobile first (phone base rules, one `@media (min-width: 40rem)` block; header one row at
  920. 390 px; /my/unwatched + /my/schedule rows two-line on a phone). Show page: phone order title (+ Follow) → full-width
  921. poster → genres/plot/cast (desktop unchanged); season caret (down/right); episodes not indented; artists orange
  922. `#ce9178`; unwatched check = accent outline circle + accent check; **Follow toggle** (face `showToggleFollow`,
  923. `follows.hl` `isFollowing`/`setFollowed`: new record `at = now`, unfollow deletes); signed out checks + Follow visible,
  924. a click opens the sign-in modal (`components/modal.hl`, copied verbatim from components.hybriel becbd59), nothing sent.
  925. Session-sync workaround in show/myshows/unwatched/schedule: `rows` reads `me` (a plain copy of `userId`), and
  926. `following` goes through a LOCAL static `followingOf` — an imported mpackdb helper called directly in a member
  927. initializer came back false after a client-side navigation (gate caught it; not reduced to a minimal repro yet).
  928. **Duplicate @ids** (hybriel#113) on a copy of live storage (2026-10-01 04:13), `tools/count-duplicate-ids.hl` + the
  929. `*.id.txt` indexes: **0 in every table** (episodes 232384, follows 128, genres 27, persons 15157, seasons 6450, shows
  930. 9453, users 1, watches 11663 rows).
  931. **Real data** (copy, `az5b2`, :8730, `node tests/realdata-check.mjs`, full load incl. socket + posters):
  932. | page | 390 px | 1280 px |
  933. |---|---|---|
  934. | `/my/shows` (128) | 1.29 s (cold posters) | 0.24 s |
  935. | `/my/unwatched` (1594) | 1.51 s | 1.46 s |
  936. | `/my/schedule` (54) | 0.35 s | 0.32 s |
  937. | `/shows/The-Librarians-The-Next-Chapter` direct / client-side | 0.14 / 0.19 s | 0.13 / 0.18 s |
  938. Client-side nav, expand, collapse: 14/26/14 checks, 0 wrong namespace, 0 undrawn; header 46 px at 390, no sideways
  939. scroll. Screenshots `/tmp/w047/real/*.png` (looked at). Procedure = ticket #8 below; the session id goes in
  940. `.scratch/real-sid` (the script reads it); copy + sessions deleted afterwards.
  941. **Gate** (76 → 101 checks):
  942. ```
  943. TRACKER_GATE_SHOTS=/tmp/w047/shots TRACKER_GATE_PORT=8720 TRACKER_GATE_IDENT_PORT=8721 TRACKER_GATE_CHROME=8722-8726 TRACKER_GATE_TMDB_PORT=8727 node tests/browser.mjs
  944. 101 passed, 0 failed
  945. ```
  946. Screenshots `/tmp/w047/shots/` ({home,show,my-*}-{390,1280}.png, signed-out-modal-1280.png) — looked at.
  947. Gate note: the follow test re-follows show 1, so the sync's request order between the two shows may flip (the check
  948. accepts both orders) and `/my/shows` after the sync has show 1 on top.
  949. **Open**: the phone poster at full width is tall (2:3 → ~550 px on a 390 phone) — as asked, the creator may want a cap.
  950. The unwatched (outline + check) and watched (filled) icons differ only by fill — as asked. No navigation links to
  951. the `/my/` pages yet. Real-phone check after deploy.
  952. ## 2026-10-01 — ticket #10: installable app (PWA) + icons
  953. **Built**: `icons/` (`icon.svg` source → `icon-192.png`, `icon-512.png`, `apple-touch-icon.png` 180; `favicon.svg`,
  954. `favicon.ico` 16/32/48 — rsvg-convert + magick, commands in README "What it does (step 10)"); `project.hl`:
  955. `appIcons` (192/512 × any/maskable, like calendar), `appTouchIcon`, `appFavicon`, `appThemeColor = darker.value`,
  956. `appBackgroundColor = dark.value` (tokens), `offline = [ Home ]`, file routes for the icons, `/favicon.ico` now a
  957. real file (was `direct = ""`); `components/main.hl` offline note + `netProbe` tick; `styles.hl` `offlineNote`,
  958. `netProbe`, `@keyframes tracker-net-tick`; gate +12 checks.
  959. **Decisions**: icon = a TV (antennas) with a check mark on the screen = "watched shows", green `#4ec9b0` on
  960. rgb(25,30,35), all inside the maskable safe zone so one PNG serves any + maskable. Theme colour = `darker` (the header
  961. bar, so the phone's status bar blends in), background = `dark`. Offline keeps only the shell/`/`; data pages get
  962. hl:web's "Unavailable offline". The offline note is driven by `navigator.onLine`, read on a 1 s CSS-animation tick
  963. (`animationiteration`) — hl:web has no connection-state member and no mount hook (reported as a Hybriel gap).
  964. **Gate** (64 → 76 checks):
  965. ```
  966. TRACKER_GATE_SHOTS=/tmp/w045/shots TRACKER_GATE_PORT=8720 TRACKER_GATE_IDENT_PORT=8721 TRACKER_GATE_CHROME=8722-8726 TRACKER_GATE_TMDB_PORT=8727 node tests/browser.mjs
  967. 76 passed, 0 failed
  968. ```
  969. Looked at: `/tmp/w045/icon-48.png`, `icon-192.png`, `icon-512.png`, `maskable-circle.png`, `small-on-white.png`
  970. (favicon 16/32/48), `/tmp/w045/shots/pwa-phone-{online,offline}.png` (390 px) on Loreana.
  971. Test gotcha: CDP `setOffline` only cuts the TAB — the service worker's own fetches still reach the server, so the
  972. gate also stops the server before the offline reload.
  973. **Open**: offline, the header's `<ident-selector>` (script from ident's origin, not cached) shows "choose ident"
  974. next to "Log out". No note when the device is online but the server is down. Real-phone install test (ticket's
  975. **Test**) after deploy: open https://tracker.worldapi.org → "Add to home screen".
  976. ## 2026-10-01 — ticket #9: TMDB sync (new episodes + posters)
  977. **Built**: `tmdbsync.hl` (`syncShow`: details + ≤ 20 seasons per request via `append_to_response`, add/update
  978. seasons+episodes, poster w342), `tools/sync-tmdb.hl` (`--limit N`, paced, prints counts), the daily run in
  979. `project.hl` (`syncTick` on an hl:time `every(1)` clock: at `TRACKER_SYNC_HOUR` UTC (4), once a day, ONE show
  980. per tick, next show after n × 260 ms), `follows.hl` `allFollowedShowIds`, fake TMDB `tests/faketmdb.mjs`,
  981. fixture shows got tmdbIds 1001/1002. Details: README "What it does (step 9)".
  982. **Decisions**: match episode by tmdbId, else by S/E when the local one has no tmdbId (161 migrated); season by
  983. number. Empty TMDB values never overwrite. Season 0 only if the show already has one (else specials flood
  984. /my/unwatched); empty TMDB seasons not created. Own 16-hex ids for new rows (hybriel#113). Posters in
  985. `storage/mpackdb/posters/` (the folder the existing `/posters/:name` route reads — inside `storage/`, so in the
  986. backup) rather than a new `storage/posters/`. Shows synced = all followed (also Ended ones — updates happen).
  987. Sync is off without `TMDB_READ_TOKEN` or with `TRACKER_SYNC=0`.
  988. **Blocking**: `fetch()` blocks the whole hl:web process (measured: requests wait for the running step) — so the
  989. run is cut into one-show steps. Real data: ~0.7 s per step average, SNL (53 seasons, 4 requests) 1.7 s; persist
  990. of the 3 tables 36 ms.
  991. **Real-data proof** (copy of Byrodin's `storage/` in `.scratch/realdata/`, deleted afterwards; procedure as
  992. ticket #8 below; session file needs `created`/`seen` = now in ms, else the boot sweep deletes it):
  993. ```
  994. set -a; . ./.env; set +a
  995. TRACKER_STORAGE=$PWD/.scratch/realdata/storage/mpackdb ./bin/hybriel tools/sync-tmdb.hl --limit 128
  996. tmdb sync done: shows=126 newSeasons=20 newEpisodes=800 updatedEpisodes=2651 updatedSeasons=174 posters=125 requests=380 errors=0 seconds=185.718
  997. (again) shows=126 newSeasons=0 newEpisodes=0 updatedEpisodes=0 updatedSeasons=0 posters=0 requests=255 errors=0 seconds=89.888
  998. ```
  999. Fresh-process recount: seasons 6430 → 6450, episodes 231584 → 232384 (exactly +20/+800, no row loss), 0
  1000. dangling season/episode refs, 0 duplicate season numbers; 12 duplicate tmdbIds + 1 wrong parent were already in
  1001. the migrated data (same before/after). 126 shows (128 follows), 125 posters (one show has none on TMDB).
  1002. In-app daily run on the copy (TRACKER_SYNC_HOUR = current hour, real TMDB): 126 shows, 255 requests, 136 s,
  1003. 0 errors; `/my/shows` (signed in) polled every 0.5 s meanwhile: 181 answers, avg 0.25 s, max 4.0 s (one), then
  1004. 1.8/1.7/1.4 s. Full page loads after the sync (headless Chrome, load + socket + all images):
  1005. | page | full load | rows |
  1006. |---|---|---|
  1007. | `/my/schedule` | 0.7–0.8 s | 55 (was 0) |
  1008. | `/my/shows` | 1.3–1.55 s (128 real posters now, 1 placeholder) | 128 |
  1009. | `/my/unwatched` | 1.5 s (server 1.3 s) | 1593 (was 831) |
  1010. | `/shows/The-Librarians-The-Next-Chapter` | 0.33 s | poster + new S2 (12 eps) |
  1011. Screenshots + logs: `/tmp/w044-real/` on Loreana (`after-*.png`, `real-sync{1,2}.log`, `real-lat.txt`).
  1012. **Gate** (49 → 64 checks):
  1013. ```
  1014. TRACKER_GATE_SHOTS=/tmp/w044-shots TRACKER_GATE_PORT=8720 TRACKER_GATE_IDENT_PORT=8721 TRACKER_GATE_CHROME=8722-8726 TRACKER_GATE_TMDB_PORT=8727 node tests/browser.mjs
  1015. (in-app run 4.405 s; 10 pages asked during it, slowest 1371 ms)
  1016. 64 passed, 0 failed
  1017. ```
  1018. Screenshots `/tmp/w044-shots/` (`synced-*.png` looked at: posters, S3, schedule rows fine).
  1019. **Deploy (architect)**: `TMDB_READ_TOKEN` must be in Byrodin's `.env` (env_file) — without it the log says
  1020. `tmdb sync: off (no TMDB_READ_TOKEN)`. First daily run 04:00 UTC after deploy; check `docker logs
  1021. tracker.worldapi.org | grep tmdb`. Or stop the container and run the tool once for an immediate catch-up.
  1022. **Open**: a step blocks requests up to ~2 s (a non-blocking `fetchStart` + `done()` state machine would fix it).
  1023. `/my/unwatched` render grew with the rows (1.3 s server, 1593 rows) — watch it against the 2 s target. A season
  1024. watch record stays solid when the sync adds a new episode to that season (existing season-watch semantics).
  1025. Dev servers get the real token from `.env` automatically → start them with `TRACKER_SYNC=0`. Shows nobody
  1026. follows are never synced (by design).
  1027. ## 2026-09-30 — ticket #8: /my/ pages, S01E01, years, speed
  1028. **Built**: `/my/unwatched`, `/my/schedule` (routes in `project.hl`); old `/unwatched`, `/schedule` →
  1029. **301** (function routes `unwatchedMoved`/`scheduleMoved`). Rows as `S01E02 · <title>` (was
  1030. `Ep 2 · …`), list titles with the year `Doctor Who (2005)`, show page `1 episode` singular.
  1031. New shared helpers in `shows.hl`: `pad2`, `episodeCode`, `showYear`, `titleWithYear`,
  1032. `posterUrlOf`; in `watches.hl`: `watchedSet` (used by `/my/unwatched` and the show page's
  1033. `buildRows`; `isWatched` stays for the single-target toggles).
  1034. **Decisions**: year = `year`, else `release.slice(0,4)`, else none (197 shows lack `year`, some
  1035. have `release = ''`). Year only in LISTS (`/my/*`), not in the show page's `h1`. The 301 drops any
  1036. query (the pages take none). A row whose poster FILE is missing gets `/posters/none` (one cached
  1037. URL) instead of `/posters/<oldId>.jpg`.
  1038. **Why /my/shows was ~25 s live though its data is 0.2 s**: hl:web handles ONE request at a time.
  1039. Measured on the copy: `/my/shows` requested 1 s into a `/unwatched` render took 13.7 s (the
  1040. `/unwatched` render itself 14.5 s). Every request (pages, 128 poster requests) of every visitor
  1041. queued behind a slow `/unwatched`. Plus 128 distinct poster URLs per load, all the placeholder.
  1042. **Real-data check** (copy of Byrodin's `storage/` only, `az5b2` = user `0mujqspn0aqb`, dev
  1043. server :8730, headless Chrome, navigate → load → websocket open, 1280×900):
  1044. | page | before | after |
  1045. |---|---|---|
  1046. | `/my/shows` (128 rows) | 1.2 s (server 0.19 s) | 0.6–0.8 s, 1 poster request |
  1047. | `/unwatched` → `/my/unwatched` (831 rows) | 14.8 s | 0.7–1.2 s (server 0.55–0.65 s) |
  1048. | `/schedule` → `/my/schedule` (0 rows, data not synced since 2025-12) | 0.36 s | 0.3 s |
  1049. | `/shows/The-Librarians-The-Next-Chapter` | 0.34 s | 0.29 s |
  1050. How to repeat (Loreana; never touch Byrodin's folder beyond the tar read):
  1051. ```
  1052. ssh [email protected] 'tar czf - -C /CONTAINERS/projects/tracker.worldapi.org storage' | tar xzf - -C .scratch/realdata # ONLY storage/
  1053. TRACKER_PORT=8730 TRACKER_WATCH=0 TRACKER_STORAGE=$PWD/.scratch/realdata/storage/mpackdb TRACKER_SESSIONS=$PWD/.scratch/realdata-sessions/ ./bin/hybriel project.hl
  1054. # session file: name = sha256(<32-hex id>), JSON {"created":1,"data":{"tag":"t"},"id":"<id>","seen":1,"user":{"id":"0mujqspn0aqb"}}
  1055. curl -s -o /dev/null -w '%{time_total}\n' -b trackersid=<id> http://127.0.0.1:8730/my/unwatched
  1056. # Chrome: tests/cdp.mjs launchBrowser, Network.setCookie trackersid, goto + wait __hl.socket open
  1057. # afterwards: stop the server, rm -rf .scratch/realdata .scratch/realdata-sessions
  1058. ```
  1059. Screenshots: `/tmp/w041-real/{before,after}-{shows,unwatched,schedule,show}.png` (Loreana).
  1060. **Gate** (45 → 49 checks: two 301s, the browser landing on `/my/unwatched`, "1 episode"; the
  1061. existing ones now expect `/my/…`, `S01E02 · Second`, `S02E01 · Season Two Opener`, titles with
  1062. year, `/posters/sh1.png` + `/posters/none`). Fixture: show 1 `image = 'png'` (gate writes a 1×1
  1063. `posters/sh1.png`), show 2 `year = null`, `release = '2025-03-01'`.
  1064. ```
  1065. TRACKER_GATE_SHOTS=/tmp/w041-shots TRACKER_GATE_PORT=8720 TRACKER_GATE_IDENT_PORT=8721 TRACKER_GATE_CHROME=8722-8726 node tests/browser.mjs
  1066. 49 passed, 0 failed
  1067. ```
  1068. Screenshots `/tmp/w041-shots/` (looked at: all fine).
  1069. **Open**: `/my/unwatched` rebuilds all rows per check click (~0.6 s, fine). Still no navigation
  1070. to the `/my/` pages. The single-request server means any future slow page blocks everyone —
  1071. keep every page well under 1 s. `/my/schedule` stays empty until the TMDB sync step.
  1072. ## 2026-09-30 — ticket #7: /my/shows
  1073. Built `/my/shows` (`components/myshows.hl`, route in `project.hl`, styles in `styles.hl`): every
  1074. followed show, newest follow (`follows.at`, epoch ms) first — small poster (2.5rem, `/posters/…` +
  1075. placeholder like the show page), title → `/shows/<slug>`, last watched episode `SxxEyy`.
  1076. **Decisions**: "last episode" = highest (season, episode) among the user's EPISODE watches of that
  1077. show (ticket); a season watch alone doesn't count (the season check watches every episode anyway).
  1078. No watch → no episode element. A show without a poster name → `/posters/none` (the route's own
  1079. placeholder), so every row has a poster. Read-only page, no face (like `/schedule`).
  1080. **Reuse**: new `follows.hl` `followsOfUser` (whole records; `followedShowIds` now builds on it) and
  1081. `shows.hl` `episodeById` (one line); `showById`, `posterName`, `watchesOfUser` unchanged.
  1082. **Performance** (against a COPY of `storage/mpackdb/` in `.scratch/perf-store`, removed after; live
  1083. files md5-verified unchanged): the page touches only the user's follows and episode watches
  1084. (one fetch per watch), never all episodes of a followed show — az5b2's 128 follows → 128 rows (123
  1085. with an episode, e.g. `S36E11`, `S30E91`) built in **160–255 ms**. For comparison **`/unwatched`
  1086. takes ~15 s** on the same copy (805 rows): it fetches every episode of every followed show and
  1087. checks each against the user's 11,692 watches with a linear `isWatched` — not in this ticket's
  1088. scope, flagged below.
  1089. **Gate** (`tests/browser.mjs`, 38 → 45 checks; `tests/seed-show.hl` adds a 2nd show "Unwatched Gate
  1090. Show", no seasons/poster name, followed AFTER the first but stored after it; the first follow is now
  1091. dated a day back): signed out → sign-in message; signed in → newest follow first, title hrefs,
  1092. posters loaded (`naturalWidth > 0`), 40px wide, `S01E02` after /unwatched's click, later `S02E01`
  1093. (watched BEFORE season 1's bulk watch → proves highest, not most recent), none for the other show.
  1094. ```
  1095. TRACKER_GATE_PORT=8720 TRACKER_GATE_IDENT_PORT=8721 TRACKER_GATE_CHROME=8722-8726 node tests/browser.mjs
  1096. 45 passed, 0 failed
  1097. ```
  1098. **Open**: `/unwatched` ~15 s on real data (above) — a watched-id map instead of `isWatched` per
  1099. episode would fix it (own ticket). No navigation links to `/my/shows` yet (homepage stays empty).
  1100. ## 2026-09-27 — ticket #6: /schedule
  1101. Built `/schedule` (`components/schedule.hl`): every episode of a show the signed-in user follows
  1102. that is NOT yet released (`e.release > today`), soonest first. Creator: "/schedule has a similar
  1103. list without check icons for the upcoming episodes of shows followed" — same row shape as
  1104. `/unwatched` (`components/unwatched.hl`) minus the check icon.
  1105. **Reuse, not copy**: imports the exact same `followedShowIds` (`follows.hl`), `showById` /
  1106. `seasonsOfShow` / `episodesOfSeason` (`shows.hl`) that `/unwatched` already uses — nothing new
  1107. added to either file. `watches.hl` is not imported at all: a row here is never watched/unwatched,
  1108. there is no check icon and no click, so the page needed no per-user watch state and no `on server`
  1109. face — the whole component is a single read-only server-side render (`rows` computed once from
  1110. `session`, same as every other reactive member here).
  1111. **Order**: soonest first, ascending by `release` (a plain `'YYYY-MM-DD'` string, ordering
  1112. operators confirmed working against this app's own vendored `bin/hybriel`, same as `/unwatched`'s
  1113. STATUS entry) — the ticket named this the architect's own reading ("the creator named the order
  1114. only for /unwatched"), so `insertByReleaseAsc` mirrors `/unwatched`'s `insertByReleaseDesc` with
  1115. the comparison flipped.
  1116. **`decided`**: "upcoming" = `release` strictly after today (not `>=`) — the natural complement of
  1117. `/unwatched`'s own `release <= today`, so every released-or-today episode is unambiguously on one
  1118. list, never both, never neither.
  1119. **Gate** (`tests/browser.mjs`, 35 → 38 checks): reused the same fixture (`tests/seed-show.hl`,
  1120. unchanged) — episode 3 already carried a far-future release (`2099-01-01`) for `/unwatched`'s own
  1121. "excludes the future one" check; `/schedule` now proves the mirror image with the same fixture:
  1122. signed out, no rows, the sign-in message; signed in, only that one future episode shows (the two
  1123. already-released ones excluded), no `button.checkicon` anywhere on the page, unaffected by any of
  1124. the watch toggles the other checks perform on the same fixture (run in any order — `/schedule`
  1125. never reads watch state).
  1126. ```
  1127. node tests/browser.mjs
  1128. 38 passed, 0 failed
  1129. ps -eo pid,args | grep [h]l-browser-tier
  1130. (nothing)
  1131. ```
  1132. Updated `README.md` ("What it does (step 6)", Test, Files) and this file.
  1133. **Open**: nothing shown on the homepage still points to `/schedule` (same as `/unwatched` before
  1134. it — the homepage stays empty per ticket #1's decision).
  1135. ## 2026-09-27 — ticket #5: /unwatched
  1136. Built `/unwatched`: every episode of a show the signed-in user follows that is already released
  1137. (`release` ≤ today, a plain `'YYYY-MM-DD'` string — migrated as-is by `tools/migrate.hl`, never
  1138. run through `dateOf`) and not yet watched, newest release first (creator: "/unwatched lists all
  1139. unwatched episodes of shows followed in release date desc order").
  1140. **Reuse, not copy** (the ticket's own instruction, re "the same check icon and watch logic as the
  1141. show page"): `watchClassOf` (watched → `'checkicon solid'`/`'checkicon regular'`) was a private
  1142. `static` in `components/show.hl`; moved it to `watches.hl` so both pages import the SAME
  1143. definition instead of each declaring their own — `show.hl` now imports it too, nothing duplicated.
  1144. `isWatched`/`setWatched` (already in `watches.hl`) needed no change. New `follows.hl`
  1145. (`followedShowIds`) and `shows.hl` `showById` (one line) round out the read-only data access this
  1146. page and `/schedule` (ticket #6) both need.
  1147. **String comparison** (`e.release <= today`, `row.release >= x.release` for the desc sort):
  1148. hybriel#2 ("no ordering operators on strings") is filed as still-open in this ticket's brief, but
  1149. its own history shows it was fixed and merged to master 2026-09-25 — confirmed directly against
  1150. THIS app's own vendored `bin/hybriel` (`'2020-09-03' <= '2026-09-27'` → `true`), so no numeric
  1151. date workaround was needed.
  1152. **A View text node cannot hold an inline expression** (`"Ep " + row.episodeNumber + " · " +
  1153. row.title` inside a tag body) — same rule as View attributes (components/show.hl's own comment:
  1154. "a View attribute must be a literal, a member or a field path"), just not documented for text
  1155. nodes anywhere yet; it silently rendered `<!-- binary_expression not rendered yet -->` instead of
  1156. erroring. Fixed by resolving the label into a plain field (`row.episodeLabel`) once, server-side,
  1157. in `unwatchedRowsOf` — the same pattern `show.hl`'s `buildRows` already uses for every other
  1158. ternary/concatenation. Not filed as a new Hybriel gap since it's the exact same restriction
  1159. already known and worked around elsewhere in this app, just not yet hit for interpolated text.
  1160. **Empty state**: signed out (no user, so no follows to show) and signed in with nothing unwatched
  1161. both render a message; used `.muted` (colorTextMuted), not `.message` (colorDanger) — the existing
  1162. `.message` class is for real errors (the login-failed banner), and an empty list isn't one (a
  1163. `decided`, small).
  1164. **Gate** (`tests/browser.mjs`, 29 → 35 checks): `tests/seed-show.hl` now takes an optional
  1165. `TRACKER_SEED_IDENTITY` and, when given, seeds a fixed user + a follow of the fixture show for it
  1166. — the only way to give `/unwatched` a known followed show before the browser ever signs in, since
  1167. the real login's `ensureUser` matches an EXISTING `users.db` row by `identity` and reuses its id
  1168. rather than minting a new one. The gate learns alice's per-app identity with one throwaway
  1169. `ident.exchange` call (consuming one code) before writing the seed. Episode 1/2 of the fixture now
  1170. carry a past `release` (`2020-01-01`/`2020-06-15`), episode 3 a far-future one (`2099-01-01`) —
  1171. proving both the release-date filter and the desc order. The new checks run signed out (no rows,
  1172. the sign-in message), then signed in RIGHT AFTER LOGIN, BEFORE the existing show-page checks that
  1173. toggle these same fixture episodes watched (order matters — otherwise `/unwatched` would already
  1174. be empty by the time it's tested): both unwatched episodes list newest-first, excluding the
  1175. future one; a click on the newest (`Second`, ep 2) removes it from the list; a reload proves the
  1176. watch is server-side, leaving only `Pilot` (ep 1).
  1177. ```
  1178. node tests/browser.mjs
  1179. 35 passed, 0 failed
  1180. ps -eo pid,args | grep [h]l-browser-tier
  1181. (nothing)
  1182. ```
  1183. Updated `README.md` ("What it does (step 5)", Test, Files) and this file.
  1184. **Open**: nothing shown on the homepage still points to `/unwatched` — no navigation exists yet
  1185. (the homepage stays empty per ticket #1's decision; a later step, from the creator, presumably
  1186. adds it). `/schedule` (ticket #6) is next and reuses `follows.hl`/`shows.hl`/`watches.hl` the same
  1187. way.
  1188. ## 2026-09-27 — ticket #4: the show page, watch checks (took over a previous half-done session)
  1189. Continued from an earlier session that had built the whole page — header, seasons/episodes,
  1190. the click-handling redesign to a flat `rows` list rebuilt server-side (`components/show.hl`'s
  1191. own header comment explains why: a nested `for` over seasons > episodes risks hybriel#86) — but
  1192. left with the gate red: clicking a check never turned it solid, no console error, and the
  1193. session ran out of budget before finding why.
  1194. **The actual bug**: the show page's own pure helpers (`buildRows`, `genreRowsOf`, `castRowsOf`,
  1195. `watchClassOf`, `initialCollapsed`) were plain instance members (`buildRows = (show, …) => {…}`,
  1196. no `static`). That shape works fine as a member's own top-level initializer (`rows = found ?
  1197. buildRows(showRow, watchRows, collapsed) : []` — this is how the page renders correctly on first
  1198. load) but throws when the SAME function is called from inside an `on server` face
  1199. (`showToggleEpisode` etc.): the server log showed `'buildRows' is not callable — it holds null`.
  1200. Found by running `.scratch/debug-click.mjs` (left by the previous session) with the server's
  1201. stdout/stderr captured — the browser console itself stayed silent (the face's error never
  1202. reaches the client at all, a separate Hybriel gap, hybriel#92 already covers that half).
  1203. Confirmed the fix by grepping other worldapi apps for the same shape:
  1204. `calendar.worldapi.org/components/calendar.hl` has `static soonOf = (u) => { … upcoming(u, …) }`
  1205. (an mpackdb-backed helper), called from its `on server calLoad`/`calSettingsLoad` faces, and
  1206. calendar's own gate is green — so `static` is the proven-safe shape for a component's own helper
  1207. that both (a) touches an mpackdb-backed import and (b) needs calling from more than one place
  1208. (its own initializer AND a later face). Declared all five helpers in `show.hl` `static`; reran
  1209. the gate: 29/29 green, including the season-bulk-toggle and the reload-proves-server-side checks.
  1210. Filed **hybriel#115 was already open** (from the previous session, about the CLIENT bundle
  1211. omitting a case for such a helper) but this session's finding is the SAME root cause reaching
  1212. further than that ticket says: the plain HL interpreter on the SERVER also treats such a helper
  1213. as `null` outside its own initializer, not just the JS-compiled client bundle. Left as one
  1214. `issues` entry pointing at hybriel#115 rather than opening a near-duplicate ticket — the
  1215. repro/observed there already generalizes (a per-instance member function wrapping an
  1216. mpackdb-backed import is unreliable wherever it is called from, not just the browser).
  1217. Ran `node tests/browser.mjs`: 29 passed, 0 failed (was 20 passed / 1 failed — the click timeout
  1218. — before the `static` fix).
  1219. **Rehearsed `tools/relink-episode-seasons.hl` against a full COPY** of the real
  1220. `storage/mpackdb/` (`.scratch/relink-rehearsal/`, since removed) — the tool's own header claimed
  1221. this rehearsal already existed here; it didn't (a leftover claim from the previous session), so
  1222. this session actually ran it:
  1223. ```
  1224. relink: episodes 231584, null season before 36194, linked 36194, still null (no matching season) 0
  1225. relink: episodes.db replaced with the relinked file — re-run to confirm idempotency (0 linked the second time)
  1226. ```
  1227. Ran a second time on the same copy straight after — idempotency confirmed:
  1228. ```
  1229. relink: episodes 231584, null season before 0, linked 0, still null (no matching season) 0
  1230. ```
  1231. All 36,194 pre-existing null-season episodes (ticket #2's count) now link to a real season by
  1232. `(show, seasonNumber)`; none left over. Not run against the LIVE `storage/mpackdb/` — that needs
  1233. the tracker container stopped first (hl:mpackdb does not coordinate two processes on one storage
  1234. directory, hybriel#21), the architect's job per the ticket ("the architect runs it live").
  1235. Updated README.md ("What it does (step 4)", Test, Files) and this file.
  1236. ## 2026-09-27 — ticket #2: old data migrated (took over a previous session's rewritten tool)
  1237. Continued from an earlier session that had rewritten `tools/migrate.hl` to avoid a real data-loss
  1238. bug (see below) but never run it even once, and had left the real `storage/mpackdb/` holding data
  1239. from the OLDER, buggy two-pass version of the tool (put a bare record, then `update()` it once the
  1240. other side of a circular reference existed). Took over: moved that buggy data aside
  1241. (`.scratch/pre-migrate-buggy-backup`, since removed), kept `storage/mpackdb/users.db` (step 1's
  1242. login table, untouched by the migration), and ran the already-fixed tool for the first time.
  1243. **The fix already on disk (kept as is):** `Show.seasons`/`Season.show` and `Show.cast`/
  1244. `Person.shows` are two-way references, so the id on one side must exist before the record on the
  1245. other side can be built. The old approach — `put()` a bare record, come back with `update()` once
  1246. the far side's id exists — loses rows: reopening a table in a fresh process after an `update()` had
  1247. touched it read back FEWER rows than were ever `put()` (seen directly: `persons.db`'s `count()`
  1248. dropped 15157 → 15152 after one round of `update()` — a real `hl:mpackdb` bug, reported to Hybriel,
  1249. not something an app is allowed to patch around). The fix assigns every new id itself (8 random
  1250. bytes, `hl:crypto`) in one pass over each export file BEFORE building any record, so by the time a
  1251. record is actually built every reference is already a known id — one `put()` per row, `update()`
  1252. never called.
  1253. **Run** (`tools/migrate.hl`, `TRACKER_OLD_DATA=.../old-tracker/mongo-export`,
  1254. `TRACKER_STORAGE=$PWD/storage/mpackdb`):
  1255. ```
  1256. migrate: genres 27 new, 0 already there (old 27 -> new 27)
  1257. migrate: persons 15157 new, 0 already there (old 15157 -> new 15157), show refs skipped 0
  1258. migrate: shows 9453 new, 0 already there (old 9453 -> new 9453), cast refs skipped 0, genre refs skipped 0, season refs skipped 0
  1259. migrate: seasons 6430 new, 0 already there (old 6430 -> new 6430), show refs skipped 0, episode refs skipped 0
  1260. migrate: episodes 231584 new, 0 already there (old 231584 -> new 231584), show refs skipped 0, season refs left null (pre-existing) 1
  1261. migrate: follows 128 new, 0 already there (old 128 -> new 128), show refs skipped 0
  1262. migrate: watches 11692 new, 0 already there (old 11692 -> new 11692), target refs left null (pre-existing) 3
  1263. migrate: 0 failed
  1264. ```
  1265. Every count equals the old export's own document count (`old-tracker/README-RECONSTRUCTED.md`:
  1266. Show 9453, Season 6430, Episode 231584, Person 15157, Genre 27, Follow 128, Watch 11692). Ran a
  1267. second time straight after (idempotency: the tool's `oldId` index finds each row again) — every
  1268. table printed `0 new`, all rows `already there`, counts unchanged, 0 failed: the id-loss bug does
  1269. not resurface across a real close-and-reopen.
  1270. **Proof beyond the tool's own counters** (`tools/verify.hl`, new): the ticket asks for a check that
  1271. does not just trust `migrate.hl`'s own "skipped" tallies. It runs against a plain filesystem COPY
  1272. of `storage/mpackdb/` (hl:mpackdb rewrites a file's data on open, so the live store is never opened
  1273. a second time) and independently re-derives, from the persisted records alone: every table's
  1274. `count()` against the export's own document count, and — by building id sets for every table and
  1275. walking every reference field (`Show.genres/cast/seasons`, `Season.show/episodes`,
  1276. `Episode.show/season`, `Person.shows`, `Follow.show/user`, `Watch.target/user`) — that every
  1277. non-null reference resolves to a real id. It also follows one show end to end (`Raised by Wolves`,
  1278. 2 seasons, 18 episodes, 1 follow, 2 season-level watches — all cross-checked back to the show).
  1279. ```
  1280. $ cp -r storage/mpackdb .scratch/verify-copy && TRACKER_VERIFY_COPY=$PWD/.scratch/verify-copy ./bin/hybriel tools/verify.hl
  1281. count ok genres: 27 (expected 27)
  1282. count ok persons: 15157 (expected 15157)
  1283. count ok shows: 9453 (expected 9453)
  1284. count ok seasons: 6430 (expected 6430)
  1285. count ok episodes: 231584 (expected 231584)
  1286. count ok follows: 128 (expected 128)
  1287. count ok watches: 11692 (expected 11692)
  1288. users: 1 (expected 1, the creator)
  1289. dangling references: 0 (episodes with a pre-existing null season: 36194, watches with a pre-existing null target: 3 — not dangling, the export already had no target)
  1290. END-TO-END show 105ad9c91b14d663 "Raised by Wolves" seasons=2
  1291. season 1 (be2965a5ab7165ca) episodes=10 show-back-ref-ok=true
  1292. season 2 (0fe4e53157ed0367) episodes=8 show-back-ref-ok=true
  1293. total episodes across seasons: 18
  1294. follows on this show: 1, season-level watches touching it: 2
  1295. VERIFY PASS
  1296. ```
  1297. (36194 episodes with no season = 36193 that never had one in the old export, plus the 1 the tool's
  1298. own count already named as a pre-existing dangling `season` reference in the source data — neither
  1299. is a reference this migration broke; `dangling references: 0` covers exactly that.)
  1300. The single old user (`User.jsonl`, `[email protected]`, password not taken over) is this app's
  1301. user for ident short id `az5b2` (`storage/mpackdb/users.db`, the same table step 1's login uses) —
  1302. confirmed in the copy: one record, `identity=az5b2`.
  1303. **Two Hybriel bugs found while building this** (both already filed as issues on this ticket by an
  1304. earlier session, not re-filed): `hl:fs readFile` silently truncates at 10 MiB (worked around here
  1305. with `split`, no shell, no JS, see `tools/migrate.hl`'s header comment) and `hl:mpackdb` loses rows
  1306. across `update()` + reopen (the reason this tool never calls `update()`).
  1307. **Open**: nothing shown yet — this ticket is data-only, on purpose (the next step, from the
  1308. creator, is showing the data in the UI).
  1309. ## 2026-09-27 — ticket #3: no border on the header or filled buttons
  1310. Design notes from the first test (architect): "the application-header should have no bottom
  1311. border" and "the buttons also no border except they are inverted". Two changes in
  1312. `styles.hl`:
  1313. - `applicationHeader`: dropped `borderBottom`.
  1314. - `ident-selector::part(button)` (the signed-out "choose ident" button): added
  1315. `border = 'none'` — the element's own CSS gave it a 1px border the same colour as its
  1316. background (`--_accent`), invisible but still a real border in the computed style; this is
  1317. the app-side restyling hook ident's README documents (`::part(button)`), not a change to
  1318. ident's vendored `selector.js`.
  1319. Left unchanged, already correct: the native `button` rule (filled, e.g. no other filled
  1320. buttons on this page yet) already has `border = '0'`; `button.quiet` ("Log out") and the
  1321. selector's dropdown `[part="identity"]` rows keep their border (transparent background —
  1322. inverted style); `a.button` ("Log in with ident") has no border rule and browsers give `<a>`
  1323. none by default. The selector's signed-in "logged in with ident" status pill
  1324. (`::part(status)`) is not one of the buttons the ticket names and isn't a button element
  1325. (a `<span>`) — left with its border.
  1326. **Gate** (`tests/browser.mjs`, now 16 checks): added computed-style checks — the header's
  1327. `borderBottomWidth` is `0px`; `#loginbutton`'s border is `0px`; the selector's
  1328. `[part~="button"]` (inside its shadow root) border is `0px`; `#logout`'s border is NOT `0px`
  1329. (still inverted-bordered) once signed in.
  1330. ```
  1331. node tests/browser.mjs
  1332. 16 passed, 0 failed
  1333. ```
  1334. ## 2026-09-27 — ticket #1 reopened: login redone to match calendar exactly (header selector, empty page)
  1335. The architect rejected the first build of ticket #1: the sign-in sat centered on the page
  1336. (its own "Sign in with ident" card, identity + sign-out shown in a `homeCard`) instead of
  1337. the header identity selector calendar/gitoria use, and there was no `<ident-selector>` at
  1338. all. Rebuilt the login by copying calendar.worldapi.org's own files (unchanged in shape, per
  1339. the architect's instruction "Copy calendar.worldapi.org's login unchanged"):
  1340. - **`users.hl`** (new): the ident exchange + a `usersTable` (`storage/mpackdb/users.db`,
  1341. `identity` → this app's user id), copied from calendar's `users.hl` with `TRACKER_KEY` /
  1342. `TRACKER_SECRET` / `TRACKER_URL` / `TRACKER_STORAGE` in place of calendar's names (kept
  1343. the names already in this app's `docker-compose.yml`/README/DECISIONS rather than
  1344. switching to calendar's generic `IDENT_API_KEY`/`IDENT_API_SECRET`).
  1345. - **`login.js`** (new): calendar's bridge between `<ident-selector>`'s `ident-login` DOM
  1346. event and the hidden `#identcode` input, copied verbatim (creator: "login.js is correct,
  1347. as thats for externals in general").
  1348. - **`components/main.hl`**: now the header carries `userBox` (`<ident-selector>` + "Log in
  1349. with ident" / "Log out"), the `trackerLogin`/`trackerLogOut` faces and the
  1350. `trackerSignedIn`/`trackerSignedOut` client push — calendar's shell renamed to this app's
  1351. event names.
  1352. - **`components/home.hl`**: now truly empty (`View { home {} }`) — no sign-in link, no
  1353. identity/sign-out duplicated on the page; that is entirely the header's job now.
  1354. - **`components/loginfailed.hl`** (new) + **`project.hl`**: the login routes are now
  1355. `/login/callback` (function route, the button's return AND the code exchange) and
  1356. `/login/failed`, copied from calendar's `project.hl` (`safePath`, `failed()`,
  1357. `loginCallback`) in place of the old `/login` + `/callback` + `/logout` routes; the old
  1358. `/logout` POST route is gone (logout is a face, like calendar's).
  1359. - **`styles.hl`**: added the header selector styles (`userBox`, `identSelector`,
  1360. `ident-selector::part(...)`, sticky header) from calendar's `styles.hl`; dropped the
  1361. now-unused `homeCard`/`accountBar`/`userName` rules from the rejected centered sign-in.
  1362. **Gate rewritten** (`tests/browser.mjs`, 12 checks): replaced the old gate (which drove
  1363. ident's full email-code UI through a vendored dev copy of ident at `.scratch/ident-dev`)
  1364. with calendar's own pattern — `tests/identkit.mjs` (copied from calendar unchanged) starts a
  1365. throwaway ident (a fresh copy of `/media/STORAGE/projects/ident.worldapi.org`'s code, no
  1366. `.env`/storage copied, codes to a mail sink, never the live ident), signs in over its REST
  1367. API and registers this app, then the gate proves the header in a real headless Chrome:
  1368. signed out → `#selector` + `#loginbutton` in the header, **`main` is empty** → sign in
  1369. (`/login/callback?ident_code=`, the same exchange the selector would trigger) → `#selector`
  1370. shows `class="in"`, `#logout` appears, **`main` still empty** → sign out → signed out again
  1371. → a reload stays signed out. No console errors.
  1372. ```
  1373. node tests/browser.mjs
  1374. 12 passed, 0 failed
  1375. ```
  1376. `./deploy.sh --dry-run --target .scratch/deploy-preview --url http://127.0.0.1:0/`: gate
  1377. passed as step [1/4], rsync preview held none of `storage/`, `.sessions/`, `.env`,
  1378. `.scratch/`, `server.*`, logs. Removed the stale `.scratch/ident-dev` (the old gate's vendored
  1379. ident copy) and `.scratch/browser-gate` (the old gate's storage) — unused by the new gate.
  1380. **Still open**: the app is registered in ident's dev copies only (this gate's own throwaway
  1381. ident). The LIVE ident registration (`TRACKER_KEY`/`TRACKER_SECRET` in `.env` next to
  1382. `docker-compose.yml`) is the architect's first-deploy step (README "Deploy"), not built here.
  1383. ## 2026-09-27 — ticket #2: data migration — blocked twice on sandbox access, nothing done
  1384. Two workers in a row (`s-20260927T1029-f57b0f`, then this session) could not start: the
  1385. migration source the ticket names, `/media/STORAGE/projects/old-tracker/mongo-export/*.jsonl`
  1386. + its `README-RECONSTRUCTED.md`, is not reachable from this worker's sandbox. Verified fresh
  1387. this session:
  1388. ```
  1389. $ ls -la /media/STORAGE/projects/
  1390. antcolony-docs hybriel ident.worldapi.org tracker.worldapi.org # no old-tracker
  1391. $ mount | grep STORAGE
  1392. /dev/nvme1n1p6 on /media/STORAGE/projects/tracker.worldapi.org type btrfs (rw,...)
  1393. /dev/nvme1n1p6 on /media/STORAGE/projects/hybriel type btrfs (ro,...)
  1394. /dev/nvme1n1p6 on /media/STORAGE/projects/ident.worldapi.org type btrfs (ro,...)
  1395. /dev/nvme1n1p6 on /media/STORAGE/projects/antcolony-docs type btrfs (ro,...)
  1396. # old-tracker is not among the mounted subvolumes at all
  1397. ```
  1398. So this is not a data problem (the export is "complete" per the ticket) — it's the worker
  1399. sandbox for this ticket that never got `old-tracker` mounted (read-only, like `hybriel` /
  1400. `ident.worldapi.org` / `antcolony-docs` above). Nothing was built or changed this session:
  1401. no `storage/`, no `tools/`, no id-mapping — writing the migration tool blind, guessing the
  1402. JSONL shape from the ticket text alone, risks silently wrong data and was avoided on purpose
  1403. (see the project's "Build it properly" rule). Filed as an antcolony issue so the next worker's
  1404. sandbox includes `old-tracker` before another attempt.
  1405. ## 2026-09-27 — ticket #1: the empty shell, ident login
  1406. Built the app from scratch: vendored `bin/hybriel` + `plugins/` + `shared/tokens.hl` from
  1407. `ident.worldapi.org` (newest local build, hybriel master 837fe120, no local patch — see
  1408. README "Vendored Hybriel"). `project.hl` (routes `/login`, `/callback`, `/logout`, `/`),
  1409. `components/home.hl` (the empty homepage), `components/main.hl` (shell), `styles.hl`
  1410. (accent green `#4ec9b0`, per `antcolony/README.md` "look and style" / `CONCEPT.md`).
  1411. `docker-compose.yml` / `Dockerfile` / `deploy.sh` following ident's own house pattern
  1412. (port 45008, container `tracker.worldapi.org`).
  1413. **Login**: the ident login BUTTON flow (ident.worldapi.org README "How apps use ident"),
  1414. server-side exchange (`POST <ident>/api/exchange`), this app's own framework session
  1415. (`session.user = { identity }`, cookie `trackersid`). ident hands over only the identity's
  1416. public **short id** — no display name yet (ident#11, properties handover, is on hold) — so
  1417. "your name" on the homepage is `Signed in as <shortid>`, the same identifier every other
  1418. worldapi app would show; see `decided` in the report.
  1419. **Lesson (Hybriel)**: a face that mutates `session.user` (e.g. `signOut`) does NOT
  1420. automatically re-render the page — a component's reactive members (`signedIn`, `identity`,
  1421. …) are computed once at mount from the framework's read-only session snapshot; a client
  1422. handler that calls `emit server X()` must ALSO flip the affected members itself afterwards
  1423. (ident's own `components/home.hl` `on doSignOut(e)` does exactly this: `emit server
  1424. signOut()` then `signedIn = false` …). Missing that made the sign-out button silently do
  1425. nothing client-side (the ack came back `ok:true`, the server-side session really was
  1426. cleared — proven by a reload — but the DOM never updated) until copied.
  1427. **Gate** (`tests/browser.mjs`, 13 checks): a fresh copy of `ident.worldapi.org`'s code (no
  1428. `.env`, no `storage/`, no `.sessions/` — verified empty of secrets/data before first use)
  1429. runs as this gate's own ident, on its own storage and its own mail sink (no live ident, no
  1430. real mail). The gate registers this app in that dev ident once over the `/__hl/emit` API
  1431. (the same one-time step a person does by hand in ident's `/apps` page), then drives the
  1432. REAL login-button flow in a real headless Chrome: signed out → click "Sign in with ident" →
  1433. ident's email form → the mail-sink code → the first-login optional-names form (Skip) → the
  1434. one-identity choice (one click) → back on tracker, "Signed in as `<shortid>`" → "Sign out" →
  1435. signed out again → a reload stays signed out. No console errors. Ran twice for stability, 0
  1436. failures; no leftover Chrome/hybriel processes after either run.
  1437. ```
  1438. node tests/browser.mjs
  1439. 13 passed, 0 failed
  1440. ```
  1441. `./deploy.sh --dry-run --target .scratch/deploy-preview --url http://127.0.0.1:0/` (a local
  1442. directory, per ident's own convention for testing deploy.sh without touching Byrodin): gate
  1443. passed, rsync preview held none of `storage/`, `.sessions/`, `.env`, `.scratch/`, `server.*`,
  1444. logs — confirmed by the same grep the script refuses on.
  1445. **Open**: the app is not registered with the LIVE ident yet — `TRACKER_KEY`/`TRACKER_SECRET`
  1446. are unset until the architect's first deploy does that (README "Deploy"); until then
  1447. `/login` on the live site answers a plain error page instead of redirecting (`/` itself
  1448. still renders). This is normal for a brand-new app, the same as ident's own SMTP `.env`
  1449. before its first deploy — not something this ticket's worker can set (no `.env` access,
  1450. and it is a LIVE ident registration).

Branches

Latest commits

  • 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
  • 2b7fdd6cmission 056: signed-out header one row on phones ("Log in", nowrap), backfill skips adult titles' posters, gate checksmre
  • 2c53d5efMerge branch 't16-person' (tracker#16 person pages) into main; filmography shows only public titles (054 adult flag), gate race fix (backfill start line)mre
  • c171227emission 054: hide adult/unknown titles from the public lists and the search; in-app adult-flag backfill (TMDB details + poster per title, resumes), gate + real-data proofmre
  • 139fafd8tracker#16: short bio (4 lines, click = all), real-data check script, README + STATUSmre
  • 93be9476tracker#16: person pages /person/<slug> with the filmography fetched from TMDB on the first visit (step by step), gatemre