EDM-3698: Better display for matching fleet name of a device#627
Conversation
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
WalkthroughThis PR updates fleet/device label matching UI messaging and refactors the DeviceLabelMatch component. Legacy ownership messages are replaced with a new step-based flow. The DeviceLabelMatch component now accepts an Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~35 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@libs/ui-components/src/components/modals/ApproveDeviceModal/DeviceLabelMatch.tsx`:
- Around line 21-25: The "checking" branch in DeviceLabelMatch.tsx currently
renders only a Spinner with the message as an aria-label, making the status
invisible to sighted users; update the JSX in the matchStatus.status ===
'checking' block to render the visible status text (e.g., a Text or span
element) alongside the Spinner using t('Checking for matching fleets') so
sighted users see the message while keeping aria-live/role for assistive tech;
reference the Spinner element and the matchStatus.status === 'checking'
conditional when making the change.
- Around line 62-66: The switch case for 'checked--multiple' declares a const
(msg) directly inside the case which violates Biome's noSwitchDeclarations rule;
wrap the case body in braces to create a block scope so the const is legal
(mirror the adjacent 'checked--error' style). Specifically, locate the
'checked--multiple' case in DeviceLabelMatch.tsx and change it to use { ... }
around the const msg and the return of <StatusDisplayContent ...> (referencing
isApproval, t, StatusDisplayContent, and ExclamationTriangleIcon) so the
declaration is scoped and the linter error is resolved.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 4ca0658e-c0b7-495c-b505-e180be342e88
📒 Files selected for processing (6)
libs/i18n/locales/en/translation.jsonlibs/ui-components/src/components/Device/DeviceDetails/DeviceFleet.tsxlibs/ui-components/src/components/Device/EditDeviceWizard/steps/GeneralInfoStep.tsxlibs/ui-components/src/components/modals/ApproveDeviceModal/ApproveDeviceForm.tsxlibs/ui-components/src/components/modals/ApproveDeviceModal/DeviceLabelMatch.csslibs/ui-components/src/components/modals/ApproveDeviceModal/DeviceLabelMatch.tsx
💤 Files with no reviewable changes (1)
- libs/ui-components/src/components/modals/ApproveDeviceModal/DeviceLabelMatch.css
d1a2ad2 to
ff376b2
Compare
ff376b2 to
e50723b
Compare
The existing display was a disabled TextInput that, specially in Dark mode, seemed editable.
Changed to use
StatusDisplayContentand updated some of the wording related to this.Example:

Summary by CodeRabbit
Release Notes