Skip to content

refactor(clusters): address engine v2 review comments - #3099

Open
rmnbrd wants to merge 25 commits into
feat/cluster-engine-v2from
feat/cluster-engine-v2-review-fixes
Open

rmnbrd wants to merge 25 commits into
feat/cluster-engine-v2from
feat/cluster-engine-v2-review-fixes

Conversation

@rmnbrd

@rmnbrd rmnbrd commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Addresses @RemiBonnet's review of #2997, with one commit per comment (a few closely related comments share a commit).

Fixes

  • Read-only fields in the array item modal: the modal now keeps readOnly fields disabled.
  • Unsaved changes: leaving the profile or switching to another cluster now asks for confirmation, and the browser's before-unload warning is enabled. Switching components within the same profile is not blocked. This follows the existing useBlocker pattern in ClusterAdd.

Moves and renames

  • isHttpStatus moved to @qovery/shared/utils, next to the Axios interceptor, and gained a spec.
  • useIsEngineV2Cluster renamed to useIsOperatorAttached.
  • The platform configuration hooks moved to clusters/feature/src/lib/hooks/<hook>/, and platform-configuration-utils moved to clusters/feature/src/lib/utils/.
  • The hook keys now default to '', as Remi suggested.
  • The index.ts export is now export * from './lib/cluster-profile/profile-tree'.
  • New library @qovery/domains/catalog/feature (libs/domains/catalog/feature). It holds catalog-variable-field (moved out of shared/util-js) and CatalogVariableInput (moved out of console-shared).

Self-managed creation flow

  • Uses the shared Heading and Section.
  • StepLayout and StepSection are typed with PropsWithChildren.
  • Unmapped violations show in a red Callout that keeps role="alert"; a test covers it.

Shared UI

  • EmptyState: size and color variants now use cva. Snapshot changes are class order only.
  • HighlightText: new stories for a match, no match, and repeated matches.
  • Tooltip: dropped the unused classNameArrow and collisionPadding props.
  • InputSearch: the defaultValue prop and its useEffect sync are replaced by an optional controlled value. The profile sidebar now owns the input state. It updates that state when the URL search changes, using React's adjust-state-on-prop-change pattern rather than an effect.
  • The other shared input changes are kept. They only add optional props, and the catalog input uses them for accessibility:
    • InputSelectSmall ariaLabel, ariaDescribedBy, ariaInvalid. Its visible label isn't linked to the <select>, so it previously had no accessible name.
    • InputTextSmall id.
    • InputToggle ariaDescribedBy, ariaInvalid.
    • The chevron is now centered with top-1/2. It looks the same at the default height and is needed for the h-10 catalog select.

Testing

  • Unit tests pass for clusters feature/data-access, catalog feature, shared ui/utils/util-js/console-shared, and services feature (the services feature only has a snapshot update).
  • tsc on the console app passes at every commit.
  • ESLint was not run: the local ESLint config fails to load because of a pending config migration.

rmnbrd and others added 16 commits October 13, 2026 13:44
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…edCluster

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… strings

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er cluster hooks

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er cluster utils

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…naged creation flow

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dren

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…heir own library

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ng props

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fault value

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 13, 2026 12:13

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@nx-cloud

nx-cloud Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 1de6f66

Command Status Duration Result
nx run console:build --parallel=3 --configurati... ✅ Succeeded 55s View ↗
nx affected --target=test --parallel=3 --config... ✅ Succeeded 5m 10s View ↗
nx affected --target=lint --parallel=3 ✅ Succeeded 2m 33s View ↗
nx-cloud record -- yarn nx format:check ✅ Succeeded 3s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-10-13 15:48:05 UTC

@cubic-dev-ai cubic-dev-ai Bot 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.

1 issue found across 52 files

Confidence score: 4/5

  • In profile-array-item-modal.tsx, an empty required field can still fail validation when disabled, blocking Save even though the user cannot edit it. Skip validation for disabled fields or ensure they have a value.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="libs/domains/clusters/feature/src/lib/cluster-profile/profile-array-item-modal.tsx">

<violation number="1" location="libs/domains/clusters/feature/src/lib/cluster-profile/profile-array-item-modal.tsx:94">
P3: A read-only (disabled) field bypasses the user but still runs the `validate` rule: if such a field is `required` and its value is empty, the modal shows "Please enter a value." and blocks Save with no way to fill the field in. Consider skipping the fulfilled/required check for disabled fields (read-only values are API-supplied), or masking the error when `field.readOnly` is set.</violation>
</file>

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

@codecov

codecov Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 79.72973% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.36%. Comparing base (1d5ddce) to head (1de6f66).

Files with missing lines Patch % Lines
...mponents/highlight-text/highlight-text.stories.tsx 0.00% 5 Missing ⚠️
...eature/src/lib/cluster-profile/cluster-profile.tsx 87.87% 1 Missing and 3 partials ⚠️
...n/use-platform-template-component-configuration.ts 0.00% 3 Missing ⚠️
...ata-access/src/lib/domains-clusters-data-access.ts 0.00% 1 Missing ⚠️
...b/platform-configuration/platform-configuration.ts 0.00% 1 Missing ⚠️
...figuration/use-platform-component-configuration.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                    Coverage Diff                     @@
##           feat/cluster-engine-v2    #3099      +/-   ##
==========================================================
+ Coverage                   52.12%   52.36%   +0.24%     
==========================================================
  Files                        1412     1377      -35     
  Lines                       31720    30690    -1030     
  Branches                     9414     9228     -186     
==========================================================
- Hits                        16534    16072     -462     
+ Misses                      12579    12085     -494     
+ Partials                     2607     2533      -74     
Flag Coverage Δ
unittests 52.36% <79.72%> (+0.24%) ⬆️

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 and others added 2 commits October 13, 2026 14:48
…orAttached

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 2 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

- Remove the cluster header and its unused context data
- Add a divider to the profile sidebar
- Detect when the selected component matches only hidden settings
- Cover the filtered settings empty state

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 3 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

- Add hover and pointer styling only when the status panel can open
- Cover clickable and unavailable status states in the footer spec
rmnbrd and others added 2 commits October 13, 2026 17:35
- Allow saving while configuration edits are being checked again
- Keep saving blocked when checks fail or report violations or missing inputs
… the search

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot 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.

1 issue found across 3 files (changes from recent commits).

Confidence score: 5/5

  • profile-changes-bar.tsx retains the last verdict while edits are rechecked, so a previous failure can keep submission disabled until the new result arrives.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="libs/domains/clusters/feature/src/lib/cluster-profile/profile-changes-bar.tsx">

<violation number="1" location="libs/domains/clusters/feature/src/lib/cluster-profile/profile-changes-bar.tsx:9">
P3: This says `canSubmit` is true during every recheck, but a previous failed verdict remains false until the new result arrives. Describe that the last verdict is retained while edits are checked again.</violation>
</file>

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

isSaving: boolean
isDeploying: boolean
// False while the edits are being checked or do not pass the checks shown in the form.
// False once a check fails or reports violations or missing inputs; true while the edits are being checked.

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.

P3: This says canSubmit is true during every recheck, but a previous failed verdict remains false until the new result arrives. Describe that the last verdict is retained while edits are checked again.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At libs/domains/clusters/feature/src/lib/cluster-profile/profile-changes-bar.tsx, line 9:

<comment>This says `canSubmit` is true during every recheck, but a previous failed verdict remains false until the new result arrives. Describe that the last verdict is retained while edits are checked again.</comment>

<file context>
@@ -6,7 +6,7 @@ interface ProfileChangesBarProps {
   isSaving: boolean
   isDeploying: boolean
-  // False while the edits are being checked or do not pass the checks shown in the form.
+  // False once a check fails or reports violations or missing inputs; true while the edits are being checked.
   canSubmit: boolean
   onReset: () => void
</file context>
Suggested change
// False once a check fails or reports violations or missing inputs; true while the edits are being checked.
// False after a check fails or reports violations or missing inputs; the last verdict is retained while edits are checked again.

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.

2 participants