From 7791e5be7fd392783a36a90d4fafe1d838e9def6 Mon Sep 17 00:00:00 2001 From: "kilo-code-bot[bot]" <240665456+kilo-code-bot[bot]@users.noreply.github.com> Date: Thu, 7 May 2026 17:32:05 -0500 Subject: [PATCH] Make GitOps mode indicator link to change management settings for global admins (#44334) ## Summary - Updates the "GitOps mode" indicator in the top navigation bar to become a clickable link that navigates to `/settings/integrations/change-management` when the current user is a global admin. - For non-global-admin users, the indicator remains as a non-clickable text badge (unchanged behavior). ## Changes - **`frontend/components/top_nav/SiteTopNav/SiteTopNav.tsx`**: Added `isGlobalAdmin` prop to `GitOpsModeIndicator` component. When true, wraps the indicator content in a `` to `PATHS.ADMIN_INTEGRATIONS_CHANGE_MANAGEMENT`. Otherwise, renders the content as-is. - **`frontend/components/top_nav/SiteTopNav/_styles.scss`**: Added `.gitops-mode-indicator__link` styles to ensure the link has no default link styling (no underline, inherited color) and shows a pointer cursor. Built for [Rachael Shaw](https://fleetdm.slack.com/archives/D0AFC5BRFHD/p1777410934139609?thread_ts=1777406096.224979&cid=D0AFC5BRFHD) by [Kilo for Slack](https://kilo.ai/features/slack-integration) Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com> --- .../top_nav/SiteTopNav/SiteTopNav.tsx | 31 +++++++++++++++---- .../top_nav/SiteTopNav/_styles.scss | 10 ++++++ 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/frontend/components/top_nav/SiteTopNav/SiteTopNav.tsx b/frontend/components/top_nav/SiteTopNav/SiteTopNav.tsx index f31329bf8f..2f6e83949e 100644 --- a/frontend/components/top_nav/SiteTopNav/SiteTopNav.tsx +++ b/frontend/components/top_nav/SiteTopNav/SiteTopNav.tsx @@ -8,6 +8,7 @@ import { isDarkMode } from "utilities/theme"; import { AppContext } from "context/app"; +import PATHS from "router/paths"; import { IConfig } from "interfaces/config"; import { API_ALL_TEAMS_ID, APP_CONTEXT_ALL_TEAMS_ID } from "interfaces/team"; import { IUser } from "interfaces/user"; @@ -77,7 +78,11 @@ const isGlobalPage = (path: string) => { return Object.values(REGEX_GLOBAL_PAGES).some((re) => path.match(re)); }; -const GitOpsModeIndicator = () => { +const GitOpsModeIndicator = ({ + isGlobalAdmin, +}: { + isGlobalAdmin?: boolean; +}) => { const baseClass = "gitops-mode-indicator"; const tipContent = ( <> @@ -91,6 +96,12 @@ const GitOpsModeIndicator = () => { /> > ); + const content = ( +