Skip to content

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

Open
ArtemHoruzhenko wants to merge 2 commits into
feature/rdi-ui/add-dev-flagfrom
feature/rdi-ui/pipeline-management-v2-route
Open

Add pipeline-management-v2 route and entry-point redirect#6465
ArtemHoruzhenko wants to merge 2 commits into
feature/rdi-ui/add-dev-flagfrom
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

Low Risk
UI-only routing and feature-flag gating with safe fallback to legacy pipeline management on load failure; no auth or data-layer changes.

Overview
Introduces a pipeline-management-v2 route and placeholder page (ahead of wiring real rdi-ui), and centralizes legacy vs. new pipeline UI routing in one place.

Routing & config: New page constants and lazy route registration sit alongside legacy pipeline management. Config adds features.rdiUi.minSupportedVersion (default 1.16.0, overridable via RI_FEATURES_RDI_UI_MIN_SUPPORTED_VERSION). shouldUseRdiUiPipeline enables v2 only when the dev-rdiUi flag is on and the connected RDI instance version meets that minimum.

Entry behavior: RdiInstancePage no longer always sends bare /integrate/:id URLs to legacy pipeline management—it waits until the connected instance for that ID is ready (or a real load failure for that context), then redirects to v2 or legacy. Stale errors from a previous instance are ignored until context matches. Navigation uses the same helper so the Pipeline tab targets the matching URL.

Tests: Expanded InstancePage coverage for v2 redirect, minimum version, loading deferral, stale errors, failed connect fallback, and Pipeline tab navigation; smoke test for the v2 placeholder.

Reviewed by Cursor Bugbot for commit c1dd540. 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.6% 28954/34632
🟡 Branches 69.75% 12348/17703
🟡 Functions 78.65% 7633/9705
🟢 Lines 84.06% 28146/33482

Test suite run success

8092 tests passing in 874 suites.

Report generated by 🧪jest coverage report action from c1dd540

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.
@ArtemHoruzhenko
ArtemHoruzhenko force-pushed the feature/rdi-ui/pipeline-management-v2-route branch 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 on lines +103 to +106
history.push(
shouldUseRdiUi
? Pages.rdiPipelineManagementV2(rdiInstanceId)
: Pages.rdiPipelineManagement(rdiInstanceId),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Route the Pipeline tab through the v1/v2 choice

For an eligible instance, this choice runs only on the bare /integrate/:id URL. The existing Pipeline tab in useNavigation.ts lines 145–153 still navigates directly to Pages.rdiPipelineManagement(...), so a user who enters Analytics— including one restored there by the lastPage branch above—and then clicks Pipeline always gets the legacy page, bypassing the enabled v2 experience. Apply the same flag/version choice to that navigation entry point.

Useful? React with 👍 / 👎.

Comment on lines +90 to +92
const isConnectedInstanceReady = connectedInstance.id === rdiInstanceId
if (!isConnectedInstanceReady && !connectedInstance.error) {
return

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Ignore connection errors belonging to a previous instance

When a previous RDI instance fetch left connectedInstance.error populated, entering another instance at its bare URL reaches this condition with a mismatched ID and the stale error. Although fetchConnectedInstanceAction clears the store at the start of the new request, this effect has captured the prior render's value, so it immediately pushes the legacy route; the later successful fetch cannot select v2 because the pathname is no longer bare. Wait for the current instance's request to finish or otherwise associate the failure with rdiInstanceId before falling back.

Useful? React with 👍 / 👎.

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

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 c1dd540. Configure here.

</S.PlaceholderContainer>
</Row>
)
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

V2 page skips last-page restore

Medium Severity

PipelineManagementV2Page never records lastPage on unmount, unlike the legacy pipeline and statistics pages. After a user opens Analytics, lastPage stays rdiStatistics, so the bare-URL entry redirect in RdiInstancePage always sends them back to Analytics instead of the pipeline they actually left.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit c1dd540. Configure here.

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.

1 participant