Skip to content

feat(devices): map the Pulsar X2A render - #1674

Open
macieqzz wants to merge 1 commit into
OpenMouse-Project:mainfrom
macieqzz:feat/pulsar-x2a-artwork
Open

macieqzz wants to merge 1 commit into
OpenMouse-Project:mainfrom
macieqzz:feat/pulsar-x2a-artwork

Conversation

@macieqzz

@macieqzz macieqzz commented Dec 1, 2026 •

Copy link
Copy Markdown

Summary

Adds the Pulsar X2A name rule before the generic Pulsar fallback, so the connected Pulsar X2A Wireless resolves to pulsar-x2a.png instead of borrowing the X2 V2 shell.

This is the mapping-only half of the artwork workflow: the render itself is not committed. Source, normalization and licensing are recorded in the artwork request discussion #1673. Once a maintainer uploads pulsar-x2a.png to the openmouse-devices bucket, the device panel shows it; until then the image fails gracefully and the panel keeps its placeholder.

Changes

  • src/shared/device-images.ts: Pulsar X2A (Wireless and Mini) → pulsar-x2a.png, before the generic /pulsar/i rule. The receiver-name fallback still resolves to pulsar-x2-v2.png until a model name is known.
  • src/shared/device-images.test.ts: covers both names.
  • public/devices/README.md: records the source and that the upload is pending.

Testing

npm run check — build, size and 731 tests pass.

Refs #1673.

Note

Add Pulsar X2A device image mapping to computeDeviceImageFilename

  • Adds a case-insensitive match for Pulsar X2A names in device-images.ts that returns pulsar-x2a.png, placed before the generic Pulsar match so other Pulsar names still map to pulsar-x2-v2.png
  • Adds test assertions in device-images.test.ts that both the Pulsar X2A Wireless and X2A Mini Wireless names resolve to the new image path
  • Documents the X2A image source and preparation steps in README.md, including a reminder to confirm redistribution terms before release
  • Risk: the pulsar-x2a.png file must be uploaded to the CDN; without it, matched devices will reference a missing image

Macroscope summarized 2ca0ece.

Summary by CodeRabbit

  • New Features
    • Pulsar X2A Wireless and Pulsar X2A Mini Wireless devices now resolve to the Pulsar X2A image.
  • Documentation
    • Added image source and preparation details, along with a note that the device panel displays a placeholder until the image is available.

- Match the X2A by its reported name before the generic Pulsar fallback, so it stops borrowing the X2 V2 shell.
- Resolve to pulsar-x2a.png; the art upload is tracked in discussion OpenMouse-Project#1673, since the artwork workflow keeps binaries out of the PR.
- Cover the Wireless and Mini names in the device-image test.
@coderabbitai

coderabbitai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The device image resolver maps names matching “Pulsar X2A” to pulsar-x2a.png. Tests cover two device name variants. The README describes the image source, pending upload, placeholder fallback, and redistribution terms.

Changes: Pulsar X2A image mapping

Layer / File(s) Summary
Map Pulsar X2A names to the image
src/shared/device-images.ts, src/shared/device-images.test.ts, public/devices/README.md
The resolver maps Pulsar X2A names to pulsar-x2a.png, while other Pulsar names retain the existing mapping. Tests cover two name variants. The README notes that the image needs a maintainer upload, the panel uses a placeholder until upload, and redistribution terms need confirmation.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Suggested labels: area: devices

Suggested reviewers: snekxs, akinome, macroscopeapp

Merge Risk: Minimal · up to 2ca0e

This change maps Pulsar X2A device names to a dedicated image. If the artwork has not been uploaded yet, the device panel keeps its placeholder. No merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "feat(devices): map the Pulsar X2A render" names the main change: a mapping from Pulsar X2A device names to the pulsar-x2a.png image. The changeset adds that mapping in src/shared/device-ima…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "feat(devices): map the Pulsar X2A render" names the main change: a mapping from Pulsar X2A device names to the pulsar-x2a.png image. The changeset adds that mapping in src/shared/device-images.ts, a test for the Wireless and Mini Wireless variants, and a README note. The title is specific and matches the objectives. It does not mention that the image file itself is absent, but the title does not claim it is included.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between d81f493 and 2ca0ece.

Files selected for processing: 3

  • public/devices/README.md
  • src/shared/device-images.test.ts
  • src/shared/device-images.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

@github-actions github-actions Bot added type: enhancement PR title category: enhancement area: ui Interface and styling area: documentation Documentation labels Dec 1, 2026
@macieqzz
macieqzz marked this pull request as ready for review December 1, 2026 19:56
@macroscopeapp

macroscopeapp Bot commented Dec 1, 2026

Copy link
Copy Markdown

Approvability

Verdict: Approved at 2ca0ece

Macroscope's review found this PR approvable — Maps Pulsar X2A and X2A Mini names to dedicated artwork and documents the pending upload. The change is presentation-only, with existing image-error fallbacks covering the missing asset.

Notes:

  • Your repo's Minimum Blocking Severity is Off, so correctness findings do not automatically block approval.

You can add or adjust custom eligibility rules. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: documentation Documentation 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