EDM-2422 split application and systemd status#373
Conversation
WalkthroughRemoves systemd management from ApplicationsTable and DeviceApplications, introduces SystemdUnitsTable and DeviceSystemdUnits, updates device/fleet edit helpers to surface systemd unit patterns, and adjusts translations and CSS related to system services. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant DetailsTab as DeviceDetailsTab
participant Apps as DeviceApplications
participant AppsTbl as ApplicationsTable
participant SysdComp as DeviceSystemdUnits
participant SysdTbl as SystemdUnitsTable
DetailsTab->>Apps: render(device)
Apps->>AppsTbl: render(appsStatus, specApps)
DetailsTab->>SysdComp: render(device)
SysdComp->>SysdTbl: render(systemdUnitsStatus)
Note right of SysdTbl#D0E8FF: Shows unit icon + enable/load/status badges
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
🧰 Additional context used🧠 Learnings (1)📓 Common learnings🔇 Additional comments (2)
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 |
bc2be7e to
1b6c6eb
Compare
8f6f4cf to
32e80e0
Compare
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (1)
libs/ui-components/src/components/DetailsPage/Tables/ApplicationsTable.tsx (1)
19-28: Consider using a Set for more concise logic.The current approach works correctly, but using a Set would be more efficient and concise.
Apply this diff:
- // Includes applications already reported in status as well as those that are only in the spec yet - const allAppNames: string[] = []; - specApps.forEach((app) => { - allAppNames.push(app); - }); - appsStatus.forEach((appStatus) => { - if (!allAppNames.includes(appStatus.name)) { - allAppNames.push(appStatus.name); - } - }); + // Includes applications already reported in status as well as those that are only in the spec yet + const allAppNames = Array.from(new Set([...specApps, ...appsStatus.map((s) => s.name)]));
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (12)
libs/i18n/locales/en/translation.json(3 hunks)libs/ui-components/src/components/DetailsPage/Tables/ApplicationsTable.css(0 hunks)libs/ui-components/src/components/DetailsPage/Tables/ApplicationsTable.tsx(1 hunks)libs/ui-components/src/components/DetailsPage/Tables/SystemdUnitsTable.tsx(1 hunks)libs/ui-components/src/components/Device/DeviceDetails/DeviceApplications.tsx(1 hunks)libs/ui-components/src/components/Device/DeviceDetails/DeviceDetailsTab.tsx(3 hunks)libs/ui-components/src/components/Device/DeviceDetails/DeviceSystemdUnits.tsx(1 hunks)libs/ui-components/src/components/Device/EditDeviceWizard/EditDeviceWizard.tsx(2 hunks)libs/ui-components/src/components/Device/EditDeviceWizard/deviceSpecUtils.ts(2 hunks)libs/ui-components/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.tsx(1 hunks)libs/ui-components/src/components/Device/EditDeviceWizard/utils.ts(2 hunks)libs/ui-components/src/components/Fleet/CreateFleet/utils.ts(2 hunks)
💤 Files with no reviewable changes (1)
- libs/ui-components/src/components/DetailsPage/Tables/ApplicationsTable.css
🧰 Additional context used
🧠 Learnings (7)
📓 Common learnings
Learnt from: celdrake
Repo: flightctl/flightctl-ui PR: 371
File: libs/types/models/AppType.ts:10-10
Timestamp: 2025-10-29T16:47:29.614Z
Learning: PR #371 (flightctl/flightctl-ui) adds the AppTypeQuadlet enum member and related types as a preparatory change. Full implementation of quadlet application support in the UI will be added later, after backend support is available.
Learnt from: celdrake
Repo: flightctl/flightctl-ui PR: 227
File: libs/ui-components/src/components/Device/EditDeviceWizard/steps/ReviewTrackedSystemdServices.tsx:3-3
Timestamp: 2025-03-12T08:41:34.720Z
Learning: In the flightctl-ui codebase, SystemdUnitsFormValues is defined as { systemdUnits: SystemdUnitFormValue[] }, allowing for direct destructuring of the systemdUnits property in component props.
📚 Learning: 2025-03-12T08:41:34.720Z
Learnt from: celdrake
Repo: flightctl/flightctl-ui PR: 227
File: libs/ui-components/src/components/Device/EditDeviceWizard/steps/ReviewTrackedSystemdServices.tsx:3-3
Timestamp: 2025-03-12T08:41:34.720Z
Learning: In the flightctl-ui codebase, SystemdUnitsFormValues is defined as { systemdUnits: SystemdUnitFormValue[] }, allowing for direct destructuring of the systemdUnits property in component props.
Applied to files:
libs/ui-components/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.tsxlibs/ui-components/src/components/Device/DeviceDetails/DeviceDetailsTab.tsxlibs/ui-components/src/components/Fleet/CreateFleet/utils.tslibs/ui-components/src/components/DetailsPage/Tables/SystemdUnitsTable.tsxlibs/ui-components/src/components/Device/EditDeviceWizard/EditDeviceWizard.tsxlibs/ui-components/src/components/Device/DeviceDetails/DeviceSystemdUnits.tsxlibs/ui-components/src/components/Device/EditDeviceWizard/deviceSpecUtils.ts
📚 Learning: 2025-03-12T09:09:44.139Z
Learnt from: celdrake
Repo: flightctl/flightctl-ui PR: 227
File: libs/ui-components/src/components/Device/EditDeviceWizard/EditDeviceWizard.tsx:87-87
Timestamp: 2025-03-12T09:09:44.139Z
Learning: The `getUpdatePolicyValues` function in libs/ui-components/src/components/Fleet/CreateFleet/fleetSpecUtils.ts is designed to handle undefined input through its optional parameter definition and consistent use of optional chaining.
Applied to files:
libs/ui-components/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.tsxlibs/ui-components/src/components/Fleet/CreateFleet/utils.tslibs/ui-components/src/components/Device/EditDeviceWizard/EditDeviceWizard.tsxlibs/ui-components/src/components/Device/EditDeviceWizard/deviceSpecUtils.tslibs/ui-components/src/components/Device/EditDeviceWizard/utils.ts
📚 Learning: 2025-03-20T12:37:36.986Z
Learnt from: celdrake
Repo: flightctl/flightctl-ui PR: 240
File: libs/ui-components/src/types/deviceSpec.ts:0-0
Timestamp: 2025-03-20T12:37:36.986Z
Learning: In the FlightCtl UI project, `name` is required for inline applications but optional for image applications. This is enforced at the type level in the `InlineAppForm` type.
Applied to files:
libs/ui-components/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.tsx
📚 Learning: 2025-03-19T08:55:03.335Z
Learnt from: celdrake
Repo: flightctl/flightctl-ui PR: 240
File: libs/ui-components/src/components/Device/DeviceDetails/DeviceApplications.tsx:44-50
Timestamp: 2025-03-19T08:55:03.335Z
Learning: In FlightCtl, the name field is required for Inline applications but optional for Image-based applications. This requirement is enforced by validation logic even though TypeScript type definitions might not explicitly show this distinction.
Applied to files:
libs/ui-components/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.tsx
📚 Learning: 2025-02-11T10:24:15.684Z
Learnt from: celdrake
Repo: flightctl/flightctl-ui PR: 208
File: libs/ui-components/src/components/Device/DevicesPage/EnrolledDevicesTable.tsx:142-150
Timestamp: 2025-02-11T10:24:15.684Z
Learning: In the FlightCtl UI, device tables (`EnrolledDevicesTable` and `DecommissionedDevicesTable`) are swapped based on the `onlyDecommissioned` state, so their respective switches can have hardcoded values (`false` and `true`).
Applied to files:
libs/ui-components/src/components/Device/DeviceDetails/DeviceDetailsTab.tsx
📚 Learning: 2025-03-12T09:09:44.139Z
Learnt from: celdrake
Repo: flightctl/flightctl-ui PR: 227
File: libs/ui-components/src/components/Device/EditDeviceWizard/EditDeviceWizard.tsx:87-87
Timestamp: 2025-03-12T09:09:44.139Z
Learning: The `getUpdatePolicyValues` function in libs/ui-components/src/components/Fleet/CreateFleet/fleetSpecUtils.ts is designed to safely handle undefined values for the updatePolicy parameter.
Applied to files:
libs/ui-components/src/components/Fleet/CreateFleet/utils.tslibs/ui-components/src/components/Device/EditDeviceWizard/EditDeviceWizard.tsxlibs/ui-components/src/components/Device/EditDeviceWizard/deviceSpecUtils.tslibs/ui-components/src/components/Device/EditDeviceWizard/utils.ts
🧬 Code graph analysis (8)
libs/ui-components/src/components/Fleet/CreateFleet/utils.ts (1)
libs/ui-components/src/components/Device/EditDeviceWizard/deviceSpecUtils.ts (1)
getSystemdUnitsValues(413-420)
libs/ui-components/src/components/Device/DeviceDetails/DeviceApplications.tsx (2)
libs/ui-components/src/hooks/useTranslation.ts (1)
useTranslation(5-8)libs/ui-components/src/types/deviceSpec.ts (1)
isImageAppProvider(88-89)
libs/ui-components/src/components/DetailsPage/Tables/SystemdUnitsTable.tsx (1)
libs/ui-components/src/hooks/useTranslation.ts (1)
useTranslation(5-8)
libs/ui-components/src/components/Device/EditDeviceWizard/EditDeviceWizard.tsx (1)
libs/ui-components/src/components/Device/EditDeviceWizard/deviceSpecUtils.ts (1)
getSystemdUnitsValues(413-420)
libs/ui-components/src/components/Device/DeviceDetails/DeviceSystemdUnits.tsx (2)
libs/ui-components/src/hooks/useTranslation.ts (1)
useTranslation(5-8)libs/ui-components/src/components/DetailsPage/DetailsPageCard.tsx (1)
DetailsPageCardBody(8-10)
libs/ui-components/src/components/Device/EditDeviceWizard/deviceSpecUtils.ts (2)
libs/types/models/DeviceSpec.ts (1)
DeviceSpec(15-44)libs/ui-components/src/types/deviceSpec.ts (1)
SystemdUnitFormValue(173-176)
libs/ui-components/src/components/Device/EditDeviceWizard/utils.ts (1)
libs/ui-components/src/utils/patch.ts (1)
getStringListPatches(63-94)
libs/ui-components/src/components/DetailsPage/Tables/ApplicationsTable.tsx (2)
libs/types/models/DeviceApplicationStatus.ts (1)
DeviceApplicationStatus(7-25)libs/ui-components/src/hooks/useTranslation.ts (1)
useTranslation(5-8)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Build
- GitHub Check: Lint
- GitHub Check: Build ocp plugin
🔇 Additional comments (9)
libs/ui-components/src/components/Device/EditDeviceWizard/utils.ts (1)
92-99: LGTM! Systemd unit patching logic is well-implemented.The use of
getStringListPatchescorrectly handles add/remove/replace operations for systemd matchPatterns, and the value builder properly wraps the patterns in the API-required{ matchPatterns: list }structure. This follows the same pattern used for other spec patches in the codebase.libs/ui-components/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.tsx (1)
148-148: LGTM! SystemdUnitsForm now available for individual devices.Rendering
SystemdUnitsFormunconditionally (removing theisFleetgate) correctly implements the PR objective of allowing systemd services configuration for individual devices, not just fleets. The component respects theisReadOnlyprop to control editability.libs/ui-components/src/components/Device/DeviceDetails/DeviceDetailsTab.tsx (1)
161-165: LGTM! Clean separation of applications and systemd units.The changes correctly separate systemd units into a dedicated
DeviceSystemdUnitscomponent displayed alongsideDeviceApplications. The simplified prop surface forDeviceApplications(now only acceptingdevice) aligns with the component's updated API as noted in the PR context.libs/ui-components/src/components/Device/EditDeviceWizard/EditDeviceWizard.tsx (1)
91-91: LGTM! Proper initialization of systemd units from device spec.Using
getSystemdUnitsValues(device.spec)correctly populates the initial systemd units for the edit form, replacing the previous empty array default. This ensures existing systemd configurations are properly loaded for editing.libs/ui-components/src/components/Device/DeviceDetails/DeviceSystemdUnits.tsx (1)
1-30: LGTM! Well-structured component for displaying systemd units.The component follows existing patterns from similar detail page cards, properly handles undefined systemd status with a fallback empty array, and correctly passes the data to
SystemdUnitsTablefor rendering.libs/ui-components/src/components/Device/EditDeviceWizard/deviceSpecUtils.ts (1)
413-420: LGTM! Clean helper function for systemd units initialization.The implementation properly handles optional chaining through the device spec hierarchy and provides a sensible empty array default. This centralizes the logic for deriving systemd unit form values from device specs.
libs/ui-components/src/components/Fleet/CreateFleet/utils.ts (1)
240-240: LGTM! Good refactoring to eliminate code duplication.Replacing manual mapping with
getSystemdUnitsValuescentralizes the systemd units initialization logic, making the Fleet and Device edit flows consistent while reducing code duplication.libs/ui-components/src/components/Device/DeviceDetails/DeviceApplications.tsx (1)
1-39: LGTM! Clean separation of concerns.The refactoring successfully removes systemd tracking functionality from the applications component, simplifying its API and focusing it solely on application display. The component now cleanly delegates to
ApplicationsTablewith only the relevant props.libs/ui-components/src/components/DetailsPage/Tables/ApplicationsTable.tsx (1)
30-64: LGTM! Clean refactoring that focuses on applications only.The table rendering successfully removes systemd-related functionality while maintaining clear application display logic. The fallback handling for apps without status is appropriate.
32e80e0 to
87250b2
Compare
87250b2 to
6de2b1a
Compare
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
libs/ui-components/src/components/DetailsPage/Tables/ApplicationsTable.tsx (1)
20-28: Consider using a Set for better performance.The current approach using
includeswithin a loop has O(n²) complexity. For typical application counts this is fine, but could be optimized.- const allAppNames: string[] = []; - specApps.forEach((app) => { - allAppNames.push(app); - }); - appsStatus.forEach((appStatus) => { - if (!allAppNames.includes(appStatus.name)) { - allAppNames.push(appStatus.name); - } - }); + const allAppNames = Array.from(new Set([...specApps, ...appsStatus.map((app) => app.name)]));
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (12)
libs/i18n/locales/en/translation.json(3 hunks)libs/ui-components/src/components/DetailsPage/Tables/ApplicationsTable.css(0 hunks)libs/ui-components/src/components/DetailsPage/Tables/ApplicationsTable.tsx(1 hunks)libs/ui-components/src/components/DetailsPage/Tables/SystemdUnitsTable.tsx(1 hunks)libs/ui-components/src/components/Device/DeviceDetails/DeviceApplications.tsx(1 hunks)libs/ui-components/src/components/Device/DeviceDetails/DeviceDetailsTab.tsx(3 hunks)libs/ui-components/src/components/Device/DeviceDetails/DeviceSystemdUnits.tsx(1 hunks)libs/ui-components/src/components/Device/EditDeviceWizard/EditDeviceWizard.tsx(2 hunks)libs/ui-components/src/components/Device/EditDeviceWizard/deviceSpecUtils.ts(2 hunks)libs/ui-components/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.tsx(1 hunks)libs/ui-components/src/components/Device/EditDeviceWizard/utils.ts(2 hunks)libs/ui-components/src/components/Fleet/CreateFleet/utils.ts(2 hunks)
💤 Files with no reviewable changes (1)
- libs/ui-components/src/components/DetailsPage/Tables/ApplicationsTable.css
🚧 Files skipped from review as they are similar to previous changes (6)
- libs/ui-components/src/components/Fleet/CreateFleet/utils.ts
- libs/ui-components/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.tsx
- libs/ui-components/src/components/Device/DeviceDetails/DeviceDetailsTab.tsx
- libs/ui-components/src/components/DetailsPage/Tables/SystemdUnitsTable.tsx
- libs/ui-components/src/components/Device/DeviceDetails/DeviceSystemdUnits.tsx
- libs/ui-components/src/components/Device/EditDeviceWizard/deviceSpecUtils.ts
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: celdrake
Repo: flightctl/flightctl-ui PR: 371
File: libs/types/models/AppType.ts:10-10
Timestamp: 2025-10-29T16:47:29.614Z
Learning: PR #371 (flightctl/flightctl-ui) adds the AppTypeQuadlet enum member and related types as a preparatory change. Full implementation of quadlet application support in the UI will be added later, after backend support is available.
Learnt from: celdrake
Repo: flightctl/flightctl-ui PR: 227
File: libs/ui-components/src/components/Device/EditDeviceWizard/steps/ReviewTrackedSystemdServices.tsx:3-3
Timestamp: 2025-03-12T08:41:34.720Z
Learning: In the flightctl-ui codebase, SystemdUnitsFormValues is defined as { systemdUnits: SystemdUnitFormValue[] }, allowing for direct destructuring of the systemdUnits property in component props.
📚 Learning: 2025-03-12T08:41:34.720Z
Learnt from: celdrake
Repo: flightctl/flightctl-ui PR: 227
File: libs/ui-components/src/components/Device/EditDeviceWizard/steps/ReviewTrackedSystemdServices.tsx:3-3
Timestamp: 2025-03-12T08:41:34.720Z
Learning: In the flightctl-ui codebase, SystemdUnitsFormValues is defined as { systemdUnits: SystemdUnitFormValue[] }, allowing for direct destructuring of the systemdUnits property in component props.
Applied to files:
libs/ui-components/src/components/Device/EditDeviceWizard/EditDeviceWizard.tsx
📚 Learning: 2025-03-12T09:09:44.139Z
Learnt from: celdrake
Repo: flightctl/flightctl-ui PR: 227
File: libs/ui-components/src/components/Device/EditDeviceWizard/EditDeviceWizard.tsx:87-87
Timestamp: 2025-03-12T09:09:44.139Z
Learning: The `getUpdatePolicyValues` function in libs/ui-components/src/components/Fleet/CreateFleet/fleetSpecUtils.ts is designed to safely handle undefined values for the updatePolicy parameter.
Applied to files:
libs/ui-components/src/components/Device/EditDeviceWizard/EditDeviceWizard.tsxlibs/ui-components/src/components/Device/EditDeviceWizard/utils.ts
📚 Learning: 2025-03-12T09:09:44.139Z
Learnt from: celdrake
Repo: flightctl/flightctl-ui PR: 227
File: libs/ui-components/src/components/Device/EditDeviceWizard/EditDeviceWizard.tsx:87-87
Timestamp: 2025-03-12T09:09:44.139Z
Learning: The `getUpdatePolicyValues` function in libs/ui-components/src/components/Fleet/CreateFleet/fleetSpecUtils.ts is designed to handle undefined input through its optional parameter definition and consistent use of optional chaining.
Applied to files:
libs/ui-components/src/components/Device/EditDeviceWizard/EditDeviceWizard.tsxlibs/ui-components/src/components/Device/EditDeviceWizard/utils.ts
🧬 Code graph analysis (4)
libs/ui-components/src/components/DetailsPage/Tables/ApplicationsTable.tsx (2)
libs/types/models/DeviceApplicationStatus.ts (1)
DeviceApplicationStatus(7-25)libs/ui-components/src/hooks/useTranslation.ts (1)
useTranslation(5-8)
libs/ui-components/src/components/Device/EditDeviceWizard/EditDeviceWizard.tsx (1)
libs/ui-components/src/components/Device/EditDeviceWizard/deviceSpecUtils.ts (1)
getSystemdUnitsValues(413-420)
libs/ui-components/src/components/Device/EditDeviceWizard/utils.ts (1)
libs/ui-components/src/utils/patch.ts (1)
getStringListPatches(63-94)
libs/ui-components/src/components/Device/DeviceDetails/DeviceApplications.tsx (3)
libs/ui-components/src/hooks/useTranslation.ts (1)
useTranslation(5-8)libs/ui-components/src/types/deviceSpec.ts (1)
isImageAppProvider(88-89)libs/ui-components/src/components/DetailsPage/DetailsPageCard.tsx (1)
DetailsPageCardBody(8-10)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: integration-tests
🔇 Additional comments (11)
libs/i18n/locales/en/translation.json (3)
128-134: Translation keys are correct and well-named, with previous typos fixed.The new systemd-related translations (Enable state, Load state, Active state, Sub state) properly represent standard systemd unit status fields. The "Active satte" and "No system sevices" typos flagged in prior reviews have been corrected. Keys are semantically appropriate and align with the PR objective to separate systemd service management from applications.
183-183: Systemd services section label is consistent with new UI components.The reintroduction of "System services" at line 183 aligns with the PR changes, providing a section label for systemd service management in device specs and fleet configurations.
324-324: Track systemd services option retained for backward compatibility.The "Track systemd services" key is preserved, consistent with the PR's goal of allowing systemd service definition at the device level while maintaining the option label for relevant UI flows.
libs/ui-components/src/components/DetailsPage/Tables/ApplicationsTable.tsx (2)
9-16: LGTM! Props simplified correctly.The component signature has been properly simplified to handle only application-related data, with systemd functionality now managed separately.
41-58: LGTM! Rendering logic is clean and handles edge cases well.The component correctly handles applications that are in the spec but not yet reported in status by providing sensible defaults.
libs/ui-components/src/components/Device/EditDeviceWizard/EditDeviceWizard.tsx (2)
31-36: LGTM! Import addition is correct.The new helper function is properly imported alongside the existing device spec utilities.
91-91: LGTM! Systemd units properly initialized from device spec.The change correctly populates initial systemd units using the new helper function, maintaining consistency with how other spec fields are initialized.
libs/ui-components/src/components/Device/EditDeviceWizard/utils.ts (2)
12-17: LGTM! Import addition is appropriate.The
getStringListPatchesutility is correctly imported for generating systemd unit patches.
92-99: LGTM! Systemd patches correctly integrated.The patch generation logic follows the established pattern used for applications and properly handles add/remove/replace operations for systemd match patterns.
libs/ui-components/src/components/Device/DeviceDetails/DeviceApplications.tsx (2)
1-12: LGTM! Component signature properly simplified.The component now has a clear, focused responsibility handling only application display, with systemd functionality appropriately separated.
14-37: LGTM! Rendering logic is clean and focused.The component correctly passes only application-related data to the
ApplicationsTable, maintaining proper separation from systemd functionality.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
libs/ui-components/src/components/DetailsPage/Tables/SystemdUnitsTable.tsx (1)
31-31: Remove redundant key prop.The
keyprop on line 31 is redundant because the key is already set on theSystemdUnitRowcomponent when it's rendered in the map at line 71. React only needs the key on the component returned from the map, not on elements inside the component.Apply this diff:
- <Tr key={unitStatus.unit}> + <Tr>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
libs/i18n/locales/en/translation.json(3 hunks)libs/ui-components/src/components/DetailsPage/Tables/SystemdUnitsTable.tsx(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- libs/i18n/locales/en/translation.json
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: celdrake
Repo: flightctl/flightctl-ui PR: 371
File: libs/types/models/AppType.ts:10-10
Timestamp: 2025-10-29T16:47:29.614Z
Learning: PR #371 (flightctl/flightctl-ui) adds the AppTypeQuadlet enum member and related types as a preparatory change. Full implementation of quadlet application support in the UI will be added later, after backend support is available.
Learnt from: celdrake
Repo: flightctl/flightctl-ui PR: 227
File: libs/ui-components/src/components/Device/EditDeviceWizard/steps/ReviewTrackedSystemdServices.tsx:3-3
Timestamp: 2025-03-12T08:41:34.720Z
Learning: In the flightctl-ui codebase, SystemdUnitsFormValues is defined as { systemdUnits: SystemdUnitFormValue[] }, allowing for direct destructuring of the systemdUnits property in component props.
📚 Learning: 2025-03-12T08:41:34.720Z
Learnt from: celdrake
Repo: flightctl/flightctl-ui PR: 227
File: libs/ui-components/src/components/Device/EditDeviceWizard/steps/ReviewTrackedSystemdServices.tsx:3-3
Timestamp: 2025-03-12T08:41:34.720Z
Learning: In the flightctl-ui codebase, SystemdUnitsFormValues is defined as { systemdUnits: SystemdUnitFormValue[] }, allowing for direct destructuring of the systemdUnits property in component props.
Applied to files:
libs/ui-components/src/components/DetailsPage/Tables/SystemdUnitsTable.tsx
📚 Learning: 2025-02-11T10:24:15.684Z
Learnt from: celdrake
Repo: flightctl/flightctl-ui PR: 208
File: libs/ui-components/src/components/Device/DevicesPage/EnrolledDevicesTable.tsx:142-150
Timestamp: 2025-02-11T10:24:15.684Z
Learning: In the FlightCtl UI, device tables (`EnrolledDevicesTable` and `DecommissionedDevicesTable`) are swapped based on the `onlyDecommissioned` state, so their respective switches can have hardcoded values (`false` and `true`).
Applied to files:
libs/ui-components/src/components/DetailsPage/Tables/SystemdUnitsTable.tsx
🧬 Code graph analysis (1)
libs/ui-components/src/components/DetailsPage/Tables/SystemdUnitsTable.tsx (1)
libs/ui-components/src/hooks/useTranslation.ts (1)
useTranslation(5-8)
ad2c388 to
3f90af4
Compare
Adapts the UI to the changes in flightctl/flightctl#1918
Final design with dark theme:

With latest changes:

Summary by CodeRabbit
New Features
Bug Fixes
Refactor
Chores