Skip to content

Add pipeline-management-v2 route and entry-point redirect - #6465

Merged
ArtemHoruzhenko merged 8 commits into
mainfrom
feature/rdi-ui/pipeline-management-v2-route
Sep 10, 2026
Merged

Add pipeline-management-v2 route and entry-point redirect#6465
ArtemHoruzhenko merged 8 commits into
mainfrom
feature/rdi-ui/pipeline-management-v2-route

Conversation

@ArtemHoruzhenko

@ArtemHoruzhenko ArtemHoruzhenko commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

What

Second PR in the rdi-ui integration chain (stacked on #6464).

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 won't fight an automatic redirect on every render.

Key points:

  • redisinsight/ui/src/config/default.ts: features.rdiUi.minSupportedVersion (env-overridable via RI_FEATURES_RDI_UI_MIN_SUPPORTED_VERSION, default 1.16.0), following the same pattern as features.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 via connectedInstance.id === rdiInstanceId, not loading, to avoid a stale-closure race) and falling back to legacy if the connect fetch fails.
  • New pipeline-management-v2 page: an unconditional placeholder for now — no redirect/version logic lives in the page itself.
  • No new dependency added yet (no rdi-ui library) — that's a separate follow-up PR.

Testing

  • npm run lint:ui and relevant Jest suites pass (InstancePage.spec.tsx, PipelineManagementV2Page.spec.tsx, PipelineManagementPage.spec.tsx — the latter is untouched/reverted to its original state).
  • Added tests for: redirect to v2 when flag+version qualify, waiting for the instance to load before deciding, and falling back to legacy on a failed connect.

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-v2 route and placeholder page, plus config features.rdiUi.minSupportedVersion (default 1.16.0, overridable via env). shouldUseRdiUiPipeline picks legacy vs v2 when the dev-rdiUi flag is on and the connected RDI instance version meets that minimum.

RdiInstancePage is 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), uses history.replace instead of push, supports skipLastPageRestore so CTAs don’t bounce back to statistics, clears lastPage on 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.

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Code Coverage - Frontend unit tests

St.
Category Percentage Covered / Total
🟢 Statements 83.63% 28990/34664
🟡 Branches 69.74% 12349/17707
🟡 Functions 78.68% 7639/9709
🟢 Lines 84.09% 28181/33512

Test suite run success

8098 tests passing in 874 suites.

Report generated by 🧪jest coverage report action from b81e0d8

@ArtemHoruzhenko
ArtemHoruzhenko force-pushed the feature/rdi-ui/pipeline-management-v2-route branch 2 times, most recently from bc9b121 to 31990ea Compare September 1, 2026 10:13
@ArtemHoruzhenko
ArtemHoruzhenko marked this pull request as ready for review September 1, 2026 10:36
@ArtemHoruzhenko
ArtemHoruzhenko requested a review from a team as a code owner September 1, 2026 10:36

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread redisinsight/ui/src/pages/rdi/instance/InstancePage.tsx Outdated
Comment thread redisinsight/ui/src/pages/rdi/instance/InstancePage.tsx Outdated
Comment thread redisinsight/ui/src/pages/rdi/instance/InstancePage.tsx
Comment thread redisinsight/ui/src/pages/rdi/instance/InstancePage.tsx
ArtemHoruzhenko added a commit that referenced this pull request Sep 1, 2026
- 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.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

ArtemHoruzhenko added a commit that referenced this pull request Sep 8, 2026
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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

if (pathname === Pages.rdiPipeline(rdiInstanceId)) {

P2 Badge Route every RDI entry point through the UI choice

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".

Comment thread redisinsight/ui/src/pages/rdi/instance/InstancePage.tsx

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread redisinsight/ui/src/pages/rdi/instance/InstancePage.tsx
Comment thread redisinsight/ui/src/pages/rdi/instance/InstancePage.tsx
ArtemHoruzhenko added a commit that referenced this pull request Sep 8, 2026
- 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.
ArtemHoruzhenko added a commit that referenced this pull request Sep 8, 2026
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.
@ArtemHoruzhenko
ArtemHoruzhenko force-pushed the feature/rdi-ui/pipeline-management-v2-route branch from 3a710d4 to bdd82f1 Compare September 8, 2026 16:48
Comment thread redisinsight/ui/src/pages/rdi/instance/InstancePage.spec.tsx Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread redisinsight/ui/src/pages/rdi/instance/InstancePage.tsx Outdated
ArtemHoruzhenko added a commit that referenced this pull request Sep 9, 2026
- 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.
ArtemHoruzhenko added a commit that referenced this pull request Sep 9, 2026
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.
@ArtemHoruzhenko
ArtemHoruzhenko force-pushed the feature/rdi-ui/pipeline-management-v2-route branch from 303a5fe to 5c1632f Compare September 9, 2026 15:24

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Base automatically changed from feature/rdi-ui/add-dev-flag to main September 9, 2026 15:52
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.
@ArtemHoruzhenko
ArtemHoruzhenko force-pushed the feature/rdi-ui/pipeline-management-v2-route branch from 5c1632f to 008b3ec Compare September 9, 2026 15:52
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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread redisinsight/ui/src/pages/rdi/instance/InstancePage.tsx Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ 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.

Comment thread redisinsight/ui/src/pages/rdi/instance/InstancePage.tsx
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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread redisinsight/ui/src/pages/rdi/statistics/empty/Empty.tsx Outdated
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.
@ArtemHoruzhenko
ArtemHoruzhenko merged commit 881d9a2 into main Sep 10, 2026
25 checks passed
@ArtemHoruzhenko
ArtemHoruzhenko deleted the feature/rdi-ui/pipeline-management-v2-route branch September 10, 2026 09:43
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.

3 participants