gitoriaLog in with ident

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit03edc78303edc783Merge branch 't15-tvmaze'mre03edc783/STATUS.md

52.5 KB

  1. # STATUS — tracker.worldapi.org
  2. ## 2026-10-01 — ticket #15 (mission 052, worktree tracker-wt15, branch t15-tvmaze): TVmaze merge in the sync
  3. **Built**: `tmdbsync.hl` `mergeTvmaze` (after the TMDB step, series with a tvmzId): `GET /shows/<tvmzId>/episodes`, by
  4. S/E number: ADD missing episodes/seasons, FILL empty/placeholder titles + empty air dates; never overwrites a TMDB
  5. value; TMDB's own placeholder ("Episode 4") no longer overwrites a real title; TMDB later adopts TVmaze rows by
  6. number. `numberingAgrees` skips shows TVmaze numbers differently (≥ 80 % of shared S/E within 1 day or same title).
  7. Details: README "What it does (step 15)". Tool line + totals: `tvmazeEpisodes tvmazeSeasons tvmazeFilled tvmazeSkipped`.
  8. **Real data** (copy of Byrodin `storage/` 2026-10-01 ~07:00, deleted afterwards; procedure = ticket #8 below, server
  9. 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`):
  10. ```
  11. run 1: shows=126 newEpisodes=0 updatedEpisodes=0 requests=255 tvmazeRequests=126 errors=0 tvmazeEpisodes=0 tvmazeFilled=21 tvmazeSkipped=7 seconds=178.9
  12. run 2: updatedEpisodes=8 (Greek Salad "Épisode n" → "Episode n", after "Épisode" became a placeholder) tvmazeFilled=0 tvmazeSkipped=6 seconds=174.9
  13. run 3: all 0, tvmazeSkipped=6, seconds=169.9 (idempotent)
  14. ```
  15. Filled: Rings of Power S3E1–8 real titles (TMDB "Episode n", airs 2026-11), Last Week Tonight 8x26–30. No episode
  16. was missing on TMDB that day (tvmazeEpisodes=0) — the add path is proven by the gate only. Skipped (checked by hand,
  17. correct): Daily Show (TVmaze seasons by year), Star Trek: Prodigy + Blood & Treasure (shifted numbering), Alex Rider,
  18. Intergalactic, The Rising (other premiere dates + placeholder titles). Loads (390 / 1280): /my/shows 1.51 / 0.26 s,
  19. /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.
  20. Screenshots `/tmp/w052-tvmaze/real/*.png` on Loreana (looked at), logs `sync{1,2,3}.log`, `skipped*.txt`, `filled.txt`.
  21. **Gate** (111 → 117 checks):
  22. ```
  23. 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
  24. 117 passed, 0 failed
  25. ```
  26. Screenshots `tvmaze-{schedule,show}-{390,1280}.png` looked at.
  27. **Open**: adds a new TVmaze-only episode on real data not yet seen live; the daily run takes ~70 s longer (1 TVmaze
  28. request/series). Shows skipped by the numbering check get no TVmaze help (by design).
  29. ## 2026-10-01 — ticket #13 (mission 050): homepage, /movies, /shows, /my/movies
  30. **Built**: `/` (`components/home.hl`): signed in 4 icon tiles → `/my/unwatched` `/my/schedule` `/my/shows` `/my/movies`;
  31. for everyone the text, "Movies" (→ `/movies`, 10 latest RELEASED movies) and "Shows" (→ `/shows`, 10 series by newest
  32. released episode) as poster rows (phone: sideways scroll inside the row; ≥ 40rem grid of 5). `/movies`, `/shows`
  33. (`components/movies.hl`, `allshows.hl` → shared `components/tilelist.hl`): all, 24 per page, pagination =
  34. components.hybriel `pagination.hl` copied verbatim (4b4dabe). `/my/movies` (`components/mymovies.hl`); `/my/shows` is
  35. series only now. `catalog.hl`: lists built once at start, `refreshCatalogShow` after each synced show (`project.hl`
  36. `syncTick`), day roll on first read of a new day. `follows.hl` `insertByFollowDesc` (moved from myshows.hl),
  37. `shows.hl` `allShows`/`allEpisodes`.
  38. **Decisions**: page in the PATH (`/movies/page/2`), not `?page=2` as the mission said — a component can't read the
  39. query (hybriel#11) and Back drops it (hl:web `popstate` uses `location.pathname`), so `?page` would mean full reloads +
  40. Back to page 1. Pagination click → host: the copied component has no data out (hybriel#87 ruling: a passed function),
  41. so a `pager-box { on click }` around it reads the button text — no edit of the copy. One page → no pagination.
  42. /movies = ALL movies incl. future-dated (first) and undated (last); the homepage row only released ones. Series without
  43. a released episode come after the others, by their own `release`. Home text says episodes come from TMDB (TVmaze is
  44. only used for ids — the mission's "TMDB/TVmaze" would be wrong). Sign-in hint only when signed out.
  45. **Real data** (copy of Byrodin `storage/` 2026-10-01 ~06:45, deleted; `az5b2`, :8730, procedure = ticket #8 below; the
  46. session file needs `created`/`seen` = now in ms, `1` is swept at boot): boot → first answer 1.47 s (catalog build).
  47. Server time (curl) 5–7 ms for `/`, `/movies`, `/movies/page/200`, `/shows`, `/shows/page/30`, `/my/movies`. Full load
  48. in a FRESH Chrome per page (document + modules + socket + every poster in view), signed in / out:
  49. | page | 390 in / out | 1280 in / out |
  50. |---|---|---|
  51. | `/` | 1.11 / 1.34 s | 1.13 / 1.29 s |
  52. | `/movies` | 0.30 / 0.91 s | 0.57 / 0.57 s |
  53. | `/movies/page/2` | 0.53 / 0.63 s | 1.31 / 0.50 s |
  54. | `/shows` (24 real posters) | 1.07 / 1.36 s | 1.37 / 1.11 s |
  55. | `/my/movies` | 0.80 / 0.66 s | 0.83 / 0.58 s |
  56. Same Chrome (`node tests/realdata-check.mjs`): `/movies`, `/shows`, `/my/movies` 0.04–0.45 s; a page change by the
  57. pagination 60–75 ms (client-side); Back works; no sideways scroll; 0 console problems. `refreshCatalogShow` for all
  58. 126 followed shows: 0.31 s (SNL 23 ms). Screenshots `/tmp/w050/real/*-{390,1280}.png` (looked at). Not mine but seen:
  59. `/my/unwatched` 1.47–1.64 s (1594 rows), `/my/shows` 1.25 s cold at 390.
  60. **Gate** (111 → 135 checks):
  61. ```
  62. 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
  63. (in-app run 5.415 s; 11 pages asked during it, slowest 1433 ms)
  64. 135 passed, 0 failed
  65. ```
  66. **Session-sync double rows** (team lead: since hybriel 64527baa every face taking `session` also syncs the members derived
  67. from session; a handler that ALSO appends the returned row shows it twice): checked — no tracker handler appends, every
  68. one assigns the whole list (`rows = r.rows`) or a flag; the new #13 pages have no faces. 4 gate checks "row appears
  69. once" (exact count + unique button values, 400 ms after the face for a late sync): /my/unwatched click, show page
  70. expand, episode click, Follow toggles.
  71. Changed existing checks: the three "page stays empty" (now home content), the in-app run expects `newEpisodes=2` (the
  72. fake TMDB adds a released episode to show 2 too, to prove the in-process re-sort). Screenshots `/tmp/w050/shots/`
  73. (home, movies, movies-page-2, shows-list, my-movies at 390/1280 — looked at).
  74. **Open**: (1) **adult titles** — the migrated movie table has many porn titles (e.g. on /movies page 1 and 4); they
  75. are on the public homepage and /movies. No `adult` flag stored; the creator/architect decides (filter via TMDB `adult`,
  76. hide unfollowed movies, …). (2) Movie posters: only followed shows/movies have real posters → nearly every movie tile is
  77. the placeholder until the sync covers more. (3) If `?page=N` links are wanted anyway, that needs hybriel#11's query
  78. half. (4) Real-phone check after deploy.
  79. ## 2026-10-01 — ticket #12 (mission 049): link icons to TMDB, IMDb, TheTVDB, TVmaze
  80. **Built**: show page header badges `TMDB` `IMDb` `TVDB` `TVmaze` (`components/show.hl` `linkRows`, `shows.hl`
  81. `externalLinksOf`, `styles.hl` `showLinks`/`a.extlink`: CSS-only monochrome badges, accent on hover), only for ids the
  82. show has, `target=_blank rel=noopener`; a movie: TMDB (`/movie/<id>`) + IMDb. Phone: between title row and poster;
  83. desktop: under the title. Sync (`tmdbsync.hl`): details request now `?append_to_response=external_ids` (no extra
  84. request) → fills a MISSING imdbId/tvdbId; still no tvmzId → TVmaze `lookup/shows?imdb=`, on 404 `?thetvdb=` (550 ms
  85. pause each, `pauseMsAfter` in both runners); never overwrites. Totals: `ids=`, `tvmazeRequests=`. New
  86. `tools/count-external-ids.hl` (copy only).
  87. **Bug found + fixed**: movies (`type = 'movie'`, 7814 rows, 1 followed: Star Trek: First Contact, tmdbId 199) were
  88. synced as `/tv/199` — another title. Now `/movie/<id>?append_to_response=external_ids`: imdbId + poster only.
  89. **Live data still carries the damage**: that record has `status = 'Ended'` and `tmdbSummary` = the overview of TV
  90. show 199 ("Kabuhayang Swak na Swak…") — not visible (the page shows `summary`), the new sync leaves both alone; a
  91. one-off fix (set `tmdbSummary = null`, `status` back) is the architect's call.
  92. **Decisions**: TheTVDB link = `https://thetvdb.com/dereferrer/series/<id>` (it and `?tab=series&id=` both 301 to the
  93. slug page, checked 2026-10-01); IMDb `/title/<tt>/`; TVmaze `www.tvmaze.com/shows/<id>`. Badges with text, not
  94. drawn pictograms (no logos copied; legible at 0.75rem). An imdb id is only taken as `tt`+digits, a tvdb/TVmaze id
  95. only as a number > 0. A show TVmaze doesn't know is asked again each daily run (2 lookups/day on real data).
  96. **Real data** (copy of Byrodin `storage/` 2026-10-01 ~06:20, deleted afterwards; `tools/count-external-ids.hl`):
  97. | | shows | tmdbId | imdbId | tvdbId | tvmzId |
  98. |---|---|---|---|---|---|
  99. | followed series, before → after 1 sync | 125 | 125 | 125 | 125 | 123 → **124** |
  100. | followed movie | 1 | 1 | 1 | – | – |
  101. | all series (only followed are synced) | 1639 | 1639 | 907 | 910 | 845 → 846 |
  102. | all movies | 7814 | 7814 | 379 | – | – |
  103. Sync: `shows=126 newSeasons=0 newEpisodes=0 updatedEpisodes=0 updatedSeasons=0 posters=1 ids=1 requests=256
  104. tvmazeRequests=4 errors=0 seconds=105.6` (poster = the movie's real one; id = Greek Salad tvmz 60613; Mapping the
  105. World: TVmaze knows neither tt0395050 nor tvdb 109331). TMDB's external ids match ALL 125 stored imdb/tvdb ids (0
  106. differ). Show pages (az5b2, :8730): Librarians 1.08 s cold / 0.13 s, Greek Salad 0.18 s, Star Trek: First Contact
  107. 0.13 s (TMDB movie/199 + IMDb, real poster now); no sideways scroll, 0 console problems. Screenshots
  108. `/tmp/w049/real/*-{390,1280}.png` (looked at). Procedure = ticket #8 below (sync tool with `.env` sourced).
  109. **Gate** (101 → 111 checks):
  110. ```
  111. 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
  112. (in-app run 5.416 s; 12 pages asked during it, slowest 1323 ms)
  113. 111 passed, 0 failed
  114. ```
  115. Fixture: show 1 imdb `tt0000001` only (TMDB says tt9999999 + tvdb 4001), show 2 tvdb `4002` only (TMDB: tt0000002 +
  116. 4999), movie `gate-test-movie` (tmdb 1003, followed by a 2nd user so alice's lists are unchanged → the sync now has
  117. 3 shows). Fake TVmaze: imdb tt0000001 → 501, thetvdb 4002 → 502. Screenshots `/tmp/w049/shots/` (show-*, synced-show
  118. {,-390}, synced-movie{,-390} looked at). The new-tab check closes the tab at once (it would load the real site).
  119. **Open**: real-phone tap test after deploy (new tab). Star Trek: First Contact's wrong `tmdbSummary`/`status`
  120. (above). Unfollowed shows never get ids filled (sync covers followed only, by design).
  121. ## 2026-10-01 — mission 047: re-vendor Hybriel (invisible checks), mobile first, show page additions
  122. **Bug** (live, the creator: "i dont see the check marks"): after a CLIENT-SIDE navigation (and after expand/collapse
  123. or a check click) the check `<svg>` was built in the XHTML namespace (circle width 0). Fixed by **re-vendoring Hybriel
  124. master ff51cf46** (bin sha256 `55a724a0…c5`, README "Vendored Hybriel"; old bin/plugins in `.scratch/pre-047/`).
  125. Proof the new check fails on the old build: `/tmp/w047/old-build-gate.log` (`ns: http://www.w3.org/1999/xhtml,
  126. circleWidth: 0`), passes on the new one.
  127. **Built**: `styles.hl` mobile first (phone base rules, one `@media (min-width: 40rem)` block; header one row at
  128. 390 px; /my/unwatched + /my/schedule rows two-line on a phone). Show page: phone order title (+ Follow) → full-width
  129. poster → genres/plot/cast (desktop unchanged); season caret (down/right); episodes not indented; artists orange
  130. `#ce9178`; unwatched check = accent outline circle + accent check; **Follow toggle** (face `showToggleFollow`,
  131. `follows.hl` `isFollowing`/`setFollowed`: new record `at = now`, unfollow deletes); signed out checks + Follow visible,
  132. a click opens the sign-in modal (`components/modal.hl`, copied verbatim from components.hybriel becbd59), nothing sent.
  133. Session-sync workaround in show/myshows/unwatched/schedule: `rows` reads `me` (a plain copy of `userId`), and
  134. `following` goes through a LOCAL static `followingOf` — an imported mpackdb helper called directly in a member
  135. initializer came back false after a client-side navigation (gate caught it; not reduced to a minimal repro yet).
  136. **Duplicate @ids** (hybriel#113) on a copy of live storage (2026-10-01 04:13), `tools/count-duplicate-ids.hl` + the
  137. `*.id.txt` indexes: **0 in every table** (episodes 232384, follows 128, genres 27, persons 15157, seasons 6450, shows
  138. 9453, users 1, watches 11663 rows).
  139. **Real data** (copy, `az5b2`, :8730, `node tests/realdata-check.mjs`, full load incl. socket + posters):
  140. | page | 390 px | 1280 px |
  141. |---|---|---|
  142. | `/my/shows` (128) | 1.29 s (cold posters) | 0.24 s |
  143. | `/my/unwatched` (1594) | 1.51 s | 1.46 s |
  144. | `/my/schedule` (54) | 0.35 s | 0.32 s |
  145. | `/shows/The-Librarians-The-Next-Chapter` direct / client-side | 0.14 / 0.19 s | 0.13 / 0.18 s |
  146. Client-side nav, expand, collapse: 14/26/14 checks, 0 wrong namespace, 0 undrawn; header 46 px at 390, no sideways
  147. scroll. Screenshots `/tmp/w047/real/*.png` (looked at). Procedure = ticket #8 below; the session id goes in
  148. `.scratch/real-sid` (the script reads it); copy + sessions deleted afterwards.
  149. **Gate** (76 → 101 checks):
  150. ```
  151. 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
  152. 101 passed, 0 failed
  153. ```
  154. Screenshots `/tmp/w047/shots/` ({home,show,my-*}-{390,1280}.png, signed-out-modal-1280.png) — looked at.
  155. Gate note: the follow test re-follows show 1, so the sync's request order between the two shows may flip (the check
  156. accepts both orders) and `/my/shows` after the sync has show 1 on top.
  157. **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.
  158. The unwatched (outline + check) and watched (filled) icons differ only by fill — as asked. No navigation links to
  159. the `/my/` pages yet. Real-phone check after deploy.
  160. ## 2026-10-01 — ticket #10: installable app (PWA) + icons
  161. **Built**: `icons/` (`icon.svg` source → `icon-192.png`, `icon-512.png`, `apple-touch-icon.png` 180; `favicon.svg`,
  162. `favicon.ico` 16/32/48 — rsvg-convert + magick, commands in README "What it does (step 10)"); `project.hl`:
  163. `appIcons` (192/512 × any/maskable, like calendar), `appTouchIcon`, `appFavicon`, `appThemeColor = darker.value`,
  164. `appBackgroundColor = dark.value` (tokens), `offline = [ Home ]`, file routes for the icons, `/favicon.ico` now a
  165. real file (was `direct = ""`); `components/main.hl` offline note + `netProbe` tick; `styles.hl` `offlineNote`,
  166. `netProbe`, `@keyframes tracker-net-tick`; gate +12 checks.
  167. **Decisions**: icon = a TV (antennas) with a check mark on the screen = "watched shows", green `#4ec9b0` on
  168. rgb(25,30,35), all inside the maskable safe zone so one PNG serves any + maskable. Theme colour = `darker` (the header
  169. bar, so the phone's status bar blends in), background = `dark`. Offline keeps only the shell/`/`; data pages get
  170. hl:web's "Unavailable offline". The offline note is driven by `navigator.onLine`, read on a 1 s CSS-animation tick
  171. (`animationiteration`) — hl:web has no connection-state member and no mount hook (reported as a Hybriel gap).
  172. **Gate** (64 → 76 checks):
  173. ```
  174. 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
  175. 76 passed, 0 failed
  176. ```
  177. Looked at: `/tmp/w045/icon-48.png`, `icon-192.png`, `icon-512.png`, `maskable-circle.png`, `small-on-white.png`
  178. (favicon 16/32/48), `/tmp/w045/shots/pwa-phone-{online,offline}.png` (390 px) on Loreana.
  179. Test gotcha: CDP `setOffline` only cuts the TAB — the service worker's own fetches still reach the server, so the
  180. gate also stops the server before the offline reload.
  181. **Open**: offline, the header's `<ident-selector>` (script from ident's origin, not cached) shows "choose ident"
  182. next to "Log out". No note when the device is online but the server is down. Real-phone install test (ticket's
  183. **Test**) after deploy: open https://tracker.worldapi.org → "Add to home screen".
  184. ## 2026-10-01 — ticket #9: TMDB sync (new episodes + posters)
  185. **Built**: `tmdbsync.hl` (`syncShow`: details + ≤ 20 seasons per request via `append_to_response`, add/update
  186. seasons+episodes, poster w342), `tools/sync-tmdb.hl` (`--limit N`, paced, prints counts), the daily run in
  187. `project.hl` (`syncTick` on an hl:time `every(1)` clock: at `TRACKER_SYNC_HOUR` UTC (4), once a day, ONE show
  188. per tick, next show after n × 260 ms), `follows.hl` `allFollowedShowIds`, fake TMDB `tests/faketmdb.mjs`,
  189. fixture shows got tmdbIds 1001/1002. Details: README "What it does (step 9)".
  190. **Decisions**: match episode by tmdbId, else by S/E when the local one has no tmdbId (161 migrated); season by
  191. number. Empty TMDB values never overwrite. Season 0 only if the show already has one (else specials flood
  192. /my/unwatched); empty TMDB seasons not created. Own 16-hex ids for new rows (hybriel#113). Posters in
  193. `storage/mpackdb/posters/` (the folder the existing `/posters/:name` route reads — inside `storage/`, so in the
  194. backup) rather than a new `storage/posters/`. Shows synced = all followed (also Ended ones — updates happen).
  195. Sync is off without `TMDB_READ_TOKEN` or with `TRACKER_SYNC=0`.
  196. **Blocking**: `fetch()` blocks the whole hl:web process (measured: requests wait for the running step) — so the
  197. run is cut into one-show steps. Real data: ~0.7 s per step average, SNL (53 seasons, 4 requests) 1.7 s; persist
  198. of the 3 tables 36 ms.
  199. **Real-data proof** (copy of Byrodin's `storage/` in `.scratch/realdata/`, deleted afterwards; procedure as
  200. ticket #8 below; session file needs `created`/`seen` = now in ms, else the boot sweep deletes it):
  201. ```
  202. set -a; . ./.env; set +a
  203. TRACKER_STORAGE=$PWD/.scratch/realdata/storage/mpackdb ./bin/hybriel tools/sync-tmdb.hl --limit 128
  204. tmdb sync done: shows=126 newSeasons=20 newEpisodes=800 updatedEpisodes=2651 updatedSeasons=174 posters=125 requests=380 errors=0 seconds=185.718
  205. (again) shows=126 newSeasons=0 newEpisodes=0 updatedEpisodes=0 updatedSeasons=0 posters=0 requests=255 errors=0 seconds=89.888
  206. ```
  207. Fresh-process recount: seasons 6430 → 6450, episodes 231584 → 232384 (exactly +20/+800, no row loss), 0
  208. dangling season/episode refs, 0 duplicate season numbers; 12 duplicate tmdbIds + 1 wrong parent were already in
  209. the migrated data (same before/after). 126 shows (128 follows), 125 posters (one show has none on TMDB).
  210. In-app daily run on the copy (TRACKER_SYNC_HOUR = current hour, real TMDB): 126 shows, 255 requests, 136 s,
  211. 0 errors; `/my/shows` (signed in) polled every 0.5 s meanwhile: 181 answers, avg 0.25 s, max 4.0 s (one), then
  212. 1.8/1.7/1.4 s. Full page loads after the sync (headless Chrome, load + socket + all images):
  213. | page | full load | rows |
  214. |---|---|---|
  215. | `/my/schedule` | 0.7–0.8 s | 55 (was 0) |
  216. | `/my/shows` | 1.3–1.55 s (128 real posters now, 1 placeholder) | 128 |
  217. | `/my/unwatched` | 1.5 s (server 1.3 s) | 1593 (was 831) |
  218. | `/shows/The-Librarians-The-Next-Chapter` | 0.33 s | poster + new S2 (12 eps) |
  219. Screenshots + logs: `/tmp/w044-real/` on Loreana (`after-*.png`, `real-sync{1,2}.log`, `real-lat.txt`).
  220. **Gate** (49 → 64 checks):
  221. ```
  222. 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
  223. (in-app run 4.405 s; 10 pages asked during it, slowest 1371 ms)
  224. 64 passed, 0 failed
  225. ```
  226. Screenshots `/tmp/w044-shots/` (`synced-*.png` looked at: posters, S3, schedule rows fine).
  227. **Deploy (architect)**: `TMDB_READ_TOKEN` must be in Byrodin's `.env` (env_file) — without it the log says
  228. `tmdb sync: off (no TMDB_READ_TOKEN)`. First daily run 04:00 UTC after deploy; check `docker logs
  229. tracker.worldapi.org | grep tmdb`. Or stop the container and run the tool once for an immediate catch-up.
  230. **Open**: a step blocks requests up to ~2 s (a non-blocking `fetchStart` + `done()` state machine would fix it).
  231. `/my/unwatched` render grew with the rows (1.3 s server, 1593 rows) — watch it against the 2 s target. A season
  232. watch record stays solid when the sync adds a new episode to that season (existing season-watch semantics).
  233. Dev servers get the real token from `.env` automatically → start them with `TRACKER_SYNC=0`. Shows nobody
  234. follows are never synced (by design).
  235. ## 2026-09-30 — ticket #8: /my/ pages, S01E01, years, speed
  236. **Built**: `/my/unwatched`, `/my/schedule` (routes in `project.hl`); old `/unwatched`, `/schedule` →
  237. **301** (function routes `unwatchedMoved`/`scheduleMoved`). Rows as `S01E02 · <title>` (was
  238. `Ep 2 · …`), list titles with the year `Doctor Who (2005)`, show page `1 episode` singular.
  239. New shared helpers in `shows.hl`: `pad2`, `episodeCode`, `showYear`, `titleWithYear`,
  240. `posterUrlOf`; in `watches.hl`: `watchedSet` (used by `/my/unwatched` and the show page's
  241. `buildRows`; `isWatched` stays for the single-target toggles).
  242. **Decisions**: year = `year`, else `release.slice(0,4)`, else none (197 shows lack `year`, some
  243. have `release = ''`). Year only in LISTS (`/my/*`), not in the show page's `h1`. The 301 drops any
  244. query (the pages take none). A row whose poster FILE is missing gets `/posters/none` (one cached
  245. URL) instead of `/posters/<oldId>.jpg`.
  246. **Why /my/shows was ~25 s live though its data is 0.2 s**: hl:web handles ONE request at a time.
  247. Measured on the copy: `/my/shows` requested 1 s into a `/unwatched` render took 13.7 s (the
  248. `/unwatched` render itself 14.5 s). Every request (pages, 128 poster requests) of every visitor
  249. queued behind a slow `/unwatched`. Plus 128 distinct poster URLs per load, all the placeholder.
  250. **Real-data check** (copy of Byrodin's `storage/` only, `az5b2` = user `0mujqspn0aqb`, dev
  251. server :8730, headless Chrome, navigate → load → websocket open, 1280×900):
  252. | page | before | after |
  253. |---|---|---|
  254. | `/my/shows` (128 rows) | 1.2 s (server 0.19 s) | 0.6–0.8 s, 1 poster request |
  255. | `/unwatched` → `/my/unwatched` (831 rows) | 14.8 s | 0.7–1.2 s (server 0.55–0.65 s) |
  256. | `/schedule` → `/my/schedule` (0 rows, data not synced since 2025-12) | 0.36 s | 0.3 s |
  257. | `/shows/The-Librarians-The-Next-Chapter` | 0.34 s | 0.29 s |
  258. How to repeat (Loreana; never touch Byrodin's folder beyond the tar read):
  259. ```
  260. ssh [email protected] 'tar czf - -C /CONTAINERS/projects/tracker.worldapi.org storage' | tar xzf - -C .scratch/realdata # ONLY storage/
  261. TRACKER_PORT=8730 TRACKER_WATCH=0 TRACKER_STORAGE=$PWD/.scratch/realdata/storage/mpackdb TRACKER_SESSIONS=$PWD/.scratch/realdata-sessions/ ./bin/hybriel project.hl
  262. # session file: name = sha256(<32-hex id>), JSON {"created":1,"data":{"tag":"t"},"id":"<id>","seen":1,"user":{"id":"0mujqspn0aqb"}}
  263. curl -s -o /dev/null -w '%{time_total}\n' -b trackersid=<id> http://127.0.0.1:8730/my/unwatched
  264. # Chrome: tests/cdp.mjs launchBrowser, Network.setCookie trackersid, goto + wait __hl.socket open
  265. # afterwards: stop the server, rm -rf .scratch/realdata .scratch/realdata-sessions
  266. ```
  267. Screenshots: `/tmp/w041-real/{before,after}-{shows,unwatched,schedule,show}.png` (Loreana).
  268. **Gate** (45 → 49 checks: two 301s, the browser landing on `/my/unwatched`, "1 episode"; the
  269. existing ones now expect `/my/…`, `S01E02 · Second`, `S02E01 · Season Two Opener`, titles with
  270. year, `/posters/sh1.png` + `/posters/none`). Fixture: show 1 `image = 'png'` (gate writes a 1×1
  271. `posters/sh1.png`), show 2 `year = null`, `release = '2025-03-01'`.
  272. ```
  273. TRACKER_GATE_SHOTS=/tmp/w041-shots TRACKER_GATE_PORT=8720 TRACKER_GATE_IDENT_PORT=8721 TRACKER_GATE_CHROME=8722-8726 node tests/browser.mjs
  274. 49 passed, 0 failed
  275. ```
  276. Screenshots `/tmp/w041-shots/` (looked at: all fine).
  277. **Open**: `/my/unwatched` rebuilds all rows per check click (~0.6 s, fine). Still no navigation
  278. to the `/my/` pages. The single-request server means any future slow page blocks everyone —
  279. keep every page well under 1 s. `/my/schedule` stays empty until the TMDB sync step.
  280. ## 2026-09-30 — ticket #7: /my/shows
  281. Built `/my/shows` (`components/myshows.hl`, route in `project.hl`, styles in `styles.hl`): every
  282. followed show, newest follow (`follows.at`, epoch ms) first — small poster (2.5rem, `/posters/…` +
  283. placeholder like the show page), title → `/shows/<slug>`, last watched episode `SxxEyy`.
  284. **Decisions**: "last episode" = highest (season, episode) among the user's EPISODE watches of that
  285. show (ticket); a season watch alone doesn't count (the season check watches every episode anyway).
  286. No watch → no episode element. A show without a poster name → `/posters/none` (the route's own
  287. placeholder), so every row has a poster. Read-only page, no face (like `/schedule`).
  288. **Reuse**: new `follows.hl` `followsOfUser` (whole records; `followedShowIds` now builds on it) and
  289. `shows.hl` `episodeById` (one line); `showById`, `posterName`, `watchesOfUser` unchanged.
  290. **Performance** (against a COPY of `storage/mpackdb/` in `.scratch/perf-store`, removed after; live
  291. files md5-verified unchanged): the page touches only the user's follows and episode watches
  292. (one fetch per watch), never all episodes of a followed show — az5b2's 128 follows → 128 rows (123
  293. with an episode, e.g. `S36E11`, `S30E91`) built in **160–255 ms**. For comparison **`/unwatched`
  294. takes ~15 s** on the same copy (805 rows): it fetches every episode of every followed show and
  295. checks each against the user's 11,692 watches with a linear `isWatched` — not in this ticket's
  296. scope, flagged below.
  297. **Gate** (`tests/browser.mjs`, 38 → 45 checks; `tests/seed-show.hl` adds a 2nd show "Unwatched Gate
  298. Show", no seasons/poster name, followed AFTER the first but stored after it; the first follow is now
  299. dated a day back): signed out → sign-in message; signed in → newest follow first, title hrefs,
  300. posters loaded (`naturalWidth > 0`), 40px wide, `S01E02` after /unwatched's click, later `S02E01`
  301. (watched BEFORE season 1's bulk watch → proves highest, not most recent), none for the other show.
  302. ```
  303. TRACKER_GATE_PORT=8720 TRACKER_GATE_IDENT_PORT=8721 TRACKER_GATE_CHROME=8722-8726 node tests/browser.mjs
  304. 45 passed, 0 failed
  305. ```
  306. **Open**: `/unwatched` ~15 s on real data (above) — a watched-id map instead of `isWatched` per
  307. episode would fix it (own ticket). No navigation links to `/my/shows` yet (homepage stays empty).
  308. ## 2026-09-27 — ticket #6: /schedule
  309. Built `/schedule` (`components/schedule.hl`): every episode of a show the signed-in user follows
  310. that is NOT yet released (`e.release > today`), soonest first. Creator: "/schedule has a similar
  311. list without check icons for the upcoming episodes of shows followed" — same row shape as
  312. `/unwatched` (`components/unwatched.hl`) minus the check icon.
  313. **Reuse, not copy**: imports the exact same `followedShowIds` (`follows.hl`), `showById` /
  314. `seasonsOfShow` / `episodesOfSeason` (`shows.hl`) that `/unwatched` already uses — nothing new
  315. added to either file. `watches.hl` is not imported at all: a row here is never watched/unwatched,
  316. there is no check icon and no click, so the page needed no per-user watch state and no `on server`
  317. face — the whole component is a single read-only server-side render (`rows` computed once from
  318. `session`, same as every other reactive member here).
  319. **Order**: soonest first, ascending by `release` (a plain `'YYYY-MM-DD'` string, ordering
  320. operators confirmed working against this app's own vendored `bin/hybriel`, same as `/unwatched`'s
  321. STATUS entry) — the ticket named this the architect's own reading ("the creator named the order
  322. only for /unwatched"), so `insertByReleaseAsc` mirrors `/unwatched`'s `insertByReleaseDesc` with
  323. the comparison flipped.
  324. **`decided`**: "upcoming" = `release` strictly after today (not `>=`) — the natural complement of
  325. `/unwatched`'s own `release <= today`, so every released-or-today episode is unambiguously on one
  326. list, never both, never neither.
  327. **Gate** (`tests/browser.mjs`, 35 → 38 checks): reused the same fixture (`tests/seed-show.hl`,
  328. unchanged) — episode 3 already carried a far-future release (`2099-01-01`) for `/unwatched`'s own
  329. "excludes the future one" check; `/schedule` now proves the mirror image with the same fixture:
  330. signed out, no rows, the sign-in message; signed in, only that one future episode shows (the two
  331. already-released ones excluded), no `button.checkicon` anywhere on the page, unaffected by any of
  332. the watch toggles the other checks perform on the same fixture (run in any order — `/schedule`
  333. never reads watch state).
  334. ```
  335. node tests/browser.mjs
  336. 38 passed, 0 failed
  337. ps -eo pid,args | grep [h]l-browser-tier
  338. (nothing)
  339. ```
  340. Updated `README.md` ("What it does (step 6)", Test, Files) and this file.
  341. **Open**: nothing shown on the homepage still points to `/schedule` (same as `/unwatched` before
  342. it — the homepage stays empty per ticket #1's decision).
  343. ## 2026-09-27 — ticket #5: /unwatched
  344. Built `/unwatched`: every episode of a show the signed-in user follows that is already released
  345. (`release` ≤ today, a plain `'YYYY-MM-DD'` string — migrated as-is by `tools/migrate.hl`, never
  346. run through `dateOf`) and not yet watched, newest release first (creator: "/unwatched lists all
  347. unwatched episodes of shows followed in release date desc order").
  348. **Reuse, not copy** (the ticket's own instruction, re "the same check icon and watch logic as the
  349. show page"): `watchClassOf` (watched → `'checkicon solid'`/`'checkicon regular'`) was a private
  350. `static` in `components/show.hl`; moved it to `watches.hl` so both pages import the SAME
  351. definition instead of each declaring their own — `show.hl` now imports it too, nothing duplicated.
  352. `isWatched`/`setWatched` (already in `watches.hl`) needed no change. New `follows.hl`
  353. (`followedShowIds`) and `shows.hl` `showById` (one line) round out the read-only data access this
  354. page and `/schedule` (ticket #6) both need.
  355. **String comparison** (`e.release <= today`, `row.release >= x.release` for the desc sort):
  356. hybriel#2 ("no ordering operators on strings") is filed as still-open in this ticket's brief, but
  357. its own history shows it was fixed and merged to master 2026-09-25 — confirmed directly against
  358. THIS app's own vendored `bin/hybriel` (`'2020-09-03' <= '2026-09-27'` → `true`), so no numeric
  359. date workaround was needed.
  360. **A View text node cannot hold an inline expression** (`"Ep " + row.episodeNumber + " · " +
  361. row.title` inside a tag body) — same rule as View attributes (components/show.hl's own comment:
  362. "a View attribute must be a literal, a member or a field path"), just not documented for text
  363. nodes anywhere yet; it silently rendered `<!-- binary_expression not rendered yet -->` instead of
  364. erroring. Fixed by resolving the label into a plain field (`row.episodeLabel`) once, server-side,
  365. in `unwatchedRowsOf` — the same pattern `show.hl`'s `buildRows` already uses for every other
  366. ternary/concatenation. Not filed as a new Hybriel gap since it's the exact same restriction
  367. already known and worked around elsewhere in this app, just not yet hit for interpolated text.
  368. **Empty state**: signed out (no user, so no follows to show) and signed in with nothing unwatched
  369. both render a message; used `.muted` (colorTextMuted), not `.message` (colorDanger) — the existing
  370. `.message` class is for real errors (the login-failed banner), and an empty list isn't one (a
  371. `decided`, small).
  372. **Gate** (`tests/browser.mjs`, 29 → 35 checks): `tests/seed-show.hl` now takes an optional
  373. `TRACKER_SEED_IDENTITY` and, when given, seeds a fixed user + a follow of the fixture show for it
  374. — the only way to give `/unwatched` a known followed show before the browser ever signs in, since
  375. the real login's `ensureUser` matches an EXISTING `users.db` row by `identity` and reuses its id
  376. rather than minting a new one. The gate learns alice's per-app identity with one throwaway
  377. `ident.exchange` call (consuming one code) before writing the seed. Episode 1/2 of the fixture now
  378. carry a past `release` (`2020-01-01`/`2020-06-15`), episode 3 a far-future one (`2099-01-01`) —
  379. proving both the release-date filter and the desc order. The new checks run signed out (no rows,
  380. the sign-in message), then signed in RIGHT AFTER LOGIN, BEFORE the existing show-page checks that
  381. toggle these same fixture episodes watched (order matters — otherwise `/unwatched` would already
  382. be empty by the time it's tested): both unwatched episodes list newest-first, excluding the
  383. future one; a click on the newest (`Second`, ep 2) removes it from the list; a reload proves the
  384. watch is server-side, leaving only `Pilot` (ep 1).
  385. ```
  386. node tests/browser.mjs
  387. 35 passed, 0 failed
  388. ps -eo pid,args | grep [h]l-browser-tier
  389. (nothing)
  390. ```
  391. Updated `README.md` ("What it does (step 5)", Test, Files) and this file.
  392. **Open**: nothing shown on the homepage still points to `/unwatched` — no navigation exists yet
  393. (the homepage stays empty per ticket #1's decision; a later step, from the creator, presumably
  394. adds it). `/schedule` (ticket #6) is next and reuses `follows.hl`/`shows.hl`/`watches.hl` the same
  395. way.
  396. ## 2026-09-27 — ticket #4: the show page, watch checks (took over a previous half-done session)
  397. Continued from an earlier session that had built the whole page — header, seasons/episodes,
  398. the click-handling redesign to a flat `rows` list rebuilt server-side (`components/show.hl`'s
  399. own header comment explains why: a nested `for` over seasons > episodes risks hybriel#86) — but
  400. left with the gate red: clicking a check never turned it solid, no console error, and the
  401. session ran out of budget before finding why.
  402. **The actual bug**: the show page's own pure helpers (`buildRows`, `genreRowsOf`, `castRowsOf`,
  403. `watchClassOf`, `initialCollapsed`) were plain instance members (`buildRows = (show, …) => {…}`,
  404. no `static`). That shape works fine as a member's own top-level initializer (`rows = found ?
  405. buildRows(showRow, watchRows, collapsed) : []` — this is how the page renders correctly on first
  406. load) but throws when the SAME function is called from inside an `on server` face
  407. (`showToggleEpisode` etc.): the server log showed `'buildRows' is not callable — it holds null`.
  408. Found by running `.scratch/debug-click.mjs` (left by the previous session) with the server's
  409. stdout/stderr captured — the browser console itself stayed silent (the face's error never
  410. reaches the client at all, a separate Hybriel gap, hybriel#92 already covers that half).
  411. Confirmed the fix by grepping other worldapi apps for the same shape:
  412. `calendar.worldapi.org/components/calendar.hl` has `static soonOf = (u) => { … upcoming(u, …) }`
  413. (an mpackdb-backed helper), called from its `on server calLoad`/`calSettingsLoad` faces, and
  414. calendar's own gate is green — so `static` is the proven-safe shape for a component's own helper
  415. that both (a) touches an mpackdb-backed import and (b) needs calling from more than one place
  416. (its own initializer AND a later face). Declared all five helpers in `show.hl` `static`; reran
  417. the gate: 29/29 green, including the season-bulk-toggle and the reload-proves-server-side checks.
  418. Filed **hybriel#115 was already open** (from the previous session, about the CLIENT bundle
  419. omitting a case for such a helper) but this session's finding is the SAME root cause reaching
  420. further than that ticket says: the plain HL interpreter on the SERVER also treats such a helper
  421. as `null` outside its own initializer, not just the JS-compiled client bundle. Left as one
  422. `issues` entry pointing at hybriel#115 rather than opening a near-duplicate ticket — the
  423. repro/observed there already generalizes (a per-instance member function wrapping an
  424. mpackdb-backed import is unreliable wherever it is called from, not just the browser).
  425. Ran `node tests/browser.mjs`: 29 passed, 0 failed (was 20 passed / 1 failed — the click timeout
  426. — before the `static` fix).
  427. **Rehearsed `tools/relink-episode-seasons.hl` against a full COPY** of the real
  428. `storage/mpackdb/` (`.scratch/relink-rehearsal/`, since removed) — the tool's own header claimed
  429. this rehearsal already existed here; it didn't (a leftover claim from the previous session), so
  430. this session actually ran it:
  431. ```
  432. relink: episodes 231584, null season before 36194, linked 36194, still null (no matching season) 0
  433. relink: episodes.db replaced with the relinked file — re-run to confirm idempotency (0 linked the second time)
  434. ```
  435. Ran a second time on the same copy straight after — idempotency confirmed:
  436. ```
  437. relink: episodes 231584, null season before 0, linked 0, still null (no matching season) 0
  438. ```
  439. All 36,194 pre-existing null-season episodes (ticket #2's count) now link to a real season by
  440. `(show, seasonNumber)`; none left over. Not run against the LIVE `storage/mpackdb/` — that needs
  441. the tracker container stopped first (hl:mpackdb does not coordinate two processes on one storage
  442. directory, hybriel#21), the architect's job per the ticket ("the architect runs it live").
  443. Updated README.md ("What it does (step 4)", Test, Files) and this file.
  444. ## 2026-09-27 — ticket #2: old data migrated (took over a previous session's rewritten tool)
  445. Continued from an earlier session that had rewritten `tools/migrate.hl` to avoid a real data-loss
  446. bug (see below) but never run it even once, and had left the real `storage/mpackdb/` holding data
  447. from the OLDER, buggy two-pass version of the tool (put a bare record, then `update()` it once the
  448. other side of a circular reference existed). Took over: moved that buggy data aside
  449. (`.scratch/pre-migrate-buggy-backup`, since removed), kept `storage/mpackdb/users.db` (step 1's
  450. login table, untouched by the migration), and ran the already-fixed tool for the first time.
  451. **The fix already on disk (kept as is):** `Show.seasons`/`Season.show` and `Show.cast`/
  452. `Person.shows` are two-way references, so the id on one side must exist before the record on the
  453. other side can be built. The old approach — `put()` a bare record, come back with `update()` once
  454. the far side's id exists — loses rows: reopening a table in a fresh process after an `update()` had
  455. touched it read back FEWER rows than were ever `put()` (seen directly: `persons.db`'s `count()`
  456. dropped 15157 → 15152 after one round of `update()` — a real `hl:mpackdb` bug, reported to Hybriel,
  457. not something an app is allowed to patch around). The fix assigns every new id itself (8 random
  458. bytes, `hl:crypto`) in one pass over each export file BEFORE building any record, so by the time a
  459. record is actually built every reference is already a known id — one `put()` per row, `update()`
  460. never called.
  461. **Run** (`tools/migrate.hl`, `TRACKER_OLD_DATA=.../old-tracker/mongo-export`,
  462. `TRACKER_STORAGE=$PWD/storage/mpackdb`):
  463. ```
  464. migrate: genres 27 new, 0 already there (old 27 -> new 27)
  465. migrate: persons 15157 new, 0 already there (old 15157 -> new 15157), show refs skipped 0
  466. migrate: shows 9453 new, 0 already there (old 9453 -> new 9453), cast refs skipped 0, genre refs skipped 0, season refs skipped 0
  467. migrate: seasons 6430 new, 0 already there (old 6430 -> new 6430), show refs skipped 0, episode refs skipped 0
  468. migrate: episodes 231584 new, 0 already there (old 231584 -> new 231584), show refs skipped 0, season refs left null (pre-existing) 1
  469. migrate: follows 128 new, 0 already there (old 128 -> new 128), show refs skipped 0
  470. migrate: watches 11692 new, 0 already there (old 11692 -> new 11692), target refs left null (pre-existing) 3
  471. migrate: 0 failed
  472. ```
  473. Every count equals the old export's own document count (`old-tracker/README-RECONSTRUCTED.md`:
  474. Show 9453, Season 6430, Episode 231584, Person 15157, Genre 27, Follow 128, Watch 11692). Ran a
  475. second time straight after (idempotency: the tool's `oldId` index finds each row again) — every
  476. table printed `0 new`, all rows `already there`, counts unchanged, 0 failed: the id-loss bug does
  477. not resurface across a real close-and-reopen.
  478. **Proof beyond the tool's own counters** (`tools/verify.hl`, new): the ticket asks for a check that
  479. does not just trust `migrate.hl`'s own "skipped" tallies. It runs against a plain filesystem COPY
  480. of `storage/mpackdb/` (hl:mpackdb rewrites a file's data on open, so the live store is never opened
  481. a second time) and independently re-derives, from the persisted records alone: every table's
  482. `count()` against the export's own document count, and — by building id sets for every table and
  483. walking every reference field (`Show.genres/cast/seasons`, `Season.show/episodes`,
  484. `Episode.show/season`, `Person.shows`, `Follow.show/user`, `Watch.target/user`) — that every
  485. non-null reference resolves to a real id. It also follows one show end to end (`Raised by Wolves`,
  486. 2 seasons, 18 episodes, 1 follow, 2 season-level watches — all cross-checked back to the show).
  487. ```
  488. $ cp -r storage/mpackdb .scratch/verify-copy && TRACKER_VERIFY_COPY=$PWD/.scratch/verify-copy ./bin/hybriel tools/verify.hl
  489. count ok genres: 27 (expected 27)
  490. count ok persons: 15157 (expected 15157)
  491. count ok shows: 9453 (expected 9453)
  492. count ok seasons: 6430 (expected 6430)
  493. count ok episodes: 231584 (expected 231584)
  494. count ok follows: 128 (expected 128)
  495. count ok watches: 11692 (expected 11692)
  496. users: 1 (expected 1, the creator)
  497. 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)
  498. END-TO-END show 105ad9c91b14d663 "Raised by Wolves" seasons=2
  499. season 1 (be2965a5ab7165ca) episodes=10 show-back-ref-ok=true
  500. season 2 (0fe4e53157ed0367) episodes=8 show-back-ref-ok=true
  501. total episodes across seasons: 18
  502. follows on this show: 1, season-level watches touching it: 2
  503. VERIFY PASS
  504. ```
  505. (36194 episodes with no season = 36193 that never had one in the old export, plus the 1 the tool's
  506. own count already named as a pre-existing dangling `season` reference in the source data — neither
  507. is a reference this migration broke; `dangling references: 0` covers exactly that.)
  508. The single old user (`User.jsonl`, `[email protected]`, password not taken over) is this app's
  509. user for ident short id `az5b2` (`storage/mpackdb/users.db`, the same table step 1's login uses) —
  510. confirmed in the copy: one record, `identity=az5b2`.
  511. **Two Hybriel bugs found while building this** (both already filed as issues on this ticket by an
  512. earlier session, not re-filed): `hl:fs readFile` silently truncates at 10 MiB (worked around here
  513. with `split`, no shell, no JS, see `tools/migrate.hl`'s header comment) and `hl:mpackdb` loses rows
  514. across `update()` + reopen (the reason this tool never calls `update()`).
  515. **Open**: nothing shown yet — this ticket is data-only, on purpose (the next step, from the
  516. creator, is showing the data in the UI).
  517. ## 2026-09-27 — ticket #3: no border on the header or filled buttons
  518. Design notes from the first test (architect): "the application-header should have no bottom
  519. border" and "the buttons also no border except they are inverted". Two changes in
  520. `styles.hl`:
  521. - `applicationHeader`: dropped `borderBottom`.
  522. - `ident-selector::part(button)` (the signed-out "choose ident" button): added
  523. `border = 'none'` — the element's own CSS gave it a 1px border the same colour as its
  524. background (`--_accent`), invisible but still a real border in the computed style; this is
  525. the app-side restyling hook ident's README documents (`::part(button)`), not a change to
  526. ident's vendored `selector.js`.
  527. Left unchanged, already correct: the native `button` rule (filled, e.g. no other filled
  528. buttons on this page yet) already has `border = '0'`; `button.quiet` ("Log out") and the
  529. selector's dropdown `[part="identity"]` rows keep their border (transparent background —
  530. inverted style); `a.button` ("Log in with ident") has no border rule and browsers give `<a>`
  531. none by default. The selector's signed-in "logged in with ident" status pill
  532. (`::part(status)`) is not one of the buttons the ticket names and isn't a button element
  533. (a `<span>`) — left with its border.
  534. **Gate** (`tests/browser.mjs`, now 16 checks): added computed-style checks — the header's
  535. `borderBottomWidth` is `0px`; `#loginbutton`'s border is `0px`; the selector's
  536. `[part~="button"]` (inside its shadow root) border is `0px`; `#logout`'s border is NOT `0px`
  537. (still inverted-bordered) once signed in.
  538. ```
  539. node tests/browser.mjs
  540. 16 passed, 0 failed
  541. ```
  542. ## 2026-09-27 — ticket #1 reopened: login redone to match calendar exactly (header selector, empty page)
  543. The architect rejected the first build of ticket #1: the sign-in sat centered on the page
  544. (its own "Sign in with ident" card, identity + sign-out shown in a `homeCard`) instead of
  545. the header identity selector calendar/gitoria use, and there was no `<ident-selector>` at
  546. all. Rebuilt the login by copying calendar.worldapi.org's own files (unchanged in shape, per
  547. the architect's instruction "Copy calendar.worldapi.org's login unchanged"):
  548. - **`users.hl`** (new): the ident exchange + a `usersTable` (`storage/mpackdb/users.db`,
  549. `identity` → this app's user id), copied from calendar's `users.hl` with `TRACKER_KEY` /
  550. `TRACKER_SECRET` / `TRACKER_URL` / `TRACKER_STORAGE` in place of calendar's names (kept
  551. the names already in this app's `docker-compose.yml`/README/DECISIONS rather than
  552. switching to calendar's generic `IDENT_API_KEY`/`IDENT_API_SECRET`).
  553. - **`login.js`** (new): calendar's bridge between `<ident-selector>`'s `ident-login` DOM
  554. event and the hidden `#identcode` input, copied verbatim (creator: "login.js is correct,
  555. as thats for externals in general").
  556. - **`components/main.hl`**: now the header carries `userBox` (`<ident-selector>` + "Log in
  557. with ident" / "Log out"), the `trackerLogin`/`trackerLogOut` faces and the
  558. `trackerSignedIn`/`trackerSignedOut` client push — calendar's shell renamed to this app's
  559. event names.
  560. - **`components/home.hl`**: now truly empty (`View { home {} }`) — no sign-in link, no
  561. identity/sign-out duplicated on the page; that is entirely the header's job now.
  562. - **`components/loginfailed.hl`** (new) + **`project.hl`**: the login routes are now
  563. `/login/callback` (function route, the button's return AND the code exchange) and
  564. `/login/failed`, copied from calendar's `project.hl` (`safePath`, `failed()`,
  565. `loginCallback`) in place of the old `/login` + `/callback` + `/logout` routes; the old
  566. `/logout` POST route is gone (logout is a face, like calendar's).
  567. - **`styles.hl`**: added the header selector styles (`userBox`, `identSelector`,
  568. `ident-selector::part(...)`, sticky header) from calendar's `styles.hl`; dropped the
  569. now-unused `homeCard`/`accountBar`/`userName` rules from the rejected centered sign-in.
  570. **Gate rewritten** (`tests/browser.mjs`, 12 checks): replaced the old gate (which drove
  571. ident's full email-code UI through a vendored dev copy of ident at `.scratch/ident-dev`)
  572. with calendar's own pattern — `tests/identkit.mjs` (copied from calendar unchanged) starts a
  573. throwaway ident (a fresh copy of `/media/STORAGE/projects/ident.worldapi.org`'s code, no
  574. `.env`/storage copied, codes to a mail sink, never the live ident), signs in over its REST
  575. API and registers this app, then the gate proves the header in a real headless Chrome:
  576. signed out → `#selector` + `#loginbutton` in the header, **`main` is empty** → sign in
  577. (`/login/callback?ident_code=`, the same exchange the selector would trigger) → `#selector`
  578. shows `class="in"`, `#logout` appears, **`main` still empty** → sign out → signed out again
  579. → a reload stays signed out. No console errors.
  580. ```
  581. node tests/browser.mjs
  582. 12 passed, 0 failed
  583. ```
  584. `./deploy.sh --dry-run --target .scratch/deploy-preview --url http://127.0.0.1:0/`: gate
  585. passed as step [1/4], rsync preview held none of `storage/`, `.sessions/`, `.env`,
  586. `.scratch/`, `server.*`, logs. Removed the stale `.scratch/ident-dev` (the old gate's vendored
  587. ident copy) and `.scratch/browser-gate` (the old gate's storage) — unused by the new gate.
  588. **Still open**: the app is registered in ident's dev copies only (this gate's own throwaway
  589. ident). The LIVE ident registration (`TRACKER_KEY`/`TRACKER_SECRET` in `.env` next to
  590. `docker-compose.yml`) is the architect's first-deploy step (README "Deploy"), not built here.
  591. ## 2026-09-27 — ticket #2: data migration — blocked twice on sandbox access, nothing done
  592. Two workers in a row (`s-20260927T1029-f57b0f`, then this session) could not start: the
  593. migration source the ticket names, `/media/STORAGE/projects/old-tracker/mongo-export/*.jsonl`
  594. + its `README-RECONSTRUCTED.md`, is not reachable from this worker's sandbox. Verified fresh
  595. this session:
  596. ```
  597. $ ls -la /media/STORAGE/projects/
  598. antcolony-docs hybriel ident.worldapi.org tracker.worldapi.org # no old-tracker
  599. $ mount | grep STORAGE
  600. /dev/nvme1n1p6 on /media/STORAGE/projects/tracker.worldapi.org type btrfs (rw,...)
  601. /dev/nvme1n1p6 on /media/STORAGE/projects/hybriel type btrfs (ro,...)
  602. /dev/nvme1n1p6 on /media/STORAGE/projects/ident.worldapi.org type btrfs (ro,...)
  603. /dev/nvme1n1p6 on /media/STORAGE/projects/antcolony-docs type btrfs (ro,...)
  604. # old-tracker is not among the mounted subvolumes at all
  605. ```
  606. So this is not a data problem (the export is "complete" per the ticket) — it's the worker
  607. sandbox for this ticket that never got `old-tracker` mounted (read-only, like `hybriel` /
  608. `ident.worldapi.org` / `antcolony-docs` above). Nothing was built or changed this session:
  609. no `storage/`, no `tools/`, no id-mapping — writing the migration tool blind, guessing the
  610. JSONL shape from the ticket text alone, risks silently wrong data and was avoided on purpose
  611. (see the project's "Build it properly" rule). Filed as an antcolony issue so the next worker's
  612. sandbox includes `old-tracker` before another attempt.
  613. ## 2026-09-27 — ticket #1: the empty shell, ident login
  614. Built the app from scratch: vendored `bin/hybriel` + `plugins/` + `shared/tokens.hl` from
  615. `ident.worldapi.org` (newest local build, hybriel master 837fe120, no local patch — see
  616. README "Vendored Hybriel"). `project.hl` (routes `/login`, `/callback`, `/logout`, `/`),
  617. `components/home.hl` (the empty homepage), `components/main.hl` (shell), `styles.hl`
  618. (accent green `#4ec9b0`, per `antcolony/README.md` "look and style" / `CONCEPT.md`).
  619. `docker-compose.yml` / `Dockerfile` / `deploy.sh` following ident's own house pattern
  620. (port 45008, container `tracker.worldapi.org`).
  621. **Login**: the ident login BUTTON flow (ident.worldapi.org README "How apps use ident"),
  622. server-side exchange (`POST <ident>/api/exchange`), this app's own framework session
  623. (`session.user = { identity }`, cookie `trackersid`). ident hands over only the identity's
  624. public **short id** — no display name yet (ident#11, properties handover, is on hold) — so
  625. "your name" on the homepage is `Signed in as <shortid>`, the same identifier every other
  626. worldapi app would show; see `decided` in the report.
  627. **Lesson (Hybriel)**: a face that mutates `session.user` (e.g. `signOut`) does NOT
  628. automatically re-render the page — a component's reactive members (`signedIn`, `identity`,
  629. …) are computed once at mount from the framework's read-only session snapshot; a client
  630. handler that calls `emit server X()` must ALSO flip the affected members itself afterwards
  631. (ident's own `components/home.hl` `on doSignOut(e)` does exactly this: `emit server
  632. signOut()` then `signedIn = false` …). Missing that made the sign-out button silently do
  633. nothing client-side (the ack came back `ok:true`, the server-side session really was
  634. cleared — proven by a reload — but the DOM never updated) until copied.
  635. **Gate** (`tests/browser.mjs`, 13 checks): a fresh copy of `ident.worldapi.org`'s code (no
  636. `.env`, no `storage/`, no `.sessions/` — verified empty of secrets/data before first use)
  637. runs as this gate's own ident, on its own storage and its own mail sink (no live ident, no
  638. real mail). The gate registers this app in that dev ident once over the `/__hl/emit` API
  639. (the same one-time step a person does by hand in ident's `/apps` page), then drives the
  640. REAL login-button flow in a real headless Chrome: signed out → click "Sign in with ident" →
  641. ident's email form → the mail-sink code → the first-login optional-names form (Skip) → the
  642. one-identity choice (one click) → back on tracker, "Signed in as `<shortid>`" → "Sign out" →
  643. signed out again → a reload stays signed out. No console errors. Ran twice for stability, 0
  644. failures; no leftover Chrome/hybriel processes after either run.
  645. ```
  646. node tests/browser.mjs
  647. 13 passed, 0 failed
  648. ```
  649. `./deploy.sh --dry-run --target .scratch/deploy-preview --url http://127.0.0.1:0/` (a local
  650. directory, per ident's own convention for testing deploy.sh without touching Byrodin): gate
  651. passed, rsync preview held none of `storage/`, `.sessions/`, `.env`, `.scratch/`, `server.*`,
  652. logs — confirmed by the same grep the script refuses on.
  653. **Open**: the app is not registered with the LIVE ident yet — `TRACKER_KEY`/`TRACKER_SECRET`
  654. are unset until the architect's first deploy does that (README "Deploy"); until then
  655. `/login` on the live site answers a plain error page instead of redirecting (`/` itself
  656. still renders). This is normal for a brand-new app, the same as ident's own SMTP `.env`
  657. before its first deploy — not something this ticket's worker can set (no `.env` access,
  658. and it is a LIVE ident registration).

Branches

Latest commits

  • 03edc783Merge branch 't15-tvmaze'mre
  • 71b46345tracker#15: numbering check by date or title, placeholder titles in other languages, docs + real-data proofmre
  • 6bb2daf1tracker#13: homepage (tiles, intro, latest movies/shows), /shows, /movies/page/N, /my/movies; lists cached in memorymre
  • 34f2c15btracker#15: TVmaze merge in the sync (gaps only: new episodes/seasons, empty titles/air dates; numbering check), fake TVmaze episodes + gatemre
  • cbdc4ea7tracker#12: link icons TMDB/IMDb/TVDB/TVmaze; sync fills missing ids (TVmaze lookup); movies fetched via /movie/mre
  • b105bcd8tracker#11: Hybriel master ff51cf46 (checks no longer vanish), mobile-first styles, carets, follow button, sign-in modal, inverted check, orange castmre
  • 31b758aatracker#10: installable app (manifest, service worker, offline shell), own icon + faviconmre
  • 2fa9d997tracker#9: TMDB sync (followed shows: seasons, episodes, posters), tools/sync-tmdb.hl + daily run 04:00 UTC, fake TMDB in gatemre
  • 49e1f61edeploy.sh: back up live storage/.sessions/.env before every deploy (newest 5 kept)mre
  • 54070a4etracker#8: /my/unwatched + /my/schedule (301 from old), S01E01, title (year), 1 episode, watched-set lookup (unwatched 15s -> 1s)mre
  • 3251488atracker#7: /my/shows (followed shows, newest follow first, poster, title, last watched SxxEyy); gate can take screenshots (TRACKER_GATE_SHOTS)mre
  • 44b7d9f9tracker#6: /schedule — upcoming episodes of followed shows, soonest firstmre
  • 91c9fc8ctracker#5: /unwatched — unwatched released episodes of followed shows, newest firstmre
  • a97c0295tracker#4: show page /shows/:slug (header, seasons, episodes, watch checks) + tools/relink-episode-seasons.hlmre
  • 05f407c5tracker: no border on any button except inverted ones (Log out, ident status and identities too); header brand weight 100mre
  • 17375427tracker#2: tools/migrate.hl + tools/verify.hl — old MongoDB data into mpackdb with new idsmre
  • 31aac936tracker#3: no border on the header and on filled buttons; inverted buttons keep theirsmre
  • 2ad9d29ctracker#1: login exactly like calendar (identity selector in the header, empty homepage)mre
  • 3691e176tracker#1: empty tracker with the ident login (state of 2026-09-27)mre