Repository navigation
feat(spa): keep firing on a timer, from the browser, for a chosen time - #68
Merged
Merged
Conversation
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>
ETWOYA
approved these changes
Oct 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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