Skip to content

feat(blueprints): blueprint update flow#2799

Open
rmnbrd wants to merge 30 commits into
stagingfrom
feature/blueprints/update-flow
Open

feat(blueprints): blueprint update flow#2799
rmnbrd wants to merge 30 commits into
stagingfrom
feature/blueprints/update-flow

Conversation

@rmnbrd

@rmnbrd rmnbrd commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

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

  • Changes tested locally in the relevant Console's pages and Storybooks
  • yarn test or yarn test -u (if you need to regenerate snapshots)
  • yarn format
  • yarn lint

PR Checklist

  • I followed naming, styling, and TypeScript rules (see .cursor/rules)
  • I performed a self-review (diff inspected, dead code removed)
  • I titled the PR using Conventional Commits with a scope when possible (e.g. feat(service): add new Terraform service) - required for semantic-release
  • I only kept necessary comments, written in English (watch for useless AI comments)
  • I involved a designer to validate UI changes if I am not a designer
  • I covered new business logic with tests (unit)
  • I confirmed CI is green (Codecov red can be accepted)
  • I reviewed and executed locally any AI-assisted code

@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 36.87316% with 214 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.73%. Comparing base (c347652) to head (6e94d4e).
⚠️ Report is 13 commits behind head on staging.

Files with missing lines Patch % Lines
...ce-update-flow/blueprint/blueprint-update-flow.tsx 3.86% 174 Missing ⚠️
...view-socket/use-blueprint-update-preview-socket.ts 68.35% 13 Missing and 12 partials ⚠️
...hooks/use-update-blueprint/use-update-blueprint.ts 0.00% 6 Missing ⚠️
...service-overview/service-header/service-header.tsx 78.94% 1 Missing and 3 partials ⚠️
...ws-subscription/use-react-query-ws-subscription.ts 66.66% 1 Missing and 1 partial ⚠️
...lib/blueprint-field-utils/blueprint-field-utils.ts 97.67% 1 Missing ⚠️
...riable-input/blueprint-manifest-variable-input.tsx 75.00% 0 Missing and 1 partial ⚠️
...w-blueprint-update/use-preview-blueprint-update.ts 0.00% 1 Missing ⚠️
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     
Flag Coverage Δ
unittests 46.73% <36.87%> (-0.20%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rmnbrd rmnbrd changed the title feat(blueprints): add basis for blueprint update flow feat(blueprints): blueprint update flow Jul 8, 2026
@rmnbrd rmnbrd marked this pull request as ready for review July 9, 2026 09:48
Copilot AI review requested due to automatic review settings July 9, 2026 09:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 InputToggle component (with autoFocus support).

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 RemiBonnet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
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">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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 {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why it's not in the qovery-ws-typescript-axios package?

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