Repository navigation
Superstrike Buttons tab: button assignments, HITS presets and speed test, Bunny Hop card, battery hours, setup code - #684
Merged
Conversation
A HITS step button only updated on-screen state; the change was staged, and so flashed by instant flash, only when Apply was pressed. With instant flash on, stage the change as soon as a step is picked: both-buttons changes through the shared writer (one profile write), left and right through their own button. Without instant flash it still waits for Apply.
With instant flash on a HITS step is staged and flashed as soon as it is picked, so the Apply to both buttons and per-button Apply buttons have nothing left to do. Hide them then. They stay while a game-profile draft is open, because HITS changes are not flashed there.
The HITS Tuning card was a separate section below the card list, so on a Superstrike the Buttons tab showed the Switches card first and the HITS card under it. Make it the first card in the list, which also keeps the mouse panel beside it, and put Bunny Hop at the bottom of the card. Bunny Hop is a per-profile setting and the Superstrike has no LightForce switches, so it no longer needs the Switches card.
Inside the card list the HITS card lost its border and background, because the list is one merged panel whose cards are flattened into dividers, so it no longer looked like the card it was. Render it first in the right-hand column as its own card, above the merged panel, with the mouse panel still beside it.
…allback The battery time estimate was computed but nothing has rendered it since the 2026-09-08 UI rewrite (batteryDetail has no caller). Show it in the status pill after the battery percent, on the tabs that carry the device panel, with the full wording on hover. The history-based estimate still needs 10 minutes and a 1% change, so until then a mouse with a known rated life (PRO X 2 Superstrike 90 h, PRO X 3 Superstrike 135 h) shows how long the charge would last at that rate, labelled as rated. Discharging only; a charging time is not guessed. Adds the label in all 11 locales and tests for the rated figures.
The rated 135 h is for one polling rate, but the mouse draws far more at 8000 Hz than at 1000 Hz. Use the system and signal draw per rate, as G HUB shows them for the PRO X 3 (e.g. 4 + 4 mW at 1000 Hz, 12 + 20 mW at 8000 Hz), to scale the rated figure to the rate in use. The 135 h quote is taken to be at 1000 Hz. These figures are not read from the mouse: a capture of G HUB stepping through every rate shows only the set-rate command and no power values, so G HUB has them built in. Models without a table keep the plain rated hours.
…sumption Comment only. The capacity (1080 mWh) follows from that quote and the 8 mW draw at 1000 Hz.
The Overview tab has its own status pill (connection, DPI, battery, rate, profile) separate from the device panel's. Add the time left after the battery percent there as well, with the full wording on hover.
A presets row in the HITS card: pick a saved setup to load it, Save the current values under a name, Delete one, Copy a short code for the current setup, or Import a code. A preset holds both buttons' actuation, rapid trigger level and on/off, and click haptics. Equal buttons load on the Both tab, unequal ones on Independent. With instant flash on a loaded preset is written at once, both buttons in one profile write; otherwise it waits for Apply. The code is HITS1- plus a base64url of the values and a checksum, so a mistyped or foreign code is rejected; the name is not in it. Values are checked against the mouse's own limits before loading. Presets live in this browser only, since the mouse has nowhere to store names. Not compatible with G HUB's HITS-Code, whose format is unknown. Labels are English, like the card's heading.
Import code opens a dialog with a paste box, live validation, a preview of what the code holds, and an optional name to save it under; Import stays disabled until the code is valid and fits the mouse. Delete opens a confirm dialog naming the preset. Both reuse the existing dialog markup and styles, with a destructive colour from the theme token for the confirm button.
…PRO X 3 Superstrike) A card on the Buttons tab, under the HITS card: the mouse artwork with a callout per button (primary, secondary, middle, forward, back), a searchable command list (mouse actions, DPI, profiles, editing and browser shortcuts, media keys, system), and a Standard / G-Shift toggle. Pick a button, then a command. The write is the existing staged applyLogitechButtonAssignment, so instant flash, the Flash bar and the Profiles tab all agree. Primary and secondary click stay locked on the Standard layer, as in the Profiles tab. - logitech-commands: the catalog, mapped onto the three record kinds the profile stores, with a round-trip test through the protocol's own encoder. - logitech-button-map: button positions on the X2 and X3 artwork. - The card stacks under the mouse when it is narrow (container query). - Overrides the HITS card's legacy order inside the new container so it stays first. Keyboard shortcuts are from a fixed list; recording a custom one stays in the Profiles tab. Not tried on a real mouse: button writes on format 8 have not been hardware-tested.
The Buttons tab showed the side panel's mouse picture and the button map's own. When the map is shown, drop the side panel so there is one mouse and the cards use the full width (the HITS card gets its original wide look back). The device name, connection and battery move into the map card's header. The map is larger (27rem), with wider callouts and a wider command list.
Smaller mouse (20rem), a shorter command list and tighter spacing. The locked tag moves to the label's second line so Primary and Forward no longer touch. The command list gets a slim rounded scrollbar like the app's other lists, without the arrow buttons; Firefox keeps the standard thin scrollbar properties.
Two columns from 1200px up; narrower windows keep them stacked.
onyxhq-dev
marked this pull request as ready for review
October 8, 2026 13:52
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
A reworked Buttons tab for the PRO X 2 and PRO X 3 Superstrike: button assignments as a picture like G HUB's "Zuweisungen", a HITS Tuning card with presets and a speed test, Bunny Hop as its own card, battery hours, and one setup code that shares it all.
New features
Button assignments (new card, PRO X 2 / PRO X 3 Superstrike)
Share setup
SETUP1-..., checksummed) for HITS tuning, Bunny Hop, the Middle, Back and Forward assignments and the DPI stages. Copy yours, or paste one and see what it contains before applying.HITS Tuning
Bunny Hop
Battery
Build
Testing
npx tsc --noEmitis clean. The test count rises to 328 (new tests for presets, setup codes, the speed test maths, the button layout, commands and conflict hints, and the battery rates).Notes