Skip to content

ui/device-details - #254

Merged
MiloCasagrande merged 20 commits into
ui/devicesfrom
ui/device-details
Oct 26, 2026
Merged

MiloCasagrande merged 20 commits into
ui/devicesfrom
ui/device-details

Conversation

@MiloCasagrande

@MiloCasagrande MiloCasagrande commented Aug 31, 2026 •

Copy link
Copy Markdown
Member

feat: redesign device detail page with new layout

Signed-off-by: Milo Casagrande mcasagra@qti.qualcomm.com

@MiloCasagrande MiloCasagrande changed the title feat: redesign device detail page with new layout ui/device-details Aug 31, 2026
@MiloCasagrande

MiloCasagrande commented Aug 31, 2026 •

Copy link
Copy Markdown
Member Author

Other PRs in this stack, in order:

This was referenced Aug 31, 2026
@doanac

doanac commented Aug 31, 2026

Copy link
Copy Markdown
Member

I mostly like this. The one thing that feels odd is not controlling the size of the view for updates. As you can see here, it winds up dominating my screen so that I don't see the other things for the device:
image

@MiloCasagrande

Copy link
Copy Markdown
Member Author

I mostly like this. The one thing that feels odd is not controlling the size of the view for updates. As you can see here, it winds up dominating my screen so that I don't see the other things for the device

Yeah, that content grows too much indeed.
I need to seed more local data to test it.

I think we need a compromise there: show 5 or 6, and have a button/link to a new page with the complete list of updates. That will add a new tab at the top, "Updates".

I noticed only now that there is a /devices/$device/update/$update page.
We should change that to /devices/$device/updates/ for the entire list, and then /devices/$device/updates/$update, in order to keep the same pluralization in the URL path as the other paths.

Comment thread cmd/seed/device_extras.go Fixed
This was referenced Oct 5, 2026
@MiloCasagrande
MiloCasagrande force-pushed the ui/device-details branch 2 times, most recently from de0c578 to 202c8d6 Compare October 9, 2026 13:00
This was referenced Oct 14, 2026
@MiloCasagrande
MiloCasagrande added this pull request to stack #309 October 21, 2026 11:33
@MiloCasagrande
MiloCasagrande marked this pull request as ready for review October 21, 2026 11:36
MiloCasagrande and others added 20 commits October 26, 2026 10:34
Signed-off-by: Milo Casagrande <mcasagra@qti.qualcomm.com>
Old /configs/device/:uuid GET routes now 301-redirect to
/devices/:uuid/configs (and related). PATCH/DELETE and history
also moved. No handler logic changed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Milo Casagrande <mcasagra@qti.qualcomm.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Milo Casagrande <mcasagra@qti.qualcomm.com>
Update template hrefs to use new URL structure:
- /configs/device/:uuid -> /devices/:uuid/configs
- /configs/device/:uuid/applied -> /devices/:uuid/applied-configs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Milo Casagrande <mcasagra@qti.qualcomm.com>
Signed-off-by: Milo Casagrande <mcasagra@qti.qualcomm.com>
Signed-off-by: Milo Casagrande <mcasagra@qti.qualcomm.com>
Give roughly a third of seeded devices 10-15 fake update-history
entries so the device's Update History page isn't always sparse,
while leaving the rest empty so it stays realistic. About one in
five entries is seeded as a failed install for visual variety.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Milo Casagrande <mcasagra@qti.qualcomm.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Milo Casagrande <mcasagra@qti.qualcomm.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Milo Casagrande <mcasagra@qti.qualcomm.com>
devicesUpdateGet used to hand the template raw DeviceUpdateEvent
data and let it slice DeviceTime with {{slice $step.DeviceTime 11 19}}
to get a clock-only timestamp. That slice has no bounds checking, so
a malformed or unexpectedly short DeviceTime from the gateway would
panic the template render instead of degrading gracefully.

buildUpdateSteps now formats each step's Time in Go (time.Format,
which can't panic) and exposes it as a plain field, alongside the
existing per-step Elapsed/Failed. Also documents that the aggregate
`failed` return value is an all-or-nothing rollup: any single event
reporting Success == false marks the whole update as failed, even if
later steps succeeded — there is no partial-success state in this UI.

Added TestBuildUpdateStepsClampsNegativeElapsed to cover the existing
elapsed-time clamp when events arrive out of order.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Milo Casagrande <mcasagra@qti.qualcomm.com>
Signed-off-by: Milo Casagrande <mcasagra@qti.qualcomm.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Milo Casagrande <mcasagra@qti.qualcomm.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Milo Casagrande <mcasagra@qti.qualcomm.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Milo Casagrande <mcasagra@qti.qualcomm.com>
Signed-off-by: Milo Casagrande <mcasagra@qti.qualcomm.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Milo Casagrande <mcasagra@qti.qualcomm.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Milo Casagrande <mcasagra@qti.qualcomm.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Milo Casagrande <mcasagra@qti.qualcomm.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Milo Casagrande <mcasagra@qti.qualcomm.com>
Use device indexes for sample variation so seed data remains reproducible
and avoids non-cryptographic randomness warnings.

Signed-off-by: Milo Casagrande <mcasagra@qti.qualcomm.com>
@MiloCasagrande
MiloCasagrande merged commit 56821e8 into main Oct 26, 2026
15 of 16 checks passed
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.

3 participants