gitoria

jukebox

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitf7368ea3f7368ea3Records: mission 011 day39, waits for lisbethmref7368ea3/missions/006-reload-scroll.md

4.4 KB

  1. # 006 — jukebox#20: after a reload the list keeps its scroll position and centers the song that plays
  2. TASK (HIS words, 2026-11-03, verbatim): "when i reload the tab it would be nice if it remebered its scroll position in the list and centers the currently playing song."
  3. Ticket: https://tickets.worldapi.org/jukebox/20 (no ticket writes by you).
  4. NOT HIS (Jukebox's notes, unconfirmed):
  5. - Atlas built the needed virtual-list options in components main (components#24): `centerId` (String, a row id centered once
  6. when the list is first built), `scrollTop` (Number, applied once on load), `onScroll` (callback with the offset, throttled).
  7. Copy components/virtual-list/ and icons/icons.hl from components commit e5b98ec (repo
  8. /media/STORAGE/projects/WorldAPI/components.hybriel.worldapi.org) with tools/sync-components.sh, byte for byte; update
  9. components/SOURCE and the --check refs. Do NOT copy media-player (it waits for components#25). Read virtual-list/README.md.
  10. - Remembering: the app already remembers the Songs sort on the server (lib/remember.hl, songs.hl songsRemember, jukebox#14).
  11. Use the same way for the scroll offset per list (Songs, Artists, Albums, an artist's / album's songs, Search), keyed by
  12. which list it is, never by a row position that can change. No hand-written JavaScript, no localStorage hack.
  13. - Centering the playing song: after a reload, does the app know a playing / last-played song (check main.hl, lib/)? If the
  14. page can only learn it from the shell, that is the open framework gap of jukebox#16 (a page has no $parent; hybriel#63
  15. waits for his answer): then build ONLY the scroll memory, do not work around the gap, and say so in the report. If the
  16. page can learn it the framework's way, center it with centerId, by the song's id.
  17. - What wins when both exist (remembered offset vs playing song)? His sentence names both; if they conflict on screen, use
  18. the playing song when one is known and the offset otherwise, and report it as a decision for him.
  19. ## Read first
  20. - /media/STORAGE/projects/WorldAPI/worldapi-conductor/archive/2026-10-31/WORKER-RULES.md in full (REVIEW QUESTIONS: id not position; second visit).
  21. - /media/STORAGE/projects/WorldAPI/jukebox/CONDUCTOR.md "Verification" and "Authority boundaries" (vendored components); README.md.
  22. - /media/STORAGE/projects/hybriel/docs/HL-PRIMER.md, /media/STORAGE/projects/hybriel/docs/CODE-ORDER.md, and in
  23. /media/STORAGE/projects/hybriel/COMPONENTS.md: "`$parent` — a component calls and reads the component that placed it" (~1174),
  24. "The event value a View handler receives" (~1718), "Event bindings" (~1764). Copy a working shape from the docs. DOCS line.
  25. ## Steps
  26. 1. Worktree /media/STORAGE/claude-scratch/jukebox/R1/wt, branch jb20 from main (bin/ = root's day35 bin; never commit a bin symlink).
  27. 2. Copy virtual-list + icons (one commit); all gates still pass.
  28. 3. Build the scroll memory (and the centering if allowed above). A new gate (tests/jb20.mjs, ports by env vars) that FAILS on
  29. main: scroll a long list, reload, the same rows are in view; with a playing song known, it is centered after reload.
  30. 4. All gates, every port in your range: node tests/gate.mjs, ui.mjs, jb3.mjs, jb11.mjs, jb13.mjs, jb14.mjs, jb15.mjs, jb20.mjs,
  31. node theme/check-theme.mjs . (last on day35: 120, 53, 50, 5, 10, 5, 33, 0; a single jb3 "songs heading" timeout is flaky, rerun once).
  32. 5. Proof in his Chrome on lisbeth :9223 (lock, one plain tab, json/list before/after, closed in finally), server on a test port
  33. with a COPY of ./storage: at 390×844 and 800×1280 scroll Songs far down, reload, shot before and after; same for one album.
  34. Shots in R1/shots/; look at each one.
  35. 6. Commit on jb20 (no attribution lines). No merge, no push, no :8700.
  36. ## Environment
  37. - Scratch: /media/STORAGE/claude-scratch/jukebox/R1/. Ports: servers 8820–8829, Chrome via HL_PORT_BASE=8630 (debug ports
  38. 8830–8839); check `ss -ltn` first. Never send anything to :8700.
  39. - DATA RULE: never open ./storage from any process; tests use a copy (delete it at the end).
  40. - Model Sonnet. Cap about 60 requests. Waiting = ONE background command.
  41. - Stop every process you started; list name + PID. Last: `for p in $(pgrep chrome); do readlink /proc/$p/cwd; done | grep R1` prints nothing.
  42. ## Report (R1/REPORT.md + final message at most 10 lines)
  43. What is remembered and where (file:line), whether centering was built or blocked (and why), new gate (fails on main: show it),
  44. gate numbers, shots and what you saw, branch SHA, processes stopped, final json/list, DOCS line.

Branches

Latest commits

  • f7368ea3Records: mission 011 day39, waits for lisbethmre
  • 9515d2cdRecords: jb20 livemre
  • 019f6601ui gate: comment names the open bug components#27 (workaround, not fixed)mre
  • 277a2722README: provenance linemre
  • 4169ca6aREADME: sync pinmre
  • a01f3aa8ui gate: back to the top before the sort checks (the screen reopens where it was left)mre
  • f7936c20Lists keep their scroll position across a reload (jukebox#20): per-list offsets in storage/ui.json, gate jb20mre
  • d67906devirtual-list and icons from components.hybriel e5b98ec (centerId, scrollTop, onScroll)mre
  • df7920ceRecords: R3 startedmre
  • 0549f038Mission 010: jb20 livemre
  • 273494e2STATUS rewrittenmre
  • 227c9b96Records: jb19 livemre
  • 9f365376README: the bar's controls (jb19)mre
  • d18851fdjb19: pressed switches look different (whole selector), queue column cannot widen past the panel, gates follow the new bar (jb3, jb11, jb15)mre
  • 82b54c0ejb19: bar Shuffle · Previous · Play · Next · Repeat, no 10 s buttons; Shuffle switch (shuffle from the playing song, back to the list), Repeat off/all/one, both remembered in ui.json; Shuffle my favourites an ordinary button; gate tests/jb19.mjsmre
  • ba354710jb19: icons pinned to components.hybriel 46fefaa (shuffle, repeat, repeatOne, prevTrack, nextTrack)mre
  • d8e8d059jb19 step 2: media-player from components.hybriel c96709c (skip, repeat options; the end of a song only calls onPlay), sync-components.sh and SOURCE point to it, jb11 counts media loads and metadata writes (from jb21 d3a026e)mre
  • 7b048c1bRecords: jb19 done, L2 live stepmre
  • 665185aeMission 009: jb19 livemre
  • 47b2d3beRecords: P1 resumedmre