feat: add timeslider playback speed setting#7541
feat: add timeslider playback speed setting#7541JohnMcLear wants to merge 1 commit intoether:developfrom
Conversation
Add a core timeslider playback speed setting with an original-speed default, a realtime mode that uses revision timestamps, and frontend coverage for the new behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Review Summary by QodoAdd timeslider playback speed setting with realtime mode
WalkthroughsDescription• Add playback speed selector to timeslider with multiple speed options • Implement realtime mode using revision timestamps for accurate playback • Persist selected playback speed in browser cookies across sessions • Add comprehensive frontend tests for default behavior, persistence, and realtime scheduling Diagramflowchart LR
A["User selects playback speed"] --> B["Speed stored in cookie"]
B --> C["BroadcastSlider updated"]
C --> D["Playback uses selected speed"]
D --> E{Speed mode?}
E -->|Realtime| F["Use revision timestamps"]
E -->|Fixed| G["Use millisecond delay"]
F --> H["Schedule next step"]
G --> H
File Changes1. src/static/js/broadcast_slider.ts
|
Code Review by Qodo
1. Playback speed lacks feature flag
|
| <p> | ||
| <label for="playbackspeed" data-l10n-id="timeslider.settings.playbackSpeed">Playback speed:</label> | ||
| <select id="playbackspeed"> | ||
| <option value="100" data-l10n-id="timeslider.settings.playbackSpeed.original">Original speed</option> | ||
| <option value="realtime" data-l10n-id="timeslider.settings.playbackSpeed.realtime">Realtime</option> | ||
| <option value="200" data-l10n-id="timeslider.settings.playbackSpeed.200ms">200 ms</option> | ||
| <option value="500" data-l10n-id="timeslider.settings.playbackSpeed.500ms">500 ms</option> | ||
| <option value="1000" data-l10n-id="timeslider.settings.playbackSpeed.1000ms">1000 ms</option> | ||
| </select> | ||
| </p> |
There was a problem hiding this comment.
1. Playback speed lacks feature flag 📘 Rule violation ⛨ Security
The new timeslider playback speed UI and behavior are always available with no feature-flag gating, which violates the requirement that new features be disabled by default behind a flag. This can introduce unreviewed behavior changes into deployments that expect the pre-change timeslider UI/behavior only.
Agent Prompt
## Issue description
The new timeslider playback speed feature (UI + behavior) is always enabled and is not protected by a feature flag, violating the requirement that new features be behind a flag and disabled by default.
## Issue Context
A compliant implementation should provide an explicit enable/disable mechanism (feature flag), default it to disabled, and preserve the pre-change behavior and UI when disabled.
## Fix Focus Areas
- src/templates/timeslider.html[241-250]
- src/static/js/timeslider.ts[178-185]
- src/static/js/broadcast_slider.ts[46-65]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
This is pretty awesome 👯♀️
Summary
Testing
Refs #5012