feat(blueprints): creation flow improvements#2787
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## staging #2787 +/- ##
===========================================
+ Coverage 48.09% 48.93% +0.84%
===========================================
Files 1243 861 -382
Lines 26222 21029 -5193
Branches 7737 6317 -1420
===========================================
- Hits 12612 10291 -2321
+ Misses 11421 8949 -2472
+ Partials 2189 1789 -400
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:
|
This is done by listening to a new WS API endpoint
c1c118a to
e310b0f
Compare
|
View your CI Pipeline Execution ↗ for commit e310b0f ☁️ Nx Cloud last updated this comment at |
1 similar comment
|
View your CI Pipeline Execution ↗ for commit e310b0f ☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
Pull request overview
This PR improves the blueprint-based service creation UX by ensuring blueprint icons are resolved through the Console’s icon registry and by keeping the creation flow in a “waiting” state until the backend confirms the service is created via WebSocket.
Changes:
- Add
onInvalidateOperationsupport to the generic React Query WebSocket subscription hook, plus dependency/URL param stability improvements. - Resolve blueprint icons via
getServiceIconsoapp://qovery-console/*URIs render correctly in the list and details panel (with updated specs). - Introduce a blueprint “service-created” WebSocket hook and update the creation flow summary step to wait for the service-created event before navigating.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| libs/state/util-queries/src/lib/use-react-query-ws-subscription/use-react-query-ws-subscription.ts | Adds invalidate-operation callback support and improves reconnection/deps behavior. |
| libs/state/util-queries/src/lib/use-react-query-ws-subscription/use-react-query-ws-subscription.spec.tsx | Extends tests to cover the new invalidate-operation callback. |
| libs/domains/services/feature/src/lib/service-new/service-new.spec.tsx | Updates blueprint icon expectations to match app:// icon resolution. |
| libs/domains/services/feature/src/lib/service-new/blueprint-card/blueprint-card.tsx | Switches blueprint card rendering to use getServiceIcon and merge icon-specific classes. |
| libs/domains/services/feature/src/lib/service-icon/service-icon.tsx | Adds getServiceIcon helper for resolving known icon URIs (with a noted hardening change needed). |
| libs/domains/services/feature/src/lib/service-creation-flow/blueprint/blueprint-step-summary/blueprint-step-summary.tsx | Keeps the UI loading while awaiting the service-created event, then navigates on confirmation. |
| libs/domains/services/feature/src/lib/service-creation-flow/blueprint/blueprint-creation-flow.spec.tsx | Adds coverage to ensure the flow waits for the service-created event before navigation. |
| libs/domains/services/feature/src/lib/hooks/use-blueprint-service-created-socket/use-blueprint-service-created-socket.ts | New hook subscribing to /blueprint/service-created and invalidating the environment services list. |
| libs/domains/services/feature/src/lib/hooks/use-blueprint-service-created-socket/use-blueprint-service-created-socket.spec.tsx | Unit tests for subscription config and invalidation behavior. |
| libs/domains/services/feature/src/lib/blueprint-details-panel/blueprint-details-panel.tsx | Uses getServiceIcon to render consistent icons in the details panel header. |
| libs/domains/services/feature/src/lib/blueprint-details-panel/blueprint-details-panel.spec.tsx | Updates icon assertion for details panel. |
| libs/domains/services/feature/src/index.ts | Exports the new useBlueprintServiceCreatedSocket hook from the package entrypoint. |
💡 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 Romain, I added few comments!
RemiBonnet
left a comment
There was a problem hiding this comment.
Thanks, LGTM 👍
Tiny optional follow-up: could we add a fallback timeout after the create mutation succeeds, just in case the websocket event never arrives? Not blocking from my side, but it would avoid leaving the user stuck in loading if the event is missed or the socket fails
* Add icons for blueprints * Improve blueprint-based service creation flow loading behavior This is done by listening to a new WS API endpoint * Reuse ServiceAvatar component * Remove aria-hidden wrappers * Refactor WS subscription and submit logic * Rename onInvalidateOperation to onQueryInvalidated * Update success toast display strategy * Add timeout fallback whem WS is not received
|
🎉 This PR is included in version 1.326.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Summary
Blueprint-based service creation flow improvements
This PR introduces several improvements to the blueprint-based service creation flow, including:
Screenshots / Recordings
Before
https://www.loom.com/share/48f54a26f33e4f83b7e5f8ac18fea4b0
After
https://www.loom.com/share/66e6affaccb341c39f84175114b8a4e8
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