tracker
All repositories: gitoria
45.5 KB
# STATUS — tracker.worldapi.org## 2026-10-01 — ticket #12 (mission 049): link icons to TMDB, IMDb, TheTVDB, TVmaze**Built**: show page header badges `TMDB` `IMDb` `TVDB` `TVmaze` (`components/show.hl` `linkRows`, `shows.hl``externalLinksOf`, `styles.hl` `showLinks`/`a.extlink`: CSS-only monochrome badges, accent on hover), only for ids theshow has, `target=_blank rel=noopener`; a movie: TMDB (`/movie/<id>`) + IMDb. Phone: between title row and poster;desktop: under the title. Sync (`tmdbsync.hl`): details request now `?append_to_response=external_ids` (no extrarequest) → fills a MISSING imdbId/tvdbId; still no tvmzId → TVmaze `lookup/shows?imdb=`, on 404 `?thetvdb=` (550 mspause each, `pauseMsAfter` in both runners); never overwrites. Totals: `ids=`, `tvmazeRequests=`. New`tools/count-external-ids.hl` (copy only).**Bug found + fixed**: movies (`type = 'movie'`, 7814 rows, 1 followed: Star Trek: First Contact, tmdbId 199) weresynced as `/tv/199` — another title. Now `/movie/<id>?append_to_response=external_ids`: imdbId + poster only.**Live data still carries the damage**: that record has `status = 'Ended'` and `tmdbSummary` = the overview of TVshow 199 ("Kabuhayang Swak na Swak…") — not visible (the page shows `summary`), the new sync leaves both alone; aone-off fix (set `tmdbSummary = null`, `status` back) is the architect's call.**Decisions**: TheTVDB link = `https://thetvdb.com/dereferrer/series/<id>` (it and `?tab=series&id=` both 301 to theslug page, checked 2026-10-01); IMDb `/title/<tt>/`; TVmaze `www.tvmaze.com/shows/<id>`. Badges with text, notdrawn pictograms (no logos copied; legible at 0.75rem). An imdb id is only taken as `tt`+digits, a tvdb/TVmaze idonly as a number > 0. A show TVmaze doesn't know is asked again each daily run (2 lookups/day on real data).**Real data** (copy of Byrodin `storage/` 2026-10-01 ~06:20, deleted afterwards; `tools/count-external-ids.hl`):| | shows | tmdbId | imdbId | tvdbId | tvmzId ||---|---|---|---|---|---|| followed series, before → after 1 sync | 125 | 125 | 125 | 125 | 123 → **124** || followed movie | 1 | 1 | 1 | – | – || all series (only followed are synced) | 1639 | 1639 | 907 | 910 | 845 → 846 || all movies | 7814 | 7814 | 379 | – | – |Sync: `shows=126 newSeasons=0 newEpisodes=0 updatedEpisodes=0 updatedSeasons=0 posters=1 ids=1 requests=256tvmazeRequests=4 errors=0 seconds=105.6` (poster = the movie's real one; id = Greek Salad tvmz 60613; Mapping theWorld: TVmaze knows neither tt0395050 nor tvdb 109331). TMDB's external ids match ALL 125 stored imdb/tvdb ids (0differ). Show pages (az5b2, :8730): Librarians 1.08 s cold / 0.13 s, Greek Salad 0.18 s, Star Trek: First Contact0.13 s (TMDB movie/199 + IMDb, real poster now); no sideways scroll, 0 console problems. Screenshots`/tmp/w049/real/*-{390,1280}.png` (looked at). Procedure = ticket #8 below (sync tool with `.env` sourced).**Gate** (101 → 111 checks):```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(in-app run 5.416 s; 12 pages asked during it, slowest 1323 ms)111 passed, 0 failed```Fixture: show 1 imdb `tt0000001` only (TMDB says tt9999999 + tvdb 4001), show 2 tvdb `4002` only (TMDB: tt0000002 +4999), movie `gate-test-movie` (tmdb 1003, followed by a 2nd user so alice's lists are unchanged → the sync now has3 shows). Fake TVmaze: imdb tt0000001 → 501, thetvdb 4002 → 502. Screenshots `/tmp/w049/shots/` (show-*, synced-show{,-390}, synced-movie{,-390} looked at). The new-tab check closes the tab at once (it would load the real site).**Open**: real-phone tap test after deploy (new tab). Star Trek: First Contact's wrong `tmdbSummary`/`status`(above). Unfollowed shows never get ids filled (sync covers followed only, by design).## 2026-10-01 — mission 047: re-vendor Hybriel (invisible checks), mobile first, show page additions**Bug** (live, the creator: "i dont see the check marks"): after a CLIENT-SIDE navigation (and after expand/collapseor a check click) the check `<svg>` was built in the XHTML namespace (circle width 0). Fixed by **re-vendoring Hybrielmaster ff51cf46** (bin sha256 `55a724a0…c5`, README "Vendored Hybriel"; old bin/plugins in `.scratch/pre-047/`).Proof the new check fails on the old build: `/tmp/w047/old-build-gate.log` (`ns: http://www.w3.org/1999/xhtml,circleWidth: 0`), passes on the new one.**Built**: `styles.hl` mobile first (phone base rules, one `@media (min-width: 40rem)` block; header one row at390 px; /my/unwatched + /my/schedule rows two-line on a phone). Show page: phone order title (+ Follow) → full-widthposter → genres/plot/cast (desktop unchanged); season caret (down/right); episodes not indented; artists orange`#ce9178`; unwatched check = accent outline circle + accent check; **Follow toggle** (face `showToggleFollow`,`follows.hl` `isFollowing`/`setFollowed`: new record `at = now`, unfollow deletes); signed out checks + Follow visible,a click opens the sign-in modal (`components/modal.hl`, copied verbatim from components.hybriel becbd59), nothing sent.Session-sync workaround in show/myshows/unwatched/schedule: `rows` reads `me` (a plain copy of `userId`), and`following` goes through a LOCAL static `followingOf` — an imported mpackdb helper called directly in a memberinitializer came back false after a client-side navigation (gate caught it; not reduced to a minimal repro yet).**Duplicate @ids** (hybriel#113) on a copy of live storage (2026-10-01 04:13), `tools/count-duplicate-ids.hl` + the`*.id.txt` indexes: **0 in every table** (episodes 232384, follows 128, genres 27, persons 15157, seasons 6450, shows9453, users 1, watches 11663 rows).**Real data** (copy, `az5b2`, :8730, `node tests/realdata-check.mjs`, full load incl. socket + posters):| page | 390 px | 1280 px ||---|---|---|| `/my/shows` (128) | 1.29 s (cold posters) | 0.24 s || `/my/unwatched` (1594) | 1.51 s | 1.46 s || `/my/schedule` (54) | 0.35 s | 0.32 s || `/shows/The-Librarians-The-Next-Chapter` direct / client-side | 0.14 / 0.19 s | 0.13 / 0.18 s |Client-side nav, expand, collapse: 14/26/14 checks, 0 wrong namespace, 0 undrawn; header 46 px at 390, no sidewaysscroll. Screenshots `/tmp/w047/real/*.png` (looked at). Procedure = ticket #8 below; the session id goes in`.scratch/real-sid` (the script reads it); copy + sessions deleted afterwards.**Gate** (76 → 101 checks):```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.mjs101 passed, 0 failed```Screenshots `/tmp/w047/shots/` ({home,show,my-*}-{390,1280}.png, signed-out-modal-1280.png) — looked at.Gate note: the follow test re-follows show 1, so the sync's request order between the two shows may flip (the checkaccepts both orders) and `/my/shows` after the sync has show 1 on top.**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.The unwatched (outline + check) and watched (filled) icons differ only by fill — as asked. No navigation links tothe `/my/` pages yet. Real-phone check after deploy.## 2026-10-01 — ticket #10: installable app (PWA) + icons**Built**: `icons/` (`icon.svg` source → `icon-192.png`, `icon-512.png`, `apple-touch-icon.png` 180; `favicon.svg`,`favicon.ico` 16/32/48 — rsvg-convert + magick, commands in README "What it does (step 10)"); `project.hl`:`appIcons` (192/512 × any/maskable, like calendar), `appTouchIcon`, `appFavicon`, `appThemeColor = darker.value`,`appBackgroundColor = dark.value` (tokens), `offline = [ Home ]`, file routes for the icons, `/favicon.ico` now areal file (was `direct = ""`); `components/main.hl` offline note + `netProbe` tick; `styles.hl` `offlineNote`,`netProbe`, `@keyframes tracker-net-tick`; gate +12 checks.**Decisions**: icon = a TV (antennas) with a check mark on the screen = "watched shows", green `#4ec9b0` onrgb(25,30,35), all inside the maskable safe zone so one PNG serves any + maskable. Theme colour = `darker` (the headerbar, so the phone's status bar blends in), background = `dark`. Offline keeps only the shell/`/`; data pages gethl:web's "Unavailable offline". The offline note is driven by `navigator.onLine`, read on a 1 s CSS-animation tick(`animationiteration`) — hl:web has no connection-state member and no mount hook (reported as a Hybriel gap).**Gate** (64 → 76 checks):```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.mjs76 passed, 0 failed```Looked at: `/tmp/w045/icon-48.png`, `icon-192.png`, `icon-512.png`, `maskable-circle.png`, `small-on-white.png`(favicon 16/32/48), `/tmp/w045/shots/pwa-phone-{online,offline}.png` (390 px) on Loreana.Test gotcha: CDP `setOffline` only cuts the TAB — the service worker's own fetches still reach the server, so thegate also stops the server before the offline reload.**Open**: offline, the header's `<ident-selector>` (script from ident's origin, not cached) shows "choose ident"next to "Log out". No note when the device is online but the server is down. Real-phone install test (ticket's**Test**) after deploy: open https://tracker.worldapi.org → "Add to home screen".## 2026-10-01 — ticket #9: TMDB sync (new episodes + posters)**Built**: `tmdbsync.hl` (`syncShow`: details + ≤ 20 seasons per request via `append_to_response`, add/updateseasons+episodes, poster w342), `tools/sync-tmdb.hl` (`--limit N`, paced, prints counts), the daily run in`project.hl` (`syncTick` on an hl:time `every(1)` clock: at `TRACKER_SYNC_HOUR` UTC (4), once a day, ONE showper tick, next show after n × 260 ms), `follows.hl` `allFollowedShowIds`, fake TMDB `tests/faketmdb.mjs`,fixture shows got tmdbIds 1001/1002. Details: README "What it does (step 9)".**Decisions**: match episode by tmdbId, else by S/E when the local one has no tmdbId (161 migrated); season bynumber. Empty TMDB values never overwrite. Season 0 only if the show already has one (else specials flood/my/unwatched); empty TMDB seasons not created. Own 16-hex ids for new rows (hybriel#113). Posters in`storage/mpackdb/posters/` (the folder the existing `/posters/:name` route reads — inside `storage/`, so in thebackup) rather than a new `storage/posters/`. Shows synced = all followed (also Ended ones — updates happen).Sync is off without `TMDB_READ_TOKEN` or with `TRACKER_SYNC=0`.**Blocking**: `fetch()` blocks the whole hl:web process (measured: requests wait for the running step) — so therun is cut into one-show steps. Real data: ~0.7 s per step average, SNL (53 seasons, 4 requests) 1.7 s; persistof the 3 tables 36 ms.**Real-data proof** (copy of Byrodin's `storage/` in `.scratch/realdata/`, deleted afterwards; procedure asticket #8 below; session file needs `created`/`seen` = now in ms, else the boot sweep deletes it):```set -a; . ./.env; set +aTRACKER_STORAGE=$PWD/.scratch/realdata/storage/mpackdb ./bin/hybriel tools/sync-tmdb.hl --limit 128tmdb sync done: shows=126 newSeasons=20 newEpisodes=800 updatedEpisodes=2651 updatedSeasons=174 posters=125 requests=380 errors=0 seconds=185.718(again) shows=126 newSeasons=0 newEpisodes=0 updatedEpisodes=0 updatedSeasons=0 posters=0 requests=255 errors=0 seconds=89.888```Fresh-process recount: seasons 6430 → 6450, episodes 231584 → 232384 (exactly +20/+800, no row loss), 0dangling season/episode refs, 0 duplicate season numbers; 12 duplicate tmdbIds + 1 wrong parent were already inthe migrated data (same before/after). 126 shows (128 follows), 125 posters (one show has none on TMDB).In-app daily run on the copy (TRACKER_SYNC_HOUR = current hour, real TMDB): 126 shows, 255 requests, 136 s,0 errors; `/my/shows` (signed in) polled every 0.5 s meanwhile: 181 answers, avg 0.25 s, max 4.0 s (one), then1.8/1.7/1.4 s. Full page loads after the sync (headless Chrome, load + socket + all images):| page | full load | rows ||---|---|---|| `/my/schedule` | 0.7–0.8 s | 55 (was 0) || `/my/shows` | 1.3–1.55 s (128 real posters now, 1 placeholder) | 128 || `/my/unwatched` | 1.5 s (server 1.3 s) | 1593 (was 831) || `/shows/The-Librarians-The-Next-Chapter` | 0.33 s | poster + new S2 (12 eps) |Screenshots + logs: `/tmp/w044-real/` on Loreana (`after-*.png`, `real-sync{1,2}.log`, `real-lat.txt`).**Gate** (49 → 64 checks):```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(in-app run 4.405 s; 10 pages asked during it, slowest 1371 ms)64 passed, 0 failed```Screenshots `/tmp/w044-shots/` (`synced-*.png` looked at: posters, S3, schedule rows fine).**Deploy (architect)**: `TMDB_READ_TOKEN` must be in Byrodin's `.env` (env_file) — without it the log says`tmdb sync: off (no TMDB_READ_TOKEN)`. First daily run 04:00 UTC after deploy; check `docker logstracker.worldapi.org | grep tmdb`. Or stop the container and run the tool once for an immediate catch-up.**Open**: a step blocks requests up to ~2 s (a non-blocking `fetchStart` + `done()` state machine would fix it).`/my/unwatched` render grew with the rows (1.3 s server, 1593 rows) — watch it against the 2 s target. A seasonwatch record stays solid when the sync adds a new episode to that season (existing season-watch semantics).Dev servers get the real token from `.env` automatically → start them with `TRACKER_SYNC=0`. Shows nobodyfollows are never synced (by design).## 2026-09-30 — ticket #8: /my/ pages, S01E01, years, speed**Built**: `/my/unwatched`, `/my/schedule` (routes in `project.hl`); old `/unwatched`, `/schedule` →**301** (function routes `unwatchedMoved`/`scheduleMoved`). Rows as `S01E02 · <title>` (was`Ep 2 · …`), list titles with the year `Doctor Who (2005)`, show page `1 episode` singular.New shared helpers in `shows.hl`: `pad2`, `episodeCode`, `showYear`, `titleWithYear`,`posterUrlOf`; in `watches.hl`: `watchedSet` (used by `/my/unwatched` and the show page's`buildRows`; `isWatched` stays for the single-target toggles).**Decisions**: year = `year`, else `release.slice(0,4)`, else none (197 shows lack `year`, somehave `release = ''`). Year only in LISTS (`/my/*`), not in the show page's `h1`. The 301 drops anyquery (the pages take none). A row whose poster FILE is missing gets `/posters/none` (one cachedURL) instead of `/posters/<oldId>.jpg`.**Why /my/shows was ~25 s live though its data is 0.2 s**: hl:web handles ONE request at a time.Measured on the copy: `/my/shows` requested 1 s into a `/unwatched` render took 13.7 s (the`/unwatched` render itself 14.5 s). Every request (pages, 128 poster requests) of every visitorqueued behind a slow `/unwatched`. Plus 128 distinct poster URLs per load, all the placeholder.**Real-data check** (copy of Byrodin's `storage/` only, `az5b2` = user `0mujqspn0aqb`, devserver :8730, headless Chrome, navigate → load → websocket open, 1280×900):| page | before | after ||---|---|---|| `/my/shows` (128 rows) | 1.2 s (server 0.19 s) | 0.6–0.8 s, 1 poster request || `/unwatched` → `/my/unwatched` (831 rows) | 14.8 s | 0.7–1.2 s (server 0.55–0.65 s) || `/schedule` → `/my/schedule` (0 rows, data not synced since 2025-12) | 0.36 s | 0.3 s || `/shows/The-Librarians-The-Next-Chapter` | 0.34 s | 0.29 s |How to repeat (Loreana; never touch Byrodin's folder beyond the tar read):```ssh [email protected] 'tar czf - -C /CONTAINERS/projects/tracker.worldapi.org storage' | tar xzf - -C .scratch/realdata # ONLY storage/TRACKER_PORT=8730 TRACKER_WATCH=0 TRACKER_STORAGE=$PWD/.scratch/realdata/storage/mpackdb TRACKER_SESSIONS=$PWD/.scratch/realdata-sessions/ ./bin/hybriel project.hl# session file: name = sha256(<32-hex id>), JSON {"created":1,"data":{"tag":"t"},"id":"<id>","seen":1,"user":{"id":"0mujqspn0aqb"}}curl -s -o /dev/null -w '%{time_total}\n' -b trackersid=<id> http://127.0.0.1:8730/my/unwatched# Chrome: tests/cdp.mjs launchBrowser, Network.setCookie trackersid, goto + wait __hl.socket open# afterwards: stop the server, rm -rf .scratch/realdata .scratch/realdata-sessions```Screenshots: `/tmp/w041-real/{before,after}-{shows,unwatched,schedule,show}.png` (Loreana).**Gate** (45 → 49 checks: two 301s, the browser landing on `/my/unwatched`, "1 episode"; theexisting ones now expect `/my/…`, `S01E02 · Second`, `S02E01 · Season Two Opener`, titles withyear, `/posters/sh1.png` + `/posters/none`). Fixture: show 1 `image = 'png'` (gate writes a 1×1`posters/sh1.png`), show 2 `year = null`, `release = '2025-03-01'`.```TRACKER_GATE_SHOTS=/tmp/w041-shots TRACKER_GATE_PORT=8720 TRACKER_GATE_IDENT_PORT=8721 TRACKER_GATE_CHROME=8722-8726 node tests/browser.mjs49 passed, 0 failed```Screenshots `/tmp/w041-shots/` (looked at: all fine).**Open**: `/my/unwatched` rebuilds all rows per check click (~0.6 s, fine). Still no navigationto the `/my/` pages. The single-request server means any future slow page blocks everyone —keep every page well under 1 s. `/my/schedule` stays empty until the TMDB sync step.## 2026-09-30 — ticket #7: /my/showsBuilt `/my/shows` (`components/myshows.hl`, route in `project.hl`, styles in `styles.hl`): everyfollowed show, newest follow (`follows.at`, epoch ms) first — small poster (2.5rem, `/posters/…` +placeholder like the show page), title → `/shows/<slug>`, last watched episode `SxxEyy`.**Decisions**: "last episode" = highest (season, episode) among the user's EPISODE watches of thatshow (ticket); a season watch alone doesn't count (the season check watches every episode anyway).No watch → no episode element. A show without a poster name → `/posters/none` (the route's ownplaceholder), so every row has a poster. Read-only page, no face (like `/schedule`).**Reuse**: new `follows.hl` `followsOfUser` (whole records; `followedShowIds` now builds on it) and`shows.hl` `episodeById` (one line); `showById`, `posterName`, `watchesOfUser` unchanged.**Performance** (against a COPY of `storage/mpackdb/` in `.scratch/perf-store`, removed after; livefiles md5-verified unchanged): the page touches only the user's follows and episode watches(one fetch per watch), never all episodes of a followed show — az5b2's 128 follows → 128 rows (123with an episode, e.g. `S36E11`, `S30E91`) built in **160–255 ms**. For comparison **`/unwatched`takes ~15 s** on the same copy (805 rows): it fetches every episode of every followed show andchecks each against the user's 11,692 watches with a linear `isWatched` — not in this ticket'sscope, flagged below.**Gate** (`tests/browser.mjs`, 38 → 45 checks; `tests/seed-show.hl` adds a 2nd show "Unwatched GateShow", no seasons/poster name, followed AFTER the first but stored after it; the first follow is nowdated a day back): signed out → sign-in message; signed in → newest follow first, title hrefs,posters loaded (`naturalWidth > 0`), 40px wide, `S01E02` after /unwatched's click, later `S02E01`(watched BEFORE season 1's bulk watch → proves highest, not most recent), none for the other show.```TRACKER_GATE_PORT=8720 TRACKER_GATE_IDENT_PORT=8721 TRACKER_GATE_CHROME=8722-8726 node tests/browser.mjs45 passed, 0 failed```**Open**: `/unwatched` ~15 s on real data (above) — a watched-id map instead of `isWatched` perepisode would fix it (own ticket). No navigation links to `/my/shows` yet (homepage stays empty).## 2026-09-27 — ticket #6: /scheduleBuilt `/schedule` (`components/schedule.hl`): every episode of a show the signed-in user followsthat is NOT yet released (`e.release > today`), soonest first. Creator: "/schedule has a similarlist without check icons for the upcoming episodes of shows followed" — same row shape as`/unwatched` (`components/unwatched.hl`) minus the check icon.**Reuse, not copy**: imports the exact same `followedShowIds` (`follows.hl`), `showById` /`seasonsOfShow` / `episodesOfSeason` (`shows.hl`) that `/unwatched` already uses — nothing newadded to either file. `watches.hl` is not imported at all: a row here is never watched/unwatched,there is no check icon and no click, so the page needed no per-user watch state and no `on server`face — the whole component is a single read-only server-side render (`rows` computed once from`session`, same as every other reactive member here).**Order**: soonest first, ascending by `release` (a plain `'YYYY-MM-DD'` string, orderingoperators confirmed working against this app's own vendored `bin/hybriel`, same as `/unwatched`'sSTATUS entry) — the ticket named this the architect's own reading ("the creator named the orderonly for /unwatched"), so `insertByReleaseAsc` mirrors `/unwatched`'s `insertByReleaseDesc` withthe comparison flipped.**`decided`**: "upcoming" = `release` strictly after today (not `>=`) — the natural complement of`/unwatched`'s own `release <= today`, so every released-or-today episode is unambiguously on onelist, never both, never neither.**Gate** (`tests/browser.mjs`, 35 → 38 checks): reused the same fixture (`tests/seed-show.hl`,unchanged) — episode 3 already carried a far-future release (`2099-01-01`) for `/unwatched`'s own"excludes the future one" check; `/schedule` now proves the mirror image with the same fixture:signed out, no rows, the sign-in message; signed in, only that one future episode shows (the twoalready-released ones excluded), no `button.checkicon` anywhere on the page, unaffected by any ofthe watch toggles the other checks perform on the same fixture (run in any order — `/schedule`never reads watch state).```node tests/browser.mjs38 passed, 0 failedps -eo pid,args | grep [h]l-browser-tier(nothing)```Updated `README.md` ("What it does (step 6)", Test, Files) and this file.**Open**: nothing shown on the homepage still points to `/schedule` (same as `/unwatched` beforeit — the homepage stays empty per ticket #1's decision).## 2026-09-27 — ticket #5: /unwatchedBuilt `/unwatched`: every episode of a show the signed-in user follows that is already released(`release` ≤ today, a plain `'YYYY-MM-DD'` string — migrated as-is by `tools/migrate.hl`, neverrun through `dateOf`) and not yet watched, newest release first (creator: "/unwatched lists allunwatched episodes of shows followed in release date desc order").**Reuse, not copy** (the ticket's own instruction, re "the same check icon and watch logic as theshow page"): `watchClassOf` (watched → `'checkicon solid'`/`'checkicon regular'`) was a private`static` in `components/show.hl`; moved it to `watches.hl` so both pages import the SAMEdefinition instead of each declaring their own — `show.hl` now imports it too, nothing duplicated.`isWatched`/`setWatched` (already in `watches.hl`) needed no change. New `follows.hl`(`followedShowIds`) and `shows.hl` `showById` (one line) round out the read-only data access thispage and `/schedule` (ticket #6) both need.**String comparison** (`e.release <= today`, `row.release >= x.release` for the desc sort):hybriel#2 ("no ordering operators on strings") is filed as still-open in this ticket's brief, butits own history shows it was fixed and merged to master 2026-09-25 — confirmed directly againstTHIS app's own vendored `bin/hybriel` (`'2020-09-03' <= '2026-09-27'` → `true`), so no numericdate workaround was needed.**A View text node cannot hold an inline expression** (`"Ep " + row.episodeNumber + " · " +row.title` inside a tag body) — same rule as View attributes (components/show.hl's own comment:"a View attribute must be a literal, a member or a field path"), just not documented for textnodes anywhere yet; it silently rendered `<!-- binary_expression not rendered yet -->` instead oferroring. Fixed by resolving the label into a plain field (`row.episodeLabel`) once, server-side,in `unwatchedRowsOf` — the same pattern `show.hl`'s `buildRows` already uses for every otherternary/concatenation. Not filed as a new Hybriel gap since it's the exact same restrictionalready known and worked around elsewhere in this app, just not yet hit for interpolated text.**Empty state**: signed out (no user, so no follows to show) and signed in with nothing unwatchedboth render a message; used `.muted` (colorTextMuted), not `.message` (colorDanger) — the existing`.message` class is for real errors (the login-failed banner), and an empty list isn't one (a`decided`, small).**Gate** (`tests/browser.mjs`, 29 → 35 checks): `tests/seed-show.hl` now takes an optional`TRACKER_SEED_IDENTITY` and, when given, seeds a fixed user + a follow of the fixture show for it— the only way to give `/unwatched` a known followed show before the browser ever signs in, sincethe real login's `ensureUser` matches an EXISTING `users.db` row by `identity` and reuses its idrather than minting a new one. The gate learns alice's per-app identity with one throwaway`ident.exchange` call (consuming one code) before writing the seed. Episode 1/2 of the fixture nowcarry a past `release` (`2020-01-01`/`2020-06-15`), episode 3 a far-future one (`2099-01-01`) —proving both the release-date filter and the desc order. The new checks run signed out (no rows,the sign-in message), then signed in RIGHT AFTER LOGIN, BEFORE the existing show-page checks thattoggle these same fixture episodes watched (order matters — otherwise `/unwatched` would alreadybe empty by the time it's tested): both unwatched episodes list newest-first, excluding thefuture one; a click on the newest (`Second`, ep 2) removes it from the list; a reload proves thewatch is server-side, leaving only `Pilot` (ep 1).```node tests/browser.mjs35 passed, 0 failedps -eo pid,args | grep [h]l-browser-tier(nothing)```Updated `README.md` ("What it does (step 5)", Test, Files) and this file.**Open**: nothing shown on the homepage still points to `/unwatched` — no navigation exists yet(the homepage stays empty per ticket #1's decision; a later step, from the creator, presumablyadds it). `/schedule` (ticket #6) is next and reuses `follows.hl`/`shows.hl`/`watches.hl` the sameway.## 2026-09-27 — ticket #4: the show page, watch checks (took over a previous half-done session)Continued from an earlier session that had built the whole page — header, seasons/episodes,the click-handling redesign to a flat `rows` list rebuilt server-side (`components/show.hl`'sown header comment explains why: a nested `for` over seasons > episodes risks hybriel#86) — butleft with the gate red: clicking a check never turned it solid, no console error, and thesession ran out of budget before finding why.**The actual bug**: the show page's own pure helpers (`buildRows`, `genreRowsOf`, `castRowsOf`,`watchClassOf`, `initialCollapsed`) were plain instance members (`buildRows = (show, …) => {…}`,no `static`). That shape works fine as a member's own top-level initializer (`rows = found ?buildRows(showRow, watchRows, collapsed) : []` — this is how the page renders correctly on firstload) but throws when the SAME function is called from inside an `on server` face(`showToggleEpisode` etc.): the server log showed `'buildRows' is not callable — it holds null`.Found by running `.scratch/debug-click.mjs` (left by the previous session) with the server'sstdout/stderr captured — the browser console itself stayed silent (the face's error neverreaches the client at all, a separate Hybriel gap, hybriel#92 already covers that half).Confirmed the fix by grepping other worldapi apps for the same shape:`calendar.worldapi.org/components/calendar.hl` has `static soonOf = (u) => { … upcoming(u, …) }`(an mpackdb-backed helper), called from its `on server calLoad`/`calSettingsLoad` faces, andcalendar's own gate is green — so `static` is the proven-safe shape for a component's own helperthat both (a) touches an mpackdb-backed import and (b) needs calling from more than one place(its own initializer AND a later face). Declared all five helpers in `show.hl` `static`; reranthe gate: 29/29 green, including the season-bulk-toggle and the reload-proves-server-side checks.Filed **hybriel#115 was already open** (from the previous session, about the CLIENT bundleomitting a case for such a helper) but this session's finding is the SAME root cause reachingfurther than that ticket says: the plain HL interpreter on the SERVER also treats such a helperas `null` outside its own initializer, not just the JS-compiled client bundle. Left as one`issues` entry pointing at hybriel#115 rather than opening a near-duplicate ticket — therepro/observed there already generalizes (a per-instance member function wrapping anmpackdb-backed import is unreliable wherever it is called from, not just the browser).Ran `node tests/browser.mjs`: 29 passed, 0 failed (was 20 passed / 1 failed — the click timeout— before the `static` fix).**Rehearsed `tools/relink-episode-seasons.hl` against a full COPY** of the real`storage/mpackdb/` (`.scratch/relink-rehearsal/`, since removed) — the tool's own header claimedthis rehearsal already existed here; it didn't (a leftover claim from the previous session), sothis session actually ran it:```relink: episodes 231584, null season before 36194, linked 36194, still null (no matching season) 0relink: episodes.db replaced with the relinked file — re-run to confirm idempotency (0 linked the second time)```Ran a second time on the same copy straight after — idempotency confirmed:```relink: episodes 231584, null season before 0, linked 0, still null (no matching season) 0```All 36,194 pre-existing null-season episodes (ticket #2's count) now link to a real season by`(show, seasonNumber)`; none left over. Not run against the LIVE `storage/mpackdb/` — that needsthe tracker container stopped first (hl:mpackdb does not coordinate two processes on one storagedirectory, hybriel#21), the architect's job per the ticket ("the architect runs it live").Updated README.md ("What it does (step 4)", Test, Files) and this file.## 2026-09-27 — ticket #2: old data migrated (took over a previous session's rewritten tool)Continued from an earlier session that had rewritten `tools/migrate.hl` to avoid a real data-lossbug (see below) but never run it even once, and had left the real `storage/mpackdb/` holding datafrom the OLDER, buggy two-pass version of the tool (put a bare record, then `update()` it once theother side of a circular reference existed). Took over: moved that buggy data aside(`.scratch/pre-migrate-buggy-backup`, since removed), kept `storage/mpackdb/users.db` (step 1'slogin table, untouched by the migration), and ran the already-fixed tool for the first time.**The fix already on disk (kept as is):** `Show.seasons`/`Season.show` and `Show.cast`/`Person.shows` are two-way references, so the id on one side must exist before the record on theother side can be built. The old approach — `put()` a bare record, come back with `update()` oncethe far side's id exists — loses rows: reopening a table in a fresh process after an `update()` hadtouched it read back FEWER rows than were ever `put()` (seen directly: `persons.db`'s `count()`dropped 15157 → 15152 after one round of `update()` — a real `hl:mpackdb` bug, reported to Hybriel,not something an app is allowed to patch around). The fix assigns every new id itself (8 randombytes, `hl:crypto`) in one pass over each export file BEFORE building any record, so by the time arecord is actually built every reference is already a known id — one `put()` per row, `update()`never called.**Run** (`tools/migrate.hl`, `TRACKER_OLD_DATA=.../old-tracker/mongo-export`,`TRACKER_STORAGE=$PWD/storage/mpackdb`):```migrate: genres 27 new, 0 already there (old 27 -> new 27)migrate: persons 15157 new, 0 already there (old 15157 -> new 15157), show refs skipped 0migrate: shows 9453 new, 0 already there (old 9453 -> new 9453), cast refs skipped 0, genre refs skipped 0, season refs skipped 0migrate: seasons 6430 new, 0 already there (old 6430 -> new 6430), show refs skipped 0, episode refs skipped 0migrate: episodes 231584 new, 0 already there (old 231584 -> new 231584), show refs skipped 0, season refs left null (pre-existing) 1migrate: follows 128 new, 0 already there (old 128 -> new 128), show refs skipped 0migrate: watches 11692 new, 0 already there (old 11692 -> new 11692), target refs left null (pre-existing) 3migrate: 0 failed```Every count equals the old export's own document count (`old-tracker/README-RECONSTRUCTED.md`:Show 9453, Season 6430, Episode 231584, Person 15157, Genre 27, Follow 128, Watch 11692). Ran asecond time straight after (idempotency: the tool's `oldId` index finds each row again) — everytable printed `0 new`, all rows `already there`, counts unchanged, 0 failed: the id-loss bug doesnot resurface across a real close-and-reopen.**Proof beyond the tool's own counters** (`tools/verify.hl`, new): the ticket asks for a check thatdoes not just trust `migrate.hl`'s own "skipped" tallies. It runs against a plain filesystem COPYof `storage/mpackdb/` (hl:mpackdb rewrites a file's data on open, so the live store is never openeda second time) and independently re-derives, from the persisted records alone: every table's`count()` against the export's own document count, and — by building id sets for every table andwalking every reference field (`Show.genres/cast/seasons`, `Season.show/episodes`,`Episode.show/season`, `Person.shows`, `Follow.show/user`, `Watch.target/user`) — that everynon-null reference resolves to a real id. It also follows one show end to end (`Raised by Wolves`,2 seasons, 18 episodes, 1 follow, 2 season-level watches — all cross-checked back to the show).```$ cp -r storage/mpackdb .scratch/verify-copy && TRACKER_VERIFY_COPY=$PWD/.scratch/verify-copy ./bin/hybriel tools/verify.hlcount ok genres: 27 (expected 27)count ok persons: 15157 (expected 15157)count ok shows: 9453 (expected 9453)count ok seasons: 6430 (expected 6430)count ok episodes: 231584 (expected 231584)count ok follows: 128 (expected 128)count ok watches: 11692 (expected 11692)users: 1 (expected 1, the creator)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)END-TO-END show 105ad9c91b14d663 "Raised by Wolves" seasons=2season 1 (be2965a5ab7165ca) episodes=10 show-back-ref-ok=trueseason 2 (0fe4e53157ed0367) episodes=8 show-back-ref-ok=truetotal episodes across seasons: 18follows on this show: 1, season-level watches touching it: 2VERIFY PASS```(36194 episodes with no season = 36193 that never had one in the old export, plus the 1 the tool'sown count already named as a pre-existing dangling `season` reference in the source data — neitheris a reference this migration broke; `dangling references: 0` covers exactly that.)The single old user (`User.jsonl`, `[email protected]`, password not taken over) is this app'suser for ident short id `az5b2` (`storage/mpackdb/users.db`, the same table step 1's login uses) —confirmed in the copy: one record, `identity=az5b2`.**Two Hybriel bugs found while building this** (both already filed as issues on this ticket by anearlier session, not re-filed): `hl:fs readFile` silently truncates at 10 MiB (worked around herewith `split`, no shell, no JS, see `tools/migrate.hl`'s header comment) and `hl:mpackdb` loses rowsacross `update()` + reopen (the reason this tool never calls `update()`).**Open**: nothing shown yet — this ticket is data-only, on purpose (the next step, from thecreator, is showing the data in the UI).## 2026-09-27 — ticket #3: no border on the header or filled buttonsDesign notes from the first test (architect): "the application-header should have no bottomborder" and "the buttons also no border except they are inverted". Two changes in`styles.hl`:- `applicationHeader`: dropped `borderBottom`.- `ident-selector::part(button)` (the signed-out "choose ident" button): added`border = 'none'` — the element's own CSS gave it a 1px border the same colour as itsbackground (`--_accent`), invisible but still a real border in the computed style; this isthe app-side restyling hook ident's README documents (`::part(button)`), not a change toident's vendored `selector.js`.Left unchanged, already correct: the native `button` rule (filled, e.g. no other filledbuttons on this page yet) already has `border = '0'`; `button.quiet` ("Log out") and theselector's dropdown `[part="identity"]` rows keep their border (transparent background —inverted style); `a.button` ("Log in with ident") has no border rule and browsers give `<a>`none by default. The selector's signed-in "logged in with ident" status pill(`::part(status)`) is not one of the buttons the ticket names and isn't a button element(a `<span>`) — left with its border.**Gate** (`tests/browser.mjs`, now 16 checks): added computed-style checks — the header's`borderBottomWidth` is `0px`; `#loginbutton`'s border is `0px`; the selector's`[part~="button"]` (inside its shadow root) border is `0px`; `#logout`'s border is NOT `0px`(still inverted-bordered) once signed in.```node tests/browser.mjs16 passed, 0 failed```## 2026-09-27 — ticket #1 reopened: login redone to match calendar exactly (header selector, empty page)The architect rejected the first build of ticket #1: the sign-in sat centered on the page(its own "Sign in with ident" card, identity + sign-out shown in a `homeCard`) instead ofthe header identity selector calendar/gitoria use, and there was no `<ident-selector>` atall. Rebuilt the login by copying calendar.worldapi.org's own files (unchanged in shape, perthe architect's instruction "Copy calendar.worldapi.org's login unchanged"):- **`users.hl`** (new): the ident exchange + a `usersTable` (`storage/mpackdb/users.db`,`identity` → this app's user id), copied from calendar's `users.hl` with `TRACKER_KEY` /`TRACKER_SECRET` / `TRACKER_URL` / `TRACKER_STORAGE` in place of calendar's names (keptthe names already in this app's `docker-compose.yml`/README/DECISIONS rather thanswitching to calendar's generic `IDENT_API_KEY`/`IDENT_API_SECRET`).- **`login.js`** (new): calendar's bridge between `<ident-selector>`'s `ident-login` DOMevent and the hidden `#identcode` input, copied verbatim (creator: "login.js is correct,as thats for externals in general").- **`components/main.hl`**: now the header carries `userBox` (`<ident-selector>` + "Log inwith ident" / "Log out"), the `trackerLogin`/`trackerLogOut` faces and the`trackerSignedIn`/`trackerSignedOut` client push — calendar's shell renamed to this app'sevent names.- **`components/home.hl`**: now truly empty (`View { home {} }`) — no sign-in link, noidentity/sign-out duplicated on the page; that is entirely the header's job now.- **`components/loginfailed.hl`** (new) + **`project.hl`**: the login routes are now`/login/callback` (function route, the button's return AND the code exchange) and`/login/failed`, copied from calendar's `project.hl` (`safePath`, `failed()`,`loginCallback`) in place of the old `/login` + `/callback` + `/logout` routes; the old`/logout` POST route is gone (logout is a face, like calendar's).- **`styles.hl`**: added the header selector styles (`userBox`, `identSelector`,`ident-selector::part(...)`, sticky header) from calendar's `styles.hl`; dropped thenow-unused `homeCard`/`accountBar`/`userName` rules from the rejected centered sign-in.**Gate rewritten** (`tests/browser.mjs`, 12 checks): replaced the old gate (which droveident's full email-code UI through a vendored dev copy of ident at `.scratch/ident-dev`)with calendar's own pattern — `tests/identkit.mjs` (copied from calendar unchanged) starts athrowaway ident (a fresh copy of `/media/STORAGE/projects/ident.worldapi.org`'s code, no`.env`/storage copied, codes to a mail sink, never the live ident), signs in over its RESTAPI and registers this app, then the gate proves the header in a real headless Chrome:signed out → `#selector` + `#loginbutton` in the header, **`main` is empty** → sign in(`/login/callback?ident_code=`, the same exchange the selector would trigger) → `#selector`shows `class="in"`, `#logout` appears, **`main` still empty** → sign out → signed out again→ a reload stays signed out. No console errors.```node tests/browser.mjs12 passed, 0 failed````./deploy.sh --dry-run --target .scratch/deploy-preview --url http://127.0.0.1:0/`: gatepassed as step [1/4], rsync preview held none of `storage/`, `.sessions/`, `.env`,`.scratch/`, `server.*`, logs. Removed the stale `.scratch/ident-dev` (the old gate's vendoredident copy) and `.scratch/browser-gate` (the old gate's storage) — unused by the new gate.**Still open**: the app is registered in ident's dev copies only (this gate's own throwawayident). The LIVE ident registration (`TRACKER_KEY`/`TRACKER_SECRET` in `.env` next to`docker-compose.yml`) is the architect's first-deploy step (README "Deploy"), not built here.## 2026-09-27 — ticket #2: data migration — blocked twice on sandbox access, nothing doneTwo workers in a row (`s-20260927T1029-f57b0f`, then this session) could not start: themigration source the ticket names, `/media/STORAGE/projects/old-tracker/mongo-export/*.jsonl`+ its `README-RECONSTRUCTED.md`, is not reachable from this worker's sandbox. Verified freshthis session:```$ ls -la /media/STORAGE/projects/antcolony-docs hybriel ident.worldapi.org tracker.worldapi.org # no old-tracker$ mount | grep STORAGE/dev/nvme1n1p6 on /media/STORAGE/projects/tracker.worldapi.org type btrfs (rw,...)/dev/nvme1n1p6 on /media/STORAGE/projects/hybriel type btrfs (ro,...)/dev/nvme1n1p6 on /media/STORAGE/projects/ident.worldapi.org type btrfs (ro,...)/dev/nvme1n1p6 on /media/STORAGE/projects/antcolony-docs type btrfs (ro,...)# old-tracker is not among the mounted subvolumes at all```So this is not a data problem (the export is "complete" per the ticket) — it's the workersandbox for this ticket that never got `old-tracker` mounted (read-only, like `hybriel` /`ident.worldapi.org` / `antcolony-docs` above). Nothing was built or changed this session:no `storage/`, no `tools/`, no id-mapping — writing the migration tool blind, guessing theJSONL shape from the ticket text alone, risks silently wrong data and was avoided on purpose(see the project's "Build it properly" rule). Filed as an antcolony issue so the next worker'ssandbox includes `old-tracker` before another attempt.## 2026-09-27 — ticket #1: the empty shell, ident loginBuilt the app from scratch: vendored `bin/hybriel` + `plugins/` + `shared/tokens.hl` from`ident.worldapi.org` (newest local build, hybriel master 837fe120, no local patch — seeREADME "Vendored Hybriel"). `project.hl` (routes `/login`, `/callback`, `/logout`, `/`),`components/home.hl` (the empty homepage), `components/main.hl` (shell), `styles.hl`(accent green `#4ec9b0`, per `antcolony/README.md` "look and style" / `CONCEPT.md`).`docker-compose.yml` / `Dockerfile` / `deploy.sh` following ident's own house pattern(port 45008, container `tracker.worldapi.org`).**Login**: the ident login BUTTON flow (ident.worldapi.org README "How apps use ident"),server-side exchange (`POST <ident>/api/exchange`), this app's own framework session(`session.user = { identity }`, cookie `trackersid`). ident hands over only the identity'spublic **short id** — no display name yet (ident#11, properties handover, is on hold) — so"your name" on the homepage is `Signed in as <shortid>`, the same identifier every otherworldapi app would show; see `decided` in the report.**Lesson (Hybriel)**: a face that mutates `session.user` (e.g. `signOut`) does NOTautomatically re-render the page — a component's reactive members (`signedIn`, `identity`,…) are computed once at mount from the framework's read-only session snapshot; a clienthandler that calls `emit server X()` must ALSO flip the affected members itself afterwards(ident's own `components/home.hl` `on doSignOut(e)` does exactly this: `emit serversignOut()` then `signedIn = false` …). Missing that made the sign-out button silently donothing client-side (the ack came back `ok:true`, the server-side session really wascleared — proven by a reload — but the DOM never updated) until copied.**Gate** (`tests/browser.mjs`, 13 checks): a fresh copy of `ident.worldapi.org`'s code (no`.env`, no `storage/`, no `.sessions/` — verified empty of secrets/data before first use)runs as this gate's own ident, on its own storage and its own mail sink (no live ident, noreal mail). The gate registers this app in that dev ident once over the `/__hl/emit` API(the same one-time step a person does by hand in ident's `/apps` page), then drives theREAL login-button flow in a real headless Chrome: signed out → click "Sign in with ident" →ident's email form → the mail-sink code → the first-login optional-names form (Skip) → theone-identity choice (one click) → back on tracker, "Signed in as `<shortid>`" → "Sign out" →signed out again → a reload stays signed out. No console errors. Ran twice for stability, 0failures; no leftover Chrome/hybriel processes after either run.```node tests/browser.mjs13 passed, 0 failed````./deploy.sh --dry-run --target .scratch/deploy-preview --url http://127.0.0.1:0/` (a localdirectory, per ident's own convention for testing deploy.sh without touching Byrodin): gatepassed, rsync preview held none of `storage/`, `.sessions/`, `.env`, `.scratch/`, `server.*`,logs — confirmed by the same grep the script refuses on.**Open**: the app is not registered with the LIVE ident yet — `TRACKER_KEY`/`TRACKER_SECRET`are unset until the architect's first deploy does that (README "Deploy"); until then`/login` on the live site answers a plain error page instead of redirecting (`/` itselfstill renders). This is normal for a brand-new app, the same as ident's own SMTP `.env`before its first deploy — not something this ticket's worker can set (no `.env` access,and it is a LIVE ident registration).
Branches
- mainmain branch
Latest commits
- 65c694a8tracker#14: search — header magnifier, /search/<text> (in-memory word-prefix index over titles + people), Fetch from web (TMDB search/multi, ours left out), Add = import via syncShow; gate +25 checks, real-data scriptmre
- 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