Skip to content

feat(devices): render driver status note and battery hint - #1201

Draft
m4milaad wants to merge 3 commits into
OpenMouse-Project:mainfrom
m4milaad:feat/devices-driver-hints-rendering
Draft

m4milaad wants to merge 3 commits into
OpenMouse-Project:mainfrom
m4milaad:feat/devices-driver-hints-rendering

Conversation

@m4milaad

@m4milaad m4milaad commented Oct 23, 2026 •

Copy link
Copy Markdown

Device / context

This completes the shell side of two driver hints that MouseUiHints already 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 forceShowBattery with batteryPercent: null (currently ignored), and the new Cosmic Byte Kilonova 3335IC driver in OpenMouse-Project/mouse-protocol#249 reports settingsReady: false with a statusNote explaining 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

  • The hero's connected status line appends status.ui.statusNote after connection detail (same line the driver contract describes).
  • forceShowBattery === true keeps 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 for percent: null, so no icon change is needed.
  • Adds a ?preview=kilonova fixture mirroring the Kilonova's browser status, so the composition is visible in dev without the hardware.

Scope notes

  • No styles, no i18n keys: both rendered strings are driver-authored dynamic data (the pollingNote precedent), and the rendered "–" reuses existing classes.
  • Wired devices whose battery percent stays null gain the same forced column; fixtures for those already set the hint.
  • npm run build, npm test and npm run size pass; JS bundle within budget.

Related

Note

Add driver status note and unknown-battery display for device preview

  • Renders the optional status.ui.statusNote in the device hero metadata line in DeviceHero.tsx
  • Shows an unknown-battery stat (battery icon with an en dash) when status.ui.forceShowBattery is true but batteryPercent is null, in both DeviceStats.tsx and the setup panel
  • Adds a kilonova preview fixture and preview mode for the Cosmic Byte Kilonova 3335IC, showing an unconfigured wireless device with a note about OpenMouse Bridge
  • Bumps @openmouse/protocol from 0.45.2 to 0.46.0

Macroscope summarized 2947833. (Automatic summaries will resume when PR exits draft mode or review begins).

github-actions Bot and others added 2 commits October 23, 2026 13:31
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.
@coderabbitai

coderabbitai Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added type: enhancement PR title category: enhancement area: ui Interface and styling area: devices Device integration and HID support area: dependencies Dependency manifests and lockfiles labels Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: dependencies Dependency manifests and lockfiles area: devices Device integration and HID support area: ui Interface and styling type: enhancement PR title category: enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant