feat(new-nav): add creation flows for Jobs#2605
Conversation
170bab6 to
6f109e1
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## new-navigation #2605 +/- ##
=================================================
Coverage ? 44.26%
=================================================
Files ? 1093
Lines ? 22831
Branches ? 6700
=================================================
Hits ? 10106
Misses ? 10939
Partials ? 1786
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds new-nav (TanStack Router) creation flows for Lifecycle Jobs and Cron Jobs, migrating the job creation UI into a new @qovery/domains/service-job/feature domain package.
Changes:
- Introduces a new
service-jobfeature library implementing the multi-step job creation flow (general/dockerfile/configure/resources/variables/summary). - Wires new
/service/create/{lifecycle-job|cron-job}routes into console-v5 and updates “Service New” cards to point to the new flow URLs. - Removes legacy job creation feature/pages and related tests/snapshots from
libs/pages/services.
Reviewed changes
Copilot reviewed 60 out of 67 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.base.json | Adds TS path alias for the new @qovery/domains/service-job/feature library. |
| libs/shared/routes/src/lib/sub-router/job.router.ts | Updates lifecycle template creation URL builder (now querystring-based). |
| libs/pages/services/src/lib/feature/page-job-create-feature/template-form-sync.tsx | Removes legacy template sync component for old job creation flow. |
| libs/pages/services/src/lib/feature/page-job-create-feature/step-variable-feature/step-variable-feature.spec.tsx | Removes legacy step-variable feature test. |
| libs/pages/services/src/lib/feature/page-job-create-feature/step-summary-feature/step-summary-feature.tsx | Removes legacy summary step implementation. |
| libs/pages/services/src/lib/feature/page-job-create-feature/step-summary-feature/step-summary-feature.spec.tsx | Removes legacy summary step test. |
| libs/pages/services/src/lib/feature/page-job-create-feature/step-resources-feature/step-resources-feature.tsx | Removes legacy resources step implementation. |
| libs/pages/services/src/lib/feature/page-job-create-feature/step-resources-feature/step-resources-feature.spec.tsx | Removes legacy resources step test. |
| libs/pages/services/src/lib/feature/page-job-create-feature/step-general-feature/step-general-feature.tsx | Removes legacy general step implementation. |
| libs/pages/services/src/lib/feature/page-job-create-feature/step-general-feature/step-general-feature.spec.tsx | Removes legacy general step test. |
| libs/pages/services/src/lib/feature/page-job-create-feature/step-dockerfile-feature/step-dockerfile-feature.spec.tsx | Removes legacy dockerfile step snapshot test. |
| libs/pages/services/src/lib/feature/page-job-create-feature/step-dockerfile-feature/snapshots/step-dockerfile-feature.spec.tsx.snap | Removes legacy dockerfile snapshot. |
| libs/pages/services/src/lib/feature/page-job-create-feature/step-configure-feature/step-configure-feature.tsx | Removes legacy configure step implementation. |
| libs/pages/services/src/lib/feature/page-job-create-feature/step-configure-feature/step-configure-feature.spec.tsx | Removes legacy configure step test. |
| libs/pages/services/src/lib/feature/page-job-create-feature/page-job-create-feature.tsx | Removes legacy job creation feature container/context. |
| libs/pages/services/src/lib/feature/page-job-create-feature/page-job-create-feature.spec.tsx | Removes legacy page-job-create feature test. |
| libs/domains/services/feature/src/lib/service-new/service-new.tsx | Updates “new service” links to use /service/create/... flow paths for jobs. |
| libs/domains/services/feature/src/lib/job-general-settings/job-general-settings.tsx | Minor formatting change (whitespace). |
| libs/domains/services/feature/src/lib/dockerfile-settings/dockerfile-settings.tsx | Updates text colors and fixes ExternalLink to include href. |
| libs/domains/services/feature/src/lib/dockerfile-settings/snapshots/dockerfile-settings.spec.tsx.snap | Updates snapshots for DockerfileSettings UI changes. |
| libs/domains/service-settings/feature/src/lib/job-configuration/job-configuration.tsx | Switches JobConfigurationForm import to the new service-job feature package. |
| libs/domains/service-job/feature/tsconfig.spec.json | Adds TS config for tests in the new library. |
| libs/domains/service-job/feature/tsconfig.lib.json | Adds TS config for building the new library. |
| libs/domains/service-job/feature/tsconfig.json | Adds TS project references/config for the new library. |
| libs/domains/service-job/feature/src/lib/job-creation-flow/step-variables/step-variables.tsx | Implements variables step using TanStack router navigation. |
| libs/domains/service-job/feature/src/lib/job-creation-flow/step-summary/step-summary.tsx | Adds new summary step (prepare request, create service, import variables, optional deploy). |
| libs/domains/service-job/feature/src/lib/job-creation-flow/step-resources/step-resources.tsx | Adds resources step using shared ApplicationSettingsResources. |
| libs/domains/service-job/feature/src/lib/job-creation-flow/step-introduction/util-localstorage-step.ts | Adds localStorage helpers for lifecycle introduction step. |
| libs/domains/service-job/feature/src/lib/job-creation-flow/step-introduction/step-introduction.tsx | Adds lifecycle-job introduction step UI using TanStack router. |
| libs/domains/service-job/feature/src/lib/job-creation-flow/step-introduction/step-introduction.spec.tsx | Adds/updates unit test for the introduction step. |
| libs/domains/service-job/feature/src/lib/job-creation-flow/step-introduction/images/trigger.svg | Adds new SVG asset for the introduction step. |
| libs/domains/service-job/feature/src/lib/job-creation-flow/step-introduction/images/build.svg | Adds new SVG asset for the introduction step. |
| libs/domains/service-job/feature/src/lib/job-creation-flow/step-general/step-general.tsx | Adds general step UI for job creation (source/build/deploy/labels). |
| libs/domains/service-job/feature/src/lib/job-creation-flow/step-dockerfile/step-dockerfile.tsx | Adds dockerfile step for lifecycle jobs with dockerfile validation. |
| libs/domains/service-job/feature/src/lib/job-creation-flow/step-configure/step-configure.tsx | Adds configure/triggers step and integrates JobConfigurationForm. |
| libs/domains/service-job/feature/src/lib/job-creation-flow/step-configure/step-configure.spec.tsx | Adds unit tests around configure step validation behavior. |
| libs/domains/service-job/feature/src/lib/job-creation-flow/job-creation-flow.tsx | Adds creation-flow context/provider and funnel wrapper for jobs. |
| libs/domains/service-job/feature/src/lib/job-creation-flow/job-creation-flow.spec.tsx | Adds a spec file (currently not aligned with job flow). |
| libs/domains/service-job/feature/src/lib/job-creation-flow/job-create-utils/job-create-utils.ts | Adds helper to resolve template/option metadata from service templates. |
| libs/domains/service-job/feature/src/lib/job-configuration-form/job-configuration-form.tsx | Adds shared JobConfigurationForm (cron + lifecycle events + execution behavior). |
| libs/domains/service-job/feature/src/lib/job-configuration-form/job-configuration-form.spec.tsx | Adds tests for JobConfigurationForm (cron + lifecycle variants). |
| libs/domains/service-job/feature/src/index.ts | Exports new service-job feature modules/components. |
| libs/domains/service-job/feature/project.json | Adds Nx project configuration for the new library. |
| libs/domains/service-job/feature/jest.config.ts | Adds Jest config for the new library. |
| libs/domains/service-job/feature/README.md | Adds generated README for the new library. |
| libs/domains/service-job/feature/.eslintrc.json | Adds ESLint config for the new library. |
| libs/domains/service-job/feature/.babelrc | Adds Babel config for the new library. |
| apps/console-v5/src/routes/_authenticated/organization/route.tsx | Adds lifecycle-job/cron-job creation routes to bypass layout list. |
| apps/console-v5/src/routes/_authenticated/organization/$organizationId/project/$projectId/environment/$environmentId/service/create/lifecycle-job/variables.tsx | Adds lifecycle-job variables route (renders StepVariables). |
| apps/console-v5/src/routes/_authenticated/organization/$organizationId/project/$projectId/environment/$environmentId/service/create/lifecycle-job/summary.tsx | Adds lifecycle-job summary route (renders StepSummary). |
| apps/console-v5/src/routes/_authenticated/organization/$organizationId/project/$projectId/environment/$environmentId/service/create/lifecycle-job/route.tsx | Adds lifecycle-job route wrapper (JobCreationFlow provider + Outlet). |
| apps/console-v5/src/routes/_authenticated/organization/$organizationId/project/$projectId/environment/$environmentId/service/create/lifecycle-job/resources.tsx | Adds lifecycle-job resources route (renders StepResources). |
| apps/console-v5/src/routes/_authenticated/organization/$organizationId/project/$projectId/environment/$environmentId/service/create/lifecycle-job/introduction.tsx | Adds lifecycle-job introduction route (renders StepIntroduction). |
| apps/console-v5/src/routes/_authenticated/organization/$organizationId/project/$projectId/environment/$environmentId/service/create/lifecycle-job/index.tsx | Adds lifecycle-job index redirect (introduction vs general). |
| apps/console-v5/src/routes/_authenticated/organization/$organizationId/project/$projectId/environment/$environmentId/service/create/lifecycle-job/general.tsx | Adds lifecycle-job general route (renders StepGeneral). |
| apps/console-v5/src/routes/_authenticated/organization/$organizationId/project/$projectId/environment/$environmentId/service/create/lifecycle-job/dockerfile.tsx | Adds lifecycle-job dockerfile route (renders StepDockerfile). |
| apps/console-v5/src/routes/_authenticated/organization/$organizationId/project/$projectId/environment/$environmentId/service/create/lifecycle-job/configure.tsx | Adds lifecycle-job configure route (renders StepConfigure). |
| apps/console-v5/src/routes/_authenticated/organization/$organizationId/project/$projectId/environment/$environmentId/service/create/cron-job/variables.tsx | Adds cron-job variables route (renders StepVariables). |
| apps/console-v5/src/routes/_authenticated/organization/$organizationId/project/$projectId/environment/$environmentId/service/create/cron-job/summary.tsx | Adds cron-job summary route (renders StepSummary). |
| apps/console-v5/src/routes/_authenticated/organization/$organizationId/project/$projectId/environment/$environmentId/service/create/cron-job/route.tsx | Adds cron-job route wrapper (JobCreationFlow provider + Outlet). |
| apps/console-v5/src/routes/_authenticated/organization/$organizationId/project/$projectId/environment/$environmentId/service/create/cron-job/resources.tsx | Adds cron-job resources route (renders StepResources). |
| apps/console-v5/src/routes/_authenticated/organization/$organizationId/project/$projectId/environment/$environmentId/service/create/cron-job/index.tsx | Adds cron-job index redirect to general step. |
| apps/console-v5/src/routes/_authenticated/organization/$organizationId/project/$projectId/environment/$environmentId/service/create/cron-job/general.tsx | Adds cron-job general route (renders StepGeneral). |
| apps/console-v5/src/routes/_authenticated/organization/$organizationId/project/$projectId/environment/$environmentId/service/create/cron-job/configure.tsx | Adds cron-job configure route (renders StepConfigure). |
Comments suppressed due to low confidence (1)
libs/domains/service-job/feature/src/lib/job-creation-flow/step-dockerfile/step-dockerfile.tsx:38
pathCreateis hard-coded to the lifecycle-job configure URL, ignoringjobURL. This tightly couples the component to lifecycle jobs and will break if the base route changes (and makes reuse in other flows impossible). Prefer navigating tojobURL + '/configure'(or a route pattern with params) rather than constructing a fixed absolute string here.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
I don't know why but the lifecycle icon has a 70% opacity modifier on it, it should really be on 100% opacity I think (also the case in the current console, but it's more telling in dark mode)
Probably on all creation flow but we have a token issue on the git provider icon in the "Application source" input
Whole summary page is missing tokens
Should use the new Qovery logo here!
Cron job
Whole summary page is missing tokens here also!
There was a problem hiding this comment.
Thanks @rmnbrd!
I think several GitHub Copilot comments are relevant, and here are mine:
-
The migrated flow only reads the static service template metadata and initializes the name/icon/source. The previousTemplateFormSynccalleduseLifecycleTemplateand populated the raw Dockerfile, default resources, lifecycle event commands, max duration, and template variables. With this removed, selecting a Terraform/CloudFormation template can create a mostly empty lifecycle job instead of using the backend-provided preset -
The variable button is missing theiconOnlyprop and should probably use the outline variant. We already have this behavior in other flows, Helm for example, so I think we should harmonize it here too (cc @TheoGrandin74)
Could you also harmonize this summary view with the Helm summary, especially the button style and label colors?
- If we created an new library
service-jobsI wonder if we need to switch all component in the libraryservicesrelated tojobsinside this one 🤔
|
|
||
| const templateData = findTemplateData(template, option) | ||
| const [currentStep, setCurrentStep] = useState(1) | ||
| const [generalData, setGeneralData] = useState<JobGeneralData | undefined>( |
There was a problem hiding this comment.
I think useState aren't useful here to populate the data inside the different step, you can directly use useForm cc other flow
There was a problem hiding this comment.
Since we have async data, that might be a bit more tricky here 😕
There was a problem hiding this comment.
Oh okay, async data makes this a bit annoying 😕
Maybe later we could hydrate the forms with reset() when the data is ready, but I don’t think it needs to block this PR

Summary
This pull request adds the creation flows for Lifecycle and CRON jobs
📺 https://www.loom.com/share/c89bb0637450425c9cb275ea54770c1e