gitoria

jukebox

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitf7368ea3f7368ea3Records: mission 011 day39, waits for lisbethmref7368ea3/missions/004-notification-flicker.md

4.5 KB

  1. # 004 — jukebox#21: remove the locked-screen workaround that makes the Android notification card flicker
  2. TASK (HIS words, 2026-11-03, verbatim): "also after adding the browser to battery exeptions the background play when screen off works so the workaround can be removed now where the playing card in the android notification disappears and reappers on ever change."
  3. Ticket: https://tickets.worldapi.org/jukebox/21 (no ticket writes by you).
  4. NOT HIS (Jukebox's reading, unconfirmed): he plays on an Android phone/tablet in Chrome with the screen off. The media
  5. notification card (Media Session) vanishes and comes back at every change (next song, maybe play/pause or time updates).
  6. He believes code added to keep playback going with the screen locked causes it. Candidates, NOT verified:
  7. - components/main.hl ~511 and ~684: navigator.mediaSession metadata / action handlers, and ~667 (a check on a.paused / a.ended);
  8. - components/media-player/media-player.hl ~394–420 (commit b58e449, jukebox#11: the next src is set and played inside `ended`
  9. on the same audio element).
  10. Find out which code (commit, file, lines) makes the card disappear and reappear, and why it was added (git log -L / blame,
  11. reports/JB11*.md, LOG.md). His sentence decides: remove the workaround so the card stays steady, while background play with
  12. the screen off still works.
  13. ## Ownership stop
  14. components/media-player/ is Atlas's shared component (components.hybriel, other apps use it). If the cause or the fix is
  15. inside media-player.hl: do NOT change it. STOP after the finding and report the exact lines, the cause and the change you
  16. would want (an option, default unchanged). Changes in the app's own files (main.hl, lib/, songs.hl …) you may make.
  17. ## Read first
  18. - /media/STORAGE/projects/WorldAPI/worldapi-conductor/archive/2026-10-31/WORKER-RULES.md in full.
  19. - /media/STORAGE/projects/WorldAPI/jukebox/CONDUCTOR.md "Verification"; README.md "Run it".
  20. - For .hl: /media/STORAGE/projects/hybriel/docs/HL-PRIMER.md, /media/STORAGE/projects/hybriel/docs/CODE-ORDER.md, and in
  21. /media/STORAGE/projects/hybriel/COMPONENTS.md the sections "The event value a View handler receives" (~1718),
  22. "Direct DOM effects are transient and untracked" (~1749), "Event bindings" (~1764). Copy a working shape from the docs.
  23. Report a DOCS line (sections used, questions the docs did not answer).
  24. ## Steps
  25. 1. Worktree /media/STORAGE/claude-scratch/jukebox/N1/wt, branch jb21 from main. Root bin/ is day35; link or copy it into the
  26. worktree's bin/ the way earlier missions did (never commit a bin symlink; check git status).
  27. 2. Find the cause (code reading + a test in a headless Chrome: count how often mediaSession.metadata is set / the media
  28. element is replaced or reloaded per song change). Write the finding first in N1/REPORT.md.
  29. 3. If app-side: fix it. Add a check that FAILS on main and passes on the fix (e.g. extend tests/jb11.mjs: across a song change
  30. the metadata is set once per song and the audio element stays the same, and the next song still starts in a hidden tab).
  31. 4. All gates pass, every port overridden into your range: node tests/gate.mjs, ui.mjs, jb3.mjs, jb11.mjs, jb13.mjs, jb14.mjs,
  32. jb15.mjs, 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.
  33. 5. Proof in his Chrome on lisbeth :9223 (WORKER-RULES: lock, one plain tab, json/list before/after, closed in finally), server on
  34. a test port with a COPY of ./storage: at 390×844 and 1280×800 play a song, press next twice, look that playback and the
  35. bar are right. Shots in N1/shots/. (Chrome desktop shows no Android card; say what you could and could not prove.)
  36. 6. Commit on jb21 (no attribution lines). No merge, no push, no restart of :8700 — I do the live step.
  37. ## Environment
  38. - Scratch: /media/STORAGE/claude-scratch/jukebox/N1/. Ports 8820–8829 only: servers 8820–8824, Chrome via HL_PORT_BASE=8630
  39. (debug ports 8830–8834); check `ss -ltn` first. Never send anything to :8700.
  40. - DATA RULE: never open ./storage from any process; tests use a copy (copy the files; delete the copy at the end).
  41. - Model Sonnet. Cap about 60 requests. Waiting = ONE background command.
  42. - Stop every process you started; list name + PID. Last: `for p in $(pgrep chrome); do readlink /proc/$p/cwd; done | grep N1` prints nothing.
  43. ## Report (N1/REPORT.md + final message at most 10 lines)
  44. Cause (commit, file, lines, why it was added), what you changed or the exact media-player change you want, the new check
  45. (fails on main: show it), gate numbers, Chrome shots, 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