fix(RHINENG-26827): pathway details systems table fixes - #2065
Merged
brantleyr merged 4 commits intoJul 16, 2026
Merged
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideRefactors pathway systems rendering to use the standard PathwaySystems inventory component instead of a separate Iop-specific variant, and ensures axios response handling and remediation modal props are correctly wired in the pathway details flow. Sequence diagram for pathway systems rendering with remediation modalsequenceDiagram
actor User
participant PathwayDetails as PathwayDetails
participant PathwaySystems as PathwaySystems
participant Inventory as Inventory
User->>PathwayDetails: view pathway details
PathwayDetails->>PathwaySystems: render PathwaySystems(pathway, selectedTags, workloads, axios, IopRemediationModal)
PathwaySystems->>Inventory: render Inventory(tableProps, onLoad, customFilters, selectedTags, workloads, axios, IopRemediationModal)
Inventory-->>User: display systems table with remediation modal
Sequence diagram for iopAxios response data interceptionsequenceDiagram
participant Component as PathwayDetailsWrapped
participant iopAxios as iopAxios
participant Backend as insights_cloud_api
participant Interceptor as responseDataInterceptor
Component->>iopAxios: iopAxios.get(path)
iopAxios->>Backend: HTTP GET /insights_cloud/path
Backend-->>iopAxios: response
iopAxios->>Interceptor: response
Interceptor-->>Component: response.data
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This comment was marked as low quality.
This comment was marked as low quality.
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- If
IopRemediationModalis intended to be a component type passed through toInventoryrather than a rendered element instance, consider changing its PropType fromPropTypes.elementtoPropTypes.elementType(ornodeif it can also be plain content) to better match how it’s used. - The
responseDataInterceptorchanges the shape of all successfuliopAxiosresponses toresponse.data; double-check all current callers ofiopAxiosare expecting this and don’t rely onstatus,headers, or other response metadata.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- If `IopRemediationModal` is intended to be a component type passed through to `Inventory` rather than a rendered element instance, consider changing its PropType from `PropTypes.element` to `PropTypes.elementType` (or `node` if it can also be plain content) to better match how it’s used.
- The `responseDataInterceptor` changes the shape of all successful `iopAxios` responses to `response.data`; double-check all current callers of `iopAxios` are expecting this and don’t rely on `status`, `headers`, or other response metadata.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Collaborator
|
/retest |
brantleyr
merged commit Jul 16, 2026
06c95a1
into
RedHatInsights:foreman-pathways-dev-v2
2 of 3 checks passed
Fewwy
added a commit
to Fewwy/insights-advisor-frontend
that referenced
this pull request
Jul 23, 2026
…ts#2065) * fix(iop): pathway details systems table fixes * fix(iop): add guardrail for remediations modal * fix(RHINENG-26827): improve inventory table and bugfixes for pathways * fix(RHINENG-26827): tooltips when for no remediation or playbook
Fewwy
added a commit
that referenced
this pull request
Jul 28, 2026
* fix(RHINENG-28040): fix freezing bug and update inventory table (#2072) * chore(deps): update build-tools digest to a55d220 (#2066) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * chore(deps): update dependency github.com/redhatinsights/konflux-pipelines to v1.70.0 (#2058) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * chore(deps): override sanitize-html (#2082) * fix(iop): bypass federated IOPInventoryTable for Pathways Systems tab The Pathways detail Systems tab crashed in Foreman with "Error loading component" because the federated IOPInventoryTable requires React 18 and RRDv6, but Foreman runs React 16 and RRDv5. Replace it with a standalone PF5 composable table (IopPathwaySystems) that fetches systems directly via the API when loadChromeless is true. * fix(RHINENG-26827): pathway details systems table fixes (#2065) * fix(iop): pathway details systems table fixes * fix(iop): add guardrail for remediations modal * fix(RHINENG-26827): improve inventory table and bugfixes for pathways * fix(RHINENG-26827): tooltips when for no remediation or playbook * fix(iop): fixed pathway details system table host links --------- Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: Viliam Krizan <vkrizan@redhat.com> Co-authored-by: Richard Brantley <brantleyr@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
https://redhat.atlassian.net/browse/RHINENG-26827
Removed the table that was using hybridinventory
Fixed missing props pass
Replace the IOP-specific pathway systems table with the standard Inventory-based pathway systems component and align axios usage for IOP endpoints.
Bug Fixes:
Enhancements:
Simplify pathway systems rendering by reusing the shared PathwaySystems component instead of a separate IopPathwaySystems implementation.
Add a response interceptor to the IOP axios instance to normalize responses to their data payload.
ASYNC_COMPONENT_FALLBACK — module-level constant
Fix for the Freeze after selecting a row - Scalprum's shouldComponentUpdate uses lodash/isEqual on all props. Without this, AsyncComponent creates a new fallback element every render. isEqual hits _owner (a FiberNode) on those elements and traverses the entire React Fiber tree → 14-second freeze. A stable reference makes isEqual short-circuit with ===.
shallowEqual on entities useSelector
Original: useSelector(({ entities }) => entities || {}) — returns a new {} reference whenever any Redux state changes, triggering unnecessary re-renders. shallowEqual prevents re-renders when entities properties haven't actually changed.
safeSelectedIds = useMemo(() => selectedIds || [], [selectedIds])
useSelectionManager returns undefined when the last item is deselected (deletes the default key). Without normalization, every consumer needs selectedIds?.length guards. This gives a stable [] reference.
selectedIdsRef + useRef
Allows fetchSystems to read the current selectedIds without including it in useMemo deps. Without this, fetchSystems recreates on every selection change, triggering a full data refetch.
fetchSystems wrapped in useMemo
Original: getEntities(...) called directly — creates a new function every render, passed as getEntities prop to the inventory table, causing a full refetch on every render. Now only recreates when pathway, rule, or API URLs change.
setResolutions([]) in the else branch of resolutions useEffect
Clears stale resolution data on deselect. Without this, resolutions keeps data from the previous selection, making actionsConfig contain large data structures that increase render cost on deselect.
Resolutions useEffect expanded for pathway case
Original only handled the rule case. Pathway systems need their own resolution mapping for IopRemediationModal to work on pathway detail pages.
actionsConfig wrapped in useMemo (was getActionsConfig() called inline)
Original: called in JSX → new object every render. Now only recomputes when its actual inputs change.
checkRemediationButtonStatus refactored
Original had a bug: pathwayRulesList.find((report) => (report.rule_id = assosciatedRule)) — uses = (assignment) instead of === (comparison), corrupting data. Rewritten with correct logic.
pathwayRulesList initial state changed from {} to []
It's used as an array (.find(), .forEach()). Initializing as {} would throw on array methods.
onLoadHandler wrapped in use
Original: inline arrow function in JSX → new function every render → passed through isEqual deep comparison. Now stable reference
chromelessTableProps / standemo
Original: inline tableProps={{...}} → new object every render → forces isEqual to deep-compare. Now stable reference
chromelessCustomFilters / stn useMemo
Same reason — inline objects created new references every render.
chromelessExportConfig / standardExportConfig wrapped in useMemo
Same reason — inline objects with new arrow functions every render.
CHROMELESS_HIDE_FILTERS / STlevel constants
Original: inline objects in JSX → new references every render. As constants, isEqual short-circuits with ===.
columns={createColumns} instns) =>createColumns(defaultColumns)}
Original wraps in an unnecessary arrow function → new reference every render. createColumns is already a useCallback, so pass it directly.
showTags={false} instead of showTags={envContext.loadChromeless ? false : showTags}
In the chromeless branch, envContext.loadChromeless is always true, so this always evaluates to false. Simplified.
All selectedIds references → safeSelectedIds
Consistent use of the normalized value to avoid undefined guards scattered throughout.