Fixes #39728 - Migrate Manifest History table from PF3 to PF5 - #11804
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthrough
ChangesManifest modal migration
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant ManageManifestModal
participant ManifestTabContent
participant ManifestHistoryContent
participant CdnTabContent
ManageManifestModal->>ManifestTabContent: Render manifest state and actions
ManageManifestModal->>ManifestHistoryContent: Render loading, empty, or history table state
ManageManifestModal->>CdnTabContent: Render CDN configuration
ManifestTabContent->>ManageManifestModal: Invoke upload, refresh, or delete callback
CdnTabContent->>ManageManifestModal: Invoke configuration update callback
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js`:
- Around line 37-45: Consolidate the duplicated tab-visibility derivation in the
component: compute showSubscriptionManifest and showManifestTab once before
useState, pass the resulting showManifestTab into getDefaultTabKey, and reuse
both values for the JSX render guards. Update getDefaultTabKey to consume the
precomputed visibility rather than recomputing permission logic, keeping default
selection and rendered tabs synchronized.
- Around line 75-83: Update the row identity in the manifestHistory.results.map
rendering to use a collision-resistant value that remains unique for duplicate
records, such as incorporating the map index alongside the existing fields, and
apply the same identity consistently to both the React key and ouiaId on each
Tr.
🪄 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 Plus
Run ID: 72d25dbd-b3fb-4bf3-af3b-32a4dc51fec4
📒 Files selected for processing (4)
webpack/scenes/Subscriptions/Manifest/ManageManifestModal.jswebpack/scenes/Subscriptions/Manifest/ManageManifestModal.scsswebpack/scenes/Subscriptions/Manifest/ManifestHistoryTableSchema.jswebpack/scenes/Subscriptions/Manifest/__tests__/ManageManifestModal.test.js
💤 Files with no reviewable changes (1)
- webpack/scenes/Subscriptions/Manifest/ManifestHistoryTableSchema.js
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
webpack/scenes/Subscriptions/Manifest/ManifestHistoryContent.js (1)
51-55: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueConsider a more precise
resultsshape.
resultsis typed asPropTypes.arrayOf(PropTypes.shape({})), an empty shape. Declare thestatus,statusMessage, andcreatedfields actually used at Lines 41-43. This documents the contract and helps catch a mismatch at development time.♻️ Proposed refactor
ManifestHistoryContent.propTypes = { manifestHistory: PropTypes.shape({ - results: PropTypes.arrayOf(PropTypes.shape({})), + results: PropTypes.arrayOf(PropTypes.shape({ + status: PropTypes.string, + statusMessage: PropTypes.string, + created: PropTypes.string, + })), }).isRequired, };🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@webpack/scenes/Subscriptions/Manifest/ManifestHistoryContent.js` around lines 51 - 55, Update the manifestHistory prop type in ManifestHistoryContent.propTypes so results uses a precise PropTypes.shape declaring the status, statusMessage, and created fields consumed by the component, replacing the empty shape while preserving the existing array contract.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@webpack/scenes/Subscriptions/Manifest/ManifestTabContent.js`:
- Around line 69-73: Update uploadManifest and its file-selection handler to
clear the native file input value after reading the selected file list, while
preserving the existing upload(fileList[0]) behavior. Reset e.target.value after
initiating the upload so selecting the same file again triggers onChange,
including the alternate occurrence noted in the comment.
- Around line 62-67: Update disabledTooltipText to check actionInProgress
instead of taskInProgress, matching the Delete button’s disabled condition and
ensuring manifestActionStarted reports the in-progress task reason.
---
Nitpick comments:
In `@webpack/scenes/Subscriptions/Manifest/ManifestHistoryContent.js`:
- Around line 51-55: Update the manifestHistory prop type in
ManifestHistoryContent.propTypes so results uses a precise PropTypes.shape
declaring the status, statusMessage, and created fields consumed by the
component, replacing the empty shape while preserving the existing array
contract.
🪄 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 Plus
Run ID: df83006a-496a-4e9a-a493-33d80b011693
📒 Files selected for processing (5)
webpack/scenes/Subscriptions/Manifest/CdnTabContent.jswebpack/scenes/Subscriptions/Manifest/ManageManifestModal.jswebpack/scenes/Subscriptions/Manifest/ManageManifestModalConstants.jswebpack/scenes/Subscriptions/Manifest/ManifestHistoryContent.jswebpack/scenes/Subscriptions/Manifest/ManifestTabContent.js
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
12e91f6 to
3e98542
Compare
|
I am wondering if the linter is setup correctly, because this should be fine |
6e780fd to
e6e9e76
Compare
pondrejk
left a comment
There was a problem hiding this comment.
Checked from the functional side using packit build, I consider this good to go
|
I have linked this PR to https://projects.theforeman.org/issues/39728 , commits and title should be updated (#39444 is closed) |
LadislavVasina1
left a comment
There was a problem hiding this comment.
I also checked this PR from the functional side and it looks good to me.
e6e9e76 to
341753d
Compare
|
@pavanshekar Commits squashed and updated redmine issue number |
Manifest History tab
Modal layout and tabs
Component structure
Before:

After

Summary by CodeRabbit