Skip to content

feat(speedtest): add manual speedtest trigger button#259

Merged
itsDNNS merged 4 commits intomainfrom
feat/255-trigger-speedtest
Mar 20, 2026
Merged

feat(speedtest): add manual speedtest trigger button#259
itsDNNS merged 4 commits intomainfrom
feat/255-trigger-speedtest

Conversation

@itsDNNS
Copy link
Owner

@itsDNNS itsDNNS commented Mar 20, 2026

Summary

  • Adds a "Run Speedtest" button to the speedtest page that triggers a test via the Speedtest Tracker API
  • Request is proxied through the DOCSight backend, so installations that don't expose STT ports to the LAN can still trigger tests
  • After triggering, the UI polls for the result (~5s intervals, up to 2min) and shows a toast with download/upload/ping on completion

Changes

  • POST /api/speedtest/run endpoint with 60s rate limiting
  • Frontend button with loading state and result polling
  • i18n keys for EN/DE/FR/ES
  • 5 new tests covering success, rate limiting, STT errors, connection errors, and unconfigured state

Test plan

  • .venv/bin/pytest tests/test_speedtest.py -v (26 passed)
  • python scripts/i18n_check.py --validate (all in sync)
  • Full suite: 1793 passed

Fixes #255

itsDNNS added 4 commits March 20, 2026 09:13
Add a "Run Speedtest" button to the speedtest page that triggers a
speedtest via the Speedtest Tracker API. The request is proxied through
the DOCSight backend so installations that don't expose STT ports to
the LAN can still trigger tests.

- POST /api/speedtest/run endpoint with 60s rate limiting
- Frontend polls for the result and shows a toast on completion
- i18n keys for EN/DE/FR/ES
A speedtest takes at least 30 seconds. Polling every 5s from the start
wastes requests. Now waits 30s before starting to poll.
- Block trigger endpoint in demo mode (returns 400)
- Add .catch() to poll loop so transient errors don't leave the button
  stuck in loading state
- Fetch latest ID from the server before triggering instead of using
  stale client-side cache, preventing false-positive result matching
The button is not rendered in demo mode since the backend rejects the
request anyway. Avoids showing a primary action that can only fail.
@itsDNNS itsDNNS merged commit 5021e77 into main Mar 20, 2026
2 checks passed
@itsDNNS itsDNNS deleted the feat/255-trigger-speedtest branch March 20, 2026 08:25
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.

Add a button to trigger speedtest tracker

1 participant