Skip to content

feat(new-nav): add "Terraform arguments" settings page#2549

Merged
rmnbrd merged 2 commits intonew-navigationfrom
feat/new-nav/terraform-arguments-settings
Mar 27, 2026
Merged

feat(new-nav): add "Terraform arguments" settings page#2549
rmnbrd merged 2 commits intonew-navigationfrom
feat/new-nav/terraform-arguments-settings

Conversation

@rmnbrd
Copy link
Copy Markdown
Contributor

@rmnbrd rmnbrd commented Mar 27, 2026

Summary

PR adding the "Terraform arguments" settings section

Screenshots / Recordings

📺 https://www.loom.com/share/920480bfd6b44a1b9cdc8bfe10ae7d81

@RemiBonnet
Copy link
Copy Markdown
Member

Qovery Preview

Qovery can create a Preview Environment for this PR.
To trigger its creation, please post a comment with one of the following command.

Command Blueprint environment
/qovery preview 15d69f24-9bc1-4a8d-80fe-d1bb1b2bcd00 New Navigation
/qovery preview {all|UUID1,UUID2,...} To preview multiple environments

This comment has been generated from Qovery AI 🤖.
Below, a word from its wisdom :

Help yourself at 2AM by putting some metrics to help observability

@rmnbrd rmnbrd self-assigned this Mar 27, 2026
@rmnbrd rmnbrd added the V5 label Mar 27, 2026
@rmnbrd rmnbrd marked this pull request as ready for review March 27, 2026 10:51
Copilot AI review requested due to automatic review settings March 27, 2026 10:51
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

❌ Patch coverage is 46.66667% with 8 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (new-navigation@d33d798). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...rguments-settings/terraform-arguments-settings.tsx 46.66% 0 Missing and 8 partials ⚠️
Additional details and impacted files
@@                Coverage Diff                @@
##             new-navigation    #2549   +/-   ##
=================================================
  Coverage                  ?   43.82%           
=================================================
  Files                     ?       25           
  Lines                     ?      753           
  Branches                  ?      250           
=================================================
  Hits                      ?      330           
  Misses                    ?      330           
  Partials                  ?       93           
Flag Coverage Δ
unittests 43.82% <46.66%> (?)

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

☔ View full report in Codecov by Sentry.
📢 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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new “Terraform arguments” settings page in the console-v5 service settings area, backed by a reusable settings component in the service-settings domain library.

Changes:

  • Introduces TerraformArgumentsSettings component for configuring per-command Terraform extra arguments.
  • Wires the new console-v5 route to render the settings component.
  • Updates exports and adjusts UI styling/header to match the new settings layout.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
libs/domains/service-settings/feature/src/lib/terraform-arguments-settings/terraform-arguments-settings.tsx Implements the Terraform arguments settings UI and submit logic.
libs/domains/service-settings/feature/src/lib/terraform-arguments-settings/terraform-arguments-settings.spec.tsx Updates tests to render the renamed component and mocks TanStack Router.
libs/domains/service-settings/feature/src/index.ts Exports the new settings component from the feature library.
apps/console-v5/src/routes/_authenticated/organization/$organizationId/project/$projectId/environment/$environmentId/service/$serviceId/settings/terraform-arguments.tsx Routes the new settings page in console-v5.
Comments suppressed due to low confidence (3)

libs/domains/service-settings/feature/src/lib/terraform-arguments-settings/terraform-arguments-settings.tsx:99

  • Remove the debug console.log statements from the submit handler. Leaving these in a settings page will clutter the console in production and can leak potentially sensitive service/form data.
    libs/domains/service-settings/feature/src/lib/terraform-arguments-settings/terraform-arguments-settings.tsx:95
  • useService is called as useService({ serviceId }) without environmentId or an explicit serviceType. In the current useService implementation, service type resolution is disabled unless environmentId is provided, so this call can leave resolvedServiceType undefined and the details query never enables (service stays undefined). Also, the form defaultValues are derived from service, but RHF only applies defaultValues on first render, so initializing before the service loads can leave the form empty and potentially overwrite existing action_extra_arguments on save. Prefer useService({ environmentId, serviceId, suspense: true }) (or useService({ serviceId, serviceType: 'TERRAFORM', suspense: true })) and either rely on the existing settings-route <Suspense> boundary or reset the form when service becomes available.
    libs/domains/service-settings/feature/src/lib/terraform-arguments-settings/terraform-arguments-settings.spec.tsx:14
  • The useParams mock only returns organizationId, but the component reads projectId, environmentId, and serviceId (and passes them to hooks/props). Keeping these as empty defaults in tests diverges from real route behavior and can hide issues where those params are required. Consider returning all expected params in the mock (similar to other service-settings specs).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

const { data: service } = useService({ serviceId: applicationId })
export function TerraformArgumentsSettings() {
const { organizationId = '', projectId = '', environmentId = '', serviceId = '' } = useParams({ strict: false })
const { data: service } = useService({ serviceId })
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
const { data: service } = useService({ serviceId })
const { data: service } = useService({ serviceId, suspense: true })

@rmnbrd rmnbrd merged commit 9ba2f2d into new-navigation Mar 27, 2026
10 checks passed
@rmnbrd rmnbrd deleted the feat/new-nav/terraform-arguments-settings branch March 27, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants