Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"dependencies": {
"@openmouse/keyboard-protocol": "1.1.0",
"@openmouse/protocol": "0.45.2",
"@openmouse/protocol": "0.46.0",
"lucide-react": "^1.43.0",
"posthog-js": "^1.438.17",
"preact": "^10.29.8"
Expand Down
32 changes: 32 additions & 0 deletions src/device/preview/preview-fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,37 @@ const ATTACKSHARK: MouseStatus = {
firmware: ["Mouse 1.0.4", "Dongle 1.0.3"],
};

/**
* The Cosmic Byte Kilonova 3335IC through its receiver (SinoWealth
* `258a:002f`), browser transport: identity, battery, link, and read-only DPI.
* The driver refuses writes until the full bank is decoded, so the shell shows
* DPI read-out but no settings cards.
*/
const KILONOVA: MouseStatus = {
brand: "Cosmic Byte" as MouseStatus["brand"],
name: "Cosmic Byte Kilonova 3335IC",
ui: {
family: "sinowealth-kilonova-3335ic",
settingsReady: false,
valuesVerified: true,
forceShowBattery: true,
hideProcessingCard: true,
defaultDisplayName: "Cosmic Byte Kilonova 3335IC",
statusNote: "OpenMouse reads this Cosmic Byte Kilonova 3335IC's DPI from its onboard memory; other settings are not decoded and changes are refused. The battery and awake check need OpenMouse Bridge.",
},
batteryPercent: null,
batteryState: "Unknown",
dpi: 1600,
dpiStages: [400, 800, 1600, 3200, 6400, 16000],
activeDpiStage: 2,
pollingRateHz: 0,
activeProfile: null,
connectionType: "Wireless",
connectionDetail: "2.4 GHz receiver",
liftOffDistance: null,
firmware: [],
};

const M3K: MouseStatus = {
brand: "Zaunkoenig" as MouseStatus["brand"],
name: "Zaunkoenig M3K",
Expand Down Expand Up @@ -1086,6 +1117,7 @@ export const PREVIEW_FIXTURES: Record<FixturePreviewMode, PreviewFixture> = {
wlmouse: { label: "WLMouse BEAST X", status: WLMOUSE },
lamzu: { label: "Lamzu Atlantis OG V2", status: LAMZU },
"attack-shark": { label: "Attack Shark R5 Ultra", status: ATTACKSHARK },
kilonova: { label: "Cosmic Byte Kilonova 3335IC", status: KILONOVA },
crdrako: { label: "CRDRAKO KO-ONE", status: CRDRAKO },
m3k: { label: "Zaunkoenig M3K", status: M3K },
atk: { label: "ATK A9 Ultra", status: ATK },
Expand Down
2 changes: 2 additions & 0 deletions src/device/preview/preview-modes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const PREVIEW_KEYS = [
"wlmouse",
"lamzu",
"attack-shark",
"kilonova",
"crdrako",
"m3k",
"atk",
Expand Down Expand Up @@ -70,6 +71,7 @@ export function parsePreviewMode(value: string | null): PreviewMode | null {
case "wlmouse": return "wlmouse";
case "lamzu": return "lamzu";
case "attack-shark": return "attack-shark";
case "kilonova": return "kilonova";
case "crdrako": return "crdrako";
case "m3k": return "m3k";
case "atk": return "atk";
Expand Down
4 changes: 4 additions & 0 deletions src/features/devices/DeviceHero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export function DeviceHero({
const activeEntry = snapshot.devices.find((device) => device.selected) ?? null;
const name = status?.name ?? keyboard?.name ?? activeEntry?.name ?? "";
const brand = status ? noirBrandLabel(status) : null;
const statusNote = status?.ui?.statusNote ?? null;
const image = snapshot.deviceArtwork
?? (keyboard ? deviceImage({ vendorId: keyboard.vendorId, productId: keyboard.productId } as HIDDevice, keyboard.name) : null);
const needsArtwork = Boolean(status && active && (imageFailed || isUnknownDevice(
Expand Down Expand Up @@ -82,6 +83,7 @@ export function DeviceHero({
{brand ? <><span className="om-sep" aria-hidden="true">·</span><span>{displayText(locale, brand)}</span></> : null}
{status?.connectionDetail ? <><span className="om-sep" aria-hidden="true">·</span><span>{displayText(locale, status.connectionDetail)}</span></> : null}
{activeEntry?.transport === "bridge" ? <><span className="om-sep" aria-hidden="true">·</span><span>{t(locale, "bridge.title")}</span></> : null}
{statusNote ? <><span className="om-sep" aria-hidden="true">·</span><span>{statusNote}</span></> : null}
</p>
{status ? <DeviceStats status={status} locale={locale} transport={activeEntry?.transport} full /> : null}
</div>
Expand Down Expand Up @@ -152,6 +154,8 @@ export function CurrentSetupPanel({ snapshot }: { snapshot: ControlSnapshot }):
unit: "%",
sub: displayText(locale, status.batteryState),
});
} else if (status.ui?.forceShowBattery === true) {
figures.push({ key: "battery", label: t(locale, "ov.batteryLabel"), value: "–" });
}
if (status.activeProfile != null) {
figures.push({ key: "profile", label: t(locale, "ov.onboardProfile"), value: String(status.activeProfile) });
Expand Down
5 changes: 5 additions & 0 deletions src/features/devices/DeviceStats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ export function DeviceStats({
<b>{status.batteryPercent}%</b>
{estimate && full ? <span className="om-muted">{estimate.time}</span> : null}
</span>
) : status.ui?.forceShowBattery === true ? (
<span className="om-stat">
<BatteryIcon percent={null} state={status.batteryState} />
<span className="om-muted">{"–"}</span>
</span>
) : null}
{status.pollingRateHz > 0 ? (
<span className="om-stat">
Expand Down
Loading