mirror of
https://github.com/safijari/openpuck.git
synced 2026-11-03 22:30:22 +00:00
[PR #260] Redesign the web panel as a Svelte + Skeleton dashboard #264
Labels
No labels
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
safijari/openpuck#264
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/safijari/openpuck/pull/260
Author: @adamrpostjr
Created: 8/30/2026
Status: 🔄 Open
Base:
main← Head:web-redesign📝 Commits (10+)
a49ff12Add Svelte + Skeleton scaffold for the web panel redesign8e423cdWire up WebUSB transport and port the Feel section114fa1dPort the Mapping and Desktop sections756f4e5Make the lizard editor read-first instead of a wall of selectsa45c792Port in-browser firmware flashing and the release list6b5a455Fix a layering violation and mark demo data in the UIc1db039Wire the Device menu actions, which were inert40837dfPort backup and clonea10d961Port the diagnostics: capture, flight recorder, hang log, stability testdd6dbc9Make the beta gate on Firmware actually gate📊 Changes
99 files changed (+19764 additions, -2610 deletions)
View changed files
➕
.github/workflows/panel.yml(+65 -0)📝
AGENTS.md(+34 -0)📝
docs/BUILD_AND_DEPLOY.md(+34 -15)➕
docs/apple-touch-icon.png(+0 -0)➕
docs/assets/Diagnostics-CNy-WTPw.js(+12 -0)➕
docs/assets/Firmware-C8NOdfZi.js(+9 -0)➕
docs/assets/Panel-DVJ_5r9G.js(+3 -0)➕
docs/assets/Sniffer-BJJtISUE.js(+3 -0)➕
docs/assets/index-BBXZdF5L.css(+2 -0)➕
docs/assets/index-DQaQRYOM.js(+49 -0)➕
docs/assets/refresh-cw-Cxz2buiS.js(+1 -0)➕
docs/icon-192.png(+0 -0)➕
docs/icon-512.png(+0 -0)➕
docs/icon-maskable-512.png(+0 -0)➕
docs/icon.svg(+10 -0)📝
docs/index.html(+17 -2328)➕
docs/legacy-sniffer.html(+270 -0)➕
docs/legacy.html(+2329 -0)➕
docs/manifest.webmanifest(+1 -0)➕
docs/registerSW.js(+1 -0)...and 79 more files
📄 Description
Closes #259.
Rebuilds the WebUSB panel as a Svelte + Skeleton dashboard. Every feature,
readout and line of explanatory copy from the current panel is carried over —
this is a reorganisation, not a trim.
The five things from #259
sniffer.htmlredirects so the old URL still worksBefore / after
Same puck, same window, both connected.
Before — one 980px column, 3712px tall:
After — link status always visible, no scrolling to reach it:
What was actually wrong
Measured on the live page with a real puck attached, in a 1556×785 window:
max-width:980px); 62% on a 2560px display.The layout
Content split by how it is used, rather than interleaved:
The old Link status card held two different jobs; the glanceable per-controller
stats moved to the sidebar and the deep telemetry to Diagnostics. All 27 notes
are kept verbatim, moved into
ⓘpopovers.Modes are cards with capability badges instead of eleven identical buttons.
The desktop map reads as sentences — 37px rows instead of ~70px, and only the
row being edited renders controls. New: a row that would be dropped on save says
so, in place. Previously those vanished silently with a note in the log.
Live streams float; post-mortem dumps stay docked.
ReversePuck and the sniffer
The dongle reshapes the panel rather than showing puck controls that do nothing:
The sniffer is now a section, keeping its own connection since it is a separate board:
Four bugs found while porting
Writing tests around the reverse-engineered code turned up real defects, all of
which exist in the current panel:
acc[3] | acc[4]<<8 | acc[5]<<16 | acc[6]*16777216. The top byte ismultiplied to dodge the sign bit
<< 24would set, but|coerces to int32and undoes it — so any capture past 2^31 µs sorted before every earlier
frame. Fixed, with a test at
0xff.status protocol v15, not v16. A puck on exactly v15 would have been locked
out. Now
caps.panelUpdate, tested either side of the boundary.never blocked; the warning you are meant to accept could be walked past.
legacy.htmlbecame unreachable once the service worker installed, whichdefeated keeping it for comparison. Fixed with a fallback denylist.
Structure
40 files, largest 351 lines, against the current 2,329-line single file.
Verified acyclic with no upward imports.
protocol/is pure — no DOM, noSvelte, no USB — and is the layer under test.
applyBlobis the only functionthat changed shape: it decoded byte offsets and wrote to the DOM in one
pass, so the decode half became a pure
parseBlob(). Every offset, length guardand version gate is unchanged. The transport, UF2 parser, CRC32, update
protocol, lizard map and backup format are lifted as-is, comments included.
116 tests, all on the protocol layer — the first thing here testable without
a puck on the desk. CI runs format, types, tests and build, and rebuilds
docs/to catch a source change pushed without one.
What you should push back on
npm install, anddocs/index.htmlbecomes generated —git logshows youediting it directly as part of feature work, so this is a real change to your
workflow, not just mine.
docs/, so UI changes carry a bundle diff.That keeps Pages working with no settings change; an Actions deploy would be
cleaner but needs repo access I do not have.
that are large and rarely opened load on demand.
docs/legacy.htmlkeeps the current panel for one release so a suspiciousreading can be compared side by side.
Testing status — please read
Reading from a puck is verified on real hardware. The transport, the status
blob decode, the 600ms poll and the lizard map dump (26 bindings off my own
puck) all work; the screenshots above are live data, not mocks.
Every write path is verified only by tests and fixtures. Mode switching,
config writes, the backup export→import round trip and firmware flashing have
not touched hardware. I did not want to exercise a flash path against someone
else's device without saying so first. If you would rather that happen before
this is considered, I will do it and report back.
Also worth a look:
web/README.mdis written for someone who has not usedSvelte or Skeleton, since that describes most of this repo's contributors.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.