Skip to content

fix(Sysdevs) incorrect drives showing under controllers#2658

Merged
limetech merged 1 commit into
unraid:masterfrom
SimonFair:feature/os-314-731-list-of-controller-devices-can-be-wrong-in-some-cases
Jun 10, 2026
Merged

fix(Sysdevs) incorrect drives showing under controllers#2658
limetech merged 1 commit into
unraid:masterfrom
SimonFair:feature/os-314-731-list-of-controller-devices-can-be-wrong-in-some-cases

Conversation

@SimonFair

@SimonFair SimonFair commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes
    • Improved drive detection accuracy by refining SATA device matching logic to prevent false matches when identifying drives in the system device list, ensuring more reliable drive recognition and display.

@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 7cf88ac1-dbed-4122-b20b-7a22ebe1c29c

📥 Commits

Reviewing files that changed from the base of the PR and between 982b3c2 and 605a348.

📒 Files selected for processing (1)
  • emhttp/plugins/dynamix/include/SysDevs.php

Walkthrough

This PR refines SATA drive enumeration logic in the system device detection routine. The device-to-LSCSI matching pattern was tightened from a loose wildcard regex to a stricter grep pattern that matches the exact /dev/<device> token with word boundary anchoring, improving precision in drive identification during storage inventory.

Changes

SATA Drive Detection Pattern Refinement

Layer / File(s) Summary
SATA device pattern matching
emhttp/plugins/dynamix/include/SysDevs.php
Device enumeration tightens matching logic by building a regex pattern that targets exact /dev/<satadevice> tokens with word boundaries instead of loose wildcards, then applies preg_grep to filter lsscsi output.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A rabbit refines the device-seeking quest, 🐰
From wild patterns matching to strict regex best,
Word boundaries guard the /dev/ array—
No partial fakes trick the search today!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main fix: preventing incorrect drives from being displayed under controllers in the Sysdevs component.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

🔧 PR Test Plugin Available

A test plugin has been generated for this PR that includes the modified files.

Version: 2026.06.05.1447
Build: View Workflow Run

📥 Installation Instructions:

Install via Unraid Web UI:

  1. Go to Plugins → Install Plugin
  2. Copy and paste this URL:
https://preview.dl.unraid.net/pr-plugins/pr-2658/webgui-pr-2658.plg
  1. Click Install

Alternative: Direct Download

⚠️ Important Notes:

  • Testing only: This plugin is for testing PR changes
  • Backup included: Original files are automatically backed up
  • Easy removal: Files are restored when plugin is removed
  • Conflicts: Remove this plugin before installing production updates
  • Post-merge behavior: This preview stays available after merge until preview storage expires or it is manually cleaned up

📝 Modified Files:

Click to expand file list
emhttp/plugins/dynamix/include/SysDevs.php

🔄 To Remove:

Navigate to Plugins → Installed Plugins and remove webgui-pr-2658, or run:

plugin remove webgui-pr-2658

🤖 This comment is automatically generated and will be updated with each new push to this PR.

@SimonFair SimonFair added the 7.3 label Jun 5, 2026
@limetech limetech merged commit 7df9dc5 into unraid:master Jun 10, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants