From ba53c94bdc5b25c6f85840ce596d2beee6fdabb3 Mon Sep 17 00:00:00 2001 From: Bryan Frimin Date: Mon, 13 Jul 2026 14:17:22 +0200 Subject: [PATCH] Move trust center profile onto the page Store website, email, and headquarters on the trust center so public and admin surfaces read branding from one place. Drop the trust API organization type and wire console, MCP, CLI, and apps through the updated schema. Signed-off-by: Bryan Frimin --- .../src/components/TopBar/TopBar.tsx | 10 ++--- apps/compliance-portal/src/pages/HomePage.tsx | 8 ++-- .../src/hooks/graph/CompliancePageGraph.ts | 1 + .../CompliancePageProfileSection.tsx | 11 ++++++ .../CompliancePageVisualIdentitySection.tsx | 14 +++---- .../CompliancePageFrameworkList.tsx | 5 ++- .../src/components/OrganizationSidebar.tsx | 2 +- apps/trust/src/hooks/useTrustCenter.ts | 2 +- apps/trust/src/pages/NDAPage.tsx | 6 +-- apps/trust/src/pages/OverviewPage.tsx | 8 ++-- apps/trust/src/pages/SubprocessorsPage.tsx | 2 +- apps/trust/src/pages/auth/ConnectPage.tsx | 10 ++--- apps/trust/src/queries/TrustGraph.ts | 12 ++---- e2e/console/trust_center_profile_test.go | 4 ++ e2e/mcp/trust_center_test.go | 6 ++- .../actions/trustCenter/update.operation.ts | 16 ++++++++ pkg/cmd/trust-center/update/update.go | 8 ++++ .../management/portal_service.go | 9 +++++ pkg/coredata/compliance_framework.go | 5 +-- pkg/coredata/migrations/20260710T144904Z.sql | 24 ++++++++++++ pkg/coredata/migrations/20260710T152544Z.sql | 16 ++++++++ pkg/coredata/trust_center.go | 11 ++++++ pkg/iam/organization_service.go | 1 + .../console/v1/graphql/trust_center.graphql | 2 + .../api/console/v1/trust_center_resolvers.go | 1 + .../api/console/v1/types/trust_center.go | 2 + pkg/server/api/mcp/v1/schema.resolvers.go | 3 ++ pkg/server/api/mcp/v1/specification.yaml | 10 +++++ pkg/server/api/mcp/v1/types/trust_center.go | 1 + pkg/server/api/trust/v1/base_resolvers.go | 20 +--------- .../api/trust/v1/graphql/organization.graphql | 5 --- .../api/trust/v1/graphql/trust_center.graphql | 3 +- .../api/trust/v1/organization_resolvers.go | 38 ------------------- pkg/server/api/trust/v1/types/organization.go | 32 ---------------- pkg/server/api/trust/v1/types/trust_center.go | 1 + pkg/server/server.go | 13 ++----- 36 files changed, 167 insertions(+), 155 deletions(-) create mode 100644 pkg/coredata/migrations/20260710T144904Z.sql create mode 100644 pkg/coredata/migrations/20260710T152544Z.sql delete mode 100644 pkg/server/api/trust/v1/graphql/organization.graphql delete mode 100644 pkg/server/api/trust/v1/organization_resolvers.go delete mode 100644 pkg/server/api/trust/v1/types/organization.go diff --git a/apps/compliance-portal/src/components/TopBar/TopBar.tsx b/apps/compliance-portal/src/components/TopBar/TopBar.tsx index 6eadf5096..967034b5d 100644 --- a/apps/compliance-portal/src/components/TopBar/TopBar.tsx +++ b/apps/compliance-portal/src/components/TopBar/TopBar.tsx @@ -44,9 +44,7 @@ const topBarFragment = graphql` } currentTrustCenter @required(action: THROW) { themedLogoUrl - organization { - name - } + title } } `; @@ -66,7 +64,7 @@ export function TopBar({ queryKey }: TopBarProps) { const { openSignIn } = useSignInDialog(); const { currentTrustCenter } = data; - const organizationName = currentTrustCenter.organization.name; + const title = currentTrustCenter.title; const logoUrl = currentTrustCenter.themedLogoUrl ?? undefined; const slots = topBar(); @@ -81,11 +79,11 @@ export function TopBar({ queryKey }: TopBarProps) { color="neutral" radius="small" src={logoUrl} - fallback={organizationName.charAt(0) || "?"} + fallback={title.charAt(0) || "?"} className={slots.logo()} /> - {organizationName} + {title} {t("topBar.tagline")} diff --git a/apps/compliance-portal/src/pages/HomePage.tsx b/apps/compliance-portal/src/pages/HomePage.tsx index bcbe10a78..08ffa2a5b 100644 --- a/apps/compliance-portal/src/pages/HomePage.tsx +++ b/apps/compliance-portal/src/pages/HomePage.tsx @@ -34,9 +34,7 @@ import type { HomePageQuery } from "./__generated__/HomePageQuery.graphql"; export const homePageQuery = graphql` query HomePageQuery @throwOnFieldError { currentTrustCenter @required(action: THROW) { - organization { - name - } + title ...TrustCenterContactInfo_trustCenter ...ComplianceFrameworksSection_trustCenter ...SecurityCommitmentsSection_trustCenter @@ -54,12 +52,12 @@ export function HomePage({ queryRef }: HomePageProps) { const { t } = useTranslation(); const data = usePreloadedQuery(homePageQuery, queryRef); const { currentTrustCenter } = data; - const { organization } = currentTrustCenter; + const { title } = currentTrustCenter; return ( <> diff --git a/apps/console/src/hooks/graph/CompliancePageGraph.ts b/apps/console/src/hooks/graph/CompliancePageGraph.ts index 71afe1bd1..6305b3bc7 100644 --- a/apps/console/src/hooks/graph/CompliancePageGraph.ts +++ b/apps/console/src/hooks/graph/CompliancePageGraph.ts @@ -32,6 +32,7 @@ const updateCompliancePageMutation = graphql` id active searchEngineIndexing + title description websiteUrl email diff --git a/apps/console/src/pages/organizations/compliance-page/brand/_components/CompliancePageProfileSection.tsx b/apps/console/src/pages/organizations/compliance-page/brand/_components/CompliancePageProfileSection.tsx index 11e72c8e6..74799d152 100644 --- a/apps/console/src/pages/organizations/compliance-page/brand/_components/CompliancePageProfileSection.tsx +++ b/apps/console/src/pages/organizations/compliance-page/brand/_components/CompliancePageProfileSection.tsx @@ -25,6 +25,7 @@ import { useFormWithSchema } from "#/hooks/useFormWithSchema"; const compliancePageFragment = graphql` fragment CompliancePageProfileSection_compliancePageFragment on TrustCenter { id + title description websiteUrl email @@ -34,6 +35,7 @@ const compliancePageFragment = graphql` `; const profileSchema = z.object({ + title: z.string().min(1), description: z.string().optional(), websiteUrl: z.string().optional(), email: z.string().optional(), @@ -56,6 +58,7 @@ export function CompliancePageProfileSection(props: { const { formState, handleSubmit, register } = useFormWithSchema(profileSchema, { defaultValues: { + title: compliancePage.title, description: compliancePage.description || "", websiteUrl: compliancePage.websiteUrl || "", email: compliancePage.email || "", @@ -70,6 +73,7 @@ export function CompliancePageProfileSection(props: { variables: { input: { trustCenterId: compliancePage.id, + title: data.title, description: data.description || null, websiteUrl: data.websiteUrl || null, email: data.email || null, @@ -91,6 +95,13 @@ export function CompliancePageProfileSection(props: { {formState.isSubmitting && } +