gitoriaLog in with ident

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit49e1f61e49e1f61edeploy.sh: back up live storage/.sessions/.env before every deploy (newest 5 kept)mre49e1f61e/STATUS.md

32.1 KB

  1. # STATUS — tracker.worldapi.org
  2. ## 2026-09-30 — ticket #8: /my/ pages, S01E01, years, speed
  3. **Built**: `/my/unwatched`, `/my/schedule` (routes in `project.hl`); old `/unwatched`, `/schedule` →
  4. **301** (function routes `unwatchedMoved`/`scheduleMoved`). Rows as `S01E02 · <title>` (was
  5. `Ep 2 · …`), list titles with the year `Doctor Who (2005)`, show page `1 episode` singular.
  6. New shared helpers in `shows.hl`: `pad2`, `episodeCode`, `showYear`, `titleWithYear`,
  7. `posterUrlOf`; in `watches.hl`: `watchedSet` (used by `/my/unwatched` and the show page's
  8. `buildRows`; `isWatched` stays for the single-target toggles).
  9. **Decisions**: year = `year`, else `release.slice(0,4)`, else none (197 shows lack `year`, some
  10. have `release = ''`). Year only in LISTS (`/my/*`), not in the show page's `h1`. The 301 drops any
  11. query (the pages take none). A row whose poster FILE is missing gets `/posters/none` (one cached
  12. URL) instead of `/posters/<oldId>.jpg`.
  13. **Why /my/shows was ~25 s live though its data is 0.2 s**: hl:web handles ONE request at a time.
  14. Measured on the copy: `/my/shows` requested 1 s into a `/unwatched` render took 13.7 s (the
  15. `/unwatched` render itself 14.5 s). Every request (pages, 128 poster requests) of every visitor
  16. queued behind a slow `/unwatched`. Plus 128 distinct poster URLs per load, all the placeholder.
  17. **Real-data check** (copy of Byrodin's `storage/` only, `az5b2` = user `0mujqspn0aqb`, dev
  18. server :8730, headless Chrome, navigate → load → websocket open, 1280×900):
  19. | page | before | after |
  20. |---|---|---|
  21. | `/my/shows` (128 rows) | 1.2 s (server 0.19 s) | 0.6–0.8 s, 1 poster request |
  22. | `/unwatched` → `/my/unwatched` (831 rows) | 14.8 s | 0.7–1.2 s (server 0.55–0.65 s) |
  23. | `/schedule` → `/my/schedule` (0 rows, data not synced since 2025-12) | 0.36 s | 0.3 s |
  24. | `/shows/The-Librarians-The-Next-Chapter` | 0.34 s | 0.29 s |
  25. How to repeat (Loreana; never touch Byrodin's folder beyond the tar read):
  26. ```
  27. ssh [email protected] 'tar czf - -C /CONTAINERS/projects/tracker.worldapi.org storage' | tar xzf - -C .scratch/realdata # ONLY storage/
  28. TRACKER_PORT=8730 TRACKER_WATCH=0 TRACKER_STORAGE=$PWD/.scratch/realdata/storage/mpackdb TRACKER_SESSIONS=$PWD/.scratch/realdata-sessions/ ./bin/hybriel project.hl
  29. # session file: name = sha256(<32-hex id>), JSON {"created":1,"data":{"tag":"t"},"id":"<id>","seen":1,"user":{"id":"0mujqspn0aqb"}}
  30. curl -s -o /dev/null -w '%{time_total}\n' -b trackersid=<id> http://127.0.0.1:8730/my/unwatched
  31. # Chrome: tests/cdp.mjs launchBrowser, Network.setCookie trackersid, goto + wait __hl.socket open
  32. # afterwards: stop the server, rm -rf .scratch/realdata .scratch/realdata-sessions
  33. ```
  34. Screenshots: `/tmp/w041-real/{before,after}-{shows,unwatched,schedule,show}.png` (Loreana).
  35. **Gate** (45 → 49 checks: two 301s, the browser landing on `/my/unwatched`, "1 episode"; the
  36. existing ones now expect `/my/…`, `S01E02 · Second`, `S02E01 · Season Two Opener`, titles with
  37. year, `/posters/sh1.png` + `/posters/none`). Fixture: show 1 `image = 'png'` (gate writes a 1×1
  38. `posters/sh1.png`), show 2 `year = null`, `release = '2025-03-01'`.
  39. ```
  40. TRACKER_GATE_SHOTS=/tmp/w041-shots TRACKER_GATE_PORT=8720 TRACKER_GATE_IDENT_PORT=8721 TRACKER_GATE_CHROME=8722-8726 node tests/browser.mjs
  41. 49 passed, 0 failed
  42. ```
  43. Screenshots `/tmp/w041-shots/` (looked at: all fine).
  44. **Open**: `/my/unwatched` rebuilds all rows per check click (~0.6 s, fine). Still no navigation
  45. to the `/my/` pages. The single-request server means any future slow page blocks everyone —
  46. keep every page well under 1 s. `/my/schedule` stays empty until the TMDB sync step.
  47. ## 2026-09-30 — ticket #7: /my/shows
  48. Built `/my/shows` (`components/myshows.hl`, route in `project.hl`, styles in `styles.hl`): every
  49. followed show, newest follow (`follows.at`, epoch ms) first — small poster (2.5rem, `/posters/…` +
  50. placeholder like the show page), title → `/shows/<slug>`, last watched episode `SxxEyy`.
  51. **Decisions**: "last episode" = highest (season, episode) among the user's EPISODE watches of that
  52. show (ticket); a season watch alone doesn't count (the season check watches every episode anyway).
  53. No watch → no episode element. A show without a poster name → `/posters/none` (the route's own
  54. placeholder), so every row has a poster. Read-only page, no face (like `/schedule`).
  55. **Reuse**: new `follows.hl` `followsOfUser` (whole records; `followedShowIds` now builds on it) and
  56. `shows.hl` `episodeById` (one line); `showById`, `posterName`, `watchesOfUser` unchanged.
  57. **Performance** (against a COPY of `storage/mpackdb/` in `.scratch/perf-store`, removed after; live
  58. files md5-verified unchanged): the page touches only the user's follows and episode watches
  59. (one fetch per watch), never all episodes of a followed show — az5b2's 128 follows → 128 rows (123
  60. with an episode, e.g. `S36E11`, `S30E91`) built in **160–255 ms**. For comparison **`/unwatched`
  61. takes ~15 s** on the same copy (805 rows): it fetches every episode of every followed show and
  62. checks each against the user's 11,692 watches with a linear `isWatched` — not in this ticket's
  63. scope, flagged below.
  64. **Gate** (`tests/browser.mjs`, 38 → 45 checks; `tests/seed-show.hl` adds a 2nd show "Unwatched Gate
  65. Show", no seasons/poster name, followed AFTER the first but stored after it; the first follow is now
  66. dated a day back): signed out → sign-in message; signed in → newest follow first, title hrefs,
  67. posters loaded (`naturalWidth > 0`), 40px wide, `S01E02` after /unwatched's click, later `S02E01`
  68. (watched BEFORE season 1's bulk watch → proves highest, not most recent), none for the other show.
  69. ```
  70. TRACKER_GATE_PORT=8720 TRACKER_GATE_IDENT_PORT=8721 TRACKER_GATE_CHROME=8722-8726 node tests/browser.mjs
  71. 45 passed, 0 failed
  72. ```
  73. **Open**: `/unwatched` ~15 s on real data (above) — a watched-id map instead of `isWatched` per
  74. episode would fix it (own ticket). No navigation links to `/my/shows` yet (homepage stays empty).
  75. ## 2026-09-27 — ticket #6: /schedule
  76. Built `/schedule` (`components/schedule.hl`): every episode of a show the signed-in user follows
  77. that is NOT yet released (`e.release > today`), soonest first. Creator: "/schedule has a similar
  78. list without check icons for the upcoming episodes of shows followed" — same row shape as
  79. `/unwatched` (`components/unwatched.hl`) minus the check icon.
  80. **Reuse, not copy**: imports the exact same `followedShowIds` (`follows.hl`), `showById` /
  81. `seasonsOfShow` / `episodesOfSeason` (`shows.hl`) that `/unwatched` already uses — nothing new
  82. added to either file. `watches.hl` is not imported at all: a row here is never watched/unwatched,
  83. there is no check icon and no click, so the page needed no per-user watch state and no `on server`
  84. face — the whole component is a single read-only server-side render (`rows` computed once from
  85. `session`, same as every other reactive member here).
  86. **Order**: soonest first, ascending by `release` (a plain `'YYYY-MM-DD'` string, ordering
  87. operators confirmed working against this app's own vendored `bin/hybriel`, same as `/unwatched`'s
  88. STATUS entry) — the ticket named this the architect's own reading ("the creator named the order
  89. only for /unwatched"), so `insertByReleaseAsc` mirrors `/unwatched`'s `insertByReleaseDesc` with
  90. the comparison flipped.
  91. **`decided`**: "upcoming" = `release` strictly after today (not `>=`) — the natural complement of
  92. `/unwatched`'s own `release <= today`, so every released-or-today episode is unambiguously on one
  93. list, never both, never neither.
  94. **Gate** (`tests/browser.mjs`, 35 → 38 checks): reused the same fixture (`tests/seed-show.hl`,
  95. unchanged) — episode 3 already carried a far-future release (`2099-01-01`) for `/unwatched`'s own
  96. "excludes the future one" check; `/schedule` now proves the mirror image with the same fixture:
  97. signed out, no rows, the sign-in message; signed in, only that one future episode shows (the two
  98. already-released ones excluded), no `button.checkicon` anywhere on the page, unaffected by any of
  99. the watch toggles the other checks perform on the same fixture (run in any order — `/schedule`
  100. never reads watch state).
  101. ```
  102. node tests/browser.mjs
  103. 38 passed, 0 failed
  104. ps -eo pid,args | grep [h]l-browser-tier
  105. (nothing)
  106. ```
  107. Updated `README.md` ("What it does (step 6)", Test, Files) and this file.
  108. **Open**: nothing shown on the homepage still points to `/schedule` (same as `/unwatched` before
  109. it — the homepage stays empty per ticket #1's decision).
  110. ## 2026-09-27 — ticket #5: /unwatched
  111. Built `/unwatched`: every episode of a show the signed-in user follows that is already released
  112. (`release` ≤ today, a plain `'YYYY-MM-DD'` string — migrated as-is by `tools/migrate.hl`, never
  113. run through `dateOf`) and not yet watched, newest release first (creator: "/unwatched lists all
  114. unwatched episodes of shows followed in release date desc order").
  115. **Reuse, not copy** (the ticket's own instruction, re "the same check icon and watch logic as the
  116. show page"): `watchClassOf` (watched → `'checkicon solid'`/`'checkicon regular'`) was a private
  117. `static` in `components/show.hl`; moved it to `watches.hl` so both pages import the SAME
  118. definition instead of each declaring their own — `show.hl` now imports it too, nothing duplicated.
  119. `isWatched`/`setWatched` (already in `watches.hl`) needed no change. New `follows.hl`
  120. (`followedShowIds`) and `shows.hl` `showById` (one line) round out the read-only data access this
  121. page and `/schedule` (ticket #6) both need.
  122. **String comparison** (`e.release <= today`, `row.release >= x.release` for the desc sort):
  123. hybriel#2 ("no ordering operators on strings") is filed as still-open in this ticket's brief, but
  124. its own history shows it was fixed and merged to master 2026-09-25 — confirmed directly against
  125. THIS app's own vendored `bin/hybriel` (`'2020-09-03' <= '2026-09-27'` → `true`), so no numeric
  126. date workaround was needed.
  127. **A View text node cannot hold an inline expression** (`"Ep " + row.episodeNumber + " · " +
  128. row.title` inside a tag body) — same rule as View attributes (components/show.hl's own comment:
  129. "a View attribute must be a literal, a member or a field path"), just not documented for text
  130. nodes anywhere yet; it silently rendered `<!-- binary_expression not rendered yet -->` instead of
  131. erroring. Fixed by resolving the label into a plain field (`row.episodeLabel`) once, server-side,
  132. in `unwatchedRowsOf` — the same pattern `show.hl`'s `buildRows` already uses for every other
  133. ternary/concatenation. Not filed as a new Hybriel gap since it's the exact same restriction
  134. already known and worked around elsewhere in this app, just not yet hit for interpolated text.
  135. **Empty state**: signed out (no user, so no follows to show) and signed in with nothing unwatched
  136. both render a message; used `.muted` (colorTextMuted), not `.message` (colorDanger) — the existing
  137. `.message` class is for real errors (the login-failed banner), and an empty list isn't one (a
  138. `decided`, small).
  139. **Gate** (`tests/browser.mjs`, 29 → 35 checks): `tests/seed-show.hl` now takes an optional
  140. `TRACKER_SEED_IDENTITY` and, when given, seeds a fixed user + a follow of the fixture show for it
  141. — the only way to give `/unwatched` a known followed show before the browser ever signs in, since
  142. the real login's `ensureUser` matches an EXISTING `users.db` row by `identity` and reuses its id
  143. rather than minting a new one. The gate learns alice's per-app identity with one throwaway
  144. `ident.exchange` call (consuming one code) before writing the seed. Episode 1/2 of the fixture now
  145. carry a past `release` (`2020-01-01`/`2020-06-15`), episode 3 a far-future one (`2099-01-01`) —
  146. proving both the release-date filter and the desc order. The new checks run signed out (no rows,
  147. the sign-in message), then signed in RIGHT AFTER LOGIN, BEFORE the existing show-page checks that
  148. toggle these same fixture episodes watched (order matters — otherwise `/unwatched` would already
  149. be empty by the time it's tested): both unwatched episodes list newest-first, excluding the
  150. future one; a click on the newest (`Second`, ep 2) removes it from the list; a reload proves the
  151. watch is server-side, leaving only `Pilot` (ep 1).
  152. ```
  153. node tests/browser.mjs
  154. 35 passed, 0 failed
  155. ps -eo pid,args | grep [h]l-browser-tier
  156. (nothing)
  157. ```
  158. Updated `README.md` ("What it does (step 5)", Test, Files) and this file.
  159. **Open**: nothing shown on the homepage still points to `/unwatched` — no navigation exists yet
  160. (the homepage stays empty per ticket #1's decision; a later step, from the creator, presumably
  161. adds it). `/schedule` (ticket #6) is next and reuses `follows.hl`/`shows.hl`/`watches.hl` the same
  162. way.
  163. ## 2026-09-27 — ticket #4: the show page, watch checks (took over a previous half-done session)
  164. Continued from an earlier session that had built the whole page — header, seasons/episodes,
  165. the click-handling redesign to a flat `rows` list rebuilt server-side (`components/show.hl`'s
  166. own header comment explains why: a nested `for` over seasons > episodes risks hybriel#86) — but
  167. left with the gate red: clicking a check never turned it solid, no console error, and the
  168. session ran out of budget before finding why.
  169. **The actual bug**: the show page's own pure helpers (`buildRows`, `genreRowsOf`, `castRowsOf`,
  170. `watchClassOf`, `initialCollapsed`) were plain instance members (`buildRows = (show, …) => {…}`,
  171. no `static`). That shape works fine as a member's own top-level initializer (`rows = found ?
  172. buildRows(showRow, watchRows, collapsed) : []` — this is how the page renders correctly on first
  173. load) but throws when the SAME function is called from inside an `on server` face
  174. (`showToggleEpisode` etc.): the server log showed `'buildRows' is not callable — it holds null`.
  175. Found by running `.scratch/debug-click.mjs` (left by the previous session) with the server's
  176. stdout/stderr captured — the browser console itself stayed silent (the face's error never
  177. reaches the client at all, a separate Hybriel gap, hybriel#92 already covers that half).
  178. Confirmed the fix by grepping other worldapi apps for the same shape:
  179. `calendar.worldapi.org/components/calendar.hl` has `static soonOf = (u) => { … upcoming(u, …) }`
  180. (an mpackdb-backed helper), called from its `on server calLoad`/`calSettingsLoad` faces, and
  181. calendar's own gate is green — so `static` is the proven-safe shape for a component's own helper
  182. that both (a) touches an mpackdb-backed import and (b) needs calling from more than one place
  183. (its own initializer AND a later face). Declared all five helpers in `show.hl` `static`; reran
  184. the gate: 29/29 green, including the season-bulk-toggle and the reload-proves-server-side checks.
  185. Filed **hybriel#115 was already open** (from the previous session, about the CLIENT bundle
  186. omitting a case for such a helper) but this session's finding is the SAME root cause reaching
  187. further than that ticket says: the plain HL interpreter on the SERVER also treats such a helper
  188. as `null` outside its own initializer, not just the JS-compiled client bundle. Left as one
  189. `issues` entry pointing at hybriel#115 rather than opening a near-duplicate ticket — the
  190. repro/observed there already generalizes (a per-instance member function wrapping an
  191. mpackdb-backed import is unreliable wherever it is called from, not just the browser).
  192. Ran `node tests/browser.mjs`: 29 passed, 0 failed (was 20 passed / 1 failed — the click timeout
  193. — before the `static` fix).
  194. **Rehearsed `tools/relink-episode-seasons.hl` against a full COPY** of the real
  195. `storage/mpackdb/` (`.scratch/relink-rehearsal/`, since removed) — the tool's own header claimed
  196. this rehearsal already existed here; it didn't (a leftover claim from the previous session), so
  197. this session actually ran it:
  198. ```
  199. relink: episodes 231584, null season before 36194, linked 36194, still null (no matching season) 0
  200. relink: episodes.db replaced with the relinked file — re-run to confirm idempotency (0 linked the second time)
  201. ```
  202. Ran a second time on the same copy straight after — idempotency confirmed:
  203. ```
  204. relink: episodes 231584, null season before 0, linked 0, still null (no matching season) 0
  205. ```
  206. All 36,194 pre-existing null-season episodes (ticket #2's count) now link to a real season by
  207. `(show, seasonNumber)`; none left over. Not run against the LIVE `storage/mpackdb/` — that needs
  208. the tracker container stopped first (hl:mpackdb does not coordinate two processes on one storage
  209. directory, hybriel#21), the architect's job per the ticket ("the architect runs it live").
  210. Updated README.md ("What it does (step 4)", Test, Files) and this file.
  211. ## 2026-09-27 — ticket #2: old data migrated (took over a previous session's rewritten tool)
  212. Continued from an earlier session that had rewritten `tools/migrate.hl` to avoid a real data-loss
  213. bug (see below) but never run it even once, and had left the real `storage/mpackdb/` holding data
  214. from the OLDER, buggy two-pass version of the tool (put a bare record, then `update()` it once the
  215. other side of a circular reference existed). Took over: moved that buggy data aside
  216. (`.scratch/pre-migrate-buggy-backup`, since removed), kept `storage/mpackdb/users.db` (step 1's
  217. login table, untouched by the migration), and ran the already-fixed tool for the first time.
  218. **The fix already on disk (kept as is):** `Show.seasons`/`Season.show` and `Show.cast`/
  219. `Person.shows` are two-way references, so the id on one side must exist before the record on the
  220. other side can be built. The old approach — `put()` a bare record, come back with `update()` once
  221. the far side's id exists — loses rows: reopening a table in a fresh process after an `update()` had
  222. touched it read back FEWER rows than were ever `put()` (seen directly: `persons.db`'s `count()`
  223. dropped 15157 → 15152 after one round of `update()` — a real `hl:mpackdb` bug, reported to Hybriel,
  224. not something an app is allowed to patch around). The fix assigns every new id itself (8 random
  225. bytes, `hl:crypto`) in one pass over each export file BEFORE building any record, so by the time a
  226. record is actually built every reference is already a known id — one `put()` per row, `update()`
  227. never called.
  228. **Run** (`tools/migrate.hl`, `TRACKER_OLD_DATA=.../old-tracker/mongo-export`,
  229. `TRACKER_STORAGE=$PWD/storage/mpackdb`):
  230. ```
  231. migrate: genres 27 new, 0 already there (old 27 -> new 27)
  232. migrate: persons 15157 new, 0 already there (old 15157 -> new 15157), show refs skipped 0
  233. migrate: shows 9453 new, 0 already there (old 9453 -> new 9453), cast refs skipped 0, genre refs skipped 0, season refs skipped 0
  234. migrate: seasons 6430 new, 0 already there (old 6430 -> new 6430), show refs skipped 0, episode refs skipped 0
  235. migrate: episodes 231584 new, 0 already there (old 231584 -> new 231584), show refs skipped 0, season refs left null (pre-existing) 1
  236. migrate: follows 128 new, 0 already there (old 128 -> new 128), show refs skipped 0
  237. migrate: watches 11692 new, 0 already there (old 11692 -> new 11692), target refs left null (pre-existing) 3
  238. migrate: 0 failed
  239. ```
  240. Every count equals the old export's own document count (`old-tracker/README-RECONSTRUCTED.md`:
  241. Show 9453, Season 6430, Episode 231584, Person 15157, Genre 27, Follow 128, Watch 11692). Ran a
  242. second time straight after (idempotency: the tool's `oldId` index finds each row again) — every
  243. table printed `0 new`, all rows `already there`, counts unchanged, 0 failed: the id-loss bug does
  244. not resurface across a real close-and-reopen.
  245. **Proof beyond the tool's own counters** (`tools/verify.hl`, new): the ticket asks for a check that
  246. does not just trust `migrate.hl`'s own "skipped" tallies. It runs against a plain filesystem COPY
  247. of `storage/mpackdb/` (hl:mpackdb rewrites a file's data on open, so the live store is never opened
  248. a second time) and independently re-derives, from the persisted records alone: every table's
  249. `count()` against the export's own document count, and — by building id sets for every table and
  250. walking every reference field (`Show.genres/cast/seasons`, `Season.show/episodes`,
  251. `Episode.show/season`, `Person.shows`, `Follow.show/user`, `Watch.target/user`) — that every
  252. non-null reference resolves to a real id. It also follows one show end to end (`Raised by Wolves`,
  253. 2 seasons, 18 episodes, 1 follow, 2 season-level watches — all cross-checked back to the show).
  254. ```
  255. $ cp -r storage/mpackdb .scratch/verify-copy && TRACKER_VERIFY_COPY=$PWD/.scratch/verify-copy ./bin/hybriel tools/verify.hl
  256. count ok genres: 27 (expected 27)
  257. count ok persons: 15157 (expected 15157)
  258. count ok shows: 9453 (expected 9453)
  259. count ok seasons: 6430 (expected 6430)
  260. count ok episodes: 231584 (expected 231584)
  261. count ok follows: 128 (expected 128)
  262. count ok watches: 11692 (expected 11692)
  263. users: 1 (expected 1, the creator)
  264. 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)
  265. END-TO-END show 105ad9c91b14d663 "Raised by Wolves" seasons=2
  266. season 1 (be2965a5ab7165ca) episodes=10 show-back-ref-ok=true
  267. season 2 (0fe4e53157ed0367) episodes=8 show-back-ref-ok=true
  268. total episodes across seasons: 18
  269. follows on this show: 1, season-level watches touching it: 2
  270. VERIFY PASS
  271. ```
  272. (36194 episodes with no season = 36193 that never had one in the old export, plus the 1 the tool's
  273. own count already named as a pre-existing dangling `season` reference in the source data — neither
  274. is a reference this migration broke; `dangling references: 0` covers exactly that.)
  275. The single old user (`User.jsonl`, `[email protected]`, password not taken over) is this app's
  276. user for ident short id `az5b2` (`storage/mpackdb/users.db`, the same table step 1's login uses) —
  277. confirmed in the copy: one record, `identity=az5b2`.
  278. **Two Hybriel bugs found while building this** (both already filed as issues on this ticket by an
  279. earlier session, not re-filed): `hl:fs readFile` silently truncates at 10 MiB (worked around here
  280. with `split`, no shell, no JS, see `tools/migrate.hl`'s header comment) and `hl:mpackdb` loses rows
  281. across `update()` + reopen (the reason this tool never calls `update()`).
  282. **Open**: nothing shown yet — this ticket is data-only, on purpose (the next step, from the
  283. creator, is showing the data in the UI).
  284. ## 2026-09-27 — ticket #3: no border on the header or filled buttons
  285. Design notes from the first test (architect): "the application-header should have no bottom
  286. border" and "the buttons also no border except they are inverted". Two changes in
  287. `styles.hl`:
  288. - `applicationHeader`: dropped `borderBottom`.
  289. - `ident-selector::part(button)` (the signed-out "choose ident" button): added
  290. `border = 'none'` — the element's own CSS gave it a 1px border the same colour as its
  291. background (`--_accent`), invisible but still a real border in the computed style; this is
  292. the app-side restyling hook ident's README documents (`::part(button)`), not a change to
  293. ident's vendored `selector.js`.
  294. Left unchanged, already correct: the native `button` rule (filled, e.g. no other filled
  295. buttons on this page yet) already has `border = '0'`; `button.quiet` ("Log out") and the
  296. selector's dropdown `[part="identity"]` rows keep their border (transparent background —
  297. inverted style); `a.button` ("Log in with ident") has no border rule and browsers give `<a>`
  298. none by default. The selector's signed-in "logged in with ident" status pill
  299. (`::part(status)`) is not one of the buttons the ticket names and isn't a button element
  300. (a `<span>`) — left with its border.
  301. **Gate** (`tests/browser.mjs`, now 16 checks): added computed-style checks — the header's
  302. `borderBottomWidth` is `0px`; `#loginbutton`'s border is `0px`; the selector's
  303. `[part~="button"]` (inside its shadow root) border is `0px`; `#logout`'s border is NOT `0px`
  304. (still inverted-bordered) once signed in.
  305. ```
  306. node tests/browser.mjs
  307. 16 passed, 0 failed
  308. ```
  309. ## 2026-09-27 — ticket #1 reopened: login redone to match calendar exactly (header selector, empty page)
  310. The architect rejected the first build of ticket #1: the sign-in sat centered on the page
  311. (its own "Sign in with ident" card, identity + sign-out shown in a `homeCard`) instead of
  312. the header identity selector calendar/gitoria use, and there was no `<ident-selector>` at
  313. all. Rebuilt the login by copying calendar.worldapi.org's own files (unchanged in shape, per
  314. the architect's instruction "Copy calendar.worldapi.org's login unchanged"):
  315. - **`users.hl`** (new): the ident exchange + a `usersTable` (`storage/mpackdb/users.db`,
  316. `identity` → this app's user id), copied from calendar's `users.hl` with `TRACKER_KEY` /
  317. `TRACKER_SECRET` / `TRACKER_URL` / `TRACKER_STORAGE` in place of calendar's names (kept
  318. the names already in this app's `docker-compose.yml`/README/DECISIONS rather than
  319. switching to calendar's generic `IDENT_API_KEY`/`IDENT_API_SECRET`).
  320. - **`login.js`** (new): calendar's bridge between `<ident-selector>`'s `ident-login` DOM
  321. event and the hidden `#identcode` input, copied verbatim (creator: "login.js is correct,
  322. as thats for externals in general").
  323. - **`components/main.hl`**: now the header carries `userBox` (`<ident-selector>` + "Log in
  324. with ident" / "Log out"), the `trackerLogin`/`trackerLogOut` faces and the
  325. `trackerSignedIn`/`trackerSignedOut` client push — calendar's shell renamed to this app's
  326. event names.
  327. - **`components/home.hl`**: now truly empty (`View { home {} }`) — no sign-in link, no
  328. identity/sign-out duplicated on the page; that is entirely the header's job now.
  329. - **`components/loginfailed.hl`** (new) + **`project.hl`**: the login routes are now
  330. `/login/callback` (function route, the button's return AND the code exchange) and
  331. `/login/failed`, copied from calendar's `project.hl` (`safePath`, `failed()`,
  332. `loginCallback`) in place of the old `/login` + `/callback` + `/logout` routes; the old
  333. `/logout` POST route is gone (logout is a face, like calendar's).
  334. - **`styles.hl`**: added the header selector styles (`userBox`, `identSelector`,
  335. `ident-selector::part(...)`, sticky header) from calendar's `styles.hl`; dropped the
  336. now-unused `homeCard`/`accountBar`/`userName` rules from the rejected centered sign-in.
  337. **Gate rewritten** (`tests/browser.mjs`, 12 checks): replaced the old gate (which drove
  338. ident's full email-code UI through a vendored dev copy of ident at `.scratch/ident-dev`)
  339. with calendar's own pattern — `tests/identkit.mjs` (copied from calendar unchanged) starts a
  340. throwaway ident (a fresh copy of `/media/STORAGE/projects/ident.worldapi.org`'s code, no
  341. `.env`/storage copied, codes to a mail sink, never the live ident), signs in over its REST
  342. API and registers this app, then the gate proves the header in a real headless Chrome:
  343. signed out → `#selector` + `#loginbutton` in the header, **`main` is empty** → sign in
  344. (`/login/callback?ident_code=`, the same exchange the selector would trigger) → `#selector`
  345. shows `class="in"`, `#logout` appears, **`main` still empty** → sign out → signed out again
  346. → a reload stays signed out. No console errors.
  347. ```
  348. node tests/browser.mjs
  349. 12 passed, 0 failed
  350. ```
  351. `./deploy.sh --dry-run --target .scratch/deploy-preview --url http://127.0.0.1:0/`: gate
  352. passed as step [1/4], rsync preview held none of `storage/`, `.sessions/`, `.env`,
  353. `.scratch/`, `server.*`, logs. Removed the stale `.scratch/ident-dev` (the old gate's vendored
  354. ident copy) and `.scratch/browser-gate` (the old gate's storage) — unused by the new gate.
  355. **Still open**: the app is registered in ident's dev copies only (this gate's own throwaway
  356. ident). The LIVE ident registration (`TRACKER_KEY`/`TRACKER_SECRET` in `.env` next to
  357. `docker-compose.yml`) is the architect's first-deploy step (README "Deploy"), not built here.
  358. ## 2026-09-27 — ticket #2: data migration — blocked twice on sandbox access, nothing done
  359. Two workers in a row (`s-20260927T1029-f57b0f`, then this session) could not start: the
  360. migration source the ticket names, `/media/STORAGE/projects/old-tracker/mongo-export/*.jsonl`
  361. + its `README-RECONSTRUCTED.md`, is not reachable from this worker's sandbox. Verified fresh
  362. this session:
  363. ```
  364. $ ls -la /media/STORAGE/projects/
  365. antcolony-docs hybriel ident.worldapi.org tracker.worldapi.org # no old-tracker
  366. $ mount | grep STORAGE
  367. /dev/nvme1n1p6 on /media/STORAGE/projects/tracker.worldapi.org type btrfs (rw,...)
  368. /dev/nvme1n1p6 on /media/STORAGE/projects/hybriel type btrfs (ro,...)
  369. /dev/nvme1n1p6 on /media/STORAGE/projects/ident.worldapi.org type btrfs (ro,...)
  370. /dev/nvme1n1p6 on /media/STORAGE/projects/antcolony-docs type btrfs (ro,...)
  371. # old-tracker is not among the mounted subvolumes at all
  372. ```
  373. So this is not a data problem (the export is "complete" per the ticket) — it's the worker
  374. sandbox for this ticket that never got `old-tracker` mounted (read-only, like `hybriel` /
  375. `ident.worldapi.org` / `antcolony-docs` above). Nothing was built or changed this session:
  376. no `storage/`, no `tools/`, no id-mapping — writing the migration tool blind, guessing the
  377. JSONL shape from the ticket text alone, risks silently wrong data and was avoided on purpose
  378. (see the project's "Build it properly" rule). Filed as an antcolony issue so the next worker's
  379. sandbox includes `old-tracker` before another attempt.
  380. ## 2026-09-27 — ticket #1: the empty shell, ident login
  381. Built the app from scratch: vendored `bin/hybriel` + `plugins/` + `shared/tokens.hl` from
  382. `ident.worldapi.org` (newest local build, hybriel master 837fe120, no local patch — see
  383. README "Vendored Hybriel"). `project.hl` (routes `/login`, `/callback`, `/logout`, `/`),
  384. `components/home.hl` (the empty homepage), `components/main.hl` (shell), `styles.hl`
  385. (accent green `#4ec9b0`, per `antcolony/README.md` "look and style" / `CONCEPT.md`).
  386. `docker-compose.yml` / `Dockerfile` / `deploy.sh` following ident's own house pattern
  387. (port 45008, container `tracker.worldapi.org`).
  388. **Login**: the ident login BUTTON flow (ident.worldapi.org README "How apps use ident"),
  389. server-side exchange (`POST <ident>/api/exchange`), this app's own framework session
  390. (`session.user = { identity }`, cookie `trackersid`). ident hands over only the identity's
  391. public **short id** — no display name yet (ident#11, properties handover, is on hold) — so
  392. "your name" on the homepage is `Signed in as <shortid>`, the same identifier every other
  393. worldapi app would show; see `decided` in the report.
  394. **Lesson (Hybriel)**: a face that mutates `session.user` (e.g. `signOut`) does NOT
  395. automatically re-render the page — a component's reactive members (`signedIn`, `identity`,
  396. …) are computed once at mount from the framework's read-only session snapshot; a client
  397. handler that calls `emit server X()` must ALSO flip the affected members itself afterwards
  398. (ident's own `components/home.hl` `on doSignOut(e)` does exactly this: `emit server
  399. signOut()` then `signedIn = false` …). Missing that made the sign-out button silently do
  400. nothing client-side (the ack came back `ok:true`, the server-side session really was
  401. cleared — proven by a reload — but the DOM never updated) until copied.
  402. **Gate** (`tests/browser.mjs`, 13 checks): a fresh copy of `ident.worldapi.org`'s code (no
  403. `.env`, no `storage/`, no `.sessions/` — verified empty of secrets/data before first use)
  404. runs as this gate's own ident, on its own storage and its own mail sink (no live ident, no
  405. real mail). The gate registers this app in that dev ident once over the `/__hl/emit` API
  406. (the same one-time step a person does by hand in ident's `/apps` page), then drives the
  407. REAL login-button flow in a real headless Chrome: signed out → click "Sign in with ident" →
  408. ident's email form → the mail-sink code → the first-login optional-names form (Skip) → the
  409. one-identity choice (one click) → back on tracker, "Signed in as `<shortid>`" → "Sign out" →
  410. signed out again → a reload stays signed out. No console errors. Ran twice for stability, 0
  411. failures; no leftover Chrome/hybriel processes after either run.
  412. ```
  413. node tests/browser.mjs
  414. 13 passed, 0 failed
  415. ```
  416. `./deploy.sh --dry-run --target .scratch/deploy-preview --url http://127.0.0.1:0/` (a local
  417. directory, per ident's own convention for testing deploy.sh without touching Byrodin): gate
  418. passed, rsync preview held none of `storage/`, `.sessions/`, `.env`, `.scratch/`, `server.*`,
  419. logs — confirmed by the same grep the script refuses on.
  420. **Open**: the app is not registered with the LIVE ident yet — `TRACKER_KEY`/`TRACKER_SECRET`
  421. are unset until the architect's first deploy does that (README "Deploy"); until then
  422. `/login` on the live site answers a plain error page instead of redirecting (`/` itself
  423. still renders). This is normal for a brand-new app, the same as ident's own SMTP `.env`
  424. before its first deploy — not something this ticket's worker can set (no `.env` access,
  425. and it is a LIVE ident registration).

Branches

Latest commits

  • 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