feat(clusters): only show the profile for Engine v2 clusters

Merged
RM
21h ago
+50-15

What

The cluster Profile view was available on every cluster as soon as the engine-v2-platform-configuration flag was on. It's now limited to Engine v2 clusters: self-managed clusters attached to the Qovery Operator.

How

  • useIsOperatorAttached already defines an Engine v2 cluster for the cluster actions (flag on, self-managed, Operator status other than NOT_ATTACHED). It now accepts a cluster that is still loading, and returns undefined until the flags, the cluster and its Operator status are known. Existing callers treat undefined like false, as before.
  • Navigation: the Profile tab is shown only when the current cluster is attached to the Operator.
  • Profile route: it waits for the cluster and its Operator status, then redirects to the overview for clusters that aren't attached. Direct links and bookmarks are covered too.

The self-managed creation flow still opens the profile once the Operator connects, which the guard allows.

Tests

  • New hook tests for the undefined states (flags, cluster and Operator status loading) and for clusters without Operator state.
  • The console app typechecks and builds.

šŸ¤– Generated with Claude Code


Summary by cubic

Gates the cluster Profile view behind Qovery Operator attachment instead of the feature flag alone, so non-Engine v2 clusters no longer show a Profile tab.

  • The Profile tab and route now show only for self-managed clusters attached to the Operator; direct links and bookmarks on non-attached clusters redirect to the overview.
  • useIsOperatorAttached returns undefined while the flags, cluster, or Operator status are still loading, so the route shows a loader instead of redirecting users with access too early.