From 8b548681016971048366895e66952989fa6b5154 Mon Sep 17 00:00:00 2001 From: snekxs <26660858+snekxs@users.noreply.github.com> Date: Mon, 12 Oct 2026 19:31:47 -0600 Subject: [PATCH] fix(finalmouse): hide the polling card for the Starlight X MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Starlight X has no adjustable polling rate — PerfectPolling is a fixed pipeline — but it still reports one, so the Performance tab offered a rate selector that could not do anything (and 8k in particular is a no-op on the SLX). `supportedPollingRates` comes from the driver, and the driver now marks the SLX read-only, but the card should not render at all: `PerfectPollingCard` already stands in for the SLX's polling story. Gate `cardAvailability.polling` on `!isSlxStatus(status)`. The Ultralight X keeps the selector; the SLX loses it. --- src/app/cards/availability.test.ts | 21 +++++++++++++++++++++ src/app/cards/availability.ts | 8 ++++++-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/src/app/cards/availability.test.ts b/src/app/cards/availability.test.ts index fa0f67a9..636c6cde 100644 --- a/src/app/cards/availability.test.ts +++ b/src/app/cards/availability.test.ts @@ -101,6 +101,27 @@ test("a driver still reading hides the settings grid but not the rest", () => { assert.equal(has.logitechDetails, true); }); +test("the Finalmouse Starlight X has no polling card; the Ultralight X keeps it", () => { + // SLX runs PerfectPolling (a fixed pipeline) and reports a rate it will not + // let the user change, so the selector is dropped and PerfectPollingCard + // stands in. Only `finalmouseIsSlx` distinguishes the two dongles. + const slx = cardAvailability(snapshot({ status: { + brand: "Finalmouse", + name: "Finalmouse Starlight X", + ui: { family: "finalmouse-slx" }, + finalmouseIsSlx: true, + } as Partial })); + assert.equal(slx.polling, false); + + const ulx = cardAvailability(snapshot({ status: { + brand: "Finalmouse", + name: "Finalmouse UltralightX", + ui: { family: "finalmouse-ulx" }, + finalmouseIsSlx: false, + } as Partial })); + assert.equal(ulx.polling, true); +}); + test("the sensor card goes when the mouse reports neither surface nor lift-off", () => { assert.equal(cardAvailability(snapshot({ status: { supportedLiftOffDistances: [] }, diff --git a/src/app/cards/availability.ts b/src/app/cards/availability.ts index 9d6f16ad..9e5ef4a2 100644 --- a/src/app/cards/availability.ts +++ b/src/app/cards/availability.ts @@ -148,11 +148,15 @@ function computeCardAvailability(snapshot: ControlSnapshot): CardAvailability { // The Attack Shark X11's settings channel is native-only (settingsReady // stays false), but its polling rate is still controllable through // OpenMouse Bridge — see isNativeAttackSharkX11 in device/controller.ts. - polling: ready || ( + // + // The Finalmouse Starlight X reports a polling rate but has no adjustable + // one: PerfectPolling runs a fixed pipeline (see PerfectPollingCard), so + // there is nothing to pick. Ultralight X keeps the selector. + polling: !isSlxStatus(status) && (ready || ( status.brand === "Attack Shark" && status.name === "Attack Shark X11" && status.ui?.settingsReady === false - ), + )), sensor: sensor && ready, lightforce: Boolean(status.lightforceSwitchMode), superstrike: traits.logitech && status.analogButtonTuning?.buttons.length === 2,