Invite device reports via pre-filled GitHub issues - #3
Merged
Merged
Conversation
A dismissible toast, never in the way: - a meter goes live on a driver that isn't live-tested: asks once per driver whether it reads right and opens the device-report issue form pre-filled with the advertised name, driver and verification tier, the GATT layout and any Device Information strings. No readings, no raw frames. - the chooser is dismissed or connecting fails: offers the connection-problem form. The app sends nothing itself; the user reviews and submits on GitHub. MeterSession gains describe() and a cancelled flag; MeterChannel mirrors driverId and cancelled.
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.
Most drivers haven't met a real meter yet. This asks users to tell us how theirs behaves, without getting in the way.
What the user sees
A dismissible, non-blocking toast (bottom right):
live-tested→ "UT181A is not yet confirmed on real hardware. Does it read right? Report it". The wording follows the driver'sverificationtier. Asked once per driver: dismissing or reporting is remembered in localStorage. Confirmed drivers and demo meters get no toast.Both open a pre-filled GitHub issue form in a new tab. The app sends nothing itself; the user reviews and submits on GitHub.
What's in the report
Connected: advertised name, matched driver + verification tier, the matched service and its characteristics with their properties, Device Information strings (manufacturer / model / hardware / firmware / software) if the meter exposes them, and the browser. No readings, no raw frames. If we need a capture, we ask in the thread.
Connection problem: the browser and the error message, if there was one.
Changes
.github/ISSUE_TEMPLATE/device-report.ymlandconnection-problem.yml(labelsdevice report/connection problem, both created)packages/web-bluetooth:Transport.describe()returns aGattDescription. The Device Information reads are best-effort and happen only when the user clicks Report it, never while connecting.Transport.chosenis new.MeterSnapshotgainscancelled.MeterChannelmirrorsdriverIdandcancelled.GattDescriptionis re-exported from@libreble/multimeter-react.apps/web:lib/report.tsbuilds the issue URLs;components/ReportToast.tsxshows the toastTesting
pnpm test: 622 pass, including new ones fordescribe(), thecancelledflag, the URL builder and the toastpnpm typecheck,pnpm lint(2 existing warnings),pnpm format:checkandpnpm buildpassThe forms only resolve on
main, so the pre-filled links fall back to the plain issue picker until this merges.