feat(blueprints): blueprint update flow#2799
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## staging #2799 +/- ##
===========================================
- Coverage 46.92% 46.73% -0.20%
===========================================
Files 1251 1256 +5
Lines 26771 27064 +293
Branches 7804 7900 +96
===========================================
+ Hits 12562 12648 +86
- Misses 12052 12246 +194
- Partials 2157 2170 +13
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR adds an end-to-end “Blueprint update” flow for blueprint-based services, including a new route and UI that guides users through reviewing required/optional/modified/removed values, previewing the impact/output, and triggering the update.
Changes:
- Introduces a new Blueprint Update funnel flow UI with preview output streaming via WebSocket.
- Adds client-side data-access mutations/hooks for previewing and launching blueprint updates, plus route + header entrypoint.
- Refactors shared blueprint field utilities and updates boolean blueprint inputs to use the shared
InputTogglecomponent (withautoFocussupport).
Reviewed changes
Copilot reviewed 27 out of 28 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Bumps qovery-typescript-axios lockfile entry to support new blueprint update endpoints/types. |
| package.json | Updates qovery-typescript-axios dependency version. |
| libs/state/util-queries/src/lib/use-react-query-ws-subscription/use-react-query-ws-subscription.ts | Makes WS message parsing resilient to non-JSON payloads. |
| libs/state/util-queries/src/lib/use-react-query-ws-subscription/use-react-query-ws-subscription.spec.tsx | Adds coverage for plain-text WS messages. |
| libs/shared/ui/src/lib/components/inputs/input-toggle/input-toggle.tsx | Adds autoFocus prop passthrough for toggle inputs. |
| libs/domains/services/feature/src/lib/service-update-flow/blueprint/blueprint-update-flow.tsx | New blueprint update flow UI (review + preview + confirm) and payload-building helpers. |
| libs/domains/services/feature/src/lib/service-overview/service-header/service-header.tsx | Makes “Update available” badge clickable to open the new update route. |
| libs/domains/services/feature/src/lib/service-overview/service-header/service-header.spec.tsx | Updates tests to assert navigation to the blueprint update flow. |
| libs/domains/services/feature/src/lib/service-creation-flow/blueprint/blueprint-step-summary/blueprint-step-summary.tsx | Switches blueprint field helpers import to new shared util module. |
| libs/domains/services/feature/src/lib/service-creation-flow/blueprint/blueprint-manifest-context/blueprint-manifest-context.tsx | Uses extracted blueprint field utilities for defaults/field classification. |
| libs/domains/services/feature/src/lib/service-creation-flow/blueprint/blueprint-creation-utils/blueprint-creation-utils.ts | Removes duplicated field helper logic in favor of shared blueprint field utils. |
| libs/domains/services/feature/src/lib/service-creation-flow/blueprint/blueprint-creation-utils/blueprint-creation-utils.spec.ts | Updates tests to import field helpers from the new shared module. |
| libs/domains/services/feature/src/lib/service-creation-flow/blueprint/blueprint-creation-flow.spec.tsx | Updates focus assertion for toggle inputs to use role="switch". |
| libs/domains/services/feature/src/lib/service-creation-flow/blueprint/blueprint-create-context/blueprint-create-context.ts | Uses new shared BlueprintFieldValues type location. |
| libs/domains/services/feature/src/lib/service-creation-flow/blueprint/blueprint-configuration-view/blueprint-configuration-view.tsx | Uses shared blueprint field utils and shared variable input component. |
| libs/domains/services/feature/src/lib/service-creation-flow/blueprint/blueprint-configuration-view/blueprint-creation-components/checkbox-field/checkbox-field.tsx | Removes legacy checkbox field component (replaced by toggle-based input). |
| libs/domains/services/feature/src/lib/hooks/use-update-blueprint/use-update-blueprint.ts | New mutation hook to trigger blueprint updates and invalidate relevant queries. |
| libs/domains/services/feature/src/lib/hooks/use-preview-blueprint-update/use-preview-blueprint-update.ts | New mutation hook to request a blueprint update preview. |
| libs/domains/services/feature/src/lib/hooks/use-blueprint-update-preview-socket/use-blueprint-update-preview-socket.ts | New hook to stream preview impact/raw output from WS messages. |
| libs/domains/services/feature/src/lib/hooks/use-blueprint-update-preview-socket/use-blueprint-update-preview-socket.spec.tsx | Adds unit tests for preview socket parsing and state behavior. |
| libs/domains/services/feature/src/lib/blueprint-manifest-variable-input/blueprint-manifest-variable-input.tsx | Updates blueprint variable input rendering and adds optional label override support. |
| libs/domains/services/feature/src/lib/blueprint-field-utils/blueprint-field-utils.ts | New shared module for blueprint field types, defaults, formatting, and validation utilities. |
| libs/domains/services/feature/src/index.ts | Exposes new hooks and blueprint update flow entrypoint from the feature package. |
| libs/domains/services/data-access/src/lib/domains-services-data-access.ts | Adds previewBlueprintUpdate and updateBlueprint mutations using the axios client. |
| apps/console/src/routeTree.gen.ts | Registers the new /update/blueprint route in the generated route tree. |
| apps/console/src/routes/_authenticated/organization/route.tsx | Adds blueprint update route to bypass-layout route list. |
| apps/console/src/routes/_authenticated/organization/$organizationId/route.tsx | Hides progress card for the blueprint update route. |
| apps/console/src/routes/_authenticated/organization/$organizationId/project/$projectId/environment/$environmentId/service/$serviceId/update/blueprint.tsx | New route component that loads service/env context and mounts the update flow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
RemiBonnet
left a comment
There was a problem hiding this comment.
Thanks @rmnbrd!
The preview output generation can take a while. We should probably explain why and set expectations for customers, could you add a UI indicator for this?
| organizationId, | ||
| previewId, | ||
| }: { | ||
| clusterId?: string |
There was a problem hiding this comment.
| clusterId?: string | |
| clusterId: string |
?
| {formatUpdateValue(value.current_default_value)} | ||
| </Badge> | ||
| <Icon iconName="arrow-right" className="text-xs" /> | ||
| <Badge size="sm" variant="surface" className="font-mono leading-5"> |
There was a problem hiding this comment.
Not sure about this bit: we’re using the mono badge with leading-5, which feels like either a new “variant” of the badge, or something that doesn’t really fit the design system. Maybe we should either turn this into a proper variant, or reuse existing tokens/components instead?
| impactedServices: string[] | ||
| } | ||
|
|
||
| export interface BlueprintUpdatePreviewSocketData { |
There was a problem hiding this comment.
Why it's not in the qovery-ws-typescript-axios package?
Summary
Blueprint update flow
This PR introduces the update flow for Blueprints, allowing users to easily update the outdated blueprint of a blueprint-based service.
Screenshots / Recordings
https://www.loom.com/share/7d20972b85b6456a82a9af8b370e75f3
Testing
yarn testoryarn test -u(if you need to regenerate snapshots)yarn formatyarn lintPR Checklist
.cursor/rules)feat(service): add new Terraform service) - required for semantic-release