chore(clusters): engine v2 review improvements
Merged
RM
11d ago+453+453+012345678901234567890123456789-158-158-012345678901234567890123456789
Summary
Improvements from reviewing the Engine v2 branch (origin/staging...HEAD) against every project skill: qovery-console-standards, qovery-ui, react-useeffect, vercel-react-best-practices and web-design-guidelines. Based on feat/cluster-engine-v2 (after #3057), one commit per change.
Bugs
- Keep edits made while saving: a successful save cleared every local edit, including ones typed while the request was in flight. It now removes only the values it submitted.
- Redirect once when the Operator connects: the install effect ran again on each parent re-render. With a parent that updates state in
onClose,onCloseran 53 times in the test. - Item modal dismissed with Escape: the modal's "open" flag stayed set, so unmounting the field later closed an unrelated modal.
- Focus outline:
focus-visible:ring-brandgenerates no CSS, so the profile sidebar and Operator footer buttons had Tailwind's default blue ring. They now useoutline-brand-strong, like the rest of the console. - Provider icons in
ClusterAvatar:OVH,ORACLEandIBMnow map to their*_CLOUDicons for every avatar (breadcrumbs, cards, overview). The profile header usesClusterAvatarinstead of its own mapping.
Performance
- No debounce on component switches: opening another component no longer waits 300 ms before its preview request, so the skeleton doesn't flash even when the preview is cached. Edits are still debounced.
Consistency
- Copy:
- "Qovery Operator" casing everywhere.
Loading layers…with an ellipsis.- Error text that says what to do next.
- The search empty states no longer mention filters, which were removed.
- No trailing period on the tooltip.
- Sidebar layer icon: the Font Awesome
layer-groupicon replaces a CSS mask ofapps/console/public/assets/sidebar-test/layer.svg. The feature lib no longer depends on an app asset, and the SVG is deleted. - Route ids:
ProfileOperatorFooterandClusterOperatorStatusread the route ids withuseParamsinstead of receiving them as props. isHttpStatus: no longer exported publicly from clusters data-access.- Console logging: the dev-only API response logs in
cluster-profile.tsxare removed; the branch has no console calls left.
Tests
- Spec for the platform configuration helpers.
InputSearchtests useuserEventinstead offireEvent.- Unused import removed.
Not included (for discussion)
- Product or design choices:
- Label the Operator step's submit "Create cluster" instead of "Continue".
- Replace the changes bar's hardcoded shadow and button gaps with tokens (they follow Figma today).
- Revert the green
EmptyStatevariant. - Add skeletons to the profile header.
- Larger changes:
- Real links for the profile tabs (Cmd-click, copy link).
- Debounce or defer search URL updates.
- Prefetch the profile queries in a route loader.
- Warn before leaving with unsaved changes.
- Move focus to the heading on each creation step.
- Live regions for the polling install step.
- Link input errors with
aria-invalid/aria-describedbyin shared inputs. - Make the password toggle a keyboard-reachable button.
- Batch the per-card Operator status requests on the clusters list.
Test plan
-
jest: clusters feature (561), shared ui (471), clusters data-access - New tests fail without their fix (save, redirect, modal dismissal, debounce, avatar icons)
-
tscapp and libs, ESLint, Prettier -
yarn build:console
🤖 Generated with Claude Code
Summary by cubic
Applies code review improvements to the Engine v2 cluster profile and creation flows, fixing four bugs and tightening performance, consistency, and test coverage.
Bug fixes
- Saving no longer clears edits typed while the request was in flight.
- The Operator connect redirect runs once even if the parent re-renders.
- Item modals report their mount state explicitly, so dismissing by Escape no longer leaves a stale flag that could close an unrelated modal later, and StrictMode double-mounting is handled.
- OVH, Oracle, and IBM clusters now show their
*_CLOUDicons in all avatars, and the profile header usesClusterAvatar.
Refactors
- The edit debounce now applies to profile edits only, so switching components previews immediately.
- Copy is aligned ("Qovery Operator",
Loading layers…, action-oriented errors); the sidebar shows "No layers match your search" only when searching, else "No layers available"; and the layer icon uses the Font Awesomelayer-groupicon. ProfileOperatorFooterandClusterOperatorStatusread route ids viauseParams,isHttpStatusis no longer publicly exported, and dev-only API response logging is removed.- Added tests for the platform configuration helpers and avatar icons, and
InputSearchtests now useuserEvent.