feat(web): show usage by device in the dashboard#533
Merged
Conversation
Add /api/devices to the web server: it returns this machine plus every paired device (via pullDevices), each kept separate. The dashboard gains a device switcher with an All devices combined view (totals, a per-device breakdown table, and a merged chart) plus a per-device tab. Remote payloads arrive sanitized, so their project and session detail is shown as private rather than listed. With no devices paired, it renders exactly as before.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Connects device sharing (#532) to the web dashboard (#531) so you can see all your Macs in the browser, not just on the CLI.
What it adds
/api/devicesendpoint: returns this machine plus every paired device viapullDevices, each kept separate (no server-side merge).Behaviour when nothing is paired
The dashboard renders exactly as before: one device (this Mac), no switcher. The switcher only appears once you pair a device with
codeburn devices add.Verification
tsc --noEmit(server) and dashtypecheck+vite buildboth pass.codeburn web:/api/devicesreturns the local device with its full payload (cost, calls, projects, models, daily), and the SPA is served.