Wire @rdi-ui/pipeline into the standalone v2 pipeline management page - #6506
Conversation
Renders the shared @rdi-ui/pipeline PipelineManagement component inside the standalone pipeline-management-v2 page, pointed at the RDI proxy endpoint (rdi/:id/proxy) added earlier. - RdiPipeline wraps the package in its own styled-components ThemeProvider, overriding just this subtree's theme shape (via an aliased @redis-ui/styles 21 install) since the bundled components read a styles-21 theme shape RedisInsight's own styles-15 theme doesn't have yet. - useRdiPipelineNavigation adapts react-router's history to the package's NavigationService contract. - targetDatabase/sourceSecrets/multiSource/pipelineSecrets/ configTranslate are wired to the minimum viable config for now; config-translation and secret-mounting are stubbed pending their own follow-up work. - Adds a TS 4.9 parse-failure workaround (zod-v4-stub.d.ts + tsconfig.json paths remap) for zod's TS5-only syntax, reached transitively via @rdi-ui/sdk - see the stub file for the full explanation. tsc-only; doesn't affect Vite or Jest. - Mocks @rdi-ui/pipeline wholesale for Jest (its UMD bundle doesn't interop with styled-components under Jest) and adds min-release-age-exclude for @rdi-ui/*, our own org's scope, so we can pick up fixes immediately instead of waiting out the supply- chain cooldown that applies to everyone else. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c6c453b12d
ℹ️ 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".
Code Coverage - Backend unit tests
Test suite run success3924 tests passing in 331 suites. Report generated by 🧪jest coverage report action from 90e4a9e |
Code Coverage - Integration Tests
|
Code Coverage - Frontend unit tests
Test suite run success8142 tests passing in 877 suites. Report generated by 🧪jest coverage report action from 90e4a9e |
- Drop `exact: true` from the pipeline-management-v2 route: the package navigates to real sub-paths under `basePath` for its multi-step wizard, and exact matching unmounted the whole page the moment it did, falling through to the v1 instance route below it in the Switch. Safe to drop since this route is still declared before that non-exact v1 route. - Attach `x-window-id` on the rdiClient config: Electron's WindowAuthMiddleware guards every API route unconditionally (including this proxy) on that header, but this client bypasses apiService's own interceptor that normally attaches it. - Stop rebuilding the whole navigation service object on every navigation: getPath() now reads from a ref kept fresh every render, so it can't go stale if the package captures the object once instead of re-reading the prop each render - and the object's identity no longer changes on route changes either, which could otherwise retrigger the package's own mount-effects. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5d704682ff
ℹ️ 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".
rdiClient and its siblings (targetDatabase, sourceSecrets, multiSource, pipelineSecrets, configTranslate) were inline object/function literals, so every render created new identities for all of them - and this component re-renders on every wizard-step navigation, since useRdiPipelineNavigation subscribes to location. Same mount-effect-retriggering risk already fixed for the navigation object itself, left unaddressed on these. rdiClient depends on rdiInstanceId, so it's memoized; the rest have no dependencies at all, so they're hoisted to module-level constants for a permanently stable reference instead. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Remove the non-functional min-release-age-exclude from .npmrc: verified against npm's own source that this was only backported to npm 11.17.0, but .nvmrc pins Node 24.16.0 (npm 11.13.0) - it silently did nothing on the toolchain this repo actually uses. - Exact-pin @rdi-ui/pipeline instead of a caret range, given how rapidly it iterates pre-1.0, and bump to the latest version that clears the release-age cooldown. - Simplify useRdiPipelineNavigation: read history.location.pathname directly instead of a ref - history.location is already always current, so the ref added nothing. - Fix PipelineManagementV2Page recording the wrong PageNames value (rdiPipelineManagement, the v1 page) as the last-visited rdi section on unmount - should record its own (rdiPipelineManagementV2). - Gate the v2 page itself on isDevRdiUiEnabled, redirecting to the v1 pipeline management page when off: the route was only gated by FeatureFlags.rdi, so a direct/bookmarked visit skipped the dev-flag check that InstancePage's own v1->v2 redirect decision already applies. Verified this can't loop: InstancePage only redirects toward v2 from the bare instance URL, never from the v1 pipeline management path this redirects to. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 880d0e4875
ℹ️ 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".
…rovider
- Extract useRdiPipelineUi: a single hook computing whether an RDI
instance should use the v1 or v2 pipeline UI, given the dev flag and
RDI version, plus a loading state. Both InstancePage (v1's own
redirect decision) and PipelineManagementV2Page (guarding direct/
bookmarked v2 URLs) now call this instead of each having their own
copy - which is what let them drift apart before: the v2 page's
guard only checked the flag, missing the version check.
- Returns a discriminated union ({status:'loading'} |
{status:'ready', target:'v1'|'v2'}) rather than separate isLoading/
target fields, so `target` can't be read while still loading at the
type level. Memoized internally so its identity only changes when
the underlying instance/flag data actually does - both consumers
depend on it (one in a useEffect dep array), and an unmemoized
object here would retrigger on every unrelated render.
- PipelineManagementV2Page now shows a Loader while resolving instead
of blank content, and redirects to v1 for both an unsupported
version and a disabled flag.
- Add a QueryClientProvider around PipelineManagement: it uses
react-query internally (confirmed directly in its bundle) but
doesn't ship its own provider, so the first query/mutation would
throw "No QueryClient set". Invisible in tests since the package is
fully mocked there.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- PipelineManagementV2Page called useConnectRdiInstance directly and useRdiPipelineUi, which calls that same hook again - both instances ran the instance-id effect, so mount dispatched fetchConnectedInstanceAction twice, reset RDI/database context twice, and could show two error notifications on failure. Now reads connectedInstance via a plain selector for the page title instead, since useRdiPipelineUi already connects the instance. - InstancePage rendered its full v1 shell (tabs, status bar) unconditionally, even while still on the bare instance URL deciding whether to redirect to v1 or v2 - under network throttling this showed as v1 UI flashing before the v2 redirect. The bare URL never actually renders as a page (the effect always replaces it with something else), so render a loader there instead, regardless of whether the decision has resolved yet - covers both the loading window and the brief gap between the decision resolving and history.replace actually firing. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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 45d6fae. Configure here.
The QueryClient was a module-level singleton shared across every RDI instance. PipelineManagement stays mounted across instance switches, and nothing guarantees its internal query keys are namespaced by instance, so the shared cache could serve a previous instance's pipeline data (jobs, secrets, error state) until a refetch completes. Scope it with useMemo keyed on rdiInstanceId instead, so switching instances always starts from an empty cache. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

Summary
Renders the shared
@rdi-ui/pipelinePipelineManagementcomponent inside the standalonepipeline-management-v2page (from #6502), pointed at the RDI proxy endpoint (rdi/:id/proxy, from #6504).RdiPipelinewraps the package in its own styled-componentsThemeProvider, overriding just this subtree's theme shape (via an aliased@redis-ui/styles21 install) since the bundled components read a styles-21 theme shape RedisInsight's own styles-15 theme doesn't have yet.useRdiPipelineNavigationadapts react-router'shistoryto the package'sNavigationServicecontract.targetDatabase/sourceSecrets/multiSource/pipelineSecrets/configTranslateare wired to the minimum viable config for now; config-translation and secret-mounting are stubbed pending their own follow-up work.zod-v4-stub.d.ts+tsconfig.jsonpathsremap) for zod's TS5-only syntax, reached transitively via@rdi-ui/sdk- see the stub file for the full explanation.tsc-only; doesn't affect Vite or Jest.@rdi-ui/pipelinewholesale for Jest (its UMD bundle doesn't interop with styled-components under Jest) and addsmin-release-age-excludefor@rdi-ui/*(our own org's scope) to.npmrc, so we can pick up fixes immediately instead of waiting out the supply-chain cooldown that applies to third-party packages.@rdi-ui/pipelineto the latest available release (0.1.28).Test plan
npx jestonpages/rdi,components/main-router- 61/61 suites passingeslint --fixon all touched files - 0 errorstsc --noEmit- no new errors introduced (zod workaround verified to produce 0 zod-related errors)🤖 Generated with Claude Code
Note
Medium Risk
New third-party UI stack and dependency tree affect RDI pipeline flows and routing; incorrect v1/v2 gating or proxy wiring could send users to the wrong experience or break pipeline API calls.
Overview
Replaces the v2 pipeline management placeholder with the shared
@rdi-ui/pipelineexperience, backed by new dependencies (@rdi-ui/pipeline,@tanstack/react-query,react-hook-form,yup, and an aliased@redis-ui/styles-rdifor RDI-specific styling).useRdiPipelineUicentralizes when the app should use v1 vs v2 (dev flag, connected instance version, load/error/context state).InstancePageandPipelineManagementV2Pageboth use it: they show a loader while resolving, redirect to the correct pipeline URL (including v2 → v1 when the flag is off or the version is unsupported), and avoid flashing the legacy v1 shell before redirect. The v2 route dropsexact: trueso nested wizard paths can match.RdiPipeline(withuseRdiPipelineNavigation) hosts the package behind a per-instance React Query client and RDI proxy base URL. Jest maps@rdi-ui/pipelineto a mock;tsconfigadds temporary zod v4 path stubs for older TypeScript.Reviewed by Cursor Bugbot for commit 90e4a9e. Bugbot is set up for automated code reviews on this repo. Configure here.