Skip to content

feat(spa): keep firing on a timer, from the browser, for a chosen time - #68

Merged
ETWOYA merged 2 commits into
mainfrom
feat/timed-firing-ui
Oct 6, 2026
Merged

ETWOYA merged 2 commits into
mainfrom
feat/timed-firing-ui

Conversation

@dankoverride

Copy link
Copy Markdown
Collaborator

Timed firing: keep firing a diagram from the browser for a chosen time

For a session that needs steady telemetry (a demo, a workshop, an investigation exercise), the Shoebox page can now keep firing the current diagram on a timer.

How it works: a small loop in the browser calls the same run as the play button, every N seconds, until the chosen time is up. Each run sends the diagram as it is at that moment, so edits apply on the next run. There is no server-side timer, no new endpoint and no server-held state.

It cannot be left on:

  • You must pick a duration: 5, 15, 30, 60 or 120 minutes (2 h ceiling in code). +15 min never leaves more than 2 h remaining.
  • It stops at the end, on Stop, and when you leave the page. Nothing is saved, so a reload always comes back stopped.

Pacing: default every 5 s, bounds 5 to 60 s. A tick is skipped while the previous run is still out; a run that does not answer within 30 s is reported and firing continues. A 429 is shown plainly and firing carries on at the same pace. The play button is disabled while timed firing is on.

Server change: /run now refills at 12 a minute (one every 5 s) per shoebox and per address, instead of 2 and 4. Bursts and partition keys are unchanged. The README pacing table and cost note state the new ceiling: one address flat out for an hour is at most 760 runs.

Tests: .NET 1207 passed; SPA vitest 44 passed, with fake-timer tests for required duration, the ceiling, stopping at the end, Stop, capped extension, skip while in flight, 429 continues, timeout, real 5 s pacing, and destroy stops it.

🤖 Generated with Claude Code

dankoverride and others added 2 commits October 6, 2026 00:18
The play button fires one run. Keep firing calls the same run every N seconds
(default 5, from 5 to 60) until a chosen duration ends: 5 minutes to 2 hours,
no open-ended option, two hours enforced in code. +15 min never leaves more
than two hours to go. A tick is skipped while the previous run is still out,
a 429 is shown and firing carries on at the same pace, and it stops at the
end, on Stop, and when the component is destroyed. Nothing is persisted, so a
reload always comes back stopped. Each run sends the diagram as it is then.

The one server change: /run now sustains 12 a minute (one every 5 s) per
shoebox and per address, up from 2 and 4, with the same bursts and the same
partitioning. README, llms.txt and the 429 body state the new numbers and
the new emission ceiling.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y while on

- Fire when at least the interval less half a second has passed. The clock
  ticks once a second and real timers jitter, so a strict check turned every
  5 s into 6 s. Still never faster than the interval allows.
- Give up on a run after 30 s, say so like any other failure, and keep
  firing, so a run that never answers cannot stall the loop silently.
- Disable the play buttons while timed firing is on, and ignore fire() then.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dankoverride
dankoverride requested a review from ETWOYA as a code owner October 6, 2026 04:26
@ETWOYA
ETWOYA merged commit 6303db4 into main Oct 6, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants