Skip to content

Conversation

@celdrake
Copy link
Collaborator

@celdrake celdrake commented Jan 28, 2026

Displays the new Canceled/Canceling statuses for Image Builds and Image Exports.

To be done as a follow-up, to add the actions to cancel the (needs UX discussion).

Summary by CodeRabbit

  • New Features
    • Added "Canceling" and "Canceled" statuses for image builds and exports with proper UI indicators.
    • Unified status handling across build/export views and logs for consistent badges and activity detection.
    • Improved action logic and buttons: "Retry" vs "Duplicate" selection and conditional download/image reference display now follow unified status reasons.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 28, 2026

Walkthrough

Adds "Canceling" and "Canceled" condition reasons and migrates UI and utilities from boolean status predicates to enum-based status reasons for image build/export flows.

Changes

Cohort / File(s) Summary
Translations & Manifests
libs/i18n/locales/en/translation.json
Added translation keys for "Canceling" and "Canceled"; reordered one "In progress" entry.
Type and Enum Definitions
libs/types/imagebuilder/models/ImageBuildConditionReason.ts, libs/types/imagebuilder/models/ImageExportConditionReason.ts
Added Canceling and Canceled enum members to both condition-reason enums.
Utility Layer
libs/ui-components/src/utils/imageBuilds.ts
Replaced boolean predicates with reason-based API: renamed hasImageBuildFailedgetImageBuildStatusReason, removed several is*/should* predicates, and added getImageExportStatusReason, isImageBuildActiveReason, isImageExportActiveReason.
UI: Status Displays & Actions
libs/ui-components/src/components/ImageBuilds/.../CreateImageBuildWizard.tsx, ImageBuildAndExportStatus.tsx, ImageBuildDetails/ImageBuildDetailsPage.tsx, ImageBuildRow.tsx, ImageExportCards.tsx
Switched UI logic to derive status via reason enums/utilities; action labels (Retry/Duplicate), buttons (Retry/Download), and status badges now consider Canceling/Canceled and other reasons.
UI: Logs & Log Status
libs/ui-components/src/components/ImageBuilds/ImageBuildDetails/ImageBuildLogsTab.tsx
Replaced per-entity booleans (isActive/isFailed) with a unified status field typed to reason enums; updated ImageBuildAndExportLogStatus props and log construction/filtering to use reason-based helpers.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 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 PR title directly and clearly reflects the main objective: adding support for viewing canceling/canceled image builds and exports, which aligns with the changeset's additions of new enum values, translation keys, and UI handling for these two new states.
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 docstrings

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In
`@libs/ui-components/src/components/ImageBuilds/ImageBuildDetails/ImageBuildLogsTab.tsx`:
- Around line 59-82: The status handling in ImageBuildAndExportLogStatus
incorrectly only checks ImageBuildConditionReason and collapses export statuses
and Canceling into wrong labels; update the conditional logic to also check
ImageExportConditionReason equivalents (e.g.,
ImageExportConditionReason.ImageExportConditionReasonCompleted, ...Failed,
...Canceling, ...Canceled) or normalize by matching both enums' values, and map
Canceling -> level 'warning' with label t('Canceling') and Canceled -> level
'warning' with label t('Canceled'), while keeping Completed ->
'success'/'Completed', Failed -> 'danger'/'Failed', and default -> 'info'/'In
progress'; reference the ImageBuildAndExportLogStatus component and the status
prop, plus the ImageBuildConditionReason and ImageExportConditionReason symbols
when making the changes.
🧹 Nitpick comments (1)
libs/ui-components/src/components/ImageBuilds/ImageBuildRow.tsx (1)

110-129: Consider adding UI feedback for Canceled builds.

The failure block is only shown when buildReason === ImageBuildConditionReasonFailed. With the new Canceled state, users might benefit from similar visual feedback indicating that the build was canceled. This could help distinguish between builds that failed due to errors vs. those that were intentionally canceled.

This is a minor suggestion and can be deferred to a follow-up since the PR description mentions that cancellation actions will be implemented after UX discussion.

@celdrake celdrake force-pushed the canceled-image-builds branch from 496a1d2 to a0d79a3 Compare January 29, 2026 08:24
@celdrake celdrake merged commit 75ca598 into flightctl:main Jan 29, 2026
6 checks passed
@celdrake celdrake deleted the canceled-image-builds branch January 29, 2026 08:31
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