feat(clusters): only show the profile for Engine v2 clusters
Merged
RM
21h ago+50+50+01234567890123456789-15-15-01234567890123456789
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
useIsOperatorAttachedalready defines an Engine v2 cluster for the cluster actions (flag on, self-managed, Operator status other thanNOT_ATTACHED). It now accepts a cluster that is still loading, and returnsundefineduntil the flags, the cluster and its Operator status are known. Existing callers treatundefinedlikefalse, 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
undefinedstates (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.
useIsOperatorAttachedreturnsundefinedwhile the flags, cluster, or Operator status are still loading, so the route shows a loader instead of redirecting users with access too early.