From e6320b178ac7072f2bfcdcf90757b1aa859e51db Mon Sep 17 00:00:00 2001 From: Alejandro Bailo <59607668+alejandrobailo@users.noreply.github.com> Date: Mon, 28 Sep 2026 15:58:32 +0200 Subject: [PATCH] fix(ui): bundle all icons so the UI renders without internet access (#12892) --- .../developer-guide/environment-variables.mdx | 2 + .../accept/accept-invitation-client.tsx | 29 ++-- ui/app/(prowler)/alerts/page.tsx | 3 +- ui/app/(prowler)/attack-paths/layout.tsx | 4 +- ui/app/(prowler)/compliance/page.tsx | 8 +- ui/app/(prowler)/error.tsx | 19 ++- ui/app/(prowler)/findings/loading.tsx | 4 +- ui/app/(prowler)/findings/page.tsx | 3 +- ui/app/(prowler)/integrations/page.tsx | 4 +- .../invitations/(send-invite)/layout.tsx | 3 +- ui/app/(prowler)/invitations/page.tsx | 3 +- .../_components/config/provider-icon.tsx | 21 ++- ui/app/(prowler)/lighthouse/page.tsx | 4 +- .../settings/(connect-llm)/layout.tsx | 8 +- ui/app/(prowler)/manage-groups/layout.tsx | 3 +- ui/app/(prowler)/mutelist/page.tsx | 3 +- ui/app/(prowler)/page.tsx | 3 +- ui/app/(prowler)/profile/page.tsx | 3 +- ui/app/(prowler)/providers/page.tsx | 3 +- ui/app/(prowler)/registry/page.tsx | 10 +- ui/app/(prowler)/resources/page.tsx | 3 +- ui/app/(prowler)/roles/(add-role)/layout.tsx | 7 +- ui/app/(prowler)/roles/page.tsx | 3 +- ui/app/(prowler)/scans/config/page.tsx | 3 +- ui/app/(prowler)/scans/page.tsx | 3 +- ui/app/(prowler)/services/page.tsx | 7 +- ui/app/(prowler)/users/page.tsx | 3 +- ui/app/(prowler)/workloads/page.tsx | 4 +- ui/changelog.d/bundled-icons-offline.fixed.md | 1 + ui/components/auth/oss/sign-in-form.tsx | 7 +- .../auth/oss/social-buttons.test.tsx | 26 ++-- ui/components/auth/oss/social-buttons.tsx | 34 ++--- .../compliance/compliance-warming.tsx | 8 +- ui/components/icons/Icons.tsx | 104 ++++++++++++++ .../layout/nav-bar/navbar-client.tsx | 4 +- ui/components/layout/nav-bar/navbar.tsx | 4 +- .../lighthouse-v1/lighthouse-settings.tsx | 6 +- .../lighthouse-v1/llm-provider-registry.ts | 10 +- .../lighthouse-v1/llm-providers-table.tsx | 6 +- ui/components/lighthouse-v1/select-model.tsx | 19 +-- .../forms/fields/wizard-input-field.tsx | 25 ++-- .../workflow/forms/test-connection-form.tsx | 6 +- .../registry/registry-access-dialog.tsx | 12 +- .../registry/registry-credential-banner.tsx | 24 ++-- .../registry-explorer.integration.test.tsx | 27 +++- ui/components/registry/registry-explorer.tsx | 7 +- .../shadcn/action-card/ActionCard.tsx | 11 +- .../breadcrumb-navigation.test.tsx | 36 +++-- .../breadcrumbs/breadcrumb-navigation.tsx | 129 +++++++++--------- .../shadcn/content-layout/content-layout.tsx | 4 +- ui/components/shadcn/custom/custom-input.tsx | 23 ++-- .../shadcn/headers/navigation-header.tsx | 8 +- ui/dependency-log.json | 8 -- ui/eslint.config.ts | 15 ++ ui/lib/csp.ts | 2 +- ui/lib/registry/presentation.test.ts | 49 ++++++- ui/lib/registry/presentation.ts | 12 +- ui/next.config.test.ts | 3 - ui/package.json | 1 - ui/playwright.registry.config.ts | 2 +- ui/pnpm-lock.yaml | 13 -- ui/proxy.ts | 7 +- ui/tests/registry/validation.md | 12 +- ui/types/env.d.ts | 3 + ui/vitest.config.ts | 1 - 65 files changed, 524 insertions(+), 318 deletions(-) create mode 100644 ui/changelog.d/bundled-icons-offline.fixed.md diff --git a/docs/developer-guide/environment-variables.mdx b/docs/developer-guide/environment-variables.mdx index d798faa6c7..863f49cd7f 100644 --- a/docs/developer-guide/environment-variables.mdx +++ b/docs/developer-guide/environment-variables.mdx @@ -47,6 +47,8 @@ The former build-time variables map to the new runtime variables as follows: Roll out Registry only after the Registry backend dependency is deployed, intended roles have `manage_registry`, and acceptance with real credentials has exercised installation, provider account creation, credentials, connection, and scan launch. Deploy the UI with `UI_REGISTRY_ENABLED` unset or `"false"`; set it to `"true"` only in the prepared process environment, then restart or otherwise apply the environment update required by the platform. A Registry key must belong to the configured Registry environment; a production key does not authenticate against a development Registry. +The Registry links read `PROWLER_REGISTRY_INDEX_URL`, the same base URL the backend installs artifacts from. The Registry page and the credential banner link to it, and its origin is allowed for images. `UI_REGISTRY_MEDIA_URL` adds the Registry media service origin so artifact logos load. When `PROWLER_REGISTRY_INDEX_URL` is unset or invalid, the links are hidden instead of pointing to the public Prowler Registry, which keeps private and air-gapped deployments from sending users to an unreachable host. `UI_REGISTRY_URL` is no longer read. + The catalog displays all artifacts, including built-ins and packages containing only checks or compliance frameworks. Only external provider artifacts support Add. After confirmed installation, open Providers and select the option labeled Registry to configure an account. Creating accounts and running scans also require the corresponding provider and scan permissions. Removing an artifact keeps existing provider accounts, but future connections or scans can fail until the artifact is installed again. To roll back, set `UI_REGISTRY_ENABLED=false` or remove it and apply the environment update. Proxy, page, and action checks deny on their next request. Navigation refreshes from server-authorized access when the page is requested again. Rollback does not delete Registry credentials, tenant artifact records, or provider accounts. diff --git a/ui/app/(auth)/invitation/accept/accept-invitation-client.tsx b/ui/app/(auth)/invitation/accept/accept-invitation-client.tsx index c412eaf48c..df68239136 100644 --- a/ui/app/(auth)/invitation/accept/accept-invitation-client.tsx +++ b/ui/app/(auth)/invitation/accept/accept-invitation-client.tsx @@ -1,6 +1,6 @@ "use client"; -import { Icon } from "@iconify/react"; +import { Mail, TriangleAlert } from "lucide-react"; import Link from "next/link"; import { useRouter } from "next/navigation"; import { useEffect, useRef, useState } from "react"; @@ -12,6 +12,7 @@ import { } from "@/app/(auth)/invitation/_lib/invitation-errors"; import { AuthBrand } from "@/components/auth/oss/auth-brand"; import { Button } from "@/components/shadcn"; +import { Spinner } from "@/components/shadcn/spinner/spinner"; type AcceptState = | { kind: "no-token" } @@ -74,10 +75,9 @@ export function AcceptInvitationClient({ {/* No token */} {state.kind === "no-token" && (
-