Skip to content

feat(live): slow-mo playback — sub-1x VCR speeds (closes #771 M1)#922

Open
efiten wants to merge 2 commits intoKpa-clawbot:masterfrom
efiten:feat/slow-mo-771
Open

feat(live): slow-mo playback — sub-1x VCR speeds (closes #771 M1)#922
efiten wants to merge 2 commits intoKpa-clawbot:masterfrom
efiten:feat/slow-mo-771

Conversation

@efiten
Copy link
Copy Markdown
Contributor

@efiten efiten commented Apr 28, 2026

Extends VCR speed cycle to [0.25, 0.5, 1, 2, 4, 8] so users can watch live paths in slow motion.

Changes

  • vcrSpeedCycle(): speed array extended to include ¼x and ½x; saves preference to localStorage('live-vcr-speed')
  • speedLabel(): new helper returning ¼x / ½x for sub-1x, used in the speed button
  • drawAnimatedLine: step interval scales with speed (33 / VCR.speed)
  • drawMatrixLine: DURATION_MS scales with speed (1100 / VCR.speed)
  • Speed preference restored from localStorage on page load

Tests

3 new unit tests; 72 pass, 0 regressions.

Closes #771 (M1 of 3)

…-clawbot#771 M1)

Adds 0.25x and 0.5x speeds to the VCR speed cycle [0.25, 0.5, 1, 2, 4, 8].
Speed button shows ¼x / ½x labels. Animation duration scales with speed
(drawAnimatedLine step interval, drawMatrixLine DURATION_MS). Speed
preference persisted to localStorage and restored on page load.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@efiten efiten mentioned this pull request Apr 28, 2026
page.$() captures an element handle at query time. When the nodes page
WebSocket auto-refresh fires between the querySelector and the .click()
call, the table is re-rendered and the element is detached, causing
"Element is not attached to the DOM".

Replace both occurrences with page.click(selector), which re-queries
the DOM at click time and retries until the element is stable.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Kpa-clawbot
Copy link
Copy Markdown
Owner

Expert Review — PR #922

Verdict: NEEDS-WORK (rebase required)

Severity Count
BLOCKER 0
MAJOR 1
MINOR 1
NIT 0

MAJOR

  1. Merge conflict — GitHub reports mergeStateStatus: DIRTY. The PR cannot be merged until rebased against current master. Likely conflict in public/live.js.

MINOR

  1. Duplicated speeds array (public/live.js): The valid speeds [0.25, 0.5, 1, 2, 4, 8] appear both at module init (line ~25, for restore validation) and inside vcrSpeedCycle() (line ~398). Extract to a shared const VCR_SPEEDS = [...] to keep them in sync.

Positives

  • Clean, minimal implementation — exactly the right scope for M1
  • speedLabel() with Unicode fractions (¼x, ½x) is a nice UX touch
  • Animation timing correctly scales inversely with speed (slower speed = longer duration)
  • localStorage persistence means operators don't lose their preferred speed on reload
  • 3 new tests with good anti-tautology properties

Tests

  • go test ./...: ✅ all pass
  • test-live.js: 72 pass, 8 fail (all 8 are pre-existing getParsedDecoded failures unrelated to this PR)

To merge

  1. Rebase onto current master, resolve conflicts in live.js
  2. Optionally extract shared VCR_SPEEDS constant

Good work overall — just needs the rebase. 👍

@Kpa-clawbot Kpa-clawbot enabled auto-merge (squash) May 1, 2026 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Live path requests

2 participants