Use appropriate icon for NoApplications. Add embedded column to apps#388
Conversation
WalkthroughThis PR adds i18n translations for "Embedded", "Yes", and "No", introduces an "Embedded" column to the ApplicationsTable displaying yes/no status based on appDetails.embedded property, refactors default app details into a reusable object, and replaces an icon in the applications status utility. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10–12 minutes
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ 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: 0
🧹 Nitpick comments (1)
libs/ui-components/src/components/DetailsPage/Tables/ApplicationsTable.tsx (1)
16-21: Clarify default Embedded value for spec‑only applications
emptyAppDetailssetsembedded: false, and the cell logic mapsfalsetot('No'). This means apps that exist only inspecApps(no status yet) will render as “No” rather than “-”, even though we don’t actually know their embedded state.If you intend “unknown until status arrives”, consider leaving
embeddedundefined in the fallback so those rows stay “-”:-const emptyAppDetails: Partial<DeviceApplicationStatus> = { - name: '', - ready: '-', - restarts: 0, - embedded: false, -}; +const emptyAppDetails: Partial<DeviceApplicationStatus> = { + name: '', + ready: '-', + restarts: 0, + // embedded intentionally omitted so unknown renders as '-' +};The rest of the Embedded column (header + Yes/No/- rendering) looks good.
Also applies to: 46-47, 51-57, 70-70
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
libs/i18n/locales/en/translation.json(1 hunks)libs/ui-components/src/components/DetailsPage/Tables/ApplicationsTable.tsx(3 hunks)libs/ui-components/src/utils/status/applications.ts(2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 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.
📚 Learning: 2025-02-04T09:04:36.106Z
Learnt from: celdrake
Repo: flightctl/flightctl-ui PR: 207
File: libs/ui-components/src/components/Device/EditDeviceWizard/steps/ReviewDeviceStep.tsx:55-55
Timestamp: 2025-02-04T09:04:36.106Z
Learning: The codebase has automated CI checks ("lint" step) that verify translation coverage for all text strings, ensuring that new or modified strings have corresponding entries in translation files.
Applied to files:
libs/i18n/locales/en/translation.json
🔇 Additional comments (2)
libs/i18n/locales/en/translation.json (1)
249-251: New translations align with Applications table usage
"Embedded","Yes", and"No"are well-placed next to the device applications table strings and match the new column semantics. No issues from the JSON/i18n perspective.libs/ui-components/src/utils/status/applications.ts (1)
8-32: Unable to complete verification due to repository access issuesThe repository clone operation is failing consistently, preventing execution of the verification script to check for lingering
AsleepIconreferences. However, based on the visible code snippet (lines 8-32 oflibs/ui-components/src/utils/status/applications.ts):
- The
ResourcesEmptyIconimport is correct- Its usage as
customIconforApplicationsSummaryStatusNoApplicationsis syntactically sound and semantically appropriate- No type mismatches are evident in the code shown
The original review comment's approval of the icon change is reasonable, but the requested verification of orphaned
AsleepIconreferences cannot be confirmed.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.