Repository navigation
Conversation
Drivers already declare two shell hints in MouseUiHints that nothing rendered: `statusNote` (an extra sentence for the connected status line, explained why a connection is limited) and `forceShowBattery` (show the battery column even when the percent is unknown). The Cosmic Byte Kilonova 3335IC driver in OpenMouse-Project/mouse-protocol#249 is the first one that relies on both, so with the current shell its page showed the device and nothing else. - The hero's connected status line now appends `status.ui.statusNote` after the connection detail. - `forceShowBattery` now keeps the battery present in the hero stats and the current-setup figures, shown as "–" while the percent is unknown, instead of only when a percent exists. Wired devices that report no percent until they flunk a battery read (Endgame Gear OP1 V2 fixtures already set the hint) gain the same column. - Adds a `?preview=kilonova` fixture mirroring the driver's browser status so the composition is visible without the hardware.
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Comment |
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.
Device / context
This completes the shell side of two driver hints that
MouseUiHintsalready declares but the app has never rendered:statusNote?: string- "Extra sentence appended to the connected status line, for drivers whose connection is deliberately limited (e.g. why settings are unavailable)."forceShowBattery?: boolean- "Always show battery column (even wired with null %)."Field devices that set both exist today: the Endgame Gear OP1 V2 wired fixtures set
forceShowBatterywithbatteryPercent: null(currently ignored), and the new Cosmic Byte Kilonova 3335IC driver in OpenMouse-Project/mouse-protocol#249 reportssettingsReady: falsewith astatusNoteexplaining the read-only treatment, because its receiver's settings bank is not decoded yet. With the current shell, that device's page renders the hero and nothing else - no explanation for the empty tabs, no battery column - so it reads like the driver is broken rather than deliberate.What the change does
status.ui.statusNoteafter connection detail (same line the driver contract describes).forceShowBattery === truekeeps the battery in the hero stats and the current-setup figures when the percent is unknown, shown as–(the established unknown-value marker), instead of absent. BatteryIcon already renders an unknown state forpercent: null, so no icon change is needed.?preview=kilonovafixture mirroring the Kilonova's browser status, so the composition is visible in dev without the hardware.Scope notes
pollingNoteprecedent), and the rendered "–" reuses existing classes.npm run build,npm testandnpm run sizepass; JS bundle within budget.Related
Note
Add driver status note and unknown-battery display for device preview
status.ui.statusNotein the device hero metadata line in DeviceHero.tsxstatus.ui.forceShowBatteryis true butbatteryPercentis null, in both DeviceStats.tsx and the setup panelkilonovapreview fixture and preview mode for the Cosmic Byte Kilonova 3335IC, showing an unconfigured wireless device with a note about OpenMouse Bridge@openmouse/protocolfrom 0.45.2 to 0.46.0Macroscope summarized 2947833. (Automatic summaries will resume when PR exits draft mode or review begins).