feat(blueprints): add logs to creation flow#2816
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## staging #2816 +/- ##
===========================================
- Coverage 46.93% 43.81% -3.12%
===========================================
Files 1263 475 -788
Lines 27061 12499 -14562
Branches 7887 3852 -4035
===========================================
- Hits 12701 5477 -7224
+ Misses 12194 6051 -6143
+ Partials 2166 971 -1195
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:
|
2a82558 to
5603868
Compare
There was a problem hiding this comment.
Pull request overview
This PR enhances the blueprint-based service creation flow by introducing a non-dismissible “creation in progress” modal that streams and displays real-time creation logs, with recovery actions when an error is detected.
Changes:
- Add a blocking modal at the end of the blueprint creation flow to display live creation logs and error recovery actions (retry / edit config).
- Introduce a WebSocket-based hook to subscribe to deployment logs and filter only logs emitted by the created blueprint.
- Update and add unit tests covering the modal, the new logs hook, and the blueprint creation flow integration.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| libs/domains/services/feature/src/lib/service-creation-flow/blueprint/blueprint-step-summary/blueprint-step-summary.tsx | Wires the new logs subscription and opens the non-dismissible modal during/after blueprint creation, including retry/edit flows. |
| libs/domains/services/feature/src/lib/service-creation-flow/blueprint/blueprint-step-summary/blueprint-creation-loading-modal/blueprint-creation-loading-modal.tsx | New modal UI that displays streaming logs, auto-scrolls, and exposes recovery actions on error. |
| libs/domains/services/feature/src/lib/service-creation-flow/blueprint/blueprint-step-summary/blueprint-creation-loading-modal/blueprint-creation-loading-modal.spec.tsx | Adds unit tests validating skeleton rendering, error highlighting, and recovery actions. |
| libs/domains/services/feature/src/lib/service-creation-flow/blueprint/blueprint-creation-flow.spec.tsx | Updates flow tests to mock environment + logs hook and assert logs subscription is enabled with the created blueprint id. |
| libs/domains/services/feature/src/lib/hooks/use-blueprint-creation-logs/use-blueprint-creation-logs.ts | New hook subscribing to /deployment/logs and filtering to blueprint-emitted logs for the created blueprint id. |
| libs/domains/services/feature/src/lib/hooks/use-blueprint-creation-logs/use-blueprint-creation-logs.spec.tsx | Adds unit tests for subscription enablement conditions and blueprint-only log filtering. |
💡 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.
The code LGTM 👍
I think the experience is a bit off: the logs appear too briefly, and we go back to the service list immediately when there’s no error, so we can’t really read them. Could we show this modal only when there's an error? wdyt @TheoGrandin74?
|
@rmnbrd I was a bit surprised by the skeleton while testing, I'm wondering if we should just have the spinner on the button while the logs are loading, and then display the log directly, without the skeleton. This way I think it could be sequenced and understood as:
Also thinking that if a blueprint is faster to create than the logs are to be loaded, it will be cleaner. Wdyt? |
@TheoGrandin74 Yes indeed! Good call, let's do that! That will be cleaner this way. |
feat(blueprints): add logs to creation flow
This PR introduces a non-dismissible modal, that opens at the end of the blueprint-based service creation flow. This modal surfaces the logs of everything happening during the creation of the service.
Screenshots / Recordings
https://www.loom.com/share/7ad14a4d0fe248b1bf1b34631a171d48
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