Skip to content

EDM-3617: Do not show decomissioned devices as target#605

Merged
rawagner merged 1 commit intoflightctl:mainfrom
rawagner:filter_decomissioned
Mar 31, 2026
Merged

EDM-3617: Do not show decomissioned devices as target#605
rawagner merged 1 commit intoflightctl:mainfrom
rawagner:filter_decomissioned

Conversation

@rawagner
Copy link
Copy Markdown
Collaborator

@rawagner rawagner commented Mar 31, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Fixed an issue where device filtering behavior was inconsistent when viewing non-decommissioned devices, ensuring more reliable and predictable results across all views.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 31, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2b42148e-63b4-4460-b56b-95de2a0468d9

📥 Commits

Reviewing files that changed from the base of the PR and between c9ab067 and 67309dd.

📒 Files selected for processing (1)
  • libs/ui-components/src/components/Device/DevicesPage/useDevices.ts

Walkthrough

The lifecycle-status filtering logic in the useDevices hook has been modified. When onlyDecommissioned is false, enrolledStatuses filtering is now consistently applied regardless of the summaryOnly flag, instead of only being applied when summaryOnly was true.

Changes

Cohort / File(s) Summary
Lifecycle Status Filtering Logic
libs/ui-components/src/components/Device/DevicesPage/useDevices.ts
Changed conditional from else if summaryOnly to else, ensuring enrolled statuses are always applied when filtering non-decommissioned devices, independent of the summary-only flag.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: adjusting device filtering logic to prevent decommissioned devices from appearing as targets, which directly corresponds to the code modification in useDevices.ts.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

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

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

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

@rawagner rawagner merged commit dfd1a5e into flightctl:main Mar 31, 2026
10 checks passed
rawagner added a commit to rawagner/flightctl-ui that referenced this pull request Mar 31, 2026
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