From a66e5d0ed679e07b31d0a6e0d8f0d005498d5a4d Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Thu, 9 Oct 2025 18:02:38 +0530 Subject: [PATCH 1/2] fix: open hub org settings --- .../config/sections/OrganizationsSection.tsx | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/gui/src/pages/config/sections/OrganizationsSection.tsx b/gui/src/pages/config/sections/OrganizationsSection.tsx index e43aec7bdef..3ca0c8442e6 100644 --- a/gui/src/pages/config/sections/OrganizationsSection.tsx +++ b/gui/src/pages/config/sections/OrganizationsSection.tsx @@ -1,5 +1,6 @@ import { Cog6ToothIcon } from "@heroicons/react/24/outline"; import { BuildingOfficeIcon, UserIcon } from "@heroicons/react/24/solid"; +import { SerializedOrgWithProfiles } from "core/config/ProfileLifecycleManager"; import { isOnPremSession } from "core/control-plane/AuthTypes"; import { useContext } from "react"; import { Button, Card, Divider } from "../../../components/ui"; @@ -30,14 +31,20 @@ export function OrganizationsSection() { session && organizations.length > 1 && !isOnPremSession(session); function handleAddOrganization() { - ideMessenger.request("controlPlane/openUrl", { + void ideMessenger.request("controlPlane/openUrl", { path: "/organizations/new", }); } - function handleConfigureOrganization(orgId: string) { - ideMessenger.request("controlPlane/openUrl", { - path: `/organizations/${orgId}/settings`, + function handleConfigureOrganization(org: SerializedOrgWithProfiles) { + let path: string; + if (org.id === "personal") { + path = "/settings"; + } else { + path = `/organizations/${org.slug}/settings`; + } + void ideMessenger.request("controlPlane/openUrl", { + path, }); } @@ -82,7 +89,7 @@ export function OrganizationsSection() {