Repository navigation
feat(aula): support SC590 Pro DPI stages in OpenMouse - #1758
Conversation
Honor optional per-stage DPI ranges in the editor, controller and hardware test. Commit fixed-stage numeric edits on blur or Enter so intermediate digits and untouched stages are not staged for writing. Reserve the hosted artwork filename without bundling a vendor image. SC590 Pro discovery will become available when OpenMouse adopts a protocol release containing the driver.
|
Caution Review failedThe pull request is closed.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Use the pending preview for preset and custom DPI validation so a value supported by the queued stage can be applied in the same batch. Verified on an SC590 Pro by queuing stage 6 and 20,000 DPI together.
# Conflicts: # src/device/controller.ts # src/device/profile-write-ownership.test.ts
ApprovabilityVerdict: Needs Human Approval Macroscope's review found this PR requires human approval — The change adds SC590 Pro stage-specific DPI limits and updates shared stage editing. An unresolved finding identifies a mode-switch sequence that can leave unequal DPI stages in Single mode, allowing unexpected sensitivity cycling. Notes:
You can add or adjust custom eligibility rules. Learn more. |
…DPI view - A slider edit still waiting on its debounce is committed with the view it was made in, instead of being dropped by the switch - Switching to Single shows the snapped DPI it stages
Dismissing prior approval to re-evaluate 223bda8
| useEffect(() => { | ||
| if (mode === lastModeRef.current) return; | ||
| lastModeRef.current = mode; | ||
| flushRef.current(); |
There was a problem hiding this comment.
🟠 High cards/DpiCard.tsx:214
Switching to Single before a fixed-stage edit's debounce expires can leave DPI cycling enabled: for [400, 800, 1600] with stage 0 active, moving stage 0 to 1200 and switching modes produces [1200, 400, 400]. flushRef.current() commits 1200, but the rest of this effect uses the captured, pre-flush status.dpiStages, so applySingleDpi(400) skips stage 0; perform the conversion using the post-flush stage values or on a subsequent render.
🤖 Copy this AI Prompt to have your agent fix this:
In file @src/features/devices/cards/DpiCard.tsx around line 214:
Switching to Single before a fixed-stage edit's debounce expires can leave DPI cycling enabled: for `[400, 800, 1600]` with stage 0 active, moving stage 0 to `1200` and switching modes produces `[1200, 400, 400]`. `flushRef.current()` commits `1200`, but the rest of this effect uses the captured, pre-flush `status.dpiStages`, so `applySingleDpi(400)` skips stage 0; perform the conversion using the post-flush stage values or on a subsequent render.
Changes
aula-sc590-pro.pngfilename. No vendor binary is included; see artwork request #1757.Dependency and verification
Depends on mouse-protocol #341. This draft keeps the current published dependency so it remains buildable. Once the driver is published, update the dependency and verify device discovery before marking this ready for review.
OpenMouse's build, bundle-size checks and all 770 tests passed with the published dependency and the local protocol branch.
npm run checkagainst the released protocol dependency that contains the driver.Note
Add per-stage DPI options for SC590 Pro in OpenMouse
dpiOptionsForStagein dpi-presets.ts to filter DPI options by the stage editor's min, max, and step limits. With a stage index it uses that stage's override; without one it returns the intersection across reported stages.DpiStageEditorin DpiCard.tsx: per-stage slider bounds, writes by hardware stage index, typed edits commit on blur or Enter in fixed-stage mode, and single-DPI fills snap to shared options.commitCustomDpiandapplyDpiStageValuein controller.ts for consumers of the old device-wide option list.Macroscope summarized 223bda8.
Summary by CodeRabbit