From f69e1d7dec64390966b451fa09d01a524c7705bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Thu, 6 Aug 2026 04:23:17 +0200 Subject: [PATCH] feat: add managed settings navigation - Show only guardian settings for managed records\n- Keep record-scoped settings and exit context visible --- e2e/v137-sharing-managed-profiles.spec.ts | 14 ++++++++++ .../settings/managed-integration-status.tsx | 13 ++++++++-- .../managed-record-settings-section.tsx | 6 ++++- src/components/settings/settings-shell.tsx | 26 ++++++++++++++++--- 4 files changed, 53 insertions(+), 6 deletions(-) diff --git a/e2e/v137-sharing-managed-profiles.spec.ts b/e2e/v137-sharing-managed-profiles.spec.ts index 8546db512..5f4eb88c5 100644 --- a/e2e/v137-sharing-managed-profiles.spec.ts +++ b/e2e/v137-sharing-managed-profiles.spec.ts @@ -22,4 +22,18 @@ test.describe("sharing release journey anchors", () => { "manage-mutation-activity-and-fenced-settings", ]); }); + + test("managed profile lifecycle", () => { + const managedJourneyNames = RELEASE_JOURNEYS.filter((journey) => + [ + "managed-profile-creation-delegation-and-revocation", + "manage-mutation-activity-and-fenced-settings", + ].includes(journey.name), + ).map((journey) => journey.name); + + expect(managedJourneyNames).toEqual([ + "managed-profile-creation-delegation-and-revocation", + "manage-mutation-activity-and-fenced-settings", + ]); + }); }); diff --git a/src/components/settings/managed-integration-status.tsx b/src/components/settings/managed-integration-status.tsx index fe94431e5..4606edb09 100644 --- a/src/components/settings/managed-integration-status.tsx +++ b/src/components/settings/managed-integration-status.tsx @@ -80,7 +80,12 @@ export function ManagedIntegrationStatus() { if (statusQuery.isLoading || !statusQuery.data) { return ( - + + + !hydrated || !section.moduleGate || modules?.[section.moduleGate] !== false, ); - const activeSection = visibleSections.find( + + // The server has already resolved which record is active. In a managed + // profile, only guardian settings are a navigation destination; the section + // gate remains responsible for refusing any direct URL that is not here. + // Keep `allVisibleSections` for the active heading so a direct unavailable + // link identifies itself before the gate explains why it cannot open. + const visibleSections = + activeRecord?.recordKind === "managed" + ? allVisibleSections.filter( + (section) => + classifySettingsDestination(section.slug).kind === + "managed-guardian", + ) + : allVisibleSections; + const activeSection = allVisibleSections.find( (section) => section.slug === activeSlug, ); @@ -539,7 +555,11 @@ export function SettingsShell({ // producing visibly more top/bottom whitespace on Settings/Admin // pages than on Dashboard/Insights/Measurements. return ( -
+
{/* v1.18.6.1 — on mobile the heading sits above the chip strip; on desktop it is rendered inside the grid (row 1 / content column) so it does not paint twice. */}