Skip to content

feat: standalone preview.html — visual demo without any install - #3

Merged
GG-93 merged 2 commits into
mainfrom
copilot/html-standalone-file-preview
Jul 21, 2026
Merged

feat: standalone preview.html — visual demo without any install#3
GG-93 merged 2 commits into
mainfrom
copilot/html-standalone-file-preview

Conversation

Copilot AI commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

No standalone file existed for previewing the UI without running the backend stack.

Adds preview.html at the repo root — a single self-contained file with all CSS/JS inlined and a built-in demo data layer. Open it directly in any browser; no server, Node.js, or npm required.

Demo mode

  • 5 simulated signals (3 Wi-Fi + 2 BLE) rendered immediately on load
  • DoA and RSSI drift continuously to keep animations live
  • Active/idle state toggles periodically
  • Auto-locates the selected target after 8 s, triggering the full located-circle + banner animation
  • Switching targets resets the countdown

Implementation notes

  • Renderer class inlined verbatim from frontend/js/renderer.js
  • WsClient replaced with a tickDemo() function called every 250 ms via setTimeout
  • Base DoA/RSSI cached on signal objects at hydration time to avoid repeated find() in the tick loop
  • currentTargetId kept module-scoped (not on window), shared via a setCurrentTargetId() setter

@GG-93
GG-93 marked this pull request as ready for review July 21, 2026 05:25
@GG-93
GG-93 merged commit 1d6e20e into main Jul 21, 2026
1 check passed
@GG-93
GG-93 deleted the copilot/html-standalone-file-preview branch July 21, 2026 23:29
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.

2 participants