feat(plugins): expose connected scale metadata - #844
Draft
MaxRink wants to merge 15 commits into
Draft
Conversation
Remove duplicate battery resets, guards, and subscription bookkeeping identified during the ponytail review. Nullable battery reporting and refresh behavior remain unchanged while the implementation has fewer competing state paths. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The top-right Settings page did not link to the existing Devices page, leaving firmware and scale controls hidden behind the launcher navigation. Add a direct Devices row so connected-device metadata and settings are reachable from the expected entry point. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Device Management is now reachable from the regular Settings page as well as the dashboard. Record both entry points so the user-facing navigation documentation matches the new discoverable route. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Expose generic connected-scale metadata through /api/v1/scale/info while keeping device inventory limited to discovery and connection state. Keep metadata refreshes out of the inventory WebSocket and align the API contract. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep scale metadata on the connected-scale endpoint and update affected implementations and tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use the router's parameterized GET form so the connected-scale metadata endpoint is reachable, and align inventory tests with the boundary. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep inventory payloads metadata-free and cover connected scale info responses. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Observed: the device-management text still claimed inventory REST and WebSocket entries carried nested deviceInfo metadata. Change: Route connected-scale metadata documentation through GET /api/v1/scale/info and apply Dart formatter output. Constraint: Keep the PR743 batteryLevel support and all implementation behavior unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep the aggregator inventory in its original (Device, StreamSubscription) shape now that each device has one connection-state listener. Apply the same cleanup across related PR copies so stale, replacement, and disposal paths cancel exactly one subscription. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Delete unused DeviceInformation declarations from the REST and WebSocket specifications while preserving the internal Dart metadata model, public ScaleInfo contract, and settings-only manual USB override behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Sep 13, 2026
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.
Summary
Expose session-scoped opaque firmware and nullable battery metadata for connected plugin scales, with the existing narrow
/api/v1/scale/infoprojection as the public boundary.PluginProtocolDevice.connectionIdidentity used by later guarded actions.Depends on the retained native scale-info boundary in #743.
Linked Issue
Related #852, #713, and #714. Depends on the retained scale-info boundary in #743; consumed by #846.
The new discussion issue is awaiting maintainer triage. This PR remains a draft while maintainers discuss the proposal; opening the issue does not satisfy the accepted-issue gate or imply approval of the proposed contract.
Verification
Impact
Connected plugin scale clients can read firmware and battery values through the existing scale-info contract. Battery
0and100remain valid, unavailable battery remains nullable, and stale sessions cannot update a replacement device. No new inventory field or settings store is introduced; the corresponding API and plugin documentation changes are part of this boundary.Contributor Responsibility
AI-assisted development is allowed. The submitter remains responsible for the submitted work.