Add pipeline-management-v2 route and entry-point redirect - #6465
Conversation
Code Coverage - Frontend unit tests
Test suite run success8098 tests passing in 874 suites. Report generated by 🧪jest coverage report action from b81e0d8 |
bc9b121 to
31990ea
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 31990eaa78
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
- Gate the redirect decision on contextRdiInstanceId matching rdiInstanceId, not just connectedInstance.error - a stale error left over from a previously viewed instance was being treated as "this instance failed to load" and pushing to legacy before the real fetch ever got a chance to resolve. - Route the Pipeline nav tab through the same v1/v2 choice via a new shared shouldUseRdiUiPipeline() helper, instead of always linking to the legacy page. - Use isVersionHigherOrEquals instead of isVersionHigher, matching the rest of the codebase's min-version convention - an instance at exactly 1.16.0 now gets v2. Flagged by chatgpt-codex-connector and Cursor Bugbot on PR #6465.
PipelineManagementV2Page never dispatched setLastPageContext on unmount, unlike the legacy pipeline and statistics pages. If a user's last-visited RDI section was the v2 page, lastPage stayed whatever it was previously set to, so re-entering the instance's bare URL could incorrectly restore them to Statistics instead of pipeline management. Flagged by Cursor Bugbot on PR #6465.
There was a problem hiding this comment.
💡 Codex Review
For an eligible instance, this decision still runs only on the bare /integrate/:id path. Repository-wide inspection shows that switching RDI endpoints through InstancesList.tsx line 102 and clicking the empty Analytics page's Add pipeline button in statistics/empty/Empty.tsx line 40 both push Pages.rdiPipelineConfig(...) directly, so those common entry points continue opening the legacy UI despite the enabled v2 experience. Route these entry points through the same version/flag choice.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
- Gate the redirect decision on contextRdiInstanceId matching rdiInstanceId, not just connectedInstance.error - a stale error left over from a previously viewed instance was being treated as "this instance failed to load" and pushing to legacy before the real fetch ever got a chance to resolve. - Route the Pipeline nav tab through the same v1/v2 choice via a new shared shouldUseRdiUiPipeline() helper, instead of always linking to the legacy page. - Use isVersionHigherOrEquals instead of isVersionHigher, matching the rest of the codebase's min-version convention - an instance at exactly 1.16.0 now gets v2. Flagged by chatgpt-codex-connector and Cursor Bugbot on PR #6465.
PipelineManagementV2Page never dispatched setLastPageContext on unmount, unlike the legacy pipeline and statistics pages. If a user's last-visited RDI section was the v2 page, lastPage stayed whatever it was previously set to, so re-entering the instance's bare URL could incorrectly restore them to Statistics instead of pipeline management. Flagged by Cursor Bugbot on PR #6465.
3a710d4 to
bdd82f1
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 303a5fe190
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
- Gate the redirect decision on contextRdiInstanceId matching rdiInstanceId, not just connectedInstance.error - a stale error left over from a previously viewed instance was being treated as "this instance failed to load" and pushing to legacy before the real fetch ever got a chance to resolve. - Route the Pipeline nav tab through the same v1/v2 choice via a new shared shouldUseRdiUiPipeline() helper, instead of always linking to the legacy page. - Use isVersionHigherOrEquals instead of isVersionHigher, matching the rest of the codebase's min-version convention - an instance at exactly 1.16.0 now gets v2. Flagged by chatgpt-codex-connector and Cursor Bugbot on PR #6465.
PipelineManagementV2Page never dispatched setLastPageContext on unmount, unlike the legacy pipeline and statistics pages. If a user's last-visited RDI section was the v2 page, lastPage stayed whatever it was previously set to, so re-entering the instance's bare URL could incorrectly restore them to Statistics instead of pipeline management. Flagged by Cursor Bugbot on PR #6465.
303a5fe to
5c1632f
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5c1632f397
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Registers a new pipeline-management-v2 placeholder page/route, to be wired up with the real rdi-ui component in a follow-up PR. The choice between the legacy pipeline management page and this new one is made once, when entering an RDI instance (RdiInstancePage), based on the dev-rdiUi flag and whether the instance version is above 1.16 - not inside the destination pages themselves, so a future manual v1/v2 switcher isn't fighting an automatic redirect on every render.
- Gate the redirect decision on contextRdiInstanceId matching rdiInstanceId, not just connectedInstance.error - a stale error left over from a previously viewed instance was being treated as "this instance failed to load" and pushing to legacy before the real fetch ever got a chance to resolve. - Route the Pipeline nav tab through the same v1/v2 choice via a new shared shouldUseRdiUiPipeline() helper, instead of always linking to the legacy page. - Use isVersionHigherOrEquals instead of isVersionHigher, matching the rest of the codebase's min-version convention - an instance at exactly 1.16.0 now gets v2. Flagged by chatgpt-codex-connector and Cursor Bugbot on PR #6465.
PipelineManagementV2Page never dispatched setLastPageContext on unmount, unlike the legacy pipeline and statistics pages. If a user's last-visited RDI section was the v2 page, lastPage stayed whatever it was previously set to, so re-entering the instance's bare URL could incorrectly restore them to Statistics instead of pipeline management. Flagged by Cursor Bugbot on PR #6465.
…ecision Resets lastPage when switching RDI instances so a stale statistics restore from a previously viewed instance can't hijack the new instance's bare-URL redirect. Guards the Pipeline tab's onClick against navigating with an empty connected-instance id while the connect fetch is still in flight.
Addresses review feedback on the leading-semicolon-prefixed-statement pattern used for the mockReturnValue calls.
5c1632f to
008b3ec
Compare
Switching RDI instances via the header popover pushed straight to the legacy pipeline config page, bypassing the v1/v2 decision that only runs on the bare instance URL - so a v2-eligible instance switched to this way always landed in the legacy UI.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 724a50b3e1
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 724a50b. Configure here.
Empty.tsx's "Add Pipeline" button linked straight to the legacy pipeline-config page, bypassing the v1/v2 decision made at the bare instance URL - same bug class already fixed in InstancesList.tsx. InstancePage's entry-decision redirect used history.push, which left the bare instance URL as a real history entry; pressing Back landed on it and the decision effect (keyed on data deps, not pathname) never re-ran, leaving a blank page. Switched to history.replace.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d72077ea2a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
The statistics empty-state CTA pushes to the bare instance URL to run the v1/v2 decision, but its effect didn't depend on pathname - only on instance-loading state. Navigating there while already viewing the same, already-loaded instance changed none of those deps, so the effect never re-ran and the bare url was left with no matching child route (blank page). Added pathname as a dependency, and a skipLastPageRestore location state so that explicit navigations to the bare url (like this CTA) aren't bounced back to the page they came from by the lastPage restore branch.

What
Second PR in the rdi-ui integration chain (stacked on #6464).
Registers a new
pipeline-management-v2placeholder page/route, to be wired up with the realrdi-uicomponent in a follow-up PR. The choice between the legacy pipeline management page and this new one is made once, when entering an RDI instance (RdiInstancePage), based on thedev-rdiUiflag and whether the instance version is above1.16— not inside the destination pages themselves, so a future manual v1/v2 switcher won't fight an automatic redirect on every render.Key points:
redisinsight/ui/src/config/default.ts:features.rdiUi.minSupportedVersion(env-overridable viaRI_FEATURES_RDI_UI_MIN_SUPPORTED_VERSION, default1.16.0), following the same pattern asfeatures.envDependent/features.cloudAds.RdiInstancePage: extended its existing bare-URL default-route effect to also decide legacy vs. v2, waiting for the connected instance to actually finish loading (checked viaconnectedInstance.id === rdiInstanceId, notloading, to avoid a stale-closure race) and falling back to legacy if the connect fetch fails.pipeline-management-v2page: an unconditional placeholder for now — no redirect/version logic lives in the page itself.rdi-uilibrary) — that's a separate follow-up PR.Testing
npm run lint:uiand relevant Jest suites pass (InstancePage.spec.tsx,PipelineManagementV2Page.spec.tsx,PipelineManagementPage.spec.tsx— the latter is untouched/reverted to its original state).No ticket yet.
Note
Medium Risk
Changes core RDI routing and redirect timing; wrong gating could send users to the wrong pipeline UI or flash redirects, but behavior is heavily tested and defaults to legacy on failure.
Overview
Adds a
pipeline-management-v2route and placeholder page, plus configfeatures.rdiUi.minSupportedVersion(default1.16.0, overridable via env).shouldUseRdiUiPipelinepicks legacy vs v2 when thedev-rdiUiflag is on and the connected RDI instance version meets that minimum.RdiInstancePageis the single decision point on the bare instance URL (Pages.rdiPipeline): it waits until the connected instance fetch finishes (and ignores stale errors from other instances), useshistory.replaceinstead of push, supportsskipLastPageRestoreso CTAs don’t bounce back to statistics, clearslastPageon instance switch, and falls back to legacy pipeline management if connect fails. Instance switching and the statistics empty state now navigate to that bare URL instead of jumping straight to legacy config.Navigation sends the Pipeline tab to v1 or v2 using the same helper. Tests cover redirects, loading races, and navigation entry points.
Reviewed by Cursor Bugbot for commit b81e0d8. Bugbot is set up for automated code reviews on this repo. Configure here.