Skip to content

Add per-device info dialog and Linux udev rules#8

Merged
pathawks merged 2 commits intomainfrom
udev-docs
May 2, 2026
Merged

Add per-device info dialog and Linux udev rules#8
pathawks merged 2 commits intomainfrom
udev-docs

Conversation

@pathawks
Copy link
Copy Markdown
Owner

@pathawks pathawks commented May 2, 2026

Summary

  • New Info button on each Connect-screen row opens a dialog showing the device's name, model identifiers, description, supported systems, USB VID:PID, transport, and homepage link.
  • Dialog includes a Linux setup section (auto-expanded on Linux via navigator.userAgentData.platform) with the udev rule for that device and copy buttons for the rule line plus the reload commands.
  • Bundle linux/99-nabu.rules covering every supported device for one-shot install. Rules use TAG+="uaccess" + MODE="0660" so systemd-logind grants ACL access to the active desktop user — no group-membership fiddling.
  • New helper module src/lib/core/udev.ts with buildUdevRule() (transport-aware: tty / hidraw* / usb), formatUsbId(), and isLinuxLike().
  • Drop the unused DeviceDef.notes field; replace with structured models?, homepage?, and description. Existing protocol references that were buried in notes already exist as code comments next to each driver.
  • README gains a Linux setup section between Supported Hardware and What It Does.

Test plan

  • Info button visible on every Connect-screen row
  • Dialog renders name, models, description, systems, VID:PID, transport, and homepage link
  • Homepage link omitted gracefully for devices without one
  • Linux setup section auto-expanded on Linux, collapsed on other platforms
  • Copy buttons copy the udev rule line and reload commands to the clipboard
  • Per-device udev rule line has the right SUBSYSTEM for each transport (tty for serial, hidraw for WebHID, usb for WebUSB)
  • linux/99-nabu.rules covers every device in DEVICES and reloads cleanly with udevadm control --reload-rules && udevadm trigger
  • After installing the bundled rules, each device opens in the wizard without sudo / group membership

- Each row on the Connect screen now has an Info button that opens a
  dialog with the device's name, known model identifiers, description,
  supported systems, USB VID:PID, transport, and homepage link (when
  one exists).
- The dialog has a Linux setup section (rendered as <details>, open by
  default on Linux via navigator.userAgentData.platform / .platform)
  showing the udev rule for that device with copy buttons for the rule
  line and reload commands.
- Bundle linux/99-nabu.rules covering every supported device for users
  who want one-shot install. Rules use TAG+="uaccess" + MODE="0660" so
  systemd-logind grants ACL access to the active desktop user without
  group-membership fiddling.
- New helper module src/lib/core/udev.ts with buildUdevRule() (transport-
  aware: tty / hidraw* / usb), formatUsbId(), and isLinuxLike().
- Drop the unused DeviceDef.notes field; replace with structured
  models?, homepage?, and description. Protocol references that were
  buried in notes already exist as code comments next to each driver.
- README gains a Linux setup section between Supported Hardware and
  What It Does.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds device metadata and a per-device info dialog to the connect flow, plus Linux udev-rule guidance so users can see hardware details and set up browser access on Linux directly from the app. It also restructures the supported-device definitions so richer metadata can be rendered in the UI and documented in the repo.

Changes:

  • Add a new DeviceInfoDialog on each supported-device row, showing device metadata, USB IDs, transport, homepage, and Linux udev setup helpers.
  • Introduce src/lib/core/udev.ts plus a bundled linux/99-nabu.rules file for per-device and one-shot Linux setup guidance.
  • Replace DeviceDef.notes with structured metadata fields (models, homepage, description) and expand the README with Linux setup instructions.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/lib/core/udev.ts Adds helpers to format USB IDs, build udev rules, and detect Linux-like platforms.
src/lib/core/devices.ts Refactors supported-device metadata to structured fields used by the new dialog.
src/components/wizard/device-info-dialog.tsx Implements the new info dialog UI, homepage links, and copyable Linux setup snippets.
src/components/wizard/connect-step.tsx Adds the info button/dialog entry point beside each connect action.
linux/99-nabu.rules Bundles repository udev rules for supported hardware.
README.md Documents Linux setup and updates supported-hardware presentation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
Comment thread src/components/wizard/connect-step.tsx
Comment thread src/lib/core/devices.ts Outdated
Comment thread src/lib/core/devices.ts Outdated
Comment thread src/lib/core/udev.ts Outdated
Comment thread linux/99-nabu.rules
Comment thread src/components/wizard/device-info-dialog.tsx
- Walk back POWERSAVE clone references. The 5c60:dead MaxLander / NaMiio
  entry in DEVICE_FILTERS was never validated, and the description claimed
  "reading and writing" while writeSave throws. Description now describes
  read-only Datel-only support; DEVICE_FILTERS drops the clone entry.
- Add Disney Infinity Base and PS3 Memory Card Adaptor to the README's
  Supported Hardware table — both already exposed via DEVICES.
- Fix isLinuxLike() ChromeOS detection. The previous `??` chain stopped
  at userAgentData.platform when set, so ChromeOS (which reports "Chrome
  OS" there but "Linux" in navigator.platform) was treated as non-Linux.
  Now tests both strings together.
- Add an Info button to the ?mock-mode developer row, backed by a
  synthesized DeviceDef so the existing dialog handles it cleanly.
@pathawks pathawks merged commit bd8f2da into main May 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants