Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
improvement(secret-syncs): modernize forms and harden destination selection (#7902)
Andrew Huang06ea0ab6fed1
diff --git a/.github/workflows/check-fe-ts-and-lint.yml b/.github/workflows/check-fe-ts-and-lint.ymlindex f568772c13..db6c273db9 100644--- a/.github/workflows/check-fe-ts-and-lint.yml+++ b/.github/workflows/check-fe-ts-and-lint.yml@@ -44,6 +44,9 @@ jobs:- name: 🏗️ Run Type checkrun: npm run type:checkworking-directory: frontend+ - name: 🧪 Run unit tests+ run: npm test+ working-directory: frontendlint:name: Lintdiff --git a/backend/src/services/app-connection/checkly/checkly-connection-public-client.test.ts b/backend/src/services/app-connection/checkly/checkly-connection-public-client.test.tsnew file mode 100644index 0000000000..37ebf40109--- /dev/null+++ b/backend/src/services/app-connection/checkly/checkly-connection-public-client.test.ts@@ -0,0 +1,46 @@+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";++import { RateLimitError } from "@app/lib/errors";++import { ChecklyPublicAPI } from "./checkly-connection-public-client";+import { TChecklyConnectionConfig } from "./checkly-connection-types";++vi.mock("@app/lib/config/env", () => ({ getConfig: () => ({}) }));++const { requestMock } = vi.hoisted(() => ({ requestMock: vi.fn() }));+vi.mock("@app/lib/config/request", () => ({ createRequestClient: () => ({ request: requestMock }) }));++// Exercise a public write method: a 429 body must never be returned as a successful write.+describe("Checkly retry exhaustion", () => {+ const connection = { method: "api-key", credentials: { apiKey: "test-token" } } as TChecklyConnectionConfig;+ const write = () =>+ ChecklyPublicAPI.createVariable(connection, "account", { key: "KEY", value: "value", locked: true, secret: true });+ beforeEach(() => {+ vi.useFakeTimers();+ requestMock.mockReset();+ });+ afterEach(() => vi.useRealTimers());+ it("rejects a write after three retries instead of returning the 429 payload", async () => {+ requestMock.mockResolvedValue({ status: 429, headers: {}, data: { error: "rate limited" } });+ const assertion = expect(write()).rejects.toBeInstanceOf(RateLimitError);+ await vi.runAllTimersAsync();+ await assertion;+ expect(requestMock).toHaveBeenCalledTimes(4);+ });+ it("returns the successful write response when a retry recovers", async () => {+ const data = { key: "KEY" };+ requestMock+ .mockResolvedValueOnce({ status: 429, headers: {}, data: {} })+ .mockResolvedValue({ status: 200, headers: {}, data });+ const result = write();+ await vi.runAllTimersAsync();+ await expect(result).resolves.toEqual(data);+ expect(requestMock).toHaveBeenCalledTimes(2);+ });+ it("preserves non-rate-limit request failures", async () => {+ const error = new Error("connection reset");+ requestMock.mockRejectedValue(error);+ await expect(write()).rejects.toBe(error);+ expect(requestMock).toHaveBeenCalledTimes(1);+ });+});diff --git a/backend/src/services/app-connection/checkly/checkly-connection-public-client.ts b/backend/src/services/app-connection/checkly/checkly-connection-public-client.tsindex 35279d007f..e0002db988 100644--- a/backend/src/services/app-connection/checkly/checkly-connection-public-client.ts+++ b/backend/src/services/app-connection/checkly/checkly-connection-public-client.ts@@ -3,6 +3,7 @@import { AxiosInstance, AxiosRequestConfig, AxiosResponse, HttpStatusCode, isAxiosError } from "axios";import { createRequestClient } from "@app/lib/config/request";+import { RateLimitError } from "@app/lib/errors";import { IntegrationUrls } from "@app/services/integration-auth/integration-list";import { SecretSyncError } from "@app/services/secret-sync/secret-sync-errors";@@ -67,7 +68,12 @@ class ChecklyPublicClient {});const limiter = getChecklyRatelimiter(response);- if (limiter.isRatelimited && retryAttempt <= limiter.maxAttempts) {+ if (limiter.isRatelimited) {+ if (retryAttempt >= limiter.maxAttempts) {+ throw new RateLimitError({+ message: "Checkly rate limit reached. Wait a moment and try again."+ });+ }await limiter.wait();return this.send(connection, config, retryAttempt + 1);}diff --git a/backend/src/services/app-connection/gitlab/gitlab-connection-fns.test.ts b/backend/src/services/app-connection/gitlab/gitlab-connection-fns.test.tsnew file mode 100644index 0000000000..324c507ca6--- /dev/null+++ b/backend/src/services/app-connection/gitlab/gitlab-connection-fns.test.ts@@ -0,0 +1,100 @@+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";++import { RateLimitError } from "@app/lib/errors";+import { OrgServiceActor } from "@app/lib/types";++import { GitLabAccessTokenType, GitLabConnectionMethod } from "./gitlab-connection-enums";+import { gitlabConnectionService } from "./gitlab-connection-service";+import { TGitLabConnection } from "./gitlab-connection-types";++vi.mock("@app/lib/validator", () => ({ blockLocalAndPrivateIpAddresses: vi.fn() }));+vi.mock("@app/lib/config/env", () => ({ getConfig: () => ({}) }));+vi.mock("@app/lib/config/request", () => ({ request: {} }));+vi.mock("@app/lib/fn", () => ({ removeTrailingSlash: (url: string) => url.replace(/\/$/, "") }));+vi.mock("@app/lib/logger", () => ({ logger: { error: vi.fn() } }));+vi.mock("@app/services/app-connection/app-connection-fns", () => ({+ encryptAppConnectionCredentials: vi.fn()+}));++describe("GitLab list retry handling", () => {+ const connection = {+ method: GitLabConnectionMethod.AccessToken,+ credentials: {+ accessToken: "test-token",+ accessTokenType: GitLabAccessTokenType.Personal,+ instanceUrl: "https://gitlab.example.com"+ }+ } as TGitLabConnection;+ const fetchMock = vi.fn<typeof fetch>();+ const service = gitlabConnectionService(+ vi.fn().mockResolvedValue(connection),+ { updateById: vi.fn() },+ { createCipherPairWithDataKey: vi.fn() }+ );++ beforeEach(() => {+ vi.useFakeTimers();+ fetchMock.mockReset();+ vi.stubGlobal("fetch", fetchMock);+ });++ afterEach(() => {+ vi.useRealTimers();+ vi.unstubAllGlobals();+ });++ describe.each([+ ["groups", service.listGroups],+ ["projects", service.listProjects]+ ] as const)("%s", (resource, list) => {+ it("propagates persistent HTTP 429s through the SDK and service as a rate-limit error", async () => {+ fetchMock.mockImplementation(async () => new Response(null, { status: 429 }));++ const result = list("connection-id", {} as OrgServiceActor);+ const assertion = expect(result).rejects.toMatchObject({+ name: new RateLimitError({}).name,+ message: `GitLab rate limit reached while loading ${resource}. Wait a moment and try again.`+ });+ await vi.runAllTimersAsync();+ await assertion;+ expect(fetchMock).toHaveBeenCalledTimes(10);+ });++ it("does not classify exhausted HTTP 502 retries as rate limiting", async () => {+ fetchMock.mockImplementation(async () => new Response(null, { status: 502 }));++ const result = list("connection-id", {} as OrgServiceActor);+ await vi.runAllTimersAsync();+ await expect(result).resolves.toEqual([]);+ expect(fetchMock).toHaveBeenCalledTimes(10);+ });++ it("returns results when a retry recovers", async () => {+ const response =+ resource === "groups"+ ? { id: 1, name: "Example", full_name: "Example", full_path: "example" }+ : { id: 1, path_with_namespace: "example/project" };+ fetchMock+ .mockImplementationOnce(async () => new Response(null, { status: 429 }))+ .mockImplementation(async () => Response.json([response]));++ const result = list("connection-id", {} as OrgServiceActor);+ await vi.runAllTimersAsync();+ await expect(result).resolves.toEqual([+ resource === "groups"+ ? { id: "1", name: "Example", fullName: "Example", fullPath: "example" }+ : { id: "1", name: "example/project" }+ ]);+ expect(fetchMock).toHaveBeenCalledTimes(2);+ });++ it("preserves genuinely empty lists", async () => {+ fetchMock.mockImplementation(async () => Response.json([]));++ const result = list("connection-id", {} as OrgServiceActor);+ await vi.runAllTimersAsync();+ await expect(result).resolves.toEqual([]);+ expect(fetchMock).toHaveBeenCalledTimes(1);+ });+ });+});diff --git a/backend/src/services/app-connection/gitlab/gitlab-connection-fns.ts b/backend/src/services/app-connection/gitlab/gitlab-connection-fns.tsindex c8651ed657..1e96ff4ba9 100644--- a/backend/src/services/app-connection/gitlab/gitlab-connection-fns.ts+++ b/backend/src/services/app-connection/gitlab/gitlab-connection-fns.ts@@ -1,10 +1,10 @@/* eslint-disable no-await-in-loop */-import { GitbeakerRequestError, Gitlab } from "@gitbeaker/rest";-import { AxiosError } from "axios";+import { GitbeakerRequestError, GitbeakerRetryError, Gitlab } from "@gitbeaker/rest";+import { AxiosError, HttpStatusCode } from "axios";import { getConfig } from "@app/lib/config/env";import { request } from "@app/lib/config/request";-import { BadRequestError, InternalServerError } from "@app/lib/errors";+import { BadRequestError, InternalServerError, RateLimitError } from "@app/lib/errors";import { removeTrailingSlash } from "@app/lib/fn";import { logger } from "@app/lib/logger";import { blockLocalAndPrivateIpAddresses } from "@app/lib/validator";@@ -314,6 +314,33 @@ export const getGitLabConnectionClient = async (return client;};+const throwGitLabListError = (error: unknown, resource: "groups" | "projects"): never => {+ // Gitbeaker retries 429 responses and exposes the final status only in the retry error's message.+ const isRateLimited =+ (error instanceof GitbeakerRequestError && error.cause?.response.status === HttpStatusCode.TooManyRequests) ||+ (error instanceof GitbeakerRetryError && /last status code: 429\b/.test(error.message));++ if (isRateLimited) {+ throw new RateLimitError({+ message: `GitLab rate limit reached while loading ${resource}. Wait a moment and try again.`+ });+ }++ if (error instanceof GitbeakerRequestError) {+ throw new BadRequestError({+ message: `Failed to fetch GitLab ${resource}: ${error.message ?? "Unknown error"}${error.cause?.description && error.message !== "Unauthorized" ? `. Cause: ${error.cause.description}` : ""}`+ });+ }++ if (error instanceof InternalServerError) {+ throw error;+ }++ throw new InternalServerError({+ message: `Unable to fetch GitLab ${resource}`+ });+};+export const listGitLabProjects = async ({appConnection,appConnectionDAL,@@ -369,19 +396,7 @@ export const listGitLabProjects = async ({id: project.id.toString()}));} catch (error: unknown) {- if (error instanceof GitbeakerRequestError) {- throw new BadRequestError({- message: `Failed to fetch GitLab projects: ${error.message ?? "Unknown error"}${error.cause?.description && error.message !== "Unauthorized" ? `. Cause: ${error.cause.description}` : ""}`- });- }-- if (error instanceof InternalServerError) {- throw error;- }-- throw new InternalServerError({- message: "Unable to fetch GitLab projects"- });+ return throwGitLabListError(error, "projects");}};@@ -419,18 +434,6 @@ export const listGitLabGroups = async ({fullPath: group.fullPath}));} catch (error: unknown) {- if (error instanceof GitbeakerRequestError) {- throw new BadRequestError({- message: `Failed to fetch GitLab groups: ${error.message ?? "Unknown error"}${error.cause?.description && error.message !== "Unauthorized" ? `. Cause: ${error.cause.description}` : ""}`- });- }-- if (error instanceof InternalServerError) {- throw error;- }-- throw new InternalServerError({- message: "Unable to fetch GitLab groups"- });+ return throwGitLabListError(error, "groups");}};diff --git a/backend/src/services/app-connection/gitlab/gitlab-connection-service.ts b/backend/src/services/app-connection/gitlab/gitlab-connection-service.tsindex 2cc8ae3c58..d53074ae26 100644--- a/backend/src/services/app-connection/gitlab/gitlab-connection-service.ts+++ b/backend/src/services/app-connection/gitlab/gitlab-connection-service.ts@@ -1,3 +1,4 @@+import { RateLimitError } from "@app/lib/errors";import { logger } from "@app/lib/logger";import { OrgServiceActor } from "@app/lib/types";import { TKmsServiceFactory } from "@app/services/kms/kms-service";@@ -31,6 +32,7 @@ export const gitlabConnectionService = (return projects;} catch (error) {logger.error(error, `Failed to establish connection with GitLab for app ${connectionId}`);+ if (error instanceof RateLimitError) throw error;return [];}};@@ -48,6 +50,7 @@ export const gitlabConnectionService = (return groups;} catch (error) {logger.error(error, `Failed to establish connection with GitLab for app ${connectionId}`);+ if (error instanceof RateLimitError) throw error;return [];}};diff --git a/backend/src/services/app-connection/netlify/netlify-connection-public-client.test.ts b/backend/src/services/app-connection/netlify/netlify-connection-public-client.test.tsnew file mode 100644index 0000000000..8553871c4a--- /dev/null+++ b/backend/src/services/app-connection/netlify/netlify-connection-public-client.test.ts@@ -0,0 +1,51 @@+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";++import { RateLimitError } from "@app/lib/errors";++import { NetlifyPublicAPI } from "./netlify-connection-public-client";+import { TNetlifyConnectionConfig } from "./netlify-connection-types";++vi.mock("@app/lib/config/env", () => ({ getConfig: () => ({}) }));++const { requestMock } = vi.hoisted(() => ({ requestMock: vi.fn() }));+vi.mock("@app/lib/config/request", () => ({ createRequestClient: () => ({ request: requestMock }) }));+vi.mock("@app/services/secret-sync/netlify", () => ({ NetlifySyncContext: {} }));++// Exercise a public write method: a 429 body must never be returned as a successful write.+describe("Netlify retry exhaustion", () => {+ const connection = { method: "access-token", credentials: { accessToken: "test-token" } } as TNetlifyConnectionConfig;+ const write = () =>+ NetlifyPublicAPI.createVariable(+ connection,+ { account_id: "account" },+ { key: "KEY", values: [{ value: "value" }] }+ );+ beforeEach(() => {+ vi.useFakeTimers();+ requestMock.mockReset();+ });+ afterEach(() => vi.useRealTimers());+ it("rejects a write after three retries instead of returning the 429 payload", async () => {+ requestMock.mockResolvedValue({ status: 429, headers: {}, data: { error: "rate limited" } });+ const assertion = expect(write()).rejects.toBeInstanceOf(RateLimitError);+ await vi.runAllTimersAsync();+ await assertion;+ expect(requestMock).toHaveBeenCalledTimes(4);+ });+ it("returns the successful write response when a retry recovers", async () => {+ const data = { key: "KEY" };+ requestMock+ .mockResolvedValueOnce({ status: 429, headers: {}, data: {} })+ .mockResolvedValue({ status: 200, headers: {}, data });+ const result = write();+ await vi.runAllTimersAsync();+ await expect(result).resolves.toEqual(data);+ expect(requestMock).toHaveBeenCalledTimes(2);+ });+ it("preserves non-rate-limit request failures", async () => {+ const error = new Error("connection reset");+ requestMock.mockRejectedValue(error);+ await expect(write()).rejects.toBe(error);+ expect(requestMock).toHaveBeenCalledTimes(1);+ });+});diff --git a/backend/src/services/app-connection/netlify/netlify-connection-public-client.ts b/backend/src/services/app-connection/netlify/netlify-connection-public-client.tsindex ca4144f8b8..a22948df95 100644--- a/backend/src/services/app-connection/netlify/netlify-connection-public-client.ts+++ b/backend/src/services/app-connection/netlify/netlify-connection-public-client.ts@@ -4,6 +4,7 @@import { AxiosInstance, AxiosRequestConfig, AxiosResponse, HttpStatusCode, isAxiosError } from "axios";import { createRequestClient } from "@app/lib/config/request";+import { RateLimitError } from "@app/lib/errors";import { IntegrationUrls } from "@app/services/integration-auth/integration-list";import { NetlifySyncContext } from "@app/services/secret-sync/netlify";@@ -84,7 +85,12 @@ class NetlifyPublicClient {});const limiter = getNetlifyRatelimiter(response);- if (limiter.isRatelimited && retryAttempt <= limiter.maxAttempts) {+ if (limiter.isRatelimited) {+ if (retryAttempt >= limiter.maxAttempts) {+ throw new RateLimitError({+ message: "Netlify rate limit reached. Wait a moment and try again."+ });+ }await limiter.wait();return this.send(connection, config, retryAttempt + 1);}diff --git a/backend/src/services/secret-sync/secret-sync-duplicate-check.test.ts b/backend/src/services/secret-sync/secret-sync-duplicate-check.test.tsnew file mode 100644index 0000000000..a87650b117--- /dev/null+++ b/backend/src/services/secret-sync/secret-sync-duplicate-check.test.ts@@ -0,0 +1,65 @@+import { areSecretSyncDestinationConfigsEqual } from "./secret-sync-duplicate-check";+import { SecretSync } from "./secret-sync-enums";++describe("secret sync destination comparison", () => {+ test.each([+ [SecretSync.Bitbucket, "environmentId", { workspaceSlug: "workspace", repositorySlug: "repository" }],+ [SecretSync.TeamCity, "buildConfig", { project: "project" }],+ [+ SecretSync.Qovery,+ "environmentId",+ { organizationId: "organization", projectId: "project", variableType: "secret" }+ ]+ ] as const)("matches cleared and omitted %s scopes in both directions", (destination, field, config) => {+ for (const value of ["", null, undefined]) {+ const cleared = { ...config, [field]: value };+ expect(areSecretSyncDestinationConfigsEqual(destination, cleared, config, [])).toBe(true);+ expect(areSecretSyncDestinationConfigsEqual(destination, config, cleared, [])).toBe(true);+ expect(areSecretSyncDestinationConfigsEqual(destination, { ...config, [field]: "selected" }, config, [])).toBe(+ false+ );+ expect(cleared).toHaveProperty(field, value);+ }+ });++ test("preserves distinct selected scopes and unrelated destination fields", () => {+ expect(+ areSecretSyncDestinationConfigsEqual(+ SecretSync.TeamCity,+ { project: "project", buildConfig: "build-a" },+ { project: "project", buildConfig: "build-b" },+ []+ )+ ).toBe(false);+ expect(+ areSecretSyncDestinationConfigsEqual(+ SecretSync.Bitbucket,+ { workspaceSlug: "a", repositorySlug: "repo", environmentId: "" },+ { workspaceSlug: "b", repositorySlug: "repo" },+ []+ )+ ).toBe(false);+ });++ test("still ignores display-only fields", () => {+ expect(+ areSecretSyncDestinationConfigsEqual(+ SecretSync.Qovery,+ { projectId: "project", environmentId: "", environmentName: "Old label" },+ { projectId: "project" },+ ["environmentName"]+ )+ ).toBe(true);+ });++ test("does not strip empty values in other providers", () => {+ expect(+ areSecretSyncDestinationConfigsEqual(+ SecretSync.Vercel,+ { scope: "project", teamId: "", sensitive: false, targetProjects: [] },+ { scope: "project", sensitive: false, targetProjects: [] },+ []+ )+ ).toBe(false);+ });+});diff --git a/backend/src/services/secret-sync/secret-sync-duplicate-check.ts b/backend/src/services/secret-sync/secret-sync-duplicate-check.tsnew file mode 100644index 0000000000..4545ead597--- /dev/null+++ b/backend/src/services/secret-sync/secret-sync-duplicate-check.ts@@ -0,0 +1,33 @@+import { deepEqualSkipFields } from "@app/lib/fn/object";++import { SecretSync } from "./secret-sync-enums";++// These optional scopes use the same provider destination when empty or omitted.+const OPTIONAL_SCOPE_FIELDS: Partial<Record<SecretSync, string>> = {+ [SecretSync.Bitbucket]: "environmentId",+ [SecretSync.TeamCity]: "buildConfig",+ [SecretSync.Qovery]: "environmentId"+};++const normalizeOptionalScope = (destination: SecretSync, config: unknown) => {+ const field = OPTIONAL_SCOPE_FIELDS[destination];+ if (!field || !config || typeof config !== "object" || Array.isArray(config)) return config;++ return Object.fromEntries(+ Object.entries(config).filter(+ ([key, value]) => key !== field || (value !== "" && value !== null && value !== undefined)+ )+ );+};++export const areSecretSyncDestinationConfigsEqual = (+ destination: SecretSync,+ existingConfig: unknown,+ newConfig: unknown,+ skipFields: string[]+) =>+ deepEqualSkipFields(+ normalizeOptionalScope(destination, existingConfig),+ normalizeOptionalScope(destination, newConfig),+ skipFields+ );diff --git a/backend/src/services/secret-sync/secret-sync-service.ts b/backend/src/services/secret-sync/secret-sync-service.tsindex 5f0dda96b4..355eb18476 100644--- a/backend/src/services/secret-sync/secret-sync-service.ts+++ b/backend/src/services/secret-sync/secret-sync-service.ts@@ -12,7 +12,6 @@ import {import { KeyStorePrefixes, TKeyStoreFactory } from "@app/keystore/keystore";import { DatabaseErrorCode } from "@app/lib/error-codes";import { BadRequestError, DatabaseError, NotFoundError } from "@app/lib/errors";-import { deepEqualSkipFields } from "@app/lib/fn/object";import { logger } from "@app/lib/logger";import { requestMemoKeys } from "@app/lib/request-context/memo-keys";import { requestMemoize } from "@app/lib/request-context/request-memoizer";@@ -51,6 +50,7 @@ import { TKmsServiceFactory } from "../kms/kms-service";import { TSecretImportDALFactory } from "../secret-import/secret-import-dal";import { TSecretV2BridgeDALFactory } from "../secret-v2-bridge/secret-v2-bridge-dal";import { TSecretSyncDALFactory } from "./secret-sync-dal";+import { areSecretSyncDestinationConfigsEqual } from "./secret-sync-duplicate-check";import {DESTINATION_DUPLICATE_CHECK_MAP,SECRET_SYNC_CONNECTION_MAP,@@ -311,7 +311,7 @@ export const secretSyncServiceFactory = ({const candidates = existingSyncs.filter((sync) => {if (sync.id === excludeSyncId) return false;- return deepEqualSkipFields(sync.destinationConfig, destinationConfig, skipFields);+ return areSecretSyncDestinationConfigsEqual(destination, sync.destinationConfig, destinationConfig, skipFields);});const duplicateCheckResults = await Promise.all(diff --git a/backend/src/services/secret-sync/vercel/vercel-sync-fns.test.ts b/backend/src/services/secret-sync/vercel/vercel-sync-fns.test.tsnew file mode 100644index 0000000000..8915d31baf--- /dev/null+++ b/backend/src/services/secret-sync/vercel/vercel-sync-fns.test.ts@@ -0,0 +1,55 @@+import { AxiosError, AxiosHeaders } from "axios";+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";++import { VercelEnvironmentType, VercelSyncScope } from "./vercel-sync-enums";+import { VercelSyncFns } from "./vercel-sync-fns";+import { TVercelSyncWithCredentials } from "./vercel-sync-types";++vi.mock("@app/lib/config/env", () => ({ getConfig: () => ({}) }));++const { get } = vi.hoisted(() => ({ get: vi.fn() }));+vi.mock("@app/lib/config/request", () => ({ request: { get } }));+vi.mock("@app/services/secret-sync/secret-sync-fns", () => ({ matchesSchema: vi.fn() }));++describe("Vercel retry error handling", () => {+ const sync = {+ destinationConfig: { scope: VercelSyncScope.Project, app: "project", env: VercelEnvironmentType.Production },+ connection: { credentials: { apiToken: "test-token" } }+ } as TVercelSyncWithCredentials;+ beforeEach(() => {+ get.mockReset();+ vi.useFakeTimers();+ });+ afterEach(() => vi.useRealTimers());+ it.each([new AxiosError("connection reset", "ECONNRESET"), new Error("unexpected failure")])(+ "preserves errors without an HTTP response: %s",+ async (error) => {+ get.mockRejectedValue(error);+ await expect(VercelSyncFns.getSecrets(sync)).rejects.toBe(error);+ expect(get).toHaveBeenCalledTimes(1);+ }+ );+ const rateLimitError = () =>+ new AxiosError("rate limited", "ERR_BAD_REQUEST", undefined, undefined, {+ status: 429,+ statusText: "Too Many Requests",+ headers: {},+ config: { headers: new AxiosHeaders() },+ data: {}+ });+ it("still retries HTTP 429s and returns recovered results", async () => {+ get.mockRejectedValueOnce(rateLimitError()).mockResolvedValue({ data: { envs: [] } });+ const result = VercelSyncFns.getSecrets(sync);+ await vi.runAllTimersAsync();+ await expect(result).resolves.toEqual({});+ expect(get).toHaveBeenCalledTimes(2);+ });+ it("preserves the HTTP error when retries are exhausted", async () => {+ const error = rateLimitError();+ get.mockRejectedValue(error);+ const assertion = expect(VercelSyncFns.getSecrets(sync)).rejects.toBe(error);+ await vi.runAllTimersAsync();+ await assertion;+ expect(get).toHaveBeenCalledTimes(6);+ });+});diff --git a/backend/src/services/secret-sync/vercel/vercel-sync-fns.ts b/backend/src/services/secret-sync/vercel/vercel-sync-fns.tsindex 03c9f9b697..7a8a7bc372 100644--- a/backend/src/services/secret-sync/vercel/vercel-sync-fns.ts+++ b/backend/src/services/secret-sync/vercel/vercel-sync-fns.ts@@ -1,4 +1,6 @@/* eslint-disable @typescript-eslint/no-unsafe-assignment */+import { isAxiosError } from "axios";+import { request } from "@app/lib/config/request";import { IntegrationUrls } from "@app/services/integration-auth/integration-list";import { SecretSyncError } from "@app/services/secret-sync/secret-sync-errors";@@ -59,7 +61,7 @@ const getVercelSecretsWithRetries = async ();return data.envs;} catch (error) {- if ((error as { response: { status: number } }).response.status === 429 && attempt < MAX_RETRIES) {+ if (isAxiosError(error) && error.response?.status === 429 && attempt < MAX_RETRIES) {await sleep();return await getVercelSecretsWithRetries(secretSync, attempt + 1);}@@ -105,7 +107,7 @@ const getDecryptedVercelSecret = async (return decryptedSecret as VercelApiSecret;} catch (error) {- if ((error as { response: { status: number } }).response.status === 429 && attempt < MAX_RETRIES) {+ if (isAxiosError(error) && error.response?.status === 429 && attempt < MAX_RETRIES) {await sleep();return await getDecryptedVercelSecret(secretSync, secret, attempt + 1);}@@ -191,7 +193,7 @@ const deleteSecret = async (});} catch (error) {- if ((error as { response: { status: number } }).response.status === 429 && attempt < MAX_RETRIES) {+ if (isAxiosError(error) && error.response?.status === 429 && attempt < MAX_RETRIES) {await sleep();return await deleteSecret(secretSync, vercelSecret, attempt + 1);}@@ -243,7 +245,7 @@ const createSecret = async (});} catch (error) {- if ((error as { response: { status: number } }).response.status === 429 && attempt < MAX_RETRIES) {+ if (isAxiosError(error) && error.response?.status === 429 && attempt < MAX_RETRIES) {await sleep();return await createSecret(secretSync, secretMap, key, attempt + 1);}@@ -307,7 +309,7 @@ const updateSecret = async (});} catch (error) {- if ((error as { response: { status: number } }).response.status === 429 && attempt < MAX_RETRIES) {+ if (isAxiosError(error) && error.response?.status === 429 && attempt < MAX_RETRIES) {await sleep();return await updateSecret(secretSync, secretMap, vercelSecret, attempt + 1);}@@ -404,7 +406,7 @@ const detachEnvFromProjectSecret = async (});} catch (error) {- if ((error as { response: { status: number } }).response.status === 429 && attempt < MAX_RETRIES) {+ if (isAxiosError(error) && error.response?.status === 429 && attempt < MAX_RETRIES) {await sleep();return detachEnvFromProjectSecret(secretSync, vercelSecret, attempt + 1);}@@ -500,7 +502,7 @@ const listTeamSharedEnvVarsWithRetries = async (hasMore = false;}} catch (error) {- if ((error as { response: { status: number } }).response.status === 429 && totalRetries < MAX_RETRIES) {+ if (isAxiosError(error) && error.response?.status === 429 && totalRetries < MAX_RETRIES) {totalRetries += 1;// eslint-disable-next-line no-await-in-loopawait sleep();@@ -544,7 +546,7 @@ const getDecryptedTeamSharedEnvVar = async ();return decryptedEnvVar;} catch (error) {- if ((error as { response: { status: number } }).response.status === 429 && attempt < MAX_RETRIES) {+ if (isAxiosError(error) && error.response?.status === 429 && attempt < MAX_RETRIES) {await sleep();return getDecryptedTeamSharedEnvVar(secretSync, envVar, attempt + 1);}@@ -648,7 +650,7 @@ const createTeamSharedEnvVar = async (}} catch (error) {if (error instanceof SecretSyncError) throw error;- if ((error as { response: { status: number } }).response.status === 429 && attempt < MAX_RETRIES) {+ if (isAxiosError(error) && error.response?.status === 429 && attempt < MAX_RETRIES) {await sleep();return createTeamSharedEnvVar(secretSync, key, value, attempt + 1);}@@ -729,7 +731,7 @@ const updateTeamSharedEnvVar = async (}} catch (error) {if (error instanceof SecretSyncError) throw error;- if ((error as { response: { status: number } }).response.status === 429 && attempt < MAX_RETRIES) {+ if (isAxiosError(error) && error.response?.status === 429 && attempt < MAX_RETRIES) {await sleep();return updateTeamSharedEnvVar(secretSync, envVar, value, attempt + 1);}@@ -777,7 +779,7 @@ const deleteTeamSharedEnvVar = async (}} catch (error) {if (error instanceof SecretSyncError) throw error;- if ((error as { response: { status: number } }).response.status === 429 && attempt < MAX_RETRIES) {+ if (isAxiosError(error) && error.response?.status === 429 && attempt < MAX_RETRIES) {await sleep();return deleteTeamSharedEnvVar(secretSync, envVar, attempt + 1);}@@ -861,7 +863,7 @@ const detachTeamSharedEnvVar = async (}} catch (error) {if (error instanceof SecretSyncError) throw error;- if ((error as { response: { status: number } }).response.status === 429 && attempt < MAX_RETRIES) {+ if (isAxiosError(error) && error.response?.status === 429 && attempt < MAX_RETRIES) {await sleep();return detachTeamSharedEnvVar(secretSync, envVar, attempt + 1);}diff --git a/frontend/package-lock.json b/frontend/package-lock.jsonindex 69a9c885d0..e69a589eae 100644--- a/frontend/package-lock.json+++ b/frontend/package-lock.json@@ -148,6 +148,7 @@"storybook": "^9.1.19","storybook-addon-tag-badges": "^2.0.4","tailwindcss": "^4.1.14",+ "tsx": "4.19.3","tw-animate-css": "^1.4.0","typescript": "~5.6.2","typescript-eslint": "^8.15.0",diff --git a/frontend/package.json b/frontend/package.jsonindex 6e40de9607..75d6e537a5 100644--- a/frontend/package.json+++ b/frontend/package.json@@ -12,6 +12,7 @@"preview": "vite preview","lint": "eslint ./src --max-warnings 0","lint:fix": "eslint --fix ./src --max-warnings 0",+ "test": "tsx --tsconfig tsconfig.app.json --test src/components/v3/generic/Combobox/combobox-accessibility.test.ts src/components/v3/generic/Combobox/combobox-items.test.ts src/components/secret-syncs/forms/schemas/secret-sync-schema.test.ts","type:check": "tsc --noEmit --project ./tsconfig.app.json","storybook": "storybook dev -p 6006","build-storybook": "storybook build"@@ -179,6 +180,7 @@"storybook": "^9.1.19","storybook-addon-tag-badges": "^2.0.4","tailwindcss": "^4.1.14",+ "tsx": "4.19.3","tw-animate-css": "^1.4.0","typescript": "~5.6.2","typescript-eslint": "^8.15.0",diff --git a/frontend/src/components/app-connections/AppConnectionOption.tsx b/frontend/src/components/app-connections/AppConnectionOption.tsxindex a87f17226c..19519aec9f 100644--- a/frontend/src/components/app-connections/AppConnectionOption.tsx+++ b/frontend/src/components/app-connections/AppConnectionOption.tsx@@ -1,7 +1,6 @@+import { ReactNode } from "react";import { components, OptionProps } from "react-select";-import { faPlus } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";-import { CheckIcon } from "lucide-react";+import { CheckIcon, PlusIcon } from "lucide-react";import {Badge,@@ -14,58 +13,79 @@ import {import { useOrganization } from "@app/context";import { TAvailableAppConnection } from "@app/hooks/api/appConnections";+type TAppConnectionOptionContentProps = {+ data: Pick<TAvailableAppConnection, "id" | "name"> & { projectId?: string | null };+ createLabel?: ReactNode;+ isOnlyOption?: boolean;+ isSelected?: boolean;+};++export const AppConnectionOptionContent = ({+ data,+ createLabel,+ isOnlyOption = false,+ isSelected = false+}: TAppConnectionOptionContentProps) => {+ const isCreateOption = data.id === "_create" || data.id.startsWith("_create:");+ const { isSubOrganization } = useOrganization();++ return (+ <div className="flex flex-row items-center justify-between">+ {isCreateOption ? (+ <div+ className={`flex items-center gap-x-1 ${isOnlyOption ? "text-foreground" : "text-accent"}`}+ >+ <PlusIcon className="size-4" />+ <span className="mr-auto">{createLabel ?? "Create New Connection"}</span>+ </div>+ ) : (+ <>+ <p className="mr-auto truncate">{data.name}</p>+ {!data.projectId && (+ <Tooltip>+ <TooltipTrigger asChild>+ <div>+ {isSubOrganization ? (+ <Badge variant="sub-org">+ <SubOrgIcon />+ Sub-Organization+ </Badge>+ ) : (+ <Badge variant="org">+ <OrgIcon />+ Organization+ </Badge>+ )}+ </div>+ </TooltipTrigger>+ <TooltipContent>+ This connection belongs to your {isSubOrganization ? "sub-" : ""}organization.+ </TooltipContent>+ </Tooltip>+ )}+ {isSelected && <CheckIcon className="ml-2 size-4" />}+ </>+ )}+ </div>+ );+};+export const AppConnectionOption = ({isSelected,- children,...props}: OptionProps<TAvailableAppConnection>) => {const isCreateOption = props.data.id === "_create" || props.data.id.startsWith("_create:");const isPerAppCreateOption = isCreateOption && props.data.id !== "_create";const isOnlyOption = isCreateOption && props.selectProps.options.length === 1;- const { isSubOrganization } = useOrganization();-return (<components.Option isSelected={isSelected} {...props}>- <div className="flex flex-row items-center justify-between">- {isCreateOption ? (- <div- className={`flex items-center gap-x-1 ${isOnlyOption ? "text-foreground" : "text-accent"}`}- >- <FontAwesomeIcon icon={faPlus} size="sm" />- <span className="mr-auto">- {isPerAppCreateOption ? children : "Create New Connection"}- </span>- </div>- ) : (- <>- <p className="mr-auto truncate">{children}</p>- {!props.data.projectId && (- <Tooltip>- <TooltipTrigger asChild>- <div>- {isSubOrganization ? (- <Badge variant="sub-org">- <SubOrgIcon />- Sub-Organization- </Badge>- ) : (- <Badge variant="org">- <OrgIcon />- Organization- </Badge>- )}- </div>- </TooltipTrigger>- <TooltipContent>- This connection belongs to your {isSubOrganization ? "sub-" : ""}organization.- </TooltipContent>- </Tooltip>- )}- {isSelected && <CheckIcon className="ml-2 size-4" />}- </>- )}- </div>+ <AppConnectionOptionContent+ data={props.data}+ createLabel={isPerAppCreateOption ? props.children : undefined}+ isOnlyOption={isOnlyOption}+ isSelected={isSelected}+ /></components.Option>);};diff --git a/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/azureEntraId.tsx b/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/azureEntraId.tsxindex b1c13004f6..4b2fecff85 100644--- a/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/azureEntraId.tsx+++ b/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/azureEntraId.tsx@@ -85,6 +85,7 @@ const AzureEntraIdFields = ({{...field}id={`azure-entra-${key}`}isReadOnly={isReadOnly}+ isError={Boolean(error)}aria-describedby={error ? `azure-entra-${key}-error` : undefined}/><FieldError id={`azure-entra-${key}-error`}>{error?.message}</FieldError>@@ -127,9 +128,12 @@ const AzureEntraIdFields = ({name="selectedUsers"render={({ field, fieldState: { error } }) => (<Field data-invalid={Boolean(error)}>- <FieldLabel htmlFor="azure-entra-users">Users</FieldLabel>+ <FieldLabel id="azure-entra-users-label" htmlFor="azure-entra-users">+ Users+ </FieldLabel><Comboboxid="azure-entra-users"+ aria-labelledby="azure-entra-users-label"multipleisDisabled={!isConfigured || isLoading || isError}isLoading={isLoading}@@ -139,6 +143,7 @@ const AzureEntraIdFields = ({onValueChange={field.onChange}getOptionLabel={(user) => `${user.name} (${user.email})`}getOptionValue={(user) => user.id}+ getOptionKeywords={(user) => [user.id]}placeholder="Select users..."searchPlaceholder="Search users..."searchAriaLabel="Search Azure Entra ID users"diff --git a/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/azureSqlDatabase.tsx b/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/azureSqlDatabase.tsxindex 0916b1b2f9..1e71aeac14 100644--- a/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/azureSqlDatabase.tsx+++ b/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/azureSqlDatabase.tsx@@ -334,6 +334,7 @@ const AzureSqlFields = ({ mode }: TDynamicSecretProviderRendererProps) => {value={field.value ?? ""}id="azure-sql-password"placeholder="Enter database password"+ isError={Boolean(error)}aria-describedby={error ? "azure-sql-password-error" : undefined}/><FieldError id="azure-sql-password-error">{error?.message}</FieldError>diff --git a/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/github.tsx b/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/github.tsxindex 0c425f91ee..53d48808be 100644--- a/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/github.tsx+++ b/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/github.tsx@@ -60,6 +60,7 @@ const GithubFields = () => {{...field}id="github-private-key"placeholder="-----BEGIN PRIVATE KEY----- ..."+ isError={Boolean(error)}aria-describedby={error ? "github-private-key-error" : undefined}/><FieldError id="github-private-key-error">{error?.message}</FieldError>diff --git a/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/ibmApiConnect.tsx b/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/ibmApiConnect.tsxindex 16d17e59bc..3290d02243 100644--- a/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/ibmApiConnect.tsx+++ b/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/ibmApiConnect.tsx@@ -171,9 +171,15 @@ const IbmApiConnectFields = ({ context, mode }: TDynamicSecretProviderRendererPrdata-invalid={Boolean(error)}data-disabled={!credentialsComplete || orgsQuery.isError}>- <FieldLabel htmlFor="ibm-api-connect-organization">Organization</FieldLabel>+ <FieldLabel+ id="ibm-api-connect-organization-label"+ htmlFor="ibm-api-connect-organization"+ >+ Organization+ </FieldLabel><Comboboxid="ibm-api-connect-organization"+ aria-labelledby="ibm-api-connect-organization-label"isDisabled={!credentialsComplete || orgsQuery.isFetching || orgsQuery.isError}isLoading={orgsQuery.isFetching}options={orgsQuery.data ?? []}@@ -190,6 +196,7 @@ const IbmApiConnectFields = ({ context, mode }: TDynamicSecretProviderRendererPrsearchAriaLabel="Search IBM API Connect organizations"getOptionLabel={(option) => option.title || option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id, option.name]}isError={Boolean(error)}modalaria-describedby={@@ -222,9 +229,12 @@ const IbmApiConnectFields = ({ context, mode }: TDynamicSecretProviderRendererPrdata-invalid={Boolean(error)}data-disabled={!orgSelected || catalogsQuery.isError}>- <FieldLabel htmlFor="ibm-api-connect-catalog">Catalog</FieldLabel>+ <FieldLabel id="ibm-api-connect-catalog-label" htmlFor="ibm-api-connect-catalog">+ Catalog+ </FieldLabel><Comboboxid="ibm-api-connect-catalog"+ aria-labelledby="ibm-api-connect-catalog-label"isDisabled={!orgSelected || catalogsQuery.isFetching || catalogsQuery.isError}isLoading={catalogsQuery.isFetching}options={catalogsQuery.data ?? []}@@ -240,6 +250,7 @@ const IbmApiConnectFields = ({ context, mode }: TDynamicSecretProviderRendererPrsearchAriaLabel="Search IBM API Connect catalogs"getOptionLabel={(option) => option.title || option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id, option.name]}isError={Boolean(error)}modalaria-describedby={@@ -270,9 +281,15 @@ const IbmApiConnectFields = ({ context, mode }: TDynamicSecretProviderRendererPrdata-invalid={Boolean(error)}data-disabled={!catalogSelected || appsQuery.isError}>- <FieldLabel htmlFor="ibm-api-connect-application">Application</FieldLabel>+ <FieldLabel+ id="ibm-api-connect-application-label"+ htmlFor="ibm-api-connect-application"+ >+ Application+ </FieldLabel><Comboboxid="ibm-api-connect-application"+ aria-labelledby="ibm-api-connect-application-label"isDisabled={!catalogSelected || appsQuery.isFetching || appsQuery.isError}isLoading={appsQuery.isFetching}options={appsQuery.data ?? []}@@ -287,6 +304,7 @@ const IbmApiConnectFields = ({ context, mode }: TDynamicSecretProviderRendererPrsearchAriaLabel="Search IBM API Connect applications"getOptionLabel={(option) => option.title || option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id, option.name]}isError={Boolean(error)}modalaria-describedby={diff --git a/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/sqlDatabase.tsx b/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/sqlDatabase.tsxindex 1de127aaf1..54988e29c6 100644--- a/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/sqlDatabase.tsx+++ b/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/sqlDatabase.tsx@@ -626,6 +626,7 @@ const SqlDatabaseFields = ({{...field}value={field.value ?? ""}id="sql-database-ca"+ isError={Boolean(error)}aria-describedby={error ? "sql-database-ca-error" : undefined}/><FieldError id="sql-database-ca-error">{error?.message}</FieldError>diff --git a/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/ssh.tsx b/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/ssh.tsxindex 06a7287d6f..8134f031fe 100644--- a/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/ssh.tsx+++ b/frontend/src/components/dynamic-secrets/DynamicSecretProviderForm/providerDefinitions/ssh.tsx@@ -81,6 +81,8 @@ const SshFields = ({ context, mode }: TDynamicSecretProviderRendererProps) => {onChange={(event) => setPrincipal(event.target.value)}onKeyDown={handleKeyDown}placeholder="Enter principal name..."+ isError={Boolean(error)}+ aria-describedby="ssh-principals-feedback"/><Buttontype="button"@@ -138,6 +140,7 @@ const SshFields = ({ context, mode }: TDynamicSecretProviderRendererProps) => {id="ssh-key-algorithm"onBlur={field.onBlur}isError={Boolean(error)}+ aria-describedby="ssh-key-algorithm-feedback"><SelectValue /></SelectTrigger>diff --git a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ParametersFields/AwsIamUserSecretRotationParametersFields.tsx b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ParametersFields/AwsIamUserSecretRotationParametersFields.tsxindex 732eddea37..d83301d612 100644--- a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ParametersFields/AwsIamUserSecretRotationParametersFields.tsx+++ b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ParametersFields/AwsIamUserSecretRotationParametersFields.tsx@@ -84,13 +84,21 @@ export const AwsIamUserSecretRotationParametersFields = () => {render={({ field: { value, onChange }, fieldState: { error } }) => (<Field data-invalid={Boolean(error)}><FieldLabelWithTooltip+ id="aws-region-label"htmlFor="aws-region"tooltip="Required only if no global scope is set.">Region <span className="font-normal text-muted">(optional)</span></FieldLabelWithTooltip>- <AwsRegionSelect value={value ?? ""} onChange={onChange} />- <FieldError>{error?.message}</FieldError>+ <AwsRegionSelect+ id="aws-region"+ value={value ?? ""}+ onChange={onChange}+ isError={Boolean(error)}+ aria-labelledby="aws-region-label"+ aria-describedby={error ? "aws-region-error" : undefined}+ />+ <FieldError id="aws-region-error">{error?.message}</FieldError></Field>)}/>diff --git a/frontend/src/components/secret-rotations-v2/forms/shared/FieldLabelWithTooltip.tsx b/frontend/src/components/secret-rotations-v2/forms/shared/FieldLabelWithTooltip.tsxindex 14a84e030c..65a8c5714d 100644--- a/frontend/src/components/secret-rotations-v2/forms/shared/FieldLabelWithTooltip.tsx+++ b/frontend/src/components/secret-rotations-v2/forms/shared/FieldLabelWithTooltip.tsx@@ -4,20 +4,33 @@ import { HelpCircleIcon } from "lucide-react";import { FieldLabel, Tooltip, TooltipContent, TooltipTrigger } from "@app/components/v3";type Props = {+ id?: string;htmlFor?: string;children: ReactNode;tooltip?: ReactNode;tooltipClassName?: string;};-export const FieldLabelWithTooltip = ({ htmlFor, children, tooltip, tooltipClassName }: Props) => {+export const FieldLabelWithTooltip = ({+ id,+ htmlFor,+ children,+ tooltip,+ tooltipClassName+}: Props) => {if (!tooltip) {- return <FieldLabel htmlFor={htmlFor}>{children}</FieldLabel>;+ return (+ <FieldLabel id={id} htmlFor={htmlFor}>+ {children}+ </FieldLabel>+ );}return (<div className="flex items-center gap-1.5">- <FieldLabel htmlFor={htmlFor}>{children}</FieldLabel>+ <FieldLabel id={id} htmlFor={htmlFor}>+ {children}+ </FieldLabel><Tooltip><TooltipTrigger asChild><buttondiff --git a/frontend/src/components/secret-syncs/CreateSecretSyncModal.tsx b/frontend/src/components/secret-syncs/CreateSecretSyncModal.tsxindex 7348a478b1..6b0b0d2a8c 100644--- a/frontend/src/components/secret-syncs/CreateSecretSyncModal.tsx+++ b/frontend/src/components/secret-syncs/CreateSecretSyncModal.tsx@@ -1,17 +1,8 @@import { useEffect, useState } from "react";-import { AlertTriangleIcon } from "lucide-react";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";import {- AlertDialog,- AlertDialogAction,- AlertDialogCancel,- AlertDialogContent,- AlertDialogDescription,- AlertDialogFooter,- AlertDialogHeader,- AlertDialogMedia,- AlertDialogTitle,+ DiscardChangesAlertDialog,Sheet,SheetContent,SheetDescription,@@ -19,6 +10,7 @@ import {SheetTitle} from "@app/components/v3";import { SecretSync, TSecretSync } from "@app/hooks/api/secretSyncs";+import { useDiscardChangesGuard } from "@app/hooks/useDiscardChangesGuard";import { CreateSecretSyncForm } from "./forms";import { SecretSyncModalHeader } from "./SecretSyncModalHeader";@@ -36,15 +28,23 @@ type ContentProps = {selectedSync: SecretSync | null;setSelectedSync: (selectedSync: SecretSync | null) => void;initialFormData?: Partial<TSecretSyncForm>;+ onDirtyChange: (isDirty: boolean) => void;};-const Content = ({ onComplete, setSelectedSync, selectedSync, initialFormData }: ContentProps) => {+const Content = ({+ onComplete,+ setSelectedSync,+ selectedSync,+ initialFormData,+ onDirtyChange+}: ContentProps) => {if (selectedSync) {return (<CreateSecretSyncForminitialFormData={initialFormData}onComplete={onComplete}onCancel={() => setSelectedSync(null)}+ onDirtyChange={onDirtyChange}destination={selectedSync}/>);@@ -60,7 +60,7 @@ export const CreateSecretSyncModal = ({initialFormData}: Props) => {const [selectedSync, setSelectedSync] = useState<SecretSync | null>(selectSync);- const [confirmDiscardOpen, setConfirmDiscardOpen] = useState(false);+ const [isDirty, setIsDirty] = useState(false);useEffect(() => {setSelectedSync(selectSync);@@ -68,17 +68,19 @@ export const CreateSecretSyncModal = ({const closeSheet = () => {setSelectedSync(null);+ setIsDirty(false);onOpenChange(false);};+ const { confirmDiscard, isDiscardDialogOpen, requestDiscard, setIsDiscardDialogOpen } =+ useDiscardChangesGuard({ isDirty, onDiscard: closeSheet });+const handleSheetOpenChange = (nextOpen: boolean) => {- if (!nextOpen && selectedSync) {- // User has started filling out the form — confirm before discarding.- setConfirmDiscardOpen(true);+ if (!nextOpen) {+ requestDiscard();return;}- if (!nextOpen) setSelectedSync(null);- onOpenChange(nextOpen);+ onOpenChange(true);};return (@@ -86,22 +88,23 @@ export const CreateSecretSyncModal = ({<Sheet open={isOpen} onOpenChange={handleSheetOpenChange}><SheetContent className="flex h-full max-h-full flex-col gap-y-0 sm:max-w-[1500px]"><SheetHeader className="border-b">- <SheetTitle>- {selectedSync ? (+ {selectedSync ? (+ <>+ <SheetTitle className="sr-only">Configure secret sync</SheetTitle><SecretSyncModalHeaderisConfigured={false}destination={selectedSync}showDocLink={false}/>- ) : (- "Choose a destination"- )}- </SheetTitle>- {!selectedSync && (- <SheetDescription>- Where should Infisical write these secrets? You can change this later only by- creating a new sync.- </SheetDescription>+ </>+ ) : (+ <>+ <SheetTitle>Choose a destination</SheetTitle>+ <SheetDescription>+ Where should Infisical write these secrets? You can change this later only by+ creating a new sync.+ </SheetDescription>+ </>)}</SheetHeader>{selectedSync ? (@@ -111,6 +114,7 @@ export const CreateSecretSyncModal = ({selectedSync={selectedSync}setSelectedSync={setSelectedSync}initialFormData={initialFormData}+ onDirtyChange={setIsDirty}/></div>) : (@@ -120,31 +124,20 @@ export const CreateSecretSyncModal = ({selectedSync={selectedSync}setSelectedSync={setSelectedSync}initialFormData={initialFormData}+ onDirtyChange={setIsDirty}/></div>)}</SheetContent></Sheet>- <AlertDialog open={confirmDiscardOpen} onOpenChange={setConfirmDiscardOpen}>- <AlertDialogContent>- <AlertDialogHeader>- <AlertDialogMedia>- <AlertTriangleIcon />- </AlertDialogMedia>- <AlertDialogTitle>Discard Sync Setup?</AlertDialogTitle>- <AlertDialogDescription>- Your progress configuring this sync will be lost.- </AlertDialogDescription>- </AlertDialogHeader>- <AlertDialogFooter>- <AlertDialogCancel>Keep Editing</AlertDialogCancel>- <AlertDialogAction variant="danger" onClick={closeSheet}>- Discard- </AlertDialogAction>- </AlertDialogFooter>- </AlertDialogContent>- </AlertDialog>+ <DiscardChangesAlertDialog+ open={isDiscardDialogOpen}+ onOpenChange={setIsDiscardDialogOpen}+ onDiscard={confirmDiscard}+ title="Discard Sync Setup?"+ description="Your progress configuring this sync will be lost."+ /></>);};diff --git a/frontend/src/components/secret-syncs/DeleteSecretSyncModal.tsx b/frontend/src/components/secret-syncs/DeleteSecretSyncModal.tsxindex c2c40191cd..baf89801a8 100644--- a/frontend/src/components/secret-syncs/DeleteSecretSyncModal.tsx+++ b/frontend/src/components/secret-syncs/DeleteSecretSyncModal.tsx@@ -1,23 +1,22 @@import { useEffect, useState } from "react";-import { Trash2Icon } from "lucide-react";import { createNotification } from "@app/components/notifications";import {+ Alert,+ AlertDescription,AlertDialog,AlertDialogAction,AlertDialogCancel,+ AlertDialogConfirmationField,AlertDialogContent,AlertDialogDescription,AlertDialogFooter,AlertDialogHeader,- AlertDialogMedia,AlertDialogTitle,Field,FieldContent,FieldDescription,- FieldLabel,FieldTitle,- Input,Toggle} from "@app/components/v3";import { SECRET_SYNC_MAP } from "@app/helpers/secretSyncs";@@ -33,11 +32,9 @@ type Props = {export const DeleteSecretSyncModal = ({ isOpen, onOpenChange, secretSync, onComplete }: Props) => {const deleteSync = useDeleteSecretSync();const { syncOption } = useSecretSyncOption(secretSync?.destination);- const [inputData, setInputData] = useState("");const [removeSecrets, setRemoveSecrets] = useState(false);useEffect(() => {- setInputData("");setRemoveSecrets(false);}, [isOpen]);@@ -45,11 +42,8 @@ export const DeleteSecretSyncModal = ({ isOpen, onOpenChange, secretSync, onCompconst { id: syncId, name, destination, projectId } = secretSync;const destinationName = SECRET_SYNC_MAP[destination].name;- const isConfirmed = inputData === name;const handleDeleteSecretSync = async () => {- if (!isConfirmed) return;-await deleteSync.mutateAsync({syncId,destination,@@ -67,35 +61,21 @@ export const DeleteSecretSyncModal = ({ isOpen, onOpenChange, secretSync, onComp};return (- <AlertDialog open={isOpen} onOpenChange={onOpenChange}>+ <AlertDialog open={isOpen} confirmationValue={name} onOpenChange={onOpenChange}><AlertDialogContent><AlertDialogHeader>- <AlertDialogMedia>- <Trash2Icon />- </AlertDialogMedia><AlertDialogTitle>Are you sure you want to delete {name}?</AlertDialogTitle>- <AlertDialogDescription>This action is irreversible.</AlertDialogDescription>+ <AlertDialogDescription asChild>+ <Alert variant="danger" appearance="borderless">+ <AlertDescription>This action is irreversible.</AlertDescription>+ </Alert>+ </AlertDialogDescription></AlertDialogHeader>- <form- onSubmit={(e) => {- e.preventDefault();- handleDeleteSecretSync();+ <AlertDialogConfirmationField+ onConfirm={() => {+ if (!deleteSync.isPending) handleDeleteSecretSync().catch(() => undefined);}}- >- <Field>- <FieldLabel>- Type <span className="font-bold">{name}</span> to confirm- </FieldLabel>- <FieldContent>- <Input- value={inputData}- onChange={(e) => setInputData(e.target.value)}- placeholder={`Type ${name} here`}- autoComplete="off"- />- </FieldContent>- </Field>- </form>+ />{syncOption?.canRemoveSecretsOnDeletion && (<Field orientation="horizontal"><FieldContent>@@ -113,11 +93,14 @@ export const DeleteSecretSyncModal = ({ isOpen, onOpenChange, secretSync, onComp</Field>)}<AlertDialogFooter>- <AlertDialogCancel>Cancel</AlertDialogCancel>+ <AlertDialogCancel isDisabled={deleteSync.isPending}>Cancel</AlertDialogCancel><AlertDialogActionvariant="danger"- onClick={handleDeleteSecretSync}- disabled={!isConfirmed}+ isPending={deleteSync.isPending}+ onClick={(event) => {+ event.preventDefault();+ if (!deleteSync.isPending) handleDeleteSecretSync().catch(() => undefined);+ }}>Delete</AlertDialogAction>diff --git a/frontend/src/components/secret-syncs/EditSecretSyncModal.tsx b/frontend/src/components/secret-syncs/EditSecretSyncModal.tsxindex a3ef257fc9..cf9f099a53 100644--- a/frontend/src/components/secret-syncs/EditSecretSyncModal.tsx+++ b/frontend/src/components/secret-syncs/EditSecretSyncModal.tsx@@ -1,22 +1,14 @@import { useState } from "react";-import { AlertTriangleIcon } from "lucide-react";import {- AlertDialog,- AlertDialogAction,- AlertDialogCancel,- AlertDialogContent,- AlertDialogDescription,- AlertDialogFooter,- AlertDialogHeader,- AlertDialogMedia,- AlertDialogTitle,+ DiscardChangesAlertDialog,Sheet,SheetContent,SheetHeader,SheetTitle} from "@app/components/v3";import { TSecretSync } from "@app/hooks/api/secretSyncs";+import { useDiscardChangesGuard } from "@app/hooks/useDiscardChangesGuard";import { EditSecretSyncForm } from "./forms";import { SecretSyncModalHeader } from "./SecretSyncModalHeader";@@ -29,21 +21,23 @@ type Props = {export const EditSecretSyncModal = ({ isOpen, secretSync, onOpenChange }: Props) => {const [isDirty, setIsDirty] = useState(false);- const [confirmDiscardOpen, setConfirmDiscardOpen] = useState(false);-- if (!secretSync) return null;const closeSheet = () => {- setConfirmDiscardOpen(false);+ setIsDirty(false);onOpenChange(false);};+ const { confirmDiscard, isDiscardDialogOpen, requestDiscard, setIsDiscardDialogOpen } =+ useDiscardChangesGuard({ isDirty, onDiscard: closeSheet });++ if (!secretSync) return null;+const handleSheetOpenChange = (nextOpen: boolean) => {- if (!nextOpen && isDirty) {- setConfirmDiscardOpen(true);+ if (!nextOpen) {+ requestDiscard();return;}- onOpenChange(nextOpen);+ onOpenChange(true);};return (@@ -51,18 +45,17 @@ export const EditSecretSyncModal = ({ isOpen, secretSync, onOpenChange }: Props)<Sheet open={isOpen} onOpenChange={handleSheetOpenChange}><SheetContent className="flex h-full max-h-full flex-col gap-y-0 sm:max-w-[1500px]"><SheetHeader className="border-b">- <SheetTitle>- <SecretSyncModalHeader- isConfigured- destination={secretSync.destination}- showDocLink={false}- />- </SheetTitle>+ <SheetTitle className="sr-only">Edit secret sync</SheetTitle>+ <SecretSyncModalHeader+ isConfigured+ destination={secretSync.destination}+ showDocLink={false}+ /></SheetHeader><div className="flex min-h-0 flex-1 flex-col"><EditSecretSyncFormsecretSync={secretSync}- onComplete={() => onOpenChange(false)}+ onComplete={closeSheet}onDirtyChange={setIsDirty}onCancel={() => handleSheetOpenChange(false)}/>@@ -70,25 +63,13 @@ export const EditSecretSyncModal = ({ isOpen, secretSync, onOpenChange }: Props)</SheetContent></Sheet>- <AlertDialog open={confirmDiscardOpen} onOpenChange={setConfirmDiscardOpen}>- <AlertDialogContent>- <AlertDialogHeader>- <AlertDialogMedia>- <AlertTriangleIcon />- </AlertDialogMedia>- <AlertDialogTitle>Discard changes?</AlertDialogTitle>- <AlertDialogDescription>- Your unsaved changes to this sync will be lost.- </AlertDialogDescription>- </AlertDialogHeader>- <AlertDialogFooter>- <AlertDialogCancel>Keep Editing</AlertDialogCancel>- <AlertDialogAction variant="danger" onClick={closeSheet}>- Discard- </AlertDialogAction>- </AlertDialogFooter>- </AlertDialogContent>- </AlertDialog>+ <DiscardChangesAlertDialog+ open={isDiscardDialogOpen}+ onOpenChange={setIsDiscardDialogOpen}+ onDiscard={confirmDiscard}+ title="Discard Changes?"+ description="Your unsaved changes to this sync will be lost."+ /></>);};diff --git a/frontend/src/components/secret-syncs/SecretSyncImportStatusBadge.tsx b/frontend/src/components/secret-syncs/SecretSyncImportStatusBadge.tsxindex e602b30eed..6ad9e902ea 100644--- a/frontend/src/components/secret-syncs/SecretSyncImportStatusBadge.tsx+++ b/frontend/src/components/secret-syncs/SecretSyncImportStatusBadge.tsx@@ -1,8 +1,6 @@import { ReactNode, useEffect, useMemo, useState } from "react";-import { faXmark } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";import { differenceInSeconds } from "date-fns";-import { AlertTriangleIcon, CheckIcon, DownloadIcon, LucideIcon } from "lucide-react";+import { AlertTriangleIcon, CheckIcon, DownloadIcon, LucideIcon, XIcon } from "lucide-react";import { Badge, TBadgeProps, Tooltip, TooltipContent, TooltipTrigger } from "@app/components/v3";import { SECRET_SYNC_MAP } from "@app/helpers/secretSyncs";@@ -64,13 +62,13 @@ export const SecretSyncImportStatusBadge = ({ secretSync, mini }: Props) => {<div className="flex flex-col gap-2 py-1 whitespace-normal">{failureMessage && (<div>- <div className="mb-2 flex self-start text-red">- <FontAwesomeIcon icon={faXmark} className="ml-1 pt-0.5 pr-1.5 text-sm" />+ <div className="mb-2 flex self-start text-danger">+ <XIcon className="mr-1.5 ml-1 size-4" /><div className="text-xs">{mini ? "Failed to Import Secrets" : "Failure Reason"}</div></div>- <div className="rounded-sm bg-mineshaft-600 p-2 text-xs">{failureMessage}</div>+ <div className="rounded-sm bg-ring p-2 text-xs">{failureMessage}</div></div>)}</div>diff --git a/frontend/src/components/secret-syncs/SecretSyncModalHeader.tsx b/frontend/src/components/secret-syncs/SecretSyncModalHeader.tsxindex b1e4f56c54..5fc78781d7 100644--- a/frontend/src/components/secret-syncs/SecretSyncModalHeader.tsx+++ b/frontend/src/components/secret-syncs/SecretSyncModalHeader.tsx@@ -21,7 +21,7 @@ export const SecretSyncModalHeader = ({ destination, isConfigured, showDocLink =/></div><div>- <div className="flex items-center gap-x-2 text-mineshaft-300">+ <div className="flex items-center gap-x-2 font-semibold text-label">{destinationDetails.name} Sync{showDocLink && (<DocumentationLinkBadge@@ -29,7 +29,7 @@ export const SecretSyncModalHeader = ({ destination, isConfigured, showDocLink =/>)}</div>- <p className="text-sm leading-4 text-mineshaft-400">+ <p className="text-sm leading-4 text-muted">{isConfigured? `Edit ${destinationDetails.name} Sync`: `Sync secrets to ${destinationDetails.name}`}diff --git a/frontend/src/components/secret-syncs/SecretSyncRemoveStatusBadge.tsx b/frontend/src/components/secret-syncs/SecretSyncRemoveStatusBadge.tsxindex fd6d862455..a206d9b9ef 100644--- a/frontend/src/components/secret-syncs/SecretSyncRemoveStatusBadge.tsx+++ b/frontend/src/components/secret-syncs/SecretSyncRemoveStatusBadge.tsx@@ -1,8 +1,6 @@import { ReactNode, useEffect, useMemo, useState } from "react";-import { faXmark } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";import { differenceInSeconds } from "date-fns";-import { AlertTriangleIcon, CheckIcon, EraserIcon, LucideIcon } from "lucide-react";+import { AlertTriangleIcon, CheckIcon, EraserIcon, LucideIcon, XIcon } from "lucide-react";import { Badge, TBadgeProps, Tooltip, TooltipContent, TooltipTrigger } from "@app/components/v3";import { SECRET_SYNC_MAP } from "@app/helpers/secretSyncs";@@ -64,13 +62,13 @@ export const SecretSyncRemoveStatusBadge = ({ secretSync, mini }: Props) => {<div className="flex flex-col gap-2 py-1 whitespace-normal">{failureMessage && (<div>- <div className="mb-2 flex self-start text-red">- <FontAwesomeIcon icon={faXmark} className="ml-1 pt-0.5 pr-1.5 text-sm" />+ <div className="mb-2 flex self-start text-danger">+ <XIcon className="mr-1.5 ml-1 size-4" /><div className="text-xs">{mini ? "Failed to Remove Secrets" : "Failure Reason"}</div></div>- <div className="rounded-sm bg-mineshaft-600 p-2 text-xs">{failureMessage}</div>+ <div className="rounded-sm bg-ring p-2 text-xs">{failureMessage}</div></div>)}</div>diff --git a/frontend/src/components/secret-syncs/SecretSyncSelect.tsx b/frontend/src/components/secret-syncs/SecretSyncSelect.tsxindex 5e7f73e136..a4ef36da0e 100644--- a/frontend/src/components/secret-syncs/SecretSyncSelect.tsx+++ b/frontend/src/components/secret-syncs/SecretSyncSelect.tsx@@ -40,10 +40,10 @@ const ProviderCard = ({<buttontype="button"onClick={onClick}- className="group flex cursor-pointer flex-col gap-3 rounded-md border border-border bg-card p-4 text-left transition-colors hover:border-mineshaft-500 hover:bg-mineshaft-700/50"+ className="group flex cursor-pointer flex-col gap-3 rounded-md border border-border bg-card p-4 text-left transition-colors hover:border-foreground/15 hover:bg-container-hover/50"><div className="flex items-start justify-between gap-2">- <div className="flex h-9 w-9 items-center justify-center rounded-md bg-mineshaft-700">+ <div className="flex h-9 w-9 items-center justify-center rounded-md bg-container-hover"><imgsrc={`/images/integrations/${image}`}alt={`${name} logo`}diff --git a/frontend/src/components/secret-syncs/SecretSyncStatusBadge.tsx b/frontend/src/components/secret-syncs/SecretSyncStatusBadge.tsxindex 4af0753760..c33aa2d493 100644--- a/frontend/src/components/secret-syncs/SecretSyncStatusBadge.tsx+++ b/frontend/src/components/secret-syncs/SecretSyncStatusBadge.tsx@@ -95,7 +95,7 @@ export const SecretSyncStatusBadge = ({ status, lastSyncedAt, lastSyncMessage }:<CalendarCheckIcon className="size-3" /><div className="text-xs">Last Synced</div></div>- <div className="rounded-sm bg-mineshaft-600 p-2 text-xs">+ <div className="rounded-sm bg-ring p-2 text-xs">{format(new Date(lastSyncedAt), "yyyy-MM-dd, hh:mm aaa")}</div></div>@@ -106,9 +106,7 @@ export const SecretSyncStatusBadge = ({ status, lastSyncedAt, lastSyncMessage }:<XIcon className="size-3" /><div className="text-xs">Failure Reason</div></div>- <div className="rounded-sm bg-mineshaft-600 p-2 text-xs break-words">- {failureMessage}- </div>+ <div className="rounded-sm bg-ring p-2 text-xs break-words">{failureMessage}</div></div>)}</div>diff --git a/frontend/src/components/secret-syncs/forms/AzureEntraIdScimSyncSourceFields.tsx b/frontend/src/components/secret-syncs/forms/AzureEntraIdScimSyncSourceFields.tsxindex 454668c62a..10b257f580 100644--- a/frontend/src/components/secret-syncs/forms/AzureEntraIdScimSyncSourceFields.tsx+++ b/frontend/src/components/secret-syncs/forms/AzureEntraIdScimSyncSourceFields.tsx@@ -4,12 +4,12 @@ import { subject } from "@casl/ability";import { Info } from "lucide-react";import {+ Combobox,Field,FieldContent,FieldError,FieldGroup,FieldLabel,- FilterableSelect,SecretPathInput,Tooltip,TooltipContent,@@ -86,7 +86,7 @@ export const AzureEntraIdScimSyncSourceFields = () => {return (<>- <p className="mb-4 text-sm text-bunker-300">+ <p className="mb-4 text-sm text-label">Specify the environment and path where you would like to sync secrets from.</p>@@ -99,14 +99,15 @@ export const AzureEntraIdScimSyncSourceFields = () => {<Field><FieldLabel>Environment</FieldLabel><FieldContent>- <FilterableSelect+ <Comboboxvalue={value}- onChange={onChange}+ onValueChange={onChange}options={currentProject.environments}placeholder="Select environment..."getOptionLabel={(option) => option?.name}getOptionValue={(option) => option?.id}isError={Boolean(error)}+ modal/><FieldError errors={[error]} /></FieldContent>@@ -149,9 +150,9 @@ export const AzureEntraIdScimSyncSourceFields = () => {</Tooltip></FieldLabel><FieldContent>- <FilterableSelect+ <Comboboxvalue={secrets?.find((s) => s.key === value) ?? null}- onChange={(option) => {+ onValueChange={(option) => {const selected = option as { id: string; key: string } | null;onChange(selected?.key ?? "");}}@@ -162,6 +163,7 @@ export const AzureEntraIdScimSyncSourceFields = () => {getOptionValue={(option) => option.id}isDisabled={!selectedEnvironment?.slug || !selectedSecretPath}isError={Boolean(error)}+ modal/><FieldError errors={[error]} /></FieldContent>diff --git a/frontend/src/components/secret-syncs/forms/CreateSecretSyncForm.tsx b/frontend/src/components/secret-syncs/forms/CreateSecretSyncForm.tsxindex b3b5fba9dd..bca93bf827 100644--- a/frontend/src/components/secret-syncs/forms/CreateSecretSyncForm.tsx+++ b/frontend/src/components/secret-syncs/forms/CreateSecretSyncForm.tsx@@ -1,4 +1,4 @@-import { useState } from "react";+import { useEffect, useState } from "react";import { Controller, FormProvider, useForm } from "react-hook-form";import { zodResolver } from "@hookform/resolvers/zod";import { AlertTriangleIcon } from "lucide-react";@@ -15,6 +15,7 @@ import {AlertDialogMedia,AlertDialogTitle,Button,+ DiscardChangesAlertDialog,DocumentationLinkBadge,Field,FieldContent,@@ -36,9 +37,10 @@ import {useDuplicateDestinationCheck,useSecretSyncOption} from "@app/hooks/api/secretSyncs";+import { useDiscardChangesGuard } from "@app/hooks/useDiscardChangesGuard";import { SecretSyncOptionsFields } from "./SecretSyncOptionsFields/SecretSyncOptionsFields";-import { SecretSyncFormSchema, TSecretSyncForm } from "./schemas";+import { getSecretSyncDestinationConfig, SecretSyncFormSchema, TSecretSyncForm } from "./schemas";import { SecretSyncDestinationFields } from "./SecretSyncDestinationFields";import { SecretSyncDetailsFields } from "./SecretSyncDetailsFields";import {@@ -52,6 +54,7 @@ type Props = {onComplete: (secretSync: TSecretSync) => void;destination: SecretSync;onCancel: () => void;+ onDirtyChange: (isDirty: boolean) => void;initialFormData?: Partial<TSecretSyncForm>;};@@ -145,6 +148,7 @@ export const CreateSecretSyncForm = ({destination,onComplete,onCancel,+ onDirtyChange,initialFormData}: Props) => {const createSecretSync = useCreateSecretSync();@@ -154,7 +158,6 @@ export const CreateSecretSyncForm = ({const formTabs = getFormTabs(destination, destinationName);const [showConfirmation, setShowConfirmation] = useState(false);- const [confirmBackToProvidersOpen, setConfirmBackToProvidersOpen] = useState(false);// scoot: right now we only do this when creating a connection so we know index 1const [selectedTabIndex, setSelectedTabIndex] = useState(initialFormData ? 1 : 0);@@ -174,10 +177,25 @@ export const CreateSecretSyncForm = ({},...initialFormData} as Partial<TSecretSyncForm>,+ // Step validation uses trigger(), which does not put the form into its submitted state.+ // Validate changes from the start so a field's error clears as soon as it is corrected.+ mode: "onChange",reValidateMode: "onChange"});const { handleSubmit, trigger, control, watch, formState } = formMethods;+ const hasUnsavedChanges = formState.isDirty || Boolean(initialFormData);+ const {+ confirmDiscard,+ isDiscardDialogOpen,+ requestDiscard: requestCancel,+ setIsDiscardDialogOpen+ } = useDiscardChangesGuard({ isDirty: hasUnsavedChanges, onDiscard: onCancel });++ useEffect(() => {+ onDirtyChange(hasUnsavedChanges);+ return () => onDirtyChange(false);+ }, [hasUnsavedChanges, onDirtyChange]);const onSubmit = async ({ environment, connection, ...formData }: TSecretSyncForm) => {try {@@ -200,11 +218,7 @@ export const CreateSecretSyncForm = ({const handlePrev = () => {if (selectedTabIndex === 0) {- if (formState.isDirty) {- setConfirmBackToProvidersOpen(true);- return;- }- onCancel();+ requestCancel();return;}@@ -216,7 +230,7 @@ export const CreateSecretSyncForm = ({projectId: currentProject?.id || "",connectionId: watch("connection")?.id,enabled: true,- destinationConfig: watch("destinationConfig")+ destinationConfig: getSecretSyncDestinationConfig(destination, watch("destinationConfig"))});const disableSecretDeletion = watch("syncOptions.disableSecretDeletion");@@ -250,11 +264,7 @@ export const CreateSecretSyncForm = ({// Provider step (index 0) jumps directly back to the provider selection screen,// regardless of which form tab the user is currently on.if (stepperIndex === 0) {- if (formState.isDirty) {- setConfirmBackToProvidersOpen(true);- return;- }- onCancel();+ requestCancel();return;}@@ -382,7 +392,7 @@ export const CreateSecretSyncForm = ({</div><div className="flex shrink-0 items-center justify-between gap-3 border-t border-border px-6 py-4">- <span className="text-xs text-muted">{formState.isDirty ? "Unsaved changes" : ""}</span>+ <span className="text-xs text-muted">{hasUnsavedChanges ? "Unsaved changes" : ""}</span><div className="flex items-center gap-3"><span className="text-xs text-muted">Step {displayedStepNumber} of {totalSteps}@@ -435,25 +445,13 @@ export const CreateSecretSyncForm = ({</AlertDialogFooter></AlertDialogContent></AlertDialog>- <AlertDialog open={confirmBackToProvidersOpen} onOpenChange={setConfirmBackToProvidersOpen}>- <AlertDialogContent>- <AlertDialogHeader>- <AlertDialogMedia>- <AlertTriangleIcon />- </AlertDialogMedia>- <AlertDialogTitle>Discard Sync Setup?</AlertDialogTitle>- <AlertDialogDescription>- Your progress configuring this sync will be lost.- </AlertDialogDescription>- </AlertDialogHeader>- <AlertDialogFooter>- <AlertDialogCancel>Keep Editing</AlertDialogCancel>- <AlertDialogAction variant="danger" onClick={onCancel}>- Discard- </AlertDialogAction>- </AlertDialogFooter>- </AlertDialogContent>- </AlertDialog>+ <DiscardChangesAlertDialog+ open={isDiscardDialogOpen}+ onOpenChange={setIsDiscardDialogOpen}+ onDiscard={confirmDiscard}+ title="Discard Sync Setup?"+ description="Your progress configuring this sync will be lost."+ /></FormProvider>);};diff --git a/frontend/src/components/secret-syncs/forms/DuplicateDestinationConfirmationModal.tsx b/frontend/src/components/secret-syncs/forms/DuplicateDestinationConfirmationModal.tsxindex c4fa5871bf..5663667c77 100644--- a/frontend/src/components/secret-syncs/forms/DuplicateDestinationConfirmationModal.tsx+++ b/frontend/src/components/secret-syncs/forms/DuplicateDestinationConfirmationModal.tsx@@ -47,11 +47,11 @@ export const DuplicateDestinationConfirmationModal = ({</span></AlertDialogDescription></AlertDialogHeader>- <p className="text-xs text-mineshaft-400">+ <p className="text-xs text-muted">{duplicateProjectId ? (<>Duplicate found in project ID:{" "}- <code className="rounded-sm bg-mineshaft-600 px-1 py-0.5 text-mineshaft-200">+ <code className="rounded-sm bg-ring px-1 py-0.5 text-foreground/80">{duplicateProjectId}</code></>diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncConnectionField.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncConnectionField.tsxindex a730734b21..c1f68b59ba 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncConnectionField.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncConnectionField.tsx@@ -1,16 +1,15 @@import { useMemo } from "react";import { Controller, useFormContext } from "react-hook-form";-import { SingleValue } from "react-select";import { subject } from "@casl/ability";import { Info } from "lucide-react";-import { AppConnectionOption } from "@app/components/app-connections";+import { AppConnectionOptionContent } from "@app/components/app-connections";import {+ Combobox,Field,FieldContent,FieldError,FieldLabel,- FilterableSelect,Tooltip,TooltipContent,TooltipTrigger@@ -74,6 +73,10 @@ export const SecretSyncConnectionField = ({ onChange: callback }: Props) => {);const appName = APP_CONNECTION_MAP[SECRET_SYNC_CONNECTION_MAP[destination]].name;+ const connectionOptions = [+ ...(canCreateConnection ? [{ id: "_create", name: "Create Connection" }] : []),+ ...allowedConnections+ ];return (<>@@ -94,12 +97,11 @@ export const SecretSyncConnectionField = ({ onChange: callback }: Props) => {</Tooltip></FieldLabel><FieldContent>- <FilterableSelect+ <Comboboxvalue={value}- onChange={(newValue) => {- if ((newValue as SingleValue<{ id: string; name: string }>)?.id === "_create") {+ onValueChange={(newValue) => {+ if (newValue.id === "_create") {handlePopUpOpen("addConnection");- onChange(null);// store for oauth callback connectionslocalStorage.setItem("secretSyncFormData", JSON.stringify(watch()));if (callback) callback();@@ -111,14 +113,17 @@ export const SecretSyncConnectionField = ({ onChange: callback }: Props) => {}}isLoading={isPending}isError={Boolean(error)}- options={[- ...(canCreateConnection ? [{ id: "_create", name: "Create Connection" }] : []),- ...allowedConnections- ]}+ options={connectionOptions}placeholder="Select connection..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}- components={{ Option: AppConnectionOption }}+ renderOption={(option) => (+ <AppConnectionOptionContent+ data={option}+ isOnlyOption={option.id === "_create" && connectionOptions.length === 1}+ />+ )}+ modal/><FieldError errors={[error]} /></FieldContent>@@ -143,7 +148,7 @@ export const SecretSyncConnectionField = ({ onChange: callback }: Props) => {app={app}onComplete={(connection) => {if (connection) {- setValue("connection", connection);+ setValue("connection", connection, { shouldValidate: true, shouldDirty: true });}}}/>diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/1PasswordSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/1PasswordSyncFields.tsxindex ab86fe1d33..4f0e0c8ec8 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/1PasswordSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/1PasswordSyncFields.tsx@@ -1,24 +1,20 @@import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldError,FieldGroup,FieldLabel,- FilterableSelect,Input,Tooltip,TooltipContent,TooltipTrigger} from "@app/components/v3";-import {- TOnePassVault,- useOnePassConnectionListVaults-} from "@app/hooks/api/appConnections/1password";+import { useOnePassConnectionListVaults } from "@app/hooks/api/appConnections/1password";import { SecretSync } from "@app/hooks/api/secretSyncs";import { TSecretSyncForm } from "../schemas";@@ -51,7 +47,10 @@ export const OnePassSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>+ <FieldLabel+ id="secret-sync-1-password-vault-id-label"+ htmlFor="secret-sync-1-password-vault-id"+ >Vault<Tooltip><TooltipTrigger asChild>@@ -63,17 +62,23 @@ export const OnePassSyncFields = () => {</Tooltip></FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-1-password-vault-id-label"+ aria-describedby={error ? "secret-sync-1-password-vault-id-error" : undefined}+ id="secret-sync-1-password-vault-id"+ isError={Boolean(error)}isLoading={isVaultsLoading && Boolean(connectionId)}isDisabled={!connectionId}value={vaults?.find((v) => v.id === value) || null}- onChange={(option) => onChange((option as SingleValue<TOnePassVault>)?.id ?? null)}+ onValueChange={(option) => onChange(option.id ?? null)}options={vaults}placeholder="Select a vault..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-1-password-vault-id-error" errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AwsParameterStoreSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AwsParameterStoreSyncFields.tsxindex 4dc0cb0f77..12a9935668 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AwsParameterStoreSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AwsParameterStoreSyncFields.tsx@@ -3,6 +3,7 @@ import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Code,Field,FieldContent,FieldError,@@ -35,7 +36,10 @@ export const AwsParameterStoreSyncFields = () => {name="destinationConfig.region"render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>+ <FieldLabel+ id="secret-sync-aws-parameter-store-region-label"+ htmlFor="secret-sync-aws-parameter-store-region"+ >Region<Tooltip><TooltipTrigger asChild>@@ -48,8 +52,17 @@ export const AwsParameterStoreSyncFields = () => {</Tooltip></FieldLabel><FieldContent>- <AwsRegionSelect value={value} onChange={onChange} />- <FieldError errors={[error]} />+ <AwsRegionSelect+ id="secret-sync-aws-parameter-store-region"+ value={value}+ onChange={onChange}+ isError={Boolean(error)}+ aria-labelledby="secret-sync-aws-parameter-store-region-label"+ aria-describedby={+ error ? "secret-sync-aws-parameter-store-region-error" : undefined+ }+ />+ <FieldError id="secret-sync-aws-parameter-store-region-error" errors={[error]} /></FieldContent></Field>)}@@ -67,18 +80,9 @@ export const AwsParameterStoreSyncFields = () => {</TooltipTrigger><TooltipContent className="max-w-lg">The path is required and will be prepended to the key schema. For example, if you- have a path of{" "}- <code className="rounded-sm bg-mineshaft-600 px-0.5 py-px text-sm text-mineshaft-300">- /demo/path/- </code>{" "}- and a key schema of{" "}- <code className="rounded-sm bg-mineshaft-600 px-0.5 py-px text-sm text-mineshaft-300">- INFISICAL_{"{{secretKey}}"}- </code>- , then the result will be{" "}- <code className="rounded-sm bg-mineshaft-600 px-0.5 py-px text-sm text-mineshaft-300">- /demo/path/INFISICAL_{"{{secretKey}}"}- </code>+ have a path of <Code>/demo/path/</Code> and a key schema of{" "}+ <Code>INFISICAL_{"{{secretKey}}"}</Code>, then the result will be{" "}+ <Code>/demo/path/INFISICAL_{"{{secretKey}}"}</Code></TooltipContent></Tooltip></FieldLabel>diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AwsSecretsManagerSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AwsSecretsManagerSyncFields.tsxindex f4015250a8..41248bdeb1 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AwsSecretsManagerSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AwsSecretsManagerSyncFields.tsx@@ -37,7 +37,10 @@ export const AwsSecretsManagerSyncFields = () => {<Controllerrender={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>+ <FieldLabel+ id="secret-sync-aws-secrets-manager-region-label"+ htmlFor="secret-sync-aws-secrets-manager-region"+ >Region<Tooltip><TooltipTrigger asChild>@@ -50,8 +53,17 @@ export const AwsSecretsManagerSyncFields = () => {</Tooltip></FieldLabel><FieldContent>- <AwsRegionSelect value={value} onChange={onChange} />- <FieldError errors={[error]} />+ <AwsRegionSelect+ id="secret-sync-aws-secrets-manager-region"+ value={value}+ onChange={onChange}+ isError={Boolean(error)}+ aria-labelledby="secret-sync-aws-secrets-manager-region-label"+ aria-describedby={+ error ? "secret-sync-aws-secrets-manager-region-error" : undefined+ }+ />+ <FieldError id="secret-sync-aws-secrets-manager-region-error" errors={[error]} /></FieldContent></Field>)}@@ -75,14 +87,14 @@ export const AwsSecretsManagerSyncFields = () => {<p>Specify how Infisical should map secrets to AWS Secrets Manager:</p><ul className="flex list-disc flex-col gap-3 pl-4"><li>- <p className="text-mineshaft-300">- <span className="font-medium text-bunker-200">One-To-One</span>: Each+ <p className="text-label">+ <span className="font-medium text-foreground">One-To-One</span>: EachInfisical secret will be mapped to a separate AWS Secrets Manager secret.</p></li><li>- <p className="text-mineshaft-300">- <span className="font-medium text-bunker-200">Many-To-One</span>: All+ <p className="text-label">+ <span className="font-medium text-foreground">Many-To-One</span>: AllInfisical secrets will be mapped to a single AWS Secrets Manager secret.</p></li>diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AzureDevOpsSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AzureDevOpsSyncFields.tsxindex 07eafde285..b30d5d099e 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AzureDevOpsSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AzureDevOpsSyncFields.tsx@@ -1,21 +1,19 @@import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldError,FieldGroup,FieldLabel,- FilterableSelect,Tooltip,TooltipContent,TooltipTrigger} from "@app/components/v3";import { useGetAzureDevOpsProjects } from "@app/hooks/api/appConnections/azure";-import { AzureDevOpsProject } from "@app/hooks/api/appConnections/azure/types";import { SecretSync } from "@app/hooks/api/secretSyncs";import { TSecretSyncForm } from "../schemas";@@ -45,7 +43,10 @@ export const AzureDevOpsSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>+ <FieldLabel+ id="secret-sync-azure-dev-ops-devops-project-id-label"+ htmlFor="secret-sync-azure-dev-ops-devops-project-id"+ >Project<Tooltip><TooltipTrigger asChild>@@ -57,23 +58,28 @@ export const AzureDevOpsSyncFields = () => {</Tooltip></FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-azure-dev-ops-devops-project-id-label"+ aria-describedby={+ error ? "secret-sync-azure-dev-ops-devops-project-id-error" : undefined+ }+ id="secret-sync-azure-dev-ops-devops-project-id"+ isError={Boolean(error)}isLoading={isProjectsLoading && Boolean(connectionId)}isDisabled={!connectionId}value={projects?.find((v) => v.appId === value) ?? null}- onChange={(option) => {- onChange((option as SingleValue<AzureDevOpsProject>)?.appId ?? null);- setValue(- "destinationConfig.devopsProjectName",- (option as SingleValue<AzureDevOpsProject>)?.name ?? ""- );+ onValueChange={(option) => {+ onChange(option.appId ?? null);+ setValue("destinationConfig.devopsProjectName", option.name ?? "");}}options={projects}placeholder="Select a project..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-azure-dev-ops-devops-project-id-error" errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AzureEntraIdScimSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AzureEntraIdScimSyncFields.tsxindex 35b2213765..5ce15854a2 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AzureEntraIdScimSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AzureEntraIdScimSyncFields.tsx@@ -1,23 +1,20 @@-import { useMemo, useState } from "react";+import { useState } from "react";import { Controller, useFormContext, useWatch } from "react-hook-form";import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldError,FieldGroup,FieldLabel,- FilterableSelect,Tooltip,TooltipContent,TooltipTrigger} from "@app/components/v3";-import {- TAzureScimServicePrincipal,- useAzureEntraIdConnectionListScimServicePrincipals-} from "@app/hooks/api/appConnections/azure";+import { useAzureEntraIdConnectionListScimServicePrincipals } from "@app/hooks/api/appConnections/azure";import { SecretSync } from "@app/hooks/api/secretSyncs";import { useDebounce } from "@app/hooks/useDebounce";@@ -29,30 +26,25 @@ export const AzureEntraIdScimSyncFields = () => {>();const connectionId = useWatch({ control, name: "connection.id" });+ const servicePrincipalDisplayName = useWatch({+ control,+ name: "destinationConfig.servicePrincipalDisplayName"+ });const [searchInput, setSearchInput] = useState("");const [debouncedSearch] = useDebounce(searchInput, 300);- const [selectedSp, setSelectedSp] = useState<TAzureScimServicePrincipal | null>(null);const { data: servicePrincipals, isLoading: isLoadingServicePrincipals } =useAzureEntraIdConnectionListScimServicePrincipals(connectionId, debouncedSearch || undefined, {enabled: Boolean(connectionId)});- const options = useMemo(() => {- const results = servicePrincipals ?? [];- if (selectedSp && !results.some((sp) => sp.id === selectedSp.id)) {- return [selectedSp, ...results];- }- return results;- }, [servicePrincipals, selectedSp]);-return (<FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.servicePrincipalId", "");- setSelectedSp(null);+ setValue("destinationConfig.servicePrincipalDisplayName", undefined);}}/>@@ -61,7 +53,10 @@ export const AzureEntraIdScimSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>+ <FieldLabel+ id="secret-sync-azure-entra-id-scim-service-principal-id-label"+ htmlFor="secret-sync-azure-entra-id-scim-service-principal-id"+ >SCIM Service Principal<Tooltip><TooltipTrigger asChild>@@ -74,29 +69,47 @@ export const AzureEntraIdScimSyncFields = () => {</Tooltip></FieldLabel><FieldContent>- <FilterableSelect- value={options.find((sp) => sp.id === value) ?? null}- onChange={(option) => {- const selected = option as TAzureScimServicePrincipal | null;- setSelectedSp(selected);- onChange(selected?.id ?? "");+ <Combobox+ aria-labelledby="secret-sync-azure-entra-id-scim-service-principal-id-label"+ aria-describedby={+ error ? "secret-sync-azure-entra-id-scim-service-principal-id-error" : undefined+ }+ id="secret-sync-azure-entra-id-scim-service-principal-id"+ isError={Boolean(error)}+ value={value || null}+ onValueChange={(option) => {+ const selected = servicePrincipals?.find((sp) => sp.id === option);+ if (!selected || option === value) return;+ onChange(option);+ setValue("destinationConfig.servicePrincipalDisplayName", selected.displayName);}}- onInputChange={(newValue) => setSearchInput(newValue)}- filterOption={null}+ onClear={() => {+ onChange("");+ setValue("destinationConfig.servicePrincipalDisplayName", undefined);+ }}+ onInputValueChange={(newValue) => setSearchInput(newValue)}+ shouldFilter={false}+ includeMissingSelectedOptions={!searchInput}isLoading={isLoadingServicePrincipals}- options={options}+ options={(servicePrincipals ?? []).map((sp) => sp.id)}placeholder="Search for a SCIM service principal..."- getOptionLabel={(option) => option.displayName}- getOptionValue={(option) => option.id}- isClearable+ getOptionLabel={(option) =>+ servicePrincipals?.find((sp) => sp.id === option)?.displayName ??+ (servicePrincipalDisplayName || option)+ }+ getOptionValue={(option) => option}isDisabled={!connectionId}- noOptionsMessage={() =>+ emptyMessage={() =>debouncedSearch? "No matching service principals found": "Type to search for service principals"}+ modal+ />+ <FieldError+ id="secret-sync-azure-entra-id-scim-service-principal-id-error"+ errors={[error]}/>- <FieldError errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/BitbucketSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/BitbucketSyncFields.tsxindex 24a9938aa3..d965e78515 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/BitbucketSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/BitbucketSyncFields.tsx@@ -1,21 +1,17 @@import { useState } from "react";import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldError,FieldGroup,- FieldLabel,- FilterableSelect+ FieldLabel} from "@app/components/v3";import { useDebounce } from "@app/hooks";import {- TBitbucketEnvironment,- TBitbucketRepo,- TBitbucketWorkspace,useBitbucketConnectionListEnvironments,useBitbucketConnectionListRepositories,useBitbucketConnectionListWorkspaces@@ -72,29 +68,40 @@ export const BitbucketSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Bitbucket Workspace</FieldLabel>+ <FieldLabel+ id="secret-sync-bitbucket-workspace-slug-label"+ htmlFor="secret-sync-bitbucket-workspace-slug"+ >+ Bitbucket Workspace+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-bitbucket-workspace-slug-label"+ aria-describedby={error ? "secret-sync-bitbucket-workspace-slug-error" : undefined}+ id="secret-sync-bitbucket-workspace-slug"+ isError={Boolean(error)}isLoading={isWorkspacesLoading && Boolean(connectionId)}isDisabled={!connectionId}- value={workspaces.find((w) => w.slug === value) ?? null}- onChange={(option) => {- const v = option as SingleValue<TBitbucketWorkspace>;- onChange(v?.slug ?? "");+ value={value || null}+ onValueChange={(option) => {+ if (option === value) return;+ onChange(option);setValue("destinationConfig.repositorySlug", "");setValue("destinationConfig.environmentId", "");}}- onInputChange={(newValue) => setWorkspaceSearch(newValue)}- filterOption={null}- options={workspaces}+ onInputValueChange={(newValue) => setWorkspaceSearch(newValue)}+ shouldFilter={false}+ includeMissingSelectedOptions={!workspaceSearch}+ options={workspaces.map((w) => w.slug)}placeholder="Search for a workspace..."- getOptionLabel={(option) => option.slug}- getOptionValue={(option) => option.slug}- noOptionsMessage={({ inputValue }) =>+ getOptionLabel={(option) => option}+ getOptionValue={(option) => option}+ emptyMessage={(inputValue) =>inputValue ? "No workspaces found matching your search." : "No workspaces found."}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-bitbucket-workspace-slug-error" errors={[error]} /></FieldContent></Field>)}@@ -105,30 +112,43 @@ export const BitbucketSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Bitbucket Repository</FieldLabel>+ <FieldLabel+ id="secret-sync-bitbucket-repository-slug-label"+ htmlFor="secret-sync-bitbucket-repository-slug"+ >+ Bitbucket Repository+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-bitbucket-repository-slug-label"+ aria-describedby={error ? "secret-sync-bitbucket-repository-slug-error" : undefined}+ id="secret-sync-bitbucket-repository-slug"+ isError={Boolean(error)}isLoading={isRepositoriesLoading && Boolean(workspace)}isDisabled={!workspace}- value={repositories.find((r) => r.slug === value) ?? null}- onChange={(option) => {- const v = option as SingleValue<TBitbucketRepo>;- onChange(v?.slug ?? "");+ value={value || null}+ onValueChange={(option) => {+ if (option === value) return;+ onChange(option);setValue("destinationConfig.environmentId", "");}}- onInputChange={(newValue) => setRepoSearch(newValue)}- filterOption={null}- options={repositories}+ onInputValueChange={(newValue) => setRepoSearch(newValue)}+ shouldFilter={false}+ includeMissingSelectedOptions={!repoSearch}+ options={repositories.map((r) => r.slug)}placeholder="Search for a repository..."- getOptionLabel={(option) => option.full_name}- getOptionValue={(option) => option.slug}- noOptionsMessage={({ inputValue }) =>+ getOptionLabel={(option) =>+ repositories.find((r) => r.slug === option)?.full_name ?? `${workspace}/${option}`+ }+ getOptionValue={(option) => option}+ emptyMessage={(inputValue) =>inputValue? "No repositories found matching your search.": "No repositories found."}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-bitbucket-repository-slug-error" errors={[error]} /></FieldContent></Field>)}@@ -139,23 +159,35 @@ export const BitbucketSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Bitbucket Deployment Environment (Optional)</FieldLabel>+ <FieldLabel+ id="secret-sync-bitbucket-environment-id-label"+ htmlFor="secret-sync-bitbucket-environment-id"+ >+ Bitbucket Deployment Environment (Optional)+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-bitbucket-environment-id-label"+ aria-describedby={error ? "secret-sync-bitbucket-environment-id-error" : undefined}+ id="secret-sync-bitbucket-environment-id"+ isError={Boolean(error)}isLoading={isEnvironmentsLoading && Boolean(repository)}isDisabled={!repository}- value={environments.find((e) => e.uuid === value) ?? null}- onChange={(option) => {- const v = option as SingleValue<TBitbucketEnvironment>;- onChange(v?.uuid ?? "");+ value={value || null}+ onValueChange={(option) => {+ onChange(option);}}- options={environments}+ onClear={() => onChange("")}+ options={environments.map((e) => e.uuid)}placeholder="Select environment..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.uuid}- isClearable+ getOptionLabel={(option) =>+ environments.find((e) => e.uuid === option)?.name ?? option+ }+ getOptionValue={(option) => option}+ getOptionKeywords={(option) => [option]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-bitbucket-environment-id-error" errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/CamundaSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/CamundaSyncFields.tsxindex 5aae038771..80f60d5157 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/CamundaSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/CamundaSyncFields.tsx@@ -1,22 +1,20 @@import { useEffect } from "react";import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldError,FieldGroup,FieldLabel,- FilterableSelect,Tooltip,TooltipContent,TooltipTrigger} from "@app/components/v3";import { useCamundaConnectionListClusters } from "@app/hooks/api/appConnections/camunda";-import { TCamundaCluster } from "@app/hooks/api/appConnections/camunda/types";import { SecretSync } from "@app/hooks/api/secretSyncs";import { CamundaSyncScope } from "@app/hooks/api/secretSyncs/types/camunda-sync";@@ -49,7 +47,10 @@ export const CamundaSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>+ <FieldLabel+ id="secret-sync-camunda-cluster-uuid-label"+ htmlFor="secret-sync-camunda-cluster-uuid"+ >Cluster<Tooltip><TooltipTrigger asChild>@@ -61,23 +62,26 @@ export const CamundaSyncFields = () => {</Tooltip></FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-camunda-cluster-uuid-label"+ aria-describedby={error ? "secret-sync-camunda-cluster-uuid-error" : undefined}+ id="secret-sync-camunda-cluster-uuid"+ isError={Boolean(error)}isLoading={isPending && Boolean(connectionId)}isDisabled={!connectionId}value={clusters?.find((cluster) => cluster.uuid === value) ?? null}- onChange={(option) => {- onChange((option as SingleValue<TCamundaCluster>)?.uuid ?? null);- setValue(- "destinationConfig.clusterName",- (option as SingleValue<TCamundaCluster>)?.name ?? ""- );+ onValueChange={(option) => {+ onChange(option.uuid ?? null);+ setValue("destinationConfig.clusterName", option.name ?? "");}}options={clusters}placeholder="Select a cluster..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.uuid}+ getOptionKeywords={(option) => [option.uuid]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-camunda-cluster-uuid-error" errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/ChecklySyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/ChecklySyncFields.tsxindex 166ea5207a..350c17c77b 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/ChecklySyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/ChecklySyncFields.tsx@@ -1,18 +1,16 @@import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldDescription,FieldError,FieldGroup,- FieldLabel,- FilterableSelect+ FieldLabel} from "@app/components/v3";import {- TChecklyAccount,useChecklyConnectionListAccounts,useChecklyConnectionListGroups} from "@app/hooks/api/appConnections/checkly";@@ -50,7 +48,7 @@ export const ChecklySyncFields = () => {onChange={() => {setValue("destinationConfig.accountId", "");setValue("destinationConfig.accountName", "");- setValue("destinationConfig.groupId", undefined);+ setValue("destinationConfig.groupId", "");setValue("destinationConfig.groupName", undefined);}}/>@@ -59,23 +57,36 @@ export const ChecklySyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Select an account</FieldLabel>+ <FieldLabel+ id="secret-sync-checkly-account-id-label"+ htmlFor="secret-sync-checkly-account-id"+ >+ Select an account+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-checkly-account-id-label"+ aria-describedby={error ? "secret-sync-checkly-account-id-error" : undefined}+ id="secret-sync-checkly-account-id"+ isError={Boolean(error)}isLoading={isAccountsLoading && Boolean(connectionId)}isDisabled={!connectionId}value={accounts.find((p) => p.id === value) ?? null}- onChange={(option) => {- const v = option as SingleValue<TChecklyAccount>;+ onValueChange={(option) => {+ const v = option;onChange(v?.id ?? null);setValue("destinationConfig.accountName", v?.name ?? "");+ setValue("destinationConfig.groupId", "");+ setValue("destinationConfig.groupName", undefined);}}options={accounts}placeholder="Select an account..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-checkly-account-id-error" errors={[error]} /></FieldContent></Field>)}@@ -86,27 +97,45 @@ export const ChecklySyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Select a group (Optional)</FieldLabel>+ <FieldLabel+ id="secret-sync-checkly-group-id-label"+ htmlFor="secret-sync-checkly-group-id"+ >+ Select a group (Optional)+ </FieldLabel><FieldContent>- <FilterableSelect- isLoading={isGroupsLoading && Boolean(connectionId)}- isDisabled={!connectionId}- isClearable+ <Combobox+ aria-labelledby="secret-sync-checkly-group-id-label"+ aria-describedby={+ error+ ? "secret-sync-checkly-group-id-description secret-sync-checkly-group-id-error"+ : "secret-sync-checkly-group-id-description"+ }+ id="secret-sync-checkly-group-id"+ isError={Boolean(error)}+ isLoading={isGroupsLoading && Boolean(connectionId && accountId)}+ isDisabled={!connectionId || !accountId}value={groups.find((p) => p.id === value) ?? null}- onChange={(option) => {- const v = option as SingleValue<TChecklyAccount>;+ onValueChange={(option) => {+ const v = option;onChange(v?.id ?? null);setValue("destinationConfig.groupName", v?.name ?? undefined);}}+ onClear={() => {+ onChange("");+ setValue("destinationConfig.groupName", undefined);+ }}options={groups}placeholder="Select a group..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal/>- <FieldDescription>+ <FieldDescription id="secret-sync-checkly-group-id-description">If provided, secrets will be scoped to a check group instead</FieldDescription>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-checkly-group-id-error" errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/ChefSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/ChefSyncFields.tsxindex 9ef545dc56..3ab2a2f083 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/ChefSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/ChefSyncFields.tsx@@ -1,18 +1,15 @@import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldError,FieldGroup,- FieldLabel,- FilterableSelect+ FieldLabel} from "@app/components/v3";import {- TChefDataBag,- TChefDataBagItem,useChefConnectionListDataBagItems,useChefConnectionListDataBags} from "@app/hooks/api/appConnections/chef";@@ -54,14 +51,23 @@ export const ChefSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Data Bag</FieldLabel>+ <FieldLabel+ id="secret-sync-chef-data-bag-name-label"+ htmlFor="secret-sync-chef-data-bag-name"+ >+ Data Bag+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-chef-data-bag-name-label"+ aria-describedby={error ? "secret-sync-chef-data-bag-name-error" : undefined}+ id="secret-sync-chef-data-bag-name"+ isError={Boolean(error)}isLoading={isDataBagsLoading && Boolean(connectionId)}isDisabled={!connectionId}value={dataBags?.find((dataBag) => dataBag.name === value) ?? null}- onChange={(option) => {- const selectedDataBag = option as SingleValue<TChefDataBag>;+ onValueChange={(option) => {+ const selectedDataBag = option;onChange(selectedDataBag?.name ?? "");setValue("destinationConfig.dataBagItemName", "");}}@@ -69,8 +75,9 @@ export const ChefSyncFields = () => {placeholder="Select a data bag..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.name}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-chef-data-bag-name-error" errors={[error]} /></FieldContent></Field>)}@@ -81,22 +88,32 @@ export const ChefSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Data Bag Item</FieldLabel>+ <FieldLabel+ id="secret-sync-chef-data-bag-item-name-label"+ htmlFor="secret-sync-chef-data-bag-item-name"+ >+ Data Bag Item+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-chef-data-bag-item-name-label"+ aria-describedby={error ? "secret-sync-chef-data-bag-item-name-error" : undefined}+ id="secret-sync-chef-data-bag-item-name"+ isError={Boolean(error)}isLoading={isDataBagItemsLoading && Boolean(connectionId && dataBagName)}isDisabled={!connectionId || !dataBagName}value={dataBagItems?.find((dataBagItem) => dataBagItem.name === value) ?? null}- onChange={(option) => {- const selectedDataBagItem = option as SingleValue<TChefDataBagItem>;+ onValueChange={(option) => {+ const selectedDataBagItem = option;onChange(selectedDataBagItem?.name ?? "");}}options={dataBagItems}placeholder="Select a data bag item..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.name}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-chef-data-bag-item-name-error" errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/CircleCISyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/CircleCISyncFields.tsxindex 5397c5c722..1499a6a4bd 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/CircleCISyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/CircleCISyncFields.tsx@@ -1,21 +1,16 @@import { useMemo } from "react";import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldError,FieldGroup,- FieldLabel,- FilterableSelect+ FieldLabel} from "@app/components/v3";-import {- TCircleCIOrganization,- TCircleCIProject,- useCircleCIConnectionListOrganizations-} from "@app/hooks/api/appConnections/circleci";+import { useCircleCIConnectionListOrganizations } from "@app/hooks/api/appConnections/circleci";import { SecretSync } from "@app/hooks/api/secretSyncs";import { TSecretSyncForm } from "../schemas";@@ -55,14 +50,23 @@ export const CircleCISyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Organization</FieldLabel>+ <FieldLabel+ id="secret-sync-circle-ci-org-name-label"+ htmlFor="secret-sync-circle-ci-org-name"+ >+ Organization+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-circle-ci-org-name-label"+ aria-describedby={error ? "secret-sync-circle-ci-org-name-error" : undefined}+ id="secret-sync-circle-ci-org-name"+ isError={Boolean(error)}isLoading={isOrganizationsPending && Boolean(connectionId)}isDisabled={!connectionId}value={organizations.find((org) => org.name === value) ?? null}- onChange={(option) => {- const selectedOrg = option as SingleValue<TCircleCIOrganization>;+ onValueChange={(option) => {+ const selectedOrg = option;onChange(selectedOrg?.name ?? "");setValue("destinationConfig.projectId", "");setValue("destinationConfig.projectName", "");@@ -71,8 +75,9 @@ export const CircleCISyncFields = () => {placeholder="Select an organization..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.name}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-circle-ci-org-name-error" errors={[error]} /></FieldContent></Field>)}@@ -83,17 +88,26 @@ export const CircleCISyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Project</FieldLabel>+ <FieldLabel+ id="secret-sync-circle-ci-project-id-label"+ htmlFor="secret-sync-circle-ci-project-id"+ >+ Project+ </FieldLabel><FieldContent>- <FilterableSelect- noOptionsMessage={() =>+ <Combobox+ aria-labelledby="secret-sync-circle-ci-project-id-label"+ aria-describedby={error ? "secret-sync-circle-ci-project-id-error" : undefined}+ id="secret-sync-circle-ci-project-id"+ isError={Boolean(error)}+ emptyMessage={() =>"No projects found. Please create a project in your selected organization."}isLoading={isOrganizationsPending && Boolean(connectionId)}isDisabled={!selectedOrgName}value={projects.find((project) => project.id === value) ?? null}- onChange={(option) => {- const selectedProject = option as SingleValue<TCircleCIProject>;+ onValueChange={(option) => {+ const selectedProject = option;onChange(selectedProject?.id ?? "");setValue("destinationConfig.projectName", selectedProject?.name ?? "");}}@@ -101,8 +115,10 @@ export const CircleCISyncFields = () => {placeholder="Select a project..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-circle-ci-project-id-error" errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/Cloud66SyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/Cloud66SyncFields.tsxindex af9b4e801d..a485da6575 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/Cloud66SyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/Cloud66SyncFields.tsx@@ -1,5 +1,4 @@import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { TriangleAlert } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";@@ -7,14 +6,13 @@ import {Alert,AlertDescription,AlertTitle,+ Combobox,Field,FieldContent,FieldError,FieldGroup,- FieldLabel,- FilterableSelect+ FieldLabel} from "@app/components/v3";-import { TCloud66Stack } from "@app/hooks/api/appConnections/cloud-66";import { useCloud66ConnectionListStacks } from "@app/hooks/api/appConnections/cloud-66/queries";import { SecretSync } from "@app/hooks/api/secretSyncs";@@ -48,14 +46,23 @@ export const Cloud66SyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Stack</FieldLabel>+ <FieldLabel+ id="secret-sync-cloud66-stack-id-label"+ htmlFor="secret-sync-cloud66-stack-id"+ >+ Stack+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-cloud66-stack-id-label"+ aria-describedby={error ? "secret-sync-cloud66-stack-id-error" : undefined}+ id="secret-sync-cloud66-stack-id"+ isError={Boolean(error)}isLoading={isStacksLoading && Boolean(connectionId)}isDisabled={!connectionId}value={stacks?.find((stack) => stack.id === value) ?? null}- onChange={(option) => {- const selectedStack = option as SingleValue<TCloud66Stack>;+ onValueChange={(option) => {+ const selectedStack = option;onChange(selectedStack?.id ?? "");setValue("destinationConfig.stackName", selectedStack?.name ?? "");}}@@ -63,8 +70,10 @@ export const Cloud66SyncFields = () => {placeholder="Select a stack..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-cloud66-stack-id-error" errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/CloudflarePagesSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/CloudflarePagesSyncFields.tsxindex 09f5dda763..71d61e81af 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/CloudflarePagesSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/CloudflarePagesSyncFields.tsx@@ -1,24 +1,20 @@import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldError,FieldGroup,FieldLabel,- FilterableSelect,Select,SelectContent,SelectItem,SelectTrigger,SelectValue} from "@app/components/v3";-import {- TCloudflarePagesProject,- useCloudflareConnectionListPagesProjects-} from "@app/hooks/api/appConnections/cloudflare";+import { useCloudflareConnectionListPagesProjects } from "@app/hooks/api/appConnections/cloudflare";import { SecretSync } from "@app/hooks/api/secretSyncs";import { TSecretSyncForm } from "../schemas";@@ -59,21 +55,34 @@ export const CloudflarePagesSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Project</FieldLabel>+ <FieldLabel+ id="secret-sync-cloudflare-pages-project-name-label"+ htmlFor="secret-sync-cloudflare-pages-project-name"+ >+ Project+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-cloudflare-pages-project-name-label"+ aria-describedby={+ error ? "secret-sync-cloudflare-pages-project-name-error" : undefined+ }+ id="secret-sync-cloudflare-pages-project-name"+ isError={Boolean(error)}isLoading={isProjectsPending && Boolean(connectionId)}isDisabled={!connectionId}- value={projects ? (projects.find((project) => project.name === value) ?? []) : []}- onChange={(option) => {- onChange((option as SingleValue<TCloudflarePagesProject>)?.name ?? null);+ value={projects.find((project) => project.name === value) ?? null}+ onValueChange={(option) => {+ onChange(option.name ?? null);}}options={projects}placeholder="Select a project..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id.toString()}+ getOptionKeywords={(option) => [option.id.toString()]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-cloudflare-pages-project-name-error" errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/CloudflareWorkersSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/CloudflareWorkersSyncFields.tsxindex cc8cd7b437..1510bb80f9 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/CloudflareWorkersSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/CloudflareWorkersSyncFields.tsx@@ -1,19 +1,15 @@import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldError,FieldGroup,- FieldLabel,- FilterableSelect+ FieldLabel} from "@app/components/v3";-import {- TCloudflareWorkersScript,- useCloudflareConnectionListWorkersScripts-} from "@app/hooks/api/appConnections/cloudflare";+import { useCloudflareConnectionListWorkersScripts } from "@app/hooks/api/appConnections/cloudflare";import { SecretSync } from "@app/hooks/api/secretSyncs";import { TSecretSyncForm } from "../schemas";@@ -42,21 +38,33 @@ export const CloudflareWorkersSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Worker Script</FieldLabel>+ <FieldLabel+ id="secret-sync-cloudflare-workers-script-id-label"+ htmlFor="secret-sync-cloudflare-workers-script-id"+ >+ Worker Script+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-cloudflare-workers-script-id-label"+ aria-describedby={+ error ? "secret-sync-cloudflare-workers-script-id-error" : undefined+ }+ id="secret-sync-cloudflare-workers-script-id"+ isError={Boolean(error)}isLoading={isScriptsPending && Boolean(connectionId)}isDisabled={!connectionId}- value={scripts?.find((script) => script.id === value) || []}- onChange={(option) => {- onChange((option as SingleValue<TCloudflareWorkersScript>)?.id ?? null);+ value={scripts?.find((script) => script.id === value) ?? null}+ onValueChange={(option) => {+ onChange(option.id ?? null);}}options={scripts}placeholder="Select a worker script..."getOptionLabel={(option) => option.id}getOptionValue={(option) => option.id}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-cloudflare-workers-script-id-error" errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/DatabricksSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/DatabricksSyncFields.tsxindex 76a7b1b66b..31cdc13d4f 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/DatabricksSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/DatabricksSyncFields.tsx@@ -1,23 +1,19 @@import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldError,FieldGroup,FieldLabel,- FilterableSelect,Tooltip,TooltipContent,TooltipTrigger} from "@app/components/v3";-import {- TDatabricksSecretScope,- useDatabricksConnectionListSecretScopes-} from "@app/hooks/api/appConnections/databricks";+import { useDatabricksConnectionListSecretScopes } from "@app/hooks/api/appConnections/databricks";import { SecretSync } from "@app/hooks/api/secretSyncs";import { TSecretSyncForm } from "../schemas";@@ -46,7 +42,10 @@ export const DatabricksSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>+ <FieldLabel+ id="secret-sync-databricks-scope-label"+ htmlFor="secret-sync-databricks-scope"+ >Secret Scope<Tooltip><TooltipTrigger asChild>@@ -62,19 +61,22 @@ export const DatabricksSyncFields = () => {</Tooltip></FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-databricks-scope-label"+ aria-describedby={error ? "secret-sync-databricks-scope-error" : undefined}+ id="secret-sync-databricks-scope"+ isError={Boolean(error)}isLoading={isSecretScopesPending && Boolean(connectionId)}isDisabled={!connectionId}value={secretScopes.find((scope) => scope.name === value) ?? null}- onChange={(option) =>- onChange((option as SingleValue<TDatabricksSecretScope>)?.name ?? null)- }+ onValueChange={(option) => onChange(option.name ?? null)}options={secretScopes}placeholder="Select a secret scope..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.name}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-databricks-scope-error" errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/DigitalOceanAppPlatformSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/DigitalOceanAppPlatformSyncFields.tsxindex a5e3933326..07b3ecfe58 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/DigitalOceanAppPlatformSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/DigitalOceanAppPlatformSyncFields.tsx@@ -1,17 +1,15 @@import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldError,FieldGroup,- FieldLabel,- FilterableSelect+ FieldLabel} from "@app/components/v3";import { useDigitalOceanConnectionListApps } from "@app/hooks/api/appConnections/digital-ocean";-import { TDigitalOceanApp } from "@app/hooks/api/appConnections/digital-ocean/types";import { SecretSync } from "@app/hooks/api/secretSyncs";import { TSecretSyncForm } from "../schemas";@@ -43,14 +41,25 @@ export const DigitalOceanAppPlatformSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Select an app</FieldLabel>+ <FieldLabel+ id="secret-sync-digital-ocean-app-platform-app-id-label"+ htmlFor="secret-sync-digital-ocean-app-platform-app-id"+ >+ Select an app+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-digital-ocean-app-platform-app-id-label"+ aria-describedby={+ error ? "secret-sync-digital-ocean-app-platform-app-id-error" : undefined+ }+ id="secret-sync-digital-ocean-app-platform-app-id"+ isError={Boolean(error)}isLoading={isAccountsLoading && Boolean(connectionId)}isDisabled={!connectionId}value={apps.find((p) => p.id === value) ?? null}- onChange={(option) => {- const v = option as SingleValue<TDigitalOceanApp>;+ onValueChange={(option) => {+ const v = option;onChange(v?.id ?? null);setValue("destinationConfig.appName", v?.spec.name ?? "");}}@@ -58,8 +67,13 @@ export const DigitalOceanAppPlatformSyncFields = () => {placeholder="Select an app..."getOptionLabel={(option) => option.spec.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal+ />+ <FieldError+ id="secret-sync-digital-ocean-app-platform-app-id-error"+ errors={[error]}/>- <FieldError errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/ExternalInfisicalSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/ExternalInfisicalSyncFields.tsxindex 9a309f5ec1..4bd1ab8642 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/ExternalInfisicalSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/ExternalInfisicalSyncFields.tsx@@ -1,16 +1,15 @@import { useMemo } from "react";import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldError,FieldGroup,FieldLabel,- FilterableSelect,SecretPathInput,Tooltip,TooltipContent,@@ -18,7 +17,6 @@ import {} from "@app/components/v3";import {TRemoteInfisicalEnvironmentFolderTree,- TRemoteInfisicalProject,useExternalInfisicalConnectionGetEnvironmentFolderTree,useExternalInfisicalConnectionListProjects} from "@app/hooks/api/appConnections/external-infisical";@@ -87,7 +85,10 @@ export const ExternalInfisicalSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>+ <FieldLabel+ id="secret-sync-external-infisical-project-id-label"+ htmlFor="secret-sync-external-infisical-project-id"+ >Project<Tooltip><TooltipTrigger asChild>@@ -100,12 +101,18 @@ export const ExternalInfisicalSyncFields = () => {</Tooltip></FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-external-infisical-project-id-label"+ aria-describedby={+ error ? "secret-sync-external-infisical-project-id-error" : undefined+ }+ id="secret-sync-external-infisical-project-id"+ isError={Boolean(error)}isLoading={isProjectsLoading && Boolean(connectionId)}isDisabled={!connectionId}value={projects.find((p) => p.id === value) ?? null}- onChange={(option) => {- const v = option as SingleValue<TRemoteInfisicalProject>;+ onValueChange={(option) => {+ const v = option;onChange(v?.id ?? "");setValue("destinationConfig.environment", "");setValue("destinationConfig.secretPath", "/");@@ -114,8 +121,10 @@ export const ExternalInfisicalSyncFields = () => {placeholder="Select a project..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id, option.slug]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-external-infisical-project-id-error" errors={[error]} /></FieldContent></Field>)}@@ -125,7 +134,10 @@ export const ExternalInfisicalSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>+ <FieldLabel+ id="secret-sync-external-infisical-environment-label"+ htmlFor="secret-sync-external-infisical-environment"+ >Environment<Tooltip><TooltipTrigger asChild>@@ -135,12 +147,18 @@ export const ExternalInfisicalSyncFields = () => {</Tooltip></FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-external-infisical-environment-label"+ aria-describedby={+ error ? "secret-sync-external-infisical-environment-error" : undefined+ }+ id="secret-sync-external-infisical-environment"+ isError={Boolean(error)}isLoading={isProjectsLoading && Boolean(connectionId)}isDisabled={!connectionId || !projectId}value={environments.find((e) => e.slug === value) ?? null}- onChange={(option) => {- const v = option as SingleValue<{ id: string; name: string; slug: string }>;+ onValueChange={(option) => {+ const v = option;onChange(v?.slug ?? "");setValue("destinationConfig.secretPath", "/");}}@@ -148,8 +166,10 @@ export const ExternalInfisicalSyncFields = () => {placeholder="Select an environment..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.slug}+ getOptionKeywords={(option) => [option.slug]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-external-infisical-environment-error" errors={[error]} /></FieldContent></Field>)}@@ -173,6 +193,7 @@ export const ExternalInfisicalSyncFields = () => {</FieldLabel><FieldContent><SecretPathInput+ isError={Boolean(error)}disabled={!connectionId || !projectId || !environmentSlug}value={value}onChange={onChange}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/FlyioSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/FlyioSyncFields.tsxindex 86e779dd20..a8e4846b3a 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/FlyioSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/FlyioSyncFields.tsx@@ -1,16 +1,15 @@import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldError,FieldGroup,- FieldLabel,- FilterableSelect+ FieldLabel} from "@app/components/v3";-import { TFlyioApp, useFlyioConnectionListApps } from "@app/hooks/api/appConnections/flyio";+import { useFlyioConnectionListApps } from "@app/hooks/api/appConnections/flyio";import { SecretSync } from "@app/hooks/api/secretSyncs";import { TSecretSyncForm } from "../schemas";@@ -39,22 +38,30 @@ export const FlyioSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>App</FieldLabel>+ <FieldLabel id="secret-sync-flyio-app-id-label" htmlFor="secret-sync-flyio-app-id">+ App+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-flyio-app-id-label"+ aria-describedby={error ? "secret-sync-flyio-app-id-error" : undefined}+ id="secret-sync-flyio-app-id"+ isError={Boolean(error)}isLoading={isAppsLoading && Boolean(connectionId)}isDisabled={!connectionId}value={apps?.find((v) => v.id === value) ?? null}- onChange={(option) => {- const selected = option as SingleValue<TFlyioApp>;+ onValueChange={(option) => {+ const selected = option;onChange(selected?.id ?? null);}}options={apps}placeholder="Select an app..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-flyio-app-id-error" errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GcpSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GcpSyncFields.tsxindex 4f8b29332a..88ff6a378a 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GcpSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GcpSyncFields.tsx@@ -1,6 +1,5 @@import { useEffect, useMemo, useRef, useState } from "react";import { Controller, useFormContext, useWatch } from "react-hook-form";-import { FormatOptionLabelMeta, MultiValue, SingleValue } from "react-select";import { Info, TriangleAlert } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";@@ -13,12 +12,12 @@ import {AlertDescription,AlertTitle,Badge,+ Combobox,Field,FieldContent,FieldError,FieldGroup,FieldLabel,- FilterableSelect,Select,SelectContent,SelectItem,@@ -33,27 +32,23 @@ import {useGcpConnectionListProjectLocations,useGcpConnectionListProjects} from "@app/hooks/api/appConnections/gcp/queries";-import { TGcpLocation, TGcpProject } from "@app/hooks/api/appConnections/gcp/types";+import { TGcpLocation } from "@app/hooks/api/appConnections/gcp/types";import { SecretSync } from "@app/hooks/api/secretSyncs";import { GcpSyncScope } from "@app/hooks/api/secretSyncs/types/gcp-sync";import { TSecretSyncForm } from "../schemas";-// The control renders selected values inside chips (isMulti), where a nested Badge reads as a-// badge-in-badge; use plain parentheses there and keep the Badge for menu options.-const formatOptionLabel = (- { displayName, locationId }: TGcpLocation,- { context }: FormatOptionLabelMeta<TGcpLocation>-) =>- context === "value" ? (- <span>- {displayName} ({locationId})- </span>- ) : (- <div className="flex w-full flex-row items-center gap-1">- <span>{displayName}</span> <Badge variant="info">{locationId}</Badge>- </div>- );+const renderLocationOption = ({ displayName, locationId }: TGcpLocation) => (+ <div className="flex w-full flex-row items-center gap-1">+ <span>{displayName}</span> <Badge variant="info">{locationId}</Badge>+ </div>+);++const renderLocationValue = ({ displayName, locationId }: TGcpLocation) => (+ <span>+ {displayName} ({locationId})+ </span>+);const ADVANCED_ITEM_VALUE = "gcp-secret-manager-advanced";@@ -166,7 +161,10 @@ export const GcpSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>+ <FieldLabel+ id="secret-sync-gcp-project-id-label"+ htmlFor="secret-sync-gcp-project-id"+ >Project<Tooltip><TooltipTrigger asChild>@@ -180,21 +178,27 @@ export const GcpSyncFields = () => {</Tooltip></FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-gcp-project-id-label"+ aria-describedby={error ? "secret-sync-gcp-project-id-error" : undefined}+ id="secret-sync-gcp-project-id"+ isError={Boolean(error)}isLoading={isPending && Boolean(connectionId)}isDisabled={!connectionId}value={projects?.find((project) => project.id === value) ?? null}- onChange={(option) => {+ onValueChange={(option) => {setValue("destinationConfig.locationId", "");setValue("destinationConfig.userReplicaLocationIds", []);- onChange((option as SingleValue<TGcpProject>)?.id ?? null);+ onChange(option.id);}}- options={projects}+ options={projects ?? []}placeholder="Select a GCP project..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id.toString()}+ getOptionKeywords={(option) => [option.id.toString()]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-gcp-project-id-error" errors={[error]} /></FieldContent></Field>)}@@ -219,8 +223,8 @@ export const GcpSyncFields = () => {<ul className="flex list-disc flex-col gap-3 pl-4">{Object.values(GCP_SYNC_SCOPES).map(({ name, description }) => (<li key={name}>- <p className="text-mineshaft-300">- <span className="font-medium text-bunker-200">{name}</span>:{" "}+ <p className="text-label">+ <span className="font-medium text-foreground">{name}</span>:{" "}{description}</p></li>@@ -262,21 +266,31 @@ export const GcpSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Region</FieldLabel>+ <FieldLabel+ id="secret-sync-gcp-location-id-label"+ htmlFor="secret-sync-gcp-location-id"+ >+ Region+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-gcp-location-id-label"+ aria-describedby={error ? "secret-sync-gcp-location-id-error" : undefined}+ id="secret-sync-gcp-location-id"+ isError={Boolean(error)}isLoading={areLocationsPending && Boolean(projectId)}isDisabled={!projectId}value={locations?.find((option) => option.locationId === value) ?? null}- onChange={(option) =>- onChange((option as SingleValue<TGcpLocation>)?.locationId ?? "")- }- options={locations}+ onValueChange={(option) => onChange(option.locationId)}+ options={locations ?? []}placeholder="Select a region..."+ getOptionLabel={(option) => `${option.displayName} (${option.locationId})`}getOptionValue={(option) => option.locationId}- formatOptionLabel={formatOptionLabel}+ renderOption={renderLocationOption}+ renderValue={renderLocationValue}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-gcp-location-id-error" errors={[error]} /></FieldContent></Field>)}@@ -302,7 +316,10 @@ export const GcpSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>+ <FieldLabel+ id="secret-sync-gcp-user-replica-location-ids-label"+ htmlFor="secret-sync-gcp-user-replica-location-ids"+ >Replica Regions<Tooltip><TooltipTrigger asChild>@@ -315,26 +332,34 @@ export const GcpSyncFields = () => {</Tooltip></FieldLabel><FieldContent>- <FilterableSelect- isMulti+ <Combobox+ aria-labelledby="secret-sync-gcp-user-replica-location-ids-label"+ aria-describedby={+ error ? "secret-sync-gcp-user-replica-location-ids-error" : undefined+ }+ id="secret-sync-gcp-user-replica-location-ids"+ isError={Boolean(error)}+ multipleisLoading={areLocationsPending && Boolean(projectId)}isDisabled={!projectId || lockReplicaRegions}- isClearable={!lockReplicaRegions}value={locations?.filter((option) =>(value || []).includes(option.locationId)) ?? []}- onChange={(option) =>- onChange((option as MultiValue<TGcpLocation>).map((o) => o.locationId))+ onValueChange={(options) =>+ onChange(options.map((option) => option.locationId))}- options={locations}+ options={locations ?? []}placeholder="Automatic replication"+ getOptionLabel={(option) =>+ `${option.displayName} (${option.locationId})`+ }getOptionValue={(option) => option.locationId}- formatOptionLabel={formatOptionLabel}- menuPortalTarget={menuPortalTarget ?? undefined}- menuPosition="fixed"- menuPlacement="auto"+ renderOption={renderLocationOption}+ renderValue={renderLocationValue}+ portalContainer={menuPortalTarget}+ modal/>{(value?.length ?? 0) > 0 && (@@ -353,7 +378,10 @@ export const GcpSyncFields = () => {</AlertDescription></Alert>)}- <FieldError errors={[error]} />+ <FieldError+ id="secret-sync-gcp-user-replica-location-ids-error"+ errors={[error]}+ /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GitHubSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GitHubSyncFields.tsxindex a3879aeae1..3d3ea94a1c 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GitHubSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GitHubSyncFields.tsx@@ -1,14 +1,13 @@import { Controller, useFormContext, useWatch } from "react-hook-form";-import { MultiValue, SingleValue } from "react-select";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldError,FieldGroup,FieldLabel,- FilterableSelect,Select,SelectContent,SelectItem,@@ -16,9 +15,6 @@ import {SelectValue} from "@app/components/v3";import {- TGitHubConnectionEnvironment,- TGitHubConnectionOrganization,- TGitHubConnectionRepository,useGitHubConnectionListEnvironments,useGitHubConnectionListOrganizations,useGitHubConnectionListRepositories@@ -77,7 +73,7 @@ export const GitHubSyncFields = () => {setValue("destinationConfig.org", "");setValue("destinationConfig.repo", "");setValue("destinationConfig.owner", "");- setValue("destinationConfig.selectedRepositoryIds", undefined);+ setValue("destinationConfig.selectedRepositoryIds", []);}}/><Controller@@ -112,23 +108,31 @@ export const GitHubSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Organization</FieldLabel>+ <FieldLabel id="secret-sync-git-hub-org-label" htmlFor="secret-sync-git-hub-org">+ Organization+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-git-hub-org-label"+ aria-describedby={error ? "secret-sync-git-hub-org-error" : undefined}+ id="secret-sync-git-hub-org"+ isError={Boolean(error)}isLoading={isOrganizationsPending && Boolean(connectionId)}isDisabled={!connectionId}value={organizations.find((org) => org.login === value) ?? null}- onChange={(option) =>- onChange(- (option as SingleValue<TGitHubConnectionOrganization>)?.login ?? null- )- }+ onValueChange={(option) => {+ if (option.login === value) return;++ onChange(option.login);+ setValue("destinationConfig.selectedRepositoryIds", []);+ }}options={organizations}placeholder="Select an organization..."getOptionLabel={(option) => option.login}getOptionValue={(option) => option.login}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-git-hub-org-error" errors={[error]} /></FieldContent></Field>)}@@ -145,7 +149,7 @@ export const GitHubSyncFields = () => {value={value}onValueChange={(val) => {onChange(val);- setValue("destinationConfig.selectedRepositoryIds", undefined);+ setValue("destinationConfig.selectedRepositoryIds", []);}}><SelectTrigger className="w-full capitalize" isError={Boolean(error)}>@@ -168,23 +172,39 @@ export const GitHubSyncFields = () => {<Controllerrender={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Selected Repositories</FieldLabel>+ <FieldLabel+ id="secret-sync-git-hub-selected-repository-ids-label"+ htmlFor="secret-sync-git-hub-selected-repository-ids"+ >+ Selected Repositories+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-git-hub-selected-repository-ids-label"+ aria-describedby={+ error ? "secret-sync-git-hub-selected-repository-ids-error" : undefined+ }+ id="secret-sync-git-hub-selected-repository-ids"+ isError={Boolean(error)}isLoading={isRepositoriesPending && Boolean(currentOrg)}isDisabled={!currentOrg || !connectionId}- isMulti+ multiplevalue={repositories.filter((repo) => value?.includes(repo.id))}- onChange={(option) => {- const repos = option as MultiValue<TGitHubConnectionRepository>;+ onValueChange={(option) => {+ const repos = option;onChange(repos.map((repo) => repo.id));}}options={repositories.filter((repo) => repo.owner.login === currentOrg)}placeholder="Select one or more repositories..."getOptionLabel={(option) => `${option.owner.login}/${option.name}`}getOptionValue={(option) => option.id.toString()}+ getOptionKeywords={(option) => [option.id.toString()]}+ modal+ />+ <FieldError+ id="secret-sync-git-hub-selected-repository-ids-error"+ errors={[error]}/>- <FieldError errors={[error]} /></FieldContent></Field>)}@@ -198,14 +218,24 @@ export const GitHubSyncFields = () => {<Controllerrender={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Repository</FieldLabel>+ <FieldLabel id="secret-sync-git-hub-repo-label" htmlFor="secret-sync-git-hub-repo">+ Repository+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-git-hub-repo-label"+ aria-describedby={error ? "secret-sync-git-hub-repo-error" : undefined}+ id="secret-sync-git-hub-repo"+ isError={Boolean(error)}isLoading={isRepositoriesPending && Boolean(connectionId)}isDisabled={!connectionId}- value={repositories.find((repo) => repo.name === value) ?? null}- onChange={(option) => {- const repo = option as SingleValue<TGitHubConnectionRepository>;+ value={+ repositories.find(+ (repo) => repo.name === value && repo.owner.login === currentOwner+ ) ?? null+ }+ onValueChange={(option) => {+ const repo = option;onChange(repo?.name);setValue("destinationConfig.owner", repo?.owner.login ?? "");@@ -215,8 +245,10 @@ export const GitHubSyncFields = () => {placeholder="Select a repository..."getOptionLabel={(option) => `${option.owner.login}/${option.name}`}getOptionValue={(option) => option.id.toString()}+ getOptionKeywords={(option) => [option.id.toString()]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-git-hub-repo-error" errors={[error]} /></FieldContent></Field>)}@@ -230,21 +262,27 @@ export const GitHubSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Environment</FieldLabel>+ <FieldLabel id="secret-sync-git-hub-env-label" htmlFor="secret-sync-git-hub-env">+ Environment+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-git-hub-env-label"+ aria-describedby={error ? "secret-sync-git-hub-env-error" : undefined}+ id="secret-sync-git-hub-env"+ isError={Boolean(error)}isLoading={isEnvironmentsPending && Boolean(connectionId) && Boolean(currentRepo)}isDisabled={!connectionId || !currentRepo}value={environments.find((env) => env.name === value) ?? null}- onChange={(option) =>- onChange((option as SingleValue<TGitHubConnectionEnvironment>)?.name ?? null)- }+ onValueChange={(option) => onChange(option.name ?? null)}options={environments}placeholder="Select an environment..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id.toString()}+ getOptionKeywords={(option) => [option.id.toString()]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-git-hub-env-error" errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GitLabSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GitLabSyncFields.tsxindex 839b360d6d..8ddf1321fa 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GitLabSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GitLabSyncFields.tsx@@ -1,17 +1,17 @@-import { useMemo, useState } from "react";+import { useState } from "react";import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";+import axios, { HttpStatusCode } from "axios";import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldDescription,FieldError,FieldGroup,FieldLabel,- FilterableSelect,Input,Label,Select,@@ -37,25 +37,36 @@ import { GitLabSyncScope } from "@app/hooks/api/secretSyncs/types/gitlab-sync";import { TSecretSyncForm } from "../schemas";const GITLAB_SYNC_LIST_LIMIT = 20;+const GITLAB_SEARCH_DEBOUNCE_MS = 500;-const formatGitLabGroupOptionLabel = (group: TGitLabGroup) => (- <div className="flex min-w-0 items-center gap-2">- <span className="shrink-0">{group.name}</span>+const normalizeGitLabSearch = (value: string) => value.trim().toLocaleLowerCase();++const getGitLabSearchErrorMessage = (error: unknown, resource: "groups" | "projects") => {+ if (!error) return null;++ return axios.isAxiosError(error) && error.response?.status === HttpStatusCode.TooManyRequests+ ? `GitLab is rate limiting ${resource}. Wait a moment and try again.`+ : `Unable to load GitLab ${resource}. Try again.`;+};++const renderGitLabGroupOption = (group: TGitLabGroup) => (+ <div className="min-w-0">+ <p className="truncate">{group.name}</p>{group.fullPath !== group.name && (- <span className="min-w-0 truncate text-muted">{group.fullPath}</span>+ <p className="truncate text-xs leading-4 text-muted">{group.fullPath}</p>)}</div>);-const formatGitLabProjectOptionLabel = (project: TGitLabProject) => {+const renderGitLabProjectOption = (project: TGitLabProject) => {const fullPathWithNamespace = project.name;const shortName = fullPathWithNamespace.split("/").pop() || fullPathWithNamespace;return (- <div className="flex min-w-0 items-center gap-2">- <span className="shrink-0">{shortName}</span>+ <div className="min-w-0">+ <p className="truncate">{shortName}</p>{fullPathWithNamespace !== shortName && (- <span className="min-w-0 truncate text-muted">{fullPathWithNamespace}</span>+ <p className="truncate text-xs leading-4 text-muted">{fullPathWithNamespace}</p>)}</div>);@@ -99,9 +110,9 @@ export const GitLabSyncFields = () => {>();const [projectSearch, setProjectSearch] = useState("");- const [debouncedProjectSearch] = useDebounce(projectSearch, 300);+ const [debouncedProjectSearch] = useDebounce(projectSearch, GITLAB_SEARCH_DEBOUNCE_MS);const [groupSearch, setGroupSearch] = useState("");- const [debouncedGroupSearch] = useDebounce(groupSearch, 300);+ const [debouncedGroupSearch] = useDebounce(groupSearch, GITLAB_SEARCH_DEBOUNCE_MS);const connectionId = useWatch({ name: "connection.id", control });const scope = useWatch({ name: "destinationConfig.scope", control });@@ -111,7 +122,11 @@ export const GitLabSyncFields = () => {const groupId = useWatch({ name: "destinationConfig.groupId", control });const groupName = useWatch({ name: "destinationConfig.groupName", control });- const { data: groups, isLoading: isGroupsLoading } = useGitLabConnectionListGroups(+ const {+ data: groups,+ error: groupsError,+ isFetching: isGroupsFetching+ } = useGitLabConnectionListGroups(connectionId,debouncedGroupSearch || undefined,GITLAB_SYNC_LIST_LIMIT,@@ -120,7 +135,11 @@ export const GitLabSyncFields = () => {});- const { data: projects, isLoading: isProjectsLoading } = useGitLabConnectionListProjects(+ const {+ data: projects,+ error: projectsError,+ isFetching: isProjectsFetching+ } = useGitLabConnectionListProjects(connectionId,debouncedProjectSearch || undefined,GITLAB_SYNC_LIST_LIMIT,@@ -129,26 +148,19 @@ export const GitLabSyncFields = () => {});- // The provider only returns the first page, so the currently-selected item may not be in the- // results. Surface it from the stored name so the selection always renders (e.g. when editing).- const groupOptions = useMemo(() => {- const results = groups ?? [];- if (groupId && groupName && !results.some((group) => group.id === groupId)) {- return [- { id: groupId, name: groupName, fullName: groupName, fullPath: groupName },- ...results- ];- }- return results;- }, [groups, groupId, groupName]);+ const isGroupSearchPending =+ Boolean(connectionId) &&+ scope === GitLabSyncScope.Group &&+ (normalizeGitLabSearch(groupSearch) !== normalizeGitLabSearch(debouncedGroupSearch) ||+ isGroupsFetching);+ const isProjectSearchPending =+ Boolean(connectionId) &&+ scope === GitLabSyncScope.Project &&+ (normalizeGitLabSearch(projectSearch) !== normalizeGitLabSearch(debouncedProjectSearch) ||+ isProjectsFetching);- const projectOptions = useMemo(() => {- const results = projects ?? [];- if (projectId && projectName && !results.some((project) => project.id === projectId)) {- return [{ id: projectId, name: projectName }, ...results];- }- return results;- }, [projects, projectId, projectName]);+ const groupsErrorMessage = getGitLabSearchErrorMessage(groupsError, "groups");+ const projectsErrorMessage = getGitLabSearchErrorMessage(projectsError, "projects");return (<FieldGroup>@@ -205,9 +217,12 @@ export const GitLabSyncFields = () => {<Controllername="destinationConfig.groupId"control={control}- render={({ field: { value, onChange }, fieldState: { error } }) => (+ render={({ field: { onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>+ <FieldLabel+ id="secret-sync-git-lab-group-id-label"+ htmlFor="secret-sync-git-lab-group-id"+ >Group<Tooltip><TooltipTrigger asChild>@@ -220,29 +235,49 @@ export const GitLabSyncFields = () => {</Tooltip></FieldLabel><FieldContent>- <FilterableSelect- isLoading={isGroupsLoading && Boolean(connectionId)}+ <Combobox+ aria-labelledby="secret-sync-git-lab-group-id-label"+ aria-describedby={error ? "secret-sync-git-lab-group-id-error" : undefined}+ id="secret-sync-git-lab-group-id"+ isError={Boolean(error)}+ isLoading={isGroupSearchPending}+ loadingMessage="Loading GitLab groups..."isDisabled={!connectionId}- value={groupOptions.find((group) => group.id === value) ?? null}- onChange={(option) => {- const selected = option as SingleValue<TGitLabGroup>;- onChange(selected?.id ?? "");+ value={groupId || null}+ onValueChange={(option) => {+ const selected = groups?.find((item) => item.id === option);+ if (!selected || option === groupId) return;+ onChange(option);setValue("destinationConfig.groupName", selected?.fullName ?? "", {shouldDirty: true});}}- onInputChange={(newValue) => setGroupSearch(newValue)}- filterOption={null}- options={groupOptions}+ onClear={() => {+ onChange("");+ setValue("destinationConfig.groupName", "", { shouldDirty: true });+ setGroupSearch("");+ }}+ clearAriaLabel="Clear group"+ onInputValueChange={(newValue) => setGroupSearch(newValue)}+ shouldFilter={false}+ includeMissingSelectedOptions={!groupSearch && !groupsError}+ options={(groups ?? []).map((item) => item.id)}placeholder="Search for a group..."- getOptionLabel={(option) => `${option.name} · ${option.fullPath}`}- formatOptionLabel={formatGitLabGroupOptionLabel}- getOptionValue={(option) => option.id}- noOptionsMessage={({ inputValue }) =>- inputValue ? "No groups found matching your search." : "No groups found."+ getOptionLabel={(id) =>+ groups?.find((item) => item.id === id)?.fullPath ?? (groupName || id)+ }+ renderOption={(id) => {+ const item = groups?.find((option) => option.id === id);+ return item ? renderGitLabGroupOption(item) : groupName || id;+ }}+ getOptionValue={(id) => id}+ emptyMessage={(inputValue) =>+ groupsErrorMessage ??+ (inputValue ? "No groups found matching your search." : "No groups found.")}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-git-lab-group-id-error" errors={[error]} /></FieldContent></Field>)}@@ -253,9 +288,12 @@ export const GitLabSyncFields = () => {<Controllername="destinationConfig.projectId"control={control}- render={({ field: { value, onChange }, fieldState: { error } }) => (+ render={({ field: { onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>+ <FieldLabel+ id="secret-sync-git-lab-project-id-label"+ htmlFor="secret-sync-git-lab-project-id"+ >GitLab Project<Tooltip><TooltipTrigger asChild>@@ -269,32 +307,49 @@ export const GitLabSyncFields = () => {</Tooltip></FieldLabel><FieldContent>- <FilterableSelect- isLoading={isProjectsLoading && Boolean(connectionId)}+ <Combobox+ aria-labelledby="secret-sync-git-lab-project-id-label"+ aria-describedby={error ? "secret-sync-git-lab-project-id-error" : undefined}+ id="secret-sync-git-lab-project-id"+ isError={Boolean(error)}+ isLoading={isProjectSearchPending}+ loadingMessage="Loading GitLab projects..."isDisabled={!connectionId}- value={projectOptions.find((project) => project.id === value) ?? null}- onChange={(option) => {- const selected = option as SingleValue<TGitLabProject>;- onChange(selected?.id ?? "");+ value={projectId || null}+ onValueChange={(option) => {+ const selected = projects?.find((item) => item.id === option);+ if (!selected || option === projectId) return;+ onChange(option);setValue("destinationConfig.projectName", selected?.name ?? "", {shouldDirty: true});}}- onInputChange={(newValue) => setProjectSearch(newValue)}- filterOption={null}- options={projectOptions}+ onClear={() => {+ onChange("");+ setValue("destinationConfig.projectName", "", { shouldDirty: true });+ setProjectSearch("");+ }}+ clearAriaLabel="Clear GitLab project"+ onInputValueChange={(newValue) => setProjectSearch(newValue)}+ shouldFilter={false}+ includeMissingSelectedOptions={!projectSearch && !projectsError}+ options={(projects ?? []).map((item) => item.id)}placeholder="Search for a project..."- getOptionLabel={(option) => {- const shortName = option.name.split("/").pop() || option.name;- return `${shortName} · ${option.name}`;+ getOptionLabel={(id) =>+ projects?.find((item) => item.id === id)?.name ?? (projectName || id)+ }+ renderOption={(id) => {+ const item = projects?.find((option) => option.id === id);+ return item ? renderGitLabProjectOption(item) : projectName || id;}}- formatOptionLabel={formatGitLabProjectOptionLabel}- getOptionValue={(option) => option.id}- noOptionsMessage={({ inputValue }) =>- inputValue ? "No projects found matching your search." : "No projects found."+ getOptionValue={(id) => id}+ emptyMessage={(inputValue) =>+ projectsErrorMessage ??+ (inputValue ? "No projects found matching your search." : "No projects found.")}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-git-lab-project-id-error" errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/HCVaultSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/HCVaultSyncFields.tsxindex 7ac9a966f4..00b8007cb5 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/HCVaultSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/HCVaultSyncFields.tsx@@ -1,15 +1,14 @@import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldError,FieldGroup,FieldLabel,- FilterableSelect,Input,Tooltip,TooltipContent,@@ -46,9 +45,9 @@ export const HCVaultSyncFields = () => {<Controllername="destinationConfig.mount"control={control}- render={({ field: { onChange }, fieldState: { error } }) => (+ render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>+ <FieldLabel id="secret-sync-hcvault-mount-label" htmlFor="secret-sync-hcvault-mount">Secrets Engine Mount<Tooltip><TooltipTrigger asChild>@@ -63,16 +62,22 @@ export const HCVaultSyncFields = () => {</Tooltip></FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-hcvault-mount-label"+ aria-describedby={error ? "secret-sync-hcvault-mount-error" : undefined}+ id="secret-sync-hcvault-mount"+ isError={Boolean(error)}isLoading={isMountsLoading && Boolean(connectionId)}isDisabled={!connectionId}- onChange={(option) =>- onChange((option as SingleValue<{ value: string }>)?.value ?? null)- }- options={mounts?.map((v) => ({ label: v, value: v }))}+ value={value ? { label: value, value } : null}+ onValueChange={(option) => onChange(option.value)}+ options={mounts?.map((mount) => ({ label: mount, value: mount })) ?? []}placeholder="Select a Secrets Engine Mount..."+ getOptionLabel={(option) => option.label}+ getOptionValue={(option) => option.value}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-hcvault-mount-error" errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/HasuraCloudSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/HasuraCloudSyncFields.tsxindex 0227b3c32f..17f97dac87 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/HasuraCloudSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/HasuraCloudSyncFields.tsx@@ -1,19 +1,15 @@import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldError,FieldGroup,- FieldLabel,- FilterableSelect+ FieldLabel} from "@app/components/v3";-import {- THasuraCloudProject,- useHasuraCloudConnectionListProjects-} from "@app/hooks/api/appConnections/hasura-cloud";+import { useHasuraCloudConnectionListProjects } from "@app/hooks/api/appConnections/hasura-cloud";import { SecretSync } from "@app/hooks/api/secretSyncs";import { TSecretSyncForm } from "../schemas";@@ -43,14 +39,23 @@ export const HasuraCloudSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Select a project</FieldLabel>+ <FieldLabel+ id="secret-sync-hasura-cloud-project-id-label"+ htmlFor="secret-sync-hasura-cloud-project-id"+ >+ Select a project+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-hasura-cloud-project-id-label"+ aria-describedby={error ? "secret-sync-hasura-cloud-project-id-error" : undefined}+ id="secret-sync-hasura-cloud-project-id"+ isError={Boolean(error)}isLoading={isProjectsLoading && Boolean(connectionId)}isDisabled={!connectionId}value={projects.find((p) => p.id === value) ?? null}- onChange={(option) => {- const v = option as SingleValue<THasuraCloudProject>;+ onValueChange={(option) => {+ const v = option;onChange(v?.id ?? null);setValue("destinationConfig.projectName", v?.name ?? "");}}@@ -58,8 +63,10 @@ export const HasuraCloudSyncFields = () => {placeholder="Select a project..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-hasura-cloud-project-id-error" errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/HerokuSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/HerokuSyncFields.tsxindex bddabc5d3d..a0d97eeda2 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/HerokuSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/HerokuSyncFields.tsx@@ -1,20 +1,18 @@import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldError,FieldGroup,FieldLabel,- FilterableSelect,Tooltip,TooltipContent,TooltipTrigger} from "@app/components/v3";-import { THerokuApp } from "@app/hooks/api/appConnections/heroku";import { useHerokuConnectionListApps } from "@app/hooks/api/appConnections/heroku/queries";import { SecretSync } from "@app/hooks/api/secretSyncs";@@ -45,7 +43,7 @@ export const HerokuSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>+ <FieldLabel id="secret-sync-heroku-app-label" htmlFor="secret-sync-heroku-app">App<Tooltip><TooltipTrigger asChild>@@ -57,23 +55,26 @@ export const HerokuSyncFields = () => {</Tooltip></FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-heroku-app-label"+ aria-describedby={error ? "secret-sync-heroku-app-error" : undefined}+ id="secret-sync-heroku-app"+ isError={Boolean(error)}isLoading={isAppsLoading && Boolean(connectionId)}isDisabled={!connectionId}value={apps?.find((app) => app.id === value) ?? null}- onChange={(option) => {- onChange((option as SingleValue<THerokuApp>)?.id ?? "");- setValue(- "destinationConfig.appName",- (option as SingleValue<THerokuApp>)?.name ?? ""- );+ onValueChange={(option) => {+ onChange(option.id ?? "");+ setValue("destinationConfig.appName", option.name ?? "");}}options={apps}placeholder="Select an app..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-heroku-app-error" errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/HumanitecSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/HumanitecSyncFields.tsxindex cfcda256ae..82c4971783 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/HumanitecSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/HumanitecSyncFields.tsx@@ -1,15 +1,14 @@import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldError,FieldGroup,FieldLabel,- FilterableSelect,Select,SelectContent,SelectItem,@@ -20,12 +19,7 @@ import {TooltipTrigger} from "@app/components/v3";import { HUMANITEC_SYNC_SCOPES } from "@app/helpers/secretSyncs";-import {- THumanitecConnectionApp,- THumanitecConnectionEnvironment,- THumanitecConnectionOrganization,- useHumanitecConnectionListOrganizations-} from "@app/hooks/api/appConnections/humanitec";+import { useHumanitecConnectionListOrganizations } from "@app/hooks/api/appConnections/humanitec";import { SecretSync } from "@app/hooks/api/secretSyncs";import { HumanitecSyncScope } from "@app/hooks/api/secretSyncs/types/humanitec-sync";@@ -64,14 +58,20 @@ export const HumanitecSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Organization</FieldLabel>+ <FieldLabel id="secret-sync-humanitec-org-label" htmlFor="secret-sync-humanitec-org">+ Organization+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-humanitec-org-label"+ aria-describedby={error ? "secret-sync-humanitec-org-error" : undefined}+ id="secret-sync-humanitec-org"+ isError={Boolean(error)}isLoading={isOrganizationsPending && Boolean(connectionId)}isDisabled={!connectionId}- value={organizations ? (organizations.find((org) => org.id === value) ?? []) : []}- onChange={(option) => {- onChange((option as SingleValue<THumanitecConnectionOrganization>)?.id ?? null);+ value={organizations?.find((org) => org.id === value) ?? null}+ onValueChange={(option) => {+ onChange(option.id ?? null);setValue("destinationConfig.app", "");setValue("destinationConfig.env", "");}}@@ -79,8 +79,10 @@ export const HumanitecSyncFields = () => {placeholder="Select an organization..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id.toString()}+ getOptionKeywords={(option) => [option.id.toString()]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-humanitec-org-error" errors={[error]} /></FieldContent></Field>)}@@ -90,7 +92,7 @@ export const HumanitecSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>+ <FieldLabel id="secret-sync-humanitec-app-label" htmlFor="secret-sync-humanitec-app">App<Tooltip><TooltipTrigger asChild>@@ -103,7 +105,11 @@ export const HumanitecSyncFields = () => {</Tooltip></FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-humanitec-app-label"+ aria-describedby={error ? "secret-sync-humanitec-app-error" : undefined}+ id="secret-sync-humanitec-app"+ isError={Boolean(error)}isLoading={isOrganizationsPending && Boolean(connectionId) && Boolean(currentOrg)}isDisabled={!connectionId || !currentOrg}value={@@ -111,8 +117,8 @@ export const HumanitecSyncFields = () => {.find((org) => org.id === currentOrg)?.apps?.find((app) => app.id === value) ?? null}- onChange={(option) => {- onChange((option as SingleValue<THumanitecConnectionApp>)?.id ?? null);+ onValueChange={(option) => {+ onChange(option.id ?? null);setValue("destinationConfig.env", "");}}options={@@ -121,8 +127,10 @@ export const HumanitecSyncFields = () => {placeholder="Select an app..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id.toString()}+ getOptionKeywords={(option) => [option.id.toString()]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-humanitec-app-error" errors={[error]} /></FieldContent></Field>)}@@ -148,8 +156,8 @@ export const HumanitecSyncFields = () => {<ul className="flex list-disc flex-col gap-3 pl-4">{Object.values(HUMANITEC_SYNC_SCOPES).map(({ name, description }) => (<li key={name}>- <p className="text-mineshaft-300">- <span className="font-medium text-bunker-200">{name}</span>:{" "}+ <p className="text-label">+ <span className="font-medium text-foreground">{name}</span>:{" "}{description}</p></li>@@ -189,9 +197,15 @@ export const HumanitecSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Environment</FieldLabel>+ <FieldLabel id="secret-sync-humanitec-env-label" htmlFor="secret-sync-humanitec-env">+ Environment+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-humanitec-env-label"+ aria-describedby={error ? "secret-sync-humanitec-env-error" : undefined}+ id="secret-sync-humanitec-env"+ isError={Boolean(error)}isLoading={isOrganizationsPending &&Boolean(connectionId) &&@@ -200,15 +214,15 @@ export const HumanitecSyncFields = () => {}isDisabled={!connectionId || !currentApp}value={environments.find((env) => env.id === value) ?? null}- onChange={(option) =>- onChange((option as SingleValue<THumanitecConnectionEnvironment>)?.id ?? null)- }+ onValueChange={(option) => onChange(option.id ?? null)}options={environments}placeholder="Select an env..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id.toString()}+ getOptionKeywords={(option) => [option.id.toString()]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-humanitec-env-error" errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/LaravelForgeSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/LaravelForgeSyncFields.tsxindex bfc8832d48..ecf0d8ae2d 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/LaravelForgeSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/LaravelForgeSyncFields.tsx@@ -1,19 +1,15 @@import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldError,FieldGroup,- FieldLabel,- FilterableSelect+ FieldLabel} from "@app/components/v3";import {- TLaravelForgeOrganization,- TLaravelForgeServer,- TLaravelForgeSite,useLaravelForgeConnectionListOrganizations,useLaravelForgeConnectionListServers,useLaravelForgeConnectionListSites@@ -71,14 +67,23 @@ export const LaravelForgeSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Organization</FieldLabel>+ <FieldLabel+ id="secret-sync-laravel-forge-org-slug-label"+ htmlFor="secret-sync-laravel-forge-org-slug"+ >+ Organization+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-laravel-forge-org-slug-label"+ aria-describedby={error ? "secret-sync-laravel-forge-org-slug-error" : undefined}+ id="secret-sync-laravel-forge-org-slug"+ isError={Boolean(error)}isLoading={isOrganizationsLoading && Boolean(connectionId)}isDisabled={!connectionId}value={organizations?.find((org) => org.slug === value) ?? null}- onChange={(option) => {- const selectedOrg = option as SingleValue<TLaravelForgeOrganization>;+ onValueChange={(option) => {+ const selectedOrg = option;onChange(selectedOrg?.slug ?? "");setValue("destinationConfig.orgName", selectedOrg?.name ?? "");setValue("destinationConfig.serverId", "");@@ -88,8 +93,10 @@ export const LaravelForgeSyncFields = () => {placeholder="Select an organization..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id, option.slug]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-laravel-forge-org-slug-error" errors={[error]} /></FieldContent></Field>)}@@ -100,14 +107,23 @@ export const LaravelForgeSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Server</FieldLabel>+ <FieldLabel+ id="secret-sync-laravel-forge-server-id-label"+ htmlFor="secret-sync-laravel-forge-server-id"+ >+ Server+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-laravel-forge-server-id-label"+ aria-describedby={error ? "secret-sync-laravel-forge-server-id-error" : undefined}+ id="secret-sync-laravel-forge-server-id"+ isError={Boolean(error)}isLoading={isServersLoading && Boolean(connectionId && orgSlug)}isDisabled={!connectionId || !orgSlug}value={servers?.find((server) => server.id === value) ?? null}- onChange={(option) => {- const selectedServer = option as SingleValue<TLaravelForgeServer>;+ onValueChange={(option) => {+ const selectedServer = option;onChange(selectedServer?.id ?? "");setValue("destinationConfig.serverName", selectedServer?.name ?? "");setValue("destinationConfig.siteId", "");@@ -116,8 +132,10 @@ export const LaravelForgeSyncFields = () => {placeholder="Select a server..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-laravel-forge-server-id-error" errors={[error]} /></FieldContent></Field>)}@@ -128,14 +146,23 @@ export const LaravelForgeSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Site</FieldLabel>+ <FieldLabel+ id="secret-sync-laravel-forge-site-id-label"+ htmlFor="secret-sync-laravel-forge-site-id"+ >+ Site+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-laravel-forge-site-id-label"+ aria-describedby={error ? "secret-sync-laravel-forge-site-id-error" : undefined}+ id="secret-sync-laravel-forge-site-id"+ isError={Boolean(error)}isLoading={isSitesLoading && Boolean(connectionId && orgSlug && serverId)}isDisabled={!connectionId || !orgSlug || !serverId}value={sites?.find((site) => site.id === value) ?? null}- onChange={(option) => {- const selectedSite = option as SingleValue<TLaravelForgeSite>;+ onValueChange={(option) => {+ const selectedSite = option;onChange(selectedSite?.id ?? "");setValue("destinationConfig.siteName", selectedSite?.name ?? "");}}@@ -143,8 +170,10 @@ export const LaravelForgeSyncFields = () => {placeholder="Select a site..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-laravel-forge-site-id-error" errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/NetlifySyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/NetlifySyncFields.tsxindex 1ffe07ea77..cda768fc4d 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/NetlifySyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/NetlifySyncFields.tsx@@ -1,19 +1,16 @@import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldDescription,FieldError,FieldGroup,- FieldLabel,- FilterableSelect+ FieldLabel} from "@app/components/v3";import {- TNetlifyAccount,- TNetlifySite,useNetlifyConnectionListAccounts,useNetlifyConnectionListSites} from "@app/hooks/api/appConnections/netlify";@@ -56,6 +53,8 @@ export const NetlifySyncFields = () => {onChange={() => {setValue("destinationConfig.accountId", "");setValue("destinationConfig.accountName", "");+ setValue("destinationConfig.siteId", "");+ setValue("destinationConfig.siteName", undefined);}}/><Controller@@ -63,23 +62,36 @@ export const NetlifySyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Account</FieldLabel>+ <FieldLabel+ id="secret-sync-netlify-account-id-label"+ htmlFor="secret-sync-netlify-account-id"+ >+ Account+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-netlify-account-id-label"+ aria-describedby={error ? "secret-sync-netlify-account-id-error" : undefined}+ id="secret-sync-netlify-account-id"+ isError={Boolean(error)}isLoading={isAccountsLoading && Boolean(connectionId)}isDisabled={!connectionId}value={accounts.find((p) => p.id === value) ?? null}- onChange={(option) => {- const v = option as SingleValue<TNetlifyAccount>;+ onValueChange={(option) => {+ const v = option;onChange(v?.id ?? null);setValue("destinationConfig.accountName", v?.name ?? "");+ setValue("destinationConfig.siteId", "");+ setValue("destinationConfig.siteName", undefined);}}options={accounts}placeholder="Select an account..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-netlify-account-id-error" errors={[error]} /></FieldContent></Field>)}@@ -89,31 +101,44 @@ export const NetlifySyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Site (Optional)</FieldLabel>+ <FieldLabel+ id="secret-sync-netlify-site-id-label"+ htmlFor="secret-sync-netlify-site-id"+ >+ Site (Optional)+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-netlify-site-id-label"+ aria-describedby={+ error+ ? "secret-sync-netlify-site-id-description secret-sync-netlify-site-id-error"+ : "secret-sync-netlify-site-id-description"+ }+ id="secret-sync-netlify-site-id"+ isError={Boolean(error)}isLoading={isSitesLoading && Boolean(accountId)}isDisabled={!accountId}value={sites.find((p) => p.id === value) ?? null}- onChange={(option) => {- const v = option as SingleValue<TNetlifySite>;- if (v?.id === value) {- onChange(undefined);- setValue("destinationConfig.siteName", undefined);- } else {- onChange(v?.id);- setValue("destinationConfig.siteName", v?.name);- }+ onValueChange={(option) => {+ onChange(option.id);+ setValue("destinationConfig.siteName", option.name);+ }}+ onClear={() => {+ onChange("");+ setValue("destinationConfig.siteName", undefined);}}options={sites}placeholder="Select a site..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal/>- <FieldDescription>+ <FieldDescription id="secret-sync-netlify-site-id-description">If you do not select a site, the secrets will be synced to all sites in the account.</FieldDescription>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-netlify-site-id-error" errors={[error]} /></FieldContent></Field>)}@@ -123,26 +148,39 @@ export const NetlifySyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Context (Optional)</FieldLabel>+ <FieldLabel+ id="secret-sync-netlify-context-label"+ htmlFor="secret-sync-netlify-context"+ >+ Context (Optional)+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-netlify-context-label"+ aria-describedby={+ error+ ? "secret-sync-netlify-context-description secret-sync-netlify-context-error"+ : "secret-sync-netlify-context-description"+ }+ id="secret-sync-netlify-context"+ isError={Boolean(error)}isDisabled={!accountId}value={contexts.find((p) => p.value === value) ?? undefined}- onChange={(option) => {- const v = option as SingleValue<{ label: string; value: NetlifySyncContext }>;- if (v) onChange(v.value);- }}+ onValueChange={(option) => onChange(option.value)}+ onClear={() => onChange(null)}options={contexts}placeholder="Select a context..."getOptionLabel={(option) => option.label}getOptionValue={(option) => option.value}+ getOptionKeywords={(option) => [option.value]}+ modal/>- <FieldDescription>+ <FieldDescription id="secret-sync-netlify-context-description">Avoid configuring multiple syncs with overlapping contexts for the same site."All Contexts" overlaps with every context. Overlapping syncs may deleteeach other's secrets.</FieldDescription>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-netlify-context-error" errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/NorthflankSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/NorthflankSyncFields.tsxindex ea12d466a1..b05cdf6e32 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/NorthflankSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/NorthflankSyncFields.tsx@@ -1,22 +1,19 @@import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldError,FieldGroup,FieldLabel,- FilterableSelect,Tooltip,TooltipContent,TooltipTrigger} from "@app/components/v3";import {- TNorthflankProject,- TNorthflankSecretGroup,useNorthflankConnectionListProjects,useNorthflankConnectionListSecretGroups} from "@app/hooks/api/appConnections/northflank";@@ -59,7 +56,10 @@ export const NorthflankSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>+ <FieldLabel+ id="secret-sync-northflank-project-id-label"+ htmlFor="secret-sync-northflank-project-id"+ >Project<Tooltip><TooltipTrigger asChild>@@ -72,12 +72,16 @@ export const NorthflankSyncFields = () => {</Tooltip></FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-northflank-project-id-label"+ aria-describedby={error ? "secret-sync-northflank-project-id-error" : undefined}+ id="secret-sync-northflank-project-id"+ isError={Boolean(error)}isLoading={isProjectsLoading && Boolean(connectionId)}isDisabled={!connectionId}value={projects.find((p) => p.id === value) ?? null}- onChange={(option) => {- const v = option as SingleValue<TNorthflankProject>;+ onValueChange={(option) => {+ const v = option;onChange(v?.id ?? null);setValue("destinationConfig.projectName", v?.name ?? "");setValue("destinationConfig.secretGroupId", "");@@ -87,8 +91,10 @@ export const NorthflankSyncFields = () => {placeholder="Select a project..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-northflank-project-id-error" errors={[error]} /></FieldContent></Field>)}@@ -98,7 +104,10 @@ export const NorthflankSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>+ <FieldLabel+ id="secret-sync-northflank-secret-group-id-label"+ htmlFor="secret-sync-northflank-secret-group-id"+ >Secret Group<Tooltip><TooltipTrigger asChild>@@ -111,12 +120,18 @@ export const NorthflankSyncFields = () => {</Tooltip></FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-northflank-secret-group-id-label"+ aria-describedby={+ error ? "secret-sync-northflank-secret-group-id-error" : undefined+ }+ id="secret-sync-northflank-secret-group-id"+ isError={Boolean(error)}isLoading={isSecretGroupsLoading && Boolean(projectId)}isDisabled={!projectId}value={secretGroups.find((sg) => sg.id === value) ?? null}- onChange={(option) => {- const v = option as SingleValue<TNorthflankSecretGroup>;+ onValueChange={(option) => {+ const v = option;onChange(v?.id ?? null);setValue("destinationConfig.secretGroupName", v?.name ?? "");}}@@ -124,8 +139,10 @@ export const NorthflankSyncFields = () => {placeholder="Select a secret group..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-northflank-secret-group-id-error" errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/OCIVaultSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/OCIVaultSyncFields.tsxindex 7625f3f7ce..3a21f2824b 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/OCIVaultSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/OCIVaultSyncFields.tsx@@ -1,15 +1,14 @@import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldError,FieldGroup,FieldLabel,- FilterableSelect,Tooltip,TooltipContent,TooltipTrigger@@ -68,7 +67,10 @@ export const OCIVaultSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>+ <FieldLabel+ id="secret-sync-ocivault-compartment-ocid-label"+ htmlFor="secret-sync-ocivault-compartment-ocid"+ >Compartment<Tooltip><TooltipTrigger asChild>@@ -80,12 +82,16 @@ export const OCIVaultSyncFields = () => {</Tooltip></FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-ocivault-compartment-ocid-label"+ aria-describedby={error ? "secret-sync-ocivault-compartment-ocid-error" : undefined}+ id="secret-sync-ocivault-compartment-ocid"+ isError={Boolean(error)}isLoading={isCompartmentsLoading && Boolean(connectionId)}isDisabled={!connectionId}value={compartments?.find((c) => c.id === value) ?? null}- onChange={(option) => {- onChange((option as SingleValue<{ id: string }>)?.id ?? null);+ onValueChange={(option) => {+ onChange(option.id ?? null);setValue("destinationConfig.vaultOcid", "");setValue("destinationConfig.keyOcid", "");}}@@ -93,8 +99,10 @@ export const OCIVaultSyncFields = () => {placeholder="Select a compartment..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-ocivault-compartment-ocid-error" errors={[error]} /></FieldContent></Field>)}@@ -105,7 +113,10 @@ export const OCIVaultSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>+ <FieldLabel+ id="secret-sync-ocivault-vault-ocid-label"+ htmlFor="secret-sync-ocivault-vault-ocid"+ >Vault<Tooltip><TooltipTrigger asChild>@@ -118,20 +129,26 @@ export const OCIVaultSyncFields = () => {</Tooltip></FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-ocivault-vault-ocid-label"+ aria-describedby={error ? "secret-sync-ocivault-vault-ocid-error" : undefined}+ id="secret-sync-ocivault-vault-ocid"+ isError={Boolean(error)}isLoading={isVaultsLoading && Boolean(connectionId)}isDisabled={!connectionId || !selectedCompartment}value={vaults?.find((v) => v.id === value) || null}- onChange={(option) => {- onChange((option as SingleValue<{ id: string }>)?.id ?? null);+ onValueChange={(option) => {+ onChange(option.id ?? null);setValue("destinationConfig.keyOcid", "");}}options={vaults}placeholder="Select a vault..."getOptionLabel={(option) => option.displayName}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-ocivault-vault-ocid-error" errors={[error]} /></FieldContent></Field>)}@@ -142,7 +159,10 @@ export const OCIVaultSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>+ <FieldLabel+ id="secret-sync-ocivault-key-ocid-label"+ htmlFor="secret-sync-ocivault-key-ocid"+ >Encryption Key<Tooltip><TooltipTrigger asChild>@@ -155,19 +175,25 @@ export const OCIVaultSyncFields = () => {</Tooltip></FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-ocivault-key-ocid-label"+ aria-describedby={error ? "secret-sync-ocivault-key-ocid-error" : undefined}+ id="secret-sync-ocivault-key-ocid"+ isError={Boolean(error)}isLoading={isKeysLoading && Boolean(connectionId)}isDisabled={!connectionId || !selectedCompartment || !selectedVault}value={keys?.find((v) => v.id === value) ?? null}- onChange={(option) => {- onChange((option as SingleValue<{ id: string }>)?.id ?? null);+ onValueChange={(option) => {+ onChange(option.id ?? null);}}options={keys}placeholder="Select a key..."getOptionLabel={(option) => option.displayName}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-ocivault-key-ocid-error" errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/OctopusDeploySyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/OctopusDeploySyncFields.tsxindex 785100061c..91b06fee7c 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/OctopusDeploySyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/OctopusDeploySyncFields.tsx@@ -1,15 +1,14 @@import { Controller, useFormContext, useWatch } from "react-hook-form";-import { MultiValue, SingleValue } from "react-select";import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldError,FieldGroup,FieldLabel,- FilterableSelect,Select,SelectContent,SelectItem,@@ -28,11 +27,6 @@ import {useOctopusDeployConnectionListProjects,useOctopusDeployConnectionListSpaces} from "@app/hooks/api/appConnections/octopus-deploy/queries";-import {- TOctopusDeployProject,- TOctopusDeploySpace,- TScopeValueOption-} from "@app/hooks/api/appConnections/octopus-deploy/types";import { SecretSync } from "@app/hooks/api/secretSyncs";import { OctopusDeploySyncScope } from "@app/hooks/api/secretSyncs/types/octopus-deploy-sync";@@ -98,7 +92,10 @@ export const OctopusDeploySyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>+ <FieldLabel+ id="secret-sync-octopus-deploy-space-id-label"+ htmlFor="secret-sync-octopus-deploy-space-id"+ >Space<Tooltip><TooltipTrigger asChild>@@ -110,12 +107,18 @@ export const OctopusDeploySyncFields = () => {</Tooltip></FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-octopus-deploy-space-id-label"+ aria-describedby={+ error ? "secret-sync-octopus-deploy-space-id-error" : undefined+ }+ id="secret-sync-octopus-deploy-space-id"+ isError={Boolean(error)}isLoading={isSpacesLoading && Boolean(connectionId)}isDisabled={!connectionId}value={spaces?.find((space) => space.id === value) ?? null}- onChange={(option) => {- const selectedSpace = option as SingleValue<TOctopusDeploySpace>;+ onValueChange={(option) => {+ const selectedSpace = option;onChange(selectedSpace?.id ?? null);setValue("destinationConfig.spaceName", selectedSpace?.name ?? "");setValue("destinationConfig.projectId", "");@@ -126,8 +129,10 @@ export const OctopusDeploySyncFields = () => {placeholder={spaces?.length ? "Select a space..." : "No spaces found..."}getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id, option.slug]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-octopus-deploy-space-id-error" errors={[error]} /></FieldContent></Field>)}@@ -173,7 +178,10 @@ export const OctopusDeploySyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>+ <FieldLabel+ id="secret-sync-octopus-deploy-project-id-label"+ htmlFor="secret-sync-octopus-deploy-project-id"+ >Project<Tooltip><TooltipTrigger asChild>@@ -185,12 +193,18 @@ export const OctopusDeploySyncFields = () => {</Tooltip></FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-octopus-deploy-project-id-label"+ aria-describedby={+ error ? "secret-sync-octopus-deploy-project-id-error" : undefined+ }+ id="secret-sync-octopus-deploy-project-id"+ isError={Boolean(error)}isLoading={isProjectsLoading && Boolean(connectionId && spaceId)}isDisabled={Boolean(!connectionId || !spaceId)}value={projects?.find((project) => project.id === value) ?? null}- onChange={(option) => {- const selectedProject = option as SingleValue<TOctopusDeployProject>;+ onValueChange={(option) => {+ const selectedProject = option;onChange(selectedProject?.id ?? null);setValue("destinationConfig.projectName", selectedProject?.name ?? "");setValue("destinationConfig.scopeValues", EMPTY_SCOPE_VALUES);@@ -203,8 +217,13 @@ export const OctopusDeploySyncFields = () => {}getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id, option.slug]}+ modal+ />+ <FieldError+ id="secret-sync-octopus-deploy-project-id-error"+ errors={[error]}/>- <FieldError errors={[error]} /></FieldContent></Field>)}@@ -222,20 +241,31 @@ export const OctopusDeploySyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Environments</FieldLabel>+ <FieldLabel+ id="secret-sync-octopus-deploy-scope-values-environments-label"+ htmlFor="secret-sync-octopus-deploy-scope-values-environments"+ >+ Environments+ </FieldLabel><FieldContent>- <FilterableSelect- isMulti+ <Combobox+ aria-labelledby="secret-sync-octopus-deploy-scope-values-environments-label"+ aria-describedby={+ error+ ? "secret-sync-octopus-deploy-scope-values-environments-error"+ : undefined+ }+ id="secret-sync-octopus-deploy-scope-values-environments"+ isError={Boolean(error)}+ multipleisLoading={isScopeValuesLoading}value={scopeValuesData?.environments?.filter((opt) =>(value || []).includes(opt.id)) || []}- onChange={(options) => {- const selectedIds = (options as MultiValue<TScopeValueOption>).map(- (opt) => opt.id- );+ onValueChange={(options) => {+ const selectedIds = options.map((opt) => opt.id);onChange(selectedIds);}}options={scopeValuesData?.environments || []}@@ -246,8 +276,13 @@ export const OctopusDeploySyncFields = () => {}getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal+ />+ <FieldError+ id="secret-sync-octopus-deploy-scope-values-environments-error"+ errors={[error]}/>- <FieldError errors={[error]} /></FieldContent></Field>)}@@ -259,19 +294,28 @@ export const OctopusDeploySyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Target Tags</FieldLabel>+ <FieldLabel+ id="secret-sync-octopus-deploy-scope-values-roles-label"+ htmlFor="secret-sync-octopus-deploy-scope-values-roles"+ >+ Target Tags+ </FieldLabel><FieldContent>- <FilterableSelect- isMulti+ <Combobox+ aria-labelledby="secret-sync-octopus-deploy-scope-values-roles-label"+ aria-describedby={+ error ? "secret-sync-octopus-deploy-scope-values-roles-error" : undefined+ }+ id="secret-sync-octopus-deploy-scope-values-roles"+ isError={Boolean(error)}+ multipleisLoading={isScopeValuesLoading}value={scopeValuesData?.roles?.filter((opt) => (value || []).includes(opt.id)) ||[]}- onChange={(options) => {- const selectedIds = (options as MultiValue<TScopeValueOption>).map(- (opt) => opt.id- );+ onValueChange={(options) => {+ const selectedIds = options.map((opt) => opt.id);onChange(selectedIds);}}options={scopeValuesData?.roles || []}@@ -282,8 +326,13 @@ export const OctopusDeploySyncFields = () => {}getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal+ />+ <FieldError+ id="secret-sync-octopus-deploy-scope-values-roles-error"+ errors={[error]}/>- <FieldError errors={[error]} /></FieldContent></Field>)}@@ -295,20 +344,31 @@ export const OctopusDeploySyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Targets</FieldLabel>+ <FieldLabel+ id="secret-sync-octopus-deploy-scope-values-machines-label"+ htmlFor="secret-sync-octopus-deploy-scope-values-machines"+ >+ Targets+ </FieldLabel><FieldContent>- <FilterableSelect- isMulti+ <Combobox+ aria-labelledby="secret-sync-octopus-deploy-scope-values-machines-label"+ aria-describedby={+ error+ ? "secret-sync-octopus-deploy-scope-values-machines-error"+ : undefined+ }+ id="secret-sync-octopus-deploy-scope-values-machines"+ isError={Boolean(error)}+ multipleisLoading={isScopeValuesLoading}value={scopeValuesData?.machines?.filter((opt) =>(value || []).includes(opt.id)) || []}- onChange={(options) => {- const selectedIds = (options as MultiValue<TScopeValueOption>).map(- (opt) => opt.id- );+ onValueChange={(options) => {+ const selectedIds = options.map((opt) => opt.id);onChange(selectedIds);}}options={scopeValuesData?.machines || []}@@ -319,8 +379,13 @@ export const OctopusDeploySyncFields = () => {}getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal+ />+ <FieldError+ id="secret-sync-octopus-deploy-scope-values-machines-error"+ errors={[error]}/>- <FieldError errors={[error]} /></FieldContent></Field>)}@@ -332,20 +397,31 @@ export const OctopusDeploySyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Processes</FieldLabel>+ <FieldLabel+ id="secret-sync-octopus-deploy-scope-values-processes-label"+ htmlFor="secret-sync-octopus-deploy-scope-values-processes"+ >+ Processes+ </FieldLabel><FieldContent>- <FilterableSelect- isMulti+ <Combobox+ aria-labelledby="secret-sync-octopus-deploy-scope-values-processes-label"+ aria-describedby={+ error+ ? "secret-sync-octopus-deploy-scope-values-processes-error"+ : undefined+ }+ id="secret-sync-octopus-deploy-scope-values-processes"+ isError={Boolean(error)}+ multipleisLoading={isScopeValuesLoading}value={scopeValuesData?.processes?.filter((opt) =>(value || []).includes(opt.id)) || []}- onChange={(options) => {- const selectedIds = (options as MultiValue<TScopeValueOption>).map(- (opt) => opt.id- );+ onValueChange={(options) => {+ const selectedIds = options.map((opt) => opt.id);onChange(selectedIds);}}options={scopeValuesData?.processes || []}@@ -356,8 +432,13 @@ export const OctopusDeploySyncFields = () => {}getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal+ />+ <FieldError+ id="secret-sync-octopus-deploy-scope-values-processes-error"+ errors={[error]}/>- <FieldError errors={[error]} /></FieldContent></Field>)}@@ -369,20 +450,31 @@ export const OctopusDeploySyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Deployment Steps</FieldLabel>+ <FieldLabel+ id="secret-sync-octopus-deploy-scope-values-actions-label"+ htmlFor="secret-sync-octopus-deploy-scope-values-actions"+ >+ Deployment Steps+ </FieldLabel><FieldContent>- <FilterableSelect- isMulti+ <Combobox+ aria-labelledby="secret-sync-octopus-deploy-scope-values-actions-label"+ aria-describedby={+ error+ ? "secret-sync-octopus-deploy-scope-values-actions-error"+ : undefined+ }+ id="secret-sync-octopus-deploy-scope-values-actions"+ isError={Boolean(error)}+ multipleisLoading={isScopeValuesLoading}value={scopeValuesData?.actions?.filter((opt) =>(value || []).includes(opt.id)) || []}- onChange={(options) => {- const selectedIds = (options as MultiValue<TScopeValueOption>).map(- (opt) => opt.id- );+ onValueChange={(options) => {+ const selectedIds = options.map((opt) => opt.id);onChange(selectedIds);}}options={scopeValuesData?.actions || []}@@ -393,8 +485,13 @@ export const OctopusDeploySyncFields = () => {}getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal+ />+ <FieldError+ id="secret-sync-octopus-deploy-scope-values-actions-error"+ errors={[error]}/>- <FieldError errors={[error]} /></FieldContent></Field>)}@@ -406,20 +503,31 @@ export const OctopusDeploySyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Channels</FieldLabel>+ <FieldLabel+ id="secret-sync-octopus-deploy-scope-values-channels-label"+ htmlFor="secret-sync-octopus-deploy-scope-values-channels"+ >+ Channels+ </FieldLabel><FieldContent>- <FilterableSelect- isMulti+ <Combobox+ aria-labelledby="secret-sync-octopus-deploy-scope-values-channels-label"+ aria-describedby={+ error+ ? "secret-sync-octopus-deploy-scope-values-channels-error"+ : undefined+ }+ id="secret-sync-octopus-deploy-scope-values-channels"+ isError={Boolean(error)}+ multipleisLoading={isScopeValuesLoading}value={scopeValuesData?.channels?.filter((opt) =>(value || []).includes(opt.id)) || []}- onChange={(options) => {- const selectedIds = (options as MultiValue<TScopeValueOption>).map(- (opt) => opt.id- );+ onValueChange={(options) => {+ const selectedIds = options.map((opt) => opt.id);onChange(selectedIds);}}options={scopeValuesData?.channels || []}@@ -430,8 +538,13 @@ export const OctopusDeploySyncFields = () => {}getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal+ />+ <FieldError+ id="secret-sync-octopus-deploy-scope-values-channels-error"+ errors={[error]}/>- <FieldError errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/OnaSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/OnaSyncFields.tsxindex 7fd298aa45..e6c9ff7cc3 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/OnaSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/OnaSyncFields.tsx@@ -1,17 +1,15 @@import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldError,FieldGroup,- FieldLabel,- FilterableSelect+ FieldLabel} from "@app/components/v3";import { useOnaConnectionListProjects } from "@app/hooks/api/appConnections/ona";-import { TOnaProject } from "@app/hooks/api/appConnections/ona/types";import { SecretSync } from "@app/hooks/api/secretSyncs";import { TSecretSyncForm } from "../schemas";@@ -42,14 +40,20 @@ export const OnaSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Ona Project</FieldLabel>+ <FieldLabel id="secret-sync-ona-project-id-label" htmlFor="secret-sync-ona-project-id">+ Ona Project+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-ona-project-id-label"+ aria-describedby={error ? "secret-sync-ona-project-id-error" : undefined}+ id="secret-sync-ona-project-id"+ isError={Boolean(error)}isLoading={isProjectsLoading && Boolean(connectionId)}isDisabled={!connectionId}value={projects?.find((p) => p.id === value) ?? null}- onChange={(option) => {- const selected = option as SingleValue<TOnaProject>;+ onValueChange={(option) => {+ const selected = option;onChange(selected?.id ?? "");setValue("destinationConfig.projectName", selected?.name ?? "");}}@@ -57,8 +61,10 @@ export const OnaSyncFields = () => {placeholder="Select a project..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-ona-project-id-error" errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/QoverySyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/QoverySyncFields.tsxindex b952beba10..04ed682907 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/QoverySyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/QoverySyncFields.tsx@@ -1,20 +1,16 @@import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldDescription,FieldError,FieldGroup,- FieldLabel,- FilterableSelect+ FieldLabel} from "@app/components/v3";import {- TQoveryConnectionEnvironment,- TQoveryConnectionOrganization,- TQoveryConnectionProject,useQoveryConnectionListEnvironments,useQoveryConnectionListOrganizations,useQoveryConnectionListProjects@@ -70,14 +66,23 @@ export const QoverySyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Organization</FieldLabel>+ <FieldLabel+ id="secret-sync-qovery-organization-id-label"+ htmlFor="secret-sync-qovery-organization-id"+ >+ Organization+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-qovery-organization-id-label"+ aria-describedby={error ? "secret-sync-qovery-organization-id-error" : undefined}+ id="secret-sync-qovery-organization-id"+ isError={Boolean(error)}isLoading={isOrganizationsLoading && Boolean(connectionId)}isDisabled={!connectionId}value={organizations?.find((org) => org.id === value) ?? null}- onChange={(option) => {- const selected = option as SingleValue<TQoveryConnectionOrganization>;+ onValueChange={(option) => {+ const selected = option;onChange(selected?.id ?? "");setValue("destinationConfig.organizationName", selected?.name ?? "");setValue("destinationConfig.projectId", "");@@ -89,8 +94,10 @@ export const QoverySyncFields = () => {placeholder="Select an organization..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-qovery-organization-id-error" errors={[error]} /></FieldContent></Field>)}@@ -101,14 +108,23 @@ export const QoverySyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Project</FieldLabel>+ <FieldLabel+ id="secret-sync-qovery-project-id-label"+ htmlFor="secret-sync-qovery-project-id"+ >+ Project+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-qovery-project-id-label"+ aria-describedby={error ? "secret-sync-qovery-project-id-error" : undefined}+ id="secret-sync-qovery-project-id"+ isError={Boolean(error)}isLoading={isProjectsLoading && Boolean(connectionId && organizationId)}isDisabled={!organizationId}value={projects?.find((project) => project.id === value) ?? null}- onChange={(option) => {- const selected = option as SingleValue<TQoveryConnectionProject>;+ onValueChange={(option) => {+ const selected = option;onChange(selected?.id ?? "");setValue("destinationConfig.projectName", selected?.name ?? "");setValue("destinationConfig.environmentId", "");@@ -118,8 +134,10 @@ export const QoverySyncFields = () => {placeholder="Select a project..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-qovery-project-id-error" errors={[error]} /></FieldContent></Field>)}@@ -130,30 +148,46 @@ export const QoverySyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>+ <FieldLabel+ id="secret-sync-qovery-environment-id-label"+ htmlFor="secret-sync-qovery-environment-id"+ >Environment <span className="text-xs text-muted">(optional)</span></FieldLabel><FieldContent>- <FilterableSelect- isClearable+ <Combobox+ aria-labelledby="secret-sync-qovery-environment-id-label"+ aria-describedby={+ error+ ? "secret-sync-qovery-environment-id-description secret-sync-qovery-environment-id-error"+ : "secret-sync-qovery-environment-id-description"+ }+ id="secret-sync-qovery-environment-id"+ isError={Boolean(error)}isLoading={isEnvironmentsLoading && Boolean(connectionId && projectId)}isDisabled={!projectId}value={environments?.find((environment) => environment.id === value) ?? null}- onChange={(option) => {- const selected = option as SingleValue<TQoveryConnectionEnvironment>;+ onValueChange={(option) => {+ const selected = option;onChange(selected?.id ?? "");setValue("destinationConfig.environmentName", selected?.name ?? "");}}+ onClear={() => {+ onChange("");+ setValue("destinationConfig.environmentName", "");+ }}options={environments}placeholder="Select an environment..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal/>- <FieldDescription>+ <FieldDescription id="secret-sync-qovery-environment-id-description">Leave empty to sync at the project level, or select an environment to sync at theenvironment level.</FieldDescription>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-qovery-environment-id-error" errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/RailwaySyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/RailwaySyncFields.tsxindex efbab9fb45..e855dba866 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/RailwaySyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/RailwaySyncFields.tsx@@ -1,25 +1,21 @@import { useMemo } from "react";import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldDescription,FieldError,FieldGroup,FieldLabel,- FilterableSelect,Tooltip,TooltipContent,TooltipTrigger} from "@app/components/v3";-import {- TRailwayProject,- useRailwayConnectionListProjects-} from "@app/hooks/api/appConnections/railway";+import { useRailwayConnectionListProjects } from "@app/hooks/api/appConnections/railway";import { SecretSync } from "@app/hooks/api/secretSyncs";import { TSecretSyncForm } from "../schemas";@@ -64,14 +60,23 @@ export const RailwaySyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Select a project</FieldLabel>+ <FieldLabel+ id="secret-sync-railway-project-id-label"+ htmlFor="secret-sync-railway-project-id"+ >+ Select a project+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-railway-project-id-label"+ aria-describedby={error ? "secret-sync-railway-project-id-error" : undefined}+ id="secret-sync-railway-project-id"+ isError={Boolean(error)}isLoading={isProjectsLoading && Boolean(connectionId)}isDisabled={!connectionId}value={projects.find((p) => p.id === value) ?? null}- onChange={(option) => {- const v = option as SingleValue<TRailwayProject>;+ onValueChange={(option) => {+ const v = option;onChange(v?.id ?? null);setValue("destinationConfig.projectName", v?.name ?? "");}}@@ -79,8 +84,10 @@ export const RailwaySyncFields = () => {placeholder="Select a project..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-railway-project-id-error" errors={[error]} /></FieldContent></Field>)}@@ -91,14 +98,23 @@ export const RailwaySyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Select an environment</FieldLabel>+ <FieldLabel+ id="secret-sync-railway-environment-id-label"+ htmlFor="secret-sync-railway-environment-id"+ >+ Select an environment+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-railway-environment-id-label"+ aria-describedby={error ? "secret-sync-railway-environment-id-error" : undefined}+ id="secret-sync-railway-environment-id"+ isError={Boolean(error)}isLoading={isProjectsLoading && Boolean(connectionId)}isDisabled={!connectionId}value={environments.find((p) => p.id === value) ?? null}- onChange={(option) => {- const v = option as SingleValue<TRailwayProject>;+ onValueChange={(option) => {+ const v = option;onChange(v?.id ?? null);setValue("destinationConfig.environmentName", v?.name ?? "");}}@@ -106,8 +122,10 @@ export const RailwaySyncFields = () => {placeholder="Select an environment..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-railway-environment-id-error" errors={[error]} /></FieldContent></Field>)}@@ -119,7 +137,10 @@ export const RailwaySyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>+ <FieldLabel+ id="secret-sync-railway-service-id-label"+ htmlFor="secret-sync-railway-service-id"+ >Select a service<Tooltip><TooltipTrigger asChild>@@ -131,12 +152,20 @@ export const RailwaySyncFields = () => {</Tooltip></FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-railway-service-id-label"+ aria-describedby={+ error+ ? "secret-sync-railway-service-id-description secret-sync-railway-service-id-error"+ : "secret-sync-railway-service-id-description"+ }+ id="secret-sync-railway-service-id"+ isError={Boolean(error)}isLoading={isProjectsLoading && Boolean(connectionId)}isDisabled={!connectionId}value={services.find((p) => p.id === value) ?? null}- onChange={(option) => {- const v = option as SingleValue<TRailwayProject>;+ onValueChange={(option) => {+ const v = option;onChange(v?.id ?? null);setValue("destinationConfig.serviceName", v?.name ?? "");}}@@ -144,11 +173,13 @@ export const RailwaySyncFields = () => {placeholder="Select a service..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal/>- <FieldDescription>+ <FieldDescription id="secret-sync-railway-service-id-description">Scope your secrets to a specific service within the environment.</FieldDescription>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-railway-service-id-error" errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/RenderSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/RenderSyncFields.tsxindex 4e80c9a797..50ce883fac 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/RenderSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/RenderSyncFields.tsx@@ -1,15 +1,14 @@import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldError,FieldGroup,FieldLabel,- FilterableSelect,Select,SelectContent,SelectItem,@@ -21,8 +20,6 @@ import {} from "@app/components/v3";import { RENDER_SYNC_SCOPES } from "@app/helpers/secretSyncs";import {- TRenderEnvironmentGroup,- TRenderService,useRenderConnectionListEnvironmentGroups,useRenderConnectionListServices} from "@app/hooks/api/appConnections/render";@@ -82,8 +79,8 @@ export const RenderSyncFields = () => {<ul className="flex list-disc flex-col gap-3 pl-4">{Object.values(RENDER_SYNC_SCOPES).map(({ name, description }) => (<li key={name}>- <p className="text-mineshaft-300">- <span className="font-medium text-bunker-200">{name}</span>:{" "}+ <p className="text-label">+ <span className="font-medium text-foreground">{name}</span>:{" "}{description}</p></li>@@ -117,25 +114,33 @@ export const RenderSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Service</FieldLabel>+ <FieldLabel+ id="secret-sync-render-service-id-label"+ htmlFor="secret-sync-render-service-id"+ >+ Service+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-render-service-id-label"+ aria-describedby={error ? "secret-sync-render-service-id-error" : undefined}+ id="secret-sync-render-service-id"+ isError={Boolean(error)}isLoading={isServicesPending && Boolean(connectionId)}isDisabled={!connectionId}- value={services ? (services.find((service) => service.id === value) ?? []) : []}- onChange={(option) => {- onChange((option as SingleValue<TRenderService>)?.id ?? null);- setValue(- "destinationConfig.serviceName",- (option as SingleValue<TRenderService>)?.name ?? ""- );+ value={services?.find((service) => service.id === value) ?? null}+ onValueChange={(option) => {+ onChange(option.id ?? null);+ setValue("destinationConfig.serviceName", option.name ?? "");}}options={services}placeholder="Select a service..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id.toString()}+ getOptionKeywords={(option) => [option.id.toString()]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-render-service-id-error" errors={[error]} /></FieldContent></Field>)}@@ -148,25 +153,35 @@ export const RenderSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Environment Group</FieldLabel>+ <FieldLabel+ id="secret-sync-render-environment-group-id-label"+ htmlFor="secret-sync-render-environment-group-id"+ >+ Environment Group+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-render-environment-group-id-label"+ aria-describedby={+ error ? "secret-sync-render-environment-group-id-error" : undefined+ }+ id="secret-sync-render-environment-group-id"+ isError={Boolean(error)}isLoading={isGroupsPending && Boolean(connectionId)}isDisabled={!connectionId}- value={groups ? (groups.find((g) => g.id === value) ?? []) : []}- onChange={(option) => {- onChange((option as SingleValue<TRenderEnvironmentGroup>)?.id ?? null);- setValue(- "destinationConfig.environmentGroupName",- (option as SingleValue<TRenderEnvironmentGroup>)?.name ?? ""- );+ value={groups?.find((group) => group.id === value) ?? null}+ onValueChange={(option) => {+ onChange(option.id ?? null);+ setValue("destinationConfig.environmentGroupName", option.name ?? "");}}options={groups}placeholder="Select an environment group..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id.toString()}+ getOptionKeywords={(option) => [option.id.toString()]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-render-environment-group-id-error" errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/RundeckSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/RundeckSyncFields.tsxindex e6111daa60..5bca486b80 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/RundeckSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/RundeckSyncFields.tsx@@ -1,21 +1,17 @@import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldDescription,FieldError,FieldGroup,FieldLabel,- FilterableSelect,Input} from "@app/components/v3";-import {- TRundeckProject,- useRundeckConnectionListProjects-} from "@app/hooks/api/appConnections/rundeck";+import { useRundeckConnectionListProjects } from "@app/hooks/api/appConnections/rundeck";import { SecretSync } from "@app/hooks/api/secretSyncs";import { TSecretSyncForm } from "../schemas";@@ -49,22 +45,32 @@ export const RundeckSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Project</FieldLabel>+ <FieldLabel+ id="secret-sync-rundeck-project-label"+ htmlFor="secret-sync-rundeck-project"+ >+ Project+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-rundeck-project-label"+ aria-describedby={error ? "secret-sync-rundeck-project-error" : undefined}+ id="secret-sync-rundeck-project"+ isError={Boolean(error)}isLoading={isProjectsLoading && Boolean(connectionId)}isDisabled={!connectionId}value={projects.find((project) => project.name === value) ?? null}- onChange={(option) => {- const selected = option as SingleValue<TRundeckProject>;+ onValueChange={(option) => {+ const selected = option;onChange(selected?.name ?? "");}}options={projects}placeholder="Select a project..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.name}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-rundeck-project-error" errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/SnowflakeSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/SnowflakeSyncFields.tsxindex fc15fe5f4d..5ed2065bae 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/SnowflakeSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/SnowflakeSyncFields.tsx@@ -1,22 +1,19 @@import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldError,FieldGroup,FieldLabel,- FilterableSelect,Tooltip,TooltipContent,TooltipTrigger} from "@app/components/v3";import {- TSnowflakeDatabase,- TSnowflakeSchema,useSnowflakeConnectionListDatabases,useSnowflakeConnectionListSchemas} from "@app/hooks/api/appConnections/snowflake";@@ -58,7 +55,10 @@ export const SnowflakeSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>+ <FieldLabel+ id="secret-sync-snowflake-database-label"+ htmlFor="secret-sync-snowflake-database"+ >Database<Tooltip><TooltipTrigger asChild>@@ -71,20 +71,25 @@ export const SnowflakeSyncFields = () => {</Tooltip></FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-snowflake-database-label"+ aria-describedby={error ? "secret-sync-snowflake-database-error" : undefined}+ id="secret-sync-snowflake-database"+ isError={Boolean(error)}isLoading={isDatabasesPending && Boolean(connectionId)}isDisabled={!connectionId}value={databases.find((db) => db.name === value) ?? null}- onChange={(option) => {+ onValueChange={(option) => {setValue("destinationConfig.schema", "");- onChange((option as SingleValue<TSnowflakeDatabase>)?.name ?? "");+ onChange(option.name ?? "");}}options={databases}placeholder="Select a database..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.name}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-snowflake-database-error" errors={[error]} /></FieldContent></Field>)}@@ -95,7 +100,10 @@ export const SnowflakeSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>+ <FieldLabel+ id="secret-sync-snowflake-schema-label"+ htmlFor="secret-sync-snowflake-schema"+ >Schema<Tooltip><TooltipTrigger asChild>@@ -108,19 +116,22 @@ export const SnowflakeSyncFields = () => {</Tooltip></FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-snowflake-schema-label"+ aria-describedby={error ? "secret-sync-snowflake-schema-error" : undefined}+ id="secret-sync-snowflake-schema"+ isError={Boolean(error)}isLoading={isSchemasPending && Boolean(connectionId) && Boolean(database)}isDisabled={!connectionId || !database}value={schemas.find((schema) => schema.name === value) ?? null}- onChange={(option) =>- onChange((option as SingleValue<TSnowflakeSchema>)?.name ?? "")- }+ onValueChange={(option) => onChange(option.name ?? "")}options={schemas}placeholder="Select a schema..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.name}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-snowflake-schema-error" errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/SpaceliftSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/SpaceliftSyncFields.tsxindex d629ee5edb..bc66c663bd 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/SpaceliftSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/SpaceliftSyncFields.tsx@@ -1,15 +1,14 @@import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldError,FieldGroup,FieldLabel,- FilterableSelect,Input,Select,SelectContent,@@ -20,10 +19,7 @@ import {TooltipContent,TooltipTrigger} from "@app/components/v3";-import {- TSpaceliftContext,- useSpaceliftConnectionListContexts-} from "@app/hooks/api/appConnections/spacelift";+import { useSpaceliftConnectionListContexts } from "@app/hooks/api/appConnections/spacelift";import { SecretSync } from "@app/hooks/api/secretSyncs";import {SpaceliftConfigType,@@ -72,14 +68,23 @@ export const SpaceliftSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Context</FieldLabel>+ <FieldLabel+ id="secret-sync-spacelift-context-id-label"+ htmlFor="secret-sync-spacelift-context-id"+ >+ Context+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-spacelift-context-id-label"+ aria-describedby={error ? "secret-sync-spacelift-context-id-error" : undefined}+ id="secret-sync-spacelift-context-id"+ isError={Boolean(error)}isLoading={isContextsPending && Boolean(connectionId)}isDisabled={!connectionId}value={contexts.find((ctx) => ctx.id === value) ?? null}- onChange={(option) => {- const selected = option as SingleValue<TSpaceliftContext>;+ onValueChange={(option) => {+ const selected = option;onChange(selected?.id ?? "");setValue("destinationConfig.contextName", selected?.name ?? "");}}@@ -87,8 +92,10 @@ export const SpaceliftSyncFields = () => {placeholder="Select a context..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-spacelift-context-id-error" errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/SupabaseSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/SupabaseSyncFields.tsxindex 488188163e..5c69cede99 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/SupabaseSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/SupabaseSyncFields.tsx@@ -1,19 +1,15 @@import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldError,FieldGroup,- FieldLabel,- FilterableSelect+ FieldLabel} from "@app/components/v3";-import {- TSupabaseProject,- useSupabaseConnectionListProjects-} from "@app/hooks/api/appConnections/supabase";+import { useSupabaseConnectionListProjects } from "@app/hooks/api/appConnections/supabase";import { SecretSync } from "@app/hooks/api/secretSyncs";import { TSecretSyncForm } from "../schemas";@@ -45,14 +41,23 @@ export const SupabaseSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Select a project</FieldLabel>+ <FieldLabel+ id="secret-sync-supabase-project-id-label"+ htmlFor="secret-sync-supabase-project-id"+ >+ Select a project+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-supabase-project-id-label"+ aria-describedby={error ? "secret-sync-supabase-project-id-error" : undefined}+ id="secret-sync-supabase-project-id"+ isError={Boolean(error)}isLoading={isProjectsLoading && Boolean(connectionId)}isDisabled={!connectionId}value={projects.find((p) => p.id === value) ?? null}- onChange={(option) => {- const v = option as SingleValue<TSupabaseProject>;+ onValueChange={(option) => {+ const v = option;onChange(v?.id ?? null);setValue("destinationConfig.projectName", v?.name ?? "");}}@@ -60,8 +65,10 @@ export const SupabaseSyncFields = () => {placeholder="Select project..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-supabase-project-id-error" errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/TeamCitySyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/TeamCitySyncFields.tsxindex 2c7d56318f..2ab8d022f2 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/TeamCitySyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/TeamCitySyncFields.tsx@@ -1,24 +1,20 @@import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldDescription,FieldError,FieldGroup,FieldLabel,- FilterableSelect,Tooltip,TooltipContent,TooltipTrigger} from "@app/components/v3";-import {- TTeamCityProjectWithBuildTypes,- useTeamCityConnectionListProjects-} from "@app/hooks/api/appConnections/teamcity";+import { useTeamCityConnectionListProjects } from "@app/hooks/api/appConnections/teamcity";import { SecretSync } from "@app/hooks/api/secretSyncs";import { TSecretSyncForm } from "../schemas";@@ -56,7 +52,10 @@ export const TeamCitySyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>+ <FieldLabel+ id="secret-sync-team-city-project-label"+ htmlFor="secret-sync-team-city-project"+ >Project<Tooltip><TooltipTrigger asChild>@@ -68,20 +67,26 @@ export const TeamCitySyncFields = () => {</Tooltip></FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-team-city-project-label"+ aria-describedby={error ? "secret-sync-team-city-project-error" : undefined}+ id="secret-sync-team-city-project"+ isError={Boolean(error)}isLoading={isProjectsLoading && Boolean(connectionId)}isDisabled={!connectionId}value={projects?.find((proj) => proj.id === value) ?? null}- onChange={(option) => {- onChange((option as SingleValue<TTeamCityProjectWithBuildTypes>)?.id ?? null);+ onValueChange={(option) => {+ onChange(option.id ?? null);setValue("destinationConfig.buildConfig", "");}}options={projects}placeholder="Select a project..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-team-city-project-error" errors={[error]} /></FieldContent></Field>)}@@ -92,7 +97,10 @@ export const TeamCitySyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>+ <FieldLabel+ id="secret-sync-team-city-build-config-label"+ htmlFor="secret-sync-team-city-build-config"+ >Build Configuration (Optional)<Tooltip><TooltipTrigger asChild>@@ -105,24 +113,34 @@ export const TeamCitySyncFields = () => {</Tooltip></FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-team-city-build-config-label"+ aria-describedby={+ error+ ? "secret-sync-team-city-build-config-description secret-sync-team-city-build-config-error"+ : "secret-sync-team-city-build-config-description"+ }+ id="secret-sync-team-city-build-config"+ isError={Boolean(error)}isLoading={isProjectsLoading && Boolean(connectionId)}isDisabled={!connectionId || !selectedProject}value={buildTypes.find((buildType) => buildType.id === value) ?? null}- onChange={(option) => {- const selectedOption = option as SingleValue<{ id: string; name: string }>;+ onValueChange={(option) => {+ const selectedOption = option;onChange(selectedOption?.id ?? "");}}+ onClear={() => onChange("")}options={buildTypes}- isClearableplaceholder="Select a build configuration..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal/>- <FieldDescription>+ <FieldDescription id="secret-sync-team-city-build-config-description">Not selecting a Build Configuration will sync your secrets to the entire project.</FieldDescription>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-team-city-build-config-error" errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/TerraformCloudSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/TerraformCloudSyncFields.tsxindex b628a84de5..35b3723e29 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/TerraformCloudSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/TerraformCloudSyncFields.tsx@@ -1,15 +1,14 @@import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldError,FieldGroup,FieldLabel,- FilterableSelect,Select,SelectContent,SelectItem,@@ -23,9 +22,6 @@ import {TERRAFORM_CLOUD_SYNC_SCOPES,TerraformCloudSyncCategory,TerraformCloudSyncScope,- TTerraformCloudConnectionOrganization,- TTerraformCloudConnectionVariableSet,- TTerraformCloudConnectionWorkspace,useTerraformCloudConnectionListOrganizations} from "@app/hooks/api/appConnections/terraform-cloud";import { SecretSync } from "@app/hooks/api/secretSyncs";@@ -66,18 +62,25 @@ export const TerraformCloudSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Organization</FieldLabel>+ <FieldLabel+ id="secret-sync-terraform-cloud-org-label"+ htmlFor="secret-sync-terraform-cloud-org"+ >+ Organization+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-terraform-cloud-org-label"+ aria-describedby={error ? "secret-sync-terraform-cloud-org-error" : undefined}+ id="secret-sync-terraform-cloud-org"+ isError={Boolean(error)}isLoading={isOrganizationsPending && Boolean(connectionId)}isDisabled={!connectionId}value={organizations ? (organizations.find((org) => org.id === value) ?? null) : null}- onChange={(option) => {- onChange(- (option as SingleValue<TTerraformCloudConnectionOrganization>)?.id ?? null- );+ onValueChange={(option) => {+ onChange(option.id ?? null);setValue("destinationConfig.variableSetId", "");setValue("destinationConfig.workspaceId", "");setValue("destinationConfig.variableSetName", "");@@ -87,8 +90,10 @@ export const TerraformCloudSyncFields = () => {placeholder="Select an organization..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id.toString()}+ getOptionKeywords={(option) => [option.id.toString()]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-terraform-cloud-org-error" errors={[error]} /></FieldContent></Field>)}@@ -108,16 +113,16 @@ export const TerraformCloudSyncFields = () => {<TooltipContent className="max-w-lg"><ul className="flex list-disc flex-col gap-3 pl-4"><li>- <p className="text-mineshaft-300">- <span className="font-medium text-bunker-200">+ <p className="text-label">+ <span className="font-medium text-foreground">Environment variables configure Terraform's behavior (e.g.,credentials).</span></p></li><li>- <p className="text-mineshaft-300">- <span className="font-medium text-bunker-200">+ <p className="text-label">+ <span className="font-medium text-foreground">Terraform variables are used as input values in your configuration.</span></p>@@ -169,8 +174,8 @@ export const TerraformCloudSyncFields = () => {<ul className="flex list-disc flex-col gap-3 pl-4">{Object.values(TERRAFORM_CLOUD_SYNC_SCOPES).map(({ name, description }) => (<li key={name}>- <p className="text-mineshaft-300">- <span className="font-medium text-bunker-200">{name}</span>:{" "}+ <p className="text-label">+ <span className="font-medium text-foreground">{name}</span>:{" "}{description}</p></li>@@ -213,15 +218,25 @@ export const TerraformCloudSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Variable Set</FieldLabel>+ <FieldLabel+ id="secret-sync-terraform-cloud-variable-set-id-label"+ htmlFor="secret-sync-terraform-cloud-variable-set-id"+ >+ Variable Set+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-terraform-cloud-variable-set-id-label"+ aria-describedby={+ error ? "secret-sync-terraform-cloud-variable-set-id-error" : undefined+ }+ id="secret-sync-terraform-cloud-variable-set-id"+ isError={Boolean(error)}isLoading={isOrganizationsPending && Boolean(connectionId) && Boolean(currentOrg)}isDisabled={!connectionId || !currentOrg}value={variableSets.find((variableSet) => variableSet.id === value) ?? null}- onChange={(option) => {- const selectedOption =- option as SingleValue<TTerraformCloudConnectionVariableSet>;+ onValueChange={(option) => {+ const selectedOption = option;onChange(selectedOption?.id ?? null);if (selectedOption) {@@ -234,8 +249,13 @@ export const TerraformCloudSyncFields = () => {placeholder="Select a variable set..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id.toString()}+ getOptionKeywords={(option) => [option.id.toString()]}+ modal+ />+ <FieldError+ id="secret-sync-terraform-cloud-variable-set-id-error"+ errors={[error]}/>- <FieldError errors={[error]} /></FieldContent></Field>)}@@ -247,15 +267,25 @@ export const TerraformCloudSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Workspace</FieldLabel>+ <FieldLabel+ id="secret-sync-terraform-cloud-workspace-id-label"+ htmlFor="secret-sync-terraform-cloud-workspace-id"+ >+ Workspace+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-terraform-cloud-workspace-id-label"+ aria-describedby={+ error ? "secret-sync-terraform-cloud-workspace-id-error" : undefined+ }+ id="secret-sync-terraform-cloud-workspace-id"+ isError={Boolean(error)}isLoading={isOrganizationsPending && Boolean(connectionId) && Boolean(currentOrg)}isDisabled={!connectionId || !currentOrg}value={workspaces.find((workspace) => workspace.id === value) ?? null}- onChange={(option) => {- const selectedOption =- option as SingleValue<TTerraformCloudConnectionWorkspace>;+ onValueChange={(option) => {+ const selectedOption = option;onChange(selectedOption?.id ?? null);if (selectedOption) {@@ -268,8 +298,10 @@ export const TerraformCloudSyncFields = () => {placeholder="Select a workspace..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id.toString()}+ getOptionKeywords={(option) => [option.id.toString()]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-terraform-cloud-workspace-id-error" errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/TravisCISyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/TravisCISyncFields.tsxindex 515e4969c9..87b440b717 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/TravisCISyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/TravisCISyncFields.tsx@@ -1,18 +1,15 @@import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldError,FieldGroup,- FieldLabel,- FilterableSelect+ FieldLabel} from "@app/components/v3";import {- TTravisCIBranch,- TTravisCIRepository,useTravisCIConnectionListBranches,useTravisCIConnectionListRepositories} from "@app/hooks/api/appConnections/travis-ci";@@ -47,7 +44,7 @@ export const TravisCISyncFields = () => {onChange={() => {setValue("destinationConfig.repositoryId", "");setValue("destinationConfig.repositorySlug", "");- setValue("destinationConfig.branch", undefined);+ setValue("destinationConfig.branch", "");}}/><Controller@@ -55,24 +52,35 @@ export const TravisCISyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Repository</FieldLabel>+ <FieldLabel+ id="secret-sync-travis-ci-repository-id-label"+ htmlFor="secret-sync-travis-ci-repository-id"+ >+ Repository+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-travis-ci-repository-id-label"+ aria-describedby={error ? "secret-sync-travis-ci-repository-id-error" : undefined}+ id="secret-sync-travis-ci-repository-id"+ isError={Boolean(error)}isLoading={isRepositoriesPending && Boolean(connectionId)}isDisabled={!connectionId}value={repositories.find((repo) => repo.id === value) ?? null}- onChange={(option) => {- const repo = option as SingleValue<TTravisCIRepository>;+ onValueChange={(option) => {+ const repo = option;onChange(repo?.id ?? "");setValue("destinationConfig.repositorySlug", repo?.slug ?? "");- setValue("destinationConfig.branch", undefined);+ setValue("destinationConfig.branch", "");}}options={repositories}placeholder="Select a repository..."getOptionLabel={(option) => option.slug}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-travis-ci-repository-id-error" errors={[error]} /></FieldContent></Field>)}@@ -82,27 +90,37 @@ export const TravisCISyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Branch (Optional)</FieldLabel>+ <FieldLabel+ id="secret-sync-travis-ci-branch-label"+ htmlFor="secret-sync-travis-ci-branch"+ >+ Branch (Optional)+ </FieldLabel><FieldContent>- <FilterableSelect- isClearable+ <Combobox+ aria-labelledby="secret-sync-travis-ci-branch-label"+ aria-describedby={error ? "secret-sync-travis-ci-branch-error" : undefined}+ id="secret-sync-travis-ci-branch"+ isError={Boolean(error)}isLoading={isBranchesPending && Boolean(connectionId) && Boolean(currentRepositoryId)}isDisabled={!connectionId || !currentRepositoryId}value={branches.find((branch) => branch.name === value) ?? null}- onChange={(option) => {- const branch = option as SingleValue<TTravisCIBranch>;- onChange(branch?.name ?? undefined);+ onValueChange={(option) => {+ const branch = option;+ onChange(branch.name);}}+ onClear={() => onChange("")}options={branches}placeholder="Select a branch..."getOptionLabel={(option) =>option.isDefault ? `${option.name} (default)` : option.name}getOptionValue={(option) => option.name}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-travis-ci-branch-error" errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/TriggerDevSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/TriggerDevSyncFields.tsxindex 615653ce2b..c8551c7941 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/TriggerDevSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/TriggerDevSyncFields.tsx@@ -1,20 +1,18 @@import { useEffect, useMemo, useState } from "react";import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldError,FieldGroup,- FieldLabel,- FilterableSelect+ FieldLabel} from "@app/components/v3";import {TTriggerDevEnvironment,TTriggerDevOrganization,- TTriggerDevProject,useTriggerDevConnectionListEnvironments,useTriggerDevConnectionListProjects} from "@app/hooks/api/appConnections/trigger-dev";@@ -94,14 +92,21 @@ export const TriggerDevSyncFields = () => {/><Field>- <FieldLabel>Organization</FieldLabel>+ <FieldLabel+ id="secret-sync-trigger-dev-organization-label"+ htmlFor="secret-sync-trigger-dev-organization"+ >+ Organization+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-trigger-dev-organization-label"+ id="secret-sync-trigger-dev-organization"isLoading={isProjectsLoading && Boolean(connectionId)}isDisabled={!connectionId}value={selectedOrganization}- onChange={(option) => {- const selected = option as SingleValue<TTriggerDevOrganization>;+ onValueChange={(option) => {+ const selected = option;setSelectedOrgId(selected?.id ?? null);setValue("destinationConfig.projectRef", "");setValue("destinationConfig.environment", "");@@ -110,6 +115,8 @@ export const TriggerDevSyncFields = () => {placeholder="Select an organization..."getOptionLabel={(option) => `${option.name} (${option.slug})`}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal/></FieldContent></Field>@@ -119,14 +126,23 @@ export const TriggerDevSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Project</FieldLabel>+ <FieldLabel+ id="secret-sync-trigger-dev-project-ref-label"+ htmlFor="secret-sync-trigger-dev-project-ref"+ >+ Project+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-trigger-dev-project-ref-label"+ aria-describedby={error ? "secret-sync-trigger-dev-project-ref-error" : undefined}+ id="secret-sync-trigger-dev-project-ref"+ isError={Boolean(error)}isLoading={isProjectsLoading && Boolean(connectionId)}isDisabled={!selectedOrgId}value={orgProjects.find((v) => v.id === value) ?? null}- onChange={(option) => {- const selected = option as SingleValue<TTriggerDevProject>;+ onValueChange={(option) => {+ const selected = option;onChange(selected?.id ?? "");setValue("destinationConfig.environment", "");}}@@ -134,8 +150,9 @@ export const TriggerDevSyncFields = () => {placeholder={selectedOrgId ? "Select a project..." : "Select an organization first"}getOptionLabel={(option) => `${option.name} (${option.id})`}getOptionValue={(option) => option.id}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-trigger-dev-project-ref-error" errors={[error]} /></FieldContent></Field>)}@@ -146,22 +163,33 @@ export const TriggerDevSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Environment</FieldLabel>+ <FieldLabel+ id="secret-sync-trigger-dev-environment-label"+ htmlFor="secret-sync-trigger-dev-environment"+ >+ Environment+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-trigger-dev-environment-label"+ aria-describedby={error ? "secret-sync-trigger-dev-environment-error" : undefined}+ id="secret-sync-trigger-dev-environment"+ isError={Boolean(error)}isLoading={isEnvironmentsLoading && Boolean(connectionId && projectRef)}isDisabled={!projectRef}value={environments?.find((env) => env.slug === value) ?? null}- onChange={(option) => {- const selected = option as SingleValue<TTriggerDevEnvironment>;+ onValueChange={(option) => {+ const selected = option;onChange(selected?.slug ?? "");}}options={environments ?? []}placeholder={projectRef ? "Select an environment..." : "Select a project first"}getOptionLabel={(option) => getEnvironmentLabel(option)}getOptionValue={(option) => option.slug}+ getOptionKeywords={(option) => [option.slug]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-trigger-dev-environment-error" errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/VercelSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/VercelSyncFields.tsxindex b406e8f0d0..813f027d7a 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/VercelSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/VercelSyncFields.tsx@@ -1,6 +1,6 @@import { useMemo, useState } from "react";import { Controller, useFormContext, useWatch } from "react-hook-form";-import { MultiValue, SingleValue } from "react-select";+import { SingleValue } from "react-select";import { Info, TriangleAlert } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";@@ -8,6 +8,7 @@ import {Alert,AlertDescription,AlertTitle,+ Combobox,CreatableSelect,Field,FieldContent,@@ -15,7 +16,6 @@ import {FieldError,FieldGroup,FieldLabel,- FilterableSelect,Label,Select,SelectContent,@@ -28,10 +28,7 @@ import {TooltipTrigger} from "@app/components/v3";import { useDebounce } from "@app/hooks";-import {- TVercelConnectionOrganization,- useVercelConnectionListOrganizations-} from "@app/hooks/api/appConnections/vercel";+import { useVercelConnectionListOrganizations } from "@app/hooks/api/appConnections/vercel";import { SecretSync } from "@app/hooks/api/secretSyncs";import {VercelEnvironmentType,@@ -61,9 +58,11 @@ export const VercelSyncFields = () => {const connectionId = useWatch({ name: "connection.id", control });const currentApp = watch("destinationConfig.app");+ const currentAppName = watch("destinationConfig.appName");const currentEnv = watch("destinationConfig.env");const scope = watch("destinationConfig.scope");const teamId = watch("destinationConfig.teamId");+ const teamName = watch("destinationConfig.teamName");const targetEnvironments = watch("destinationConfig.targetEnvironments");const isProjectDevTargeted =@@ -80,20 +79,21 @@ export const VercelSyncFields = () => {});- const selectedProject = teams- ?.find((team) => team.apps.some((app) => app.id === currentApp))- ?.apps.find((app) => app.id === currentApp);+ const allApps = useMemo(+ () =>+ teams?.flatMap((team) =>+ team.apps.map((project) => ({ ...project, teamName: team.name, teamId: team.id }))+ ) ?? [],+ [teams]+ );- const allApps =- teams?.flatMap((team) =>- team.apps.map((project) => ({ ...project, teamName: team.name, teamId: team.id }))- ) || [];+ const selectedProject = allApps.find((app) => app.id === currentApp);const availableApps = useMemo(() => {if (scope !== VercelSyncScope.Team) return allApps;return allApps.filter((app) => app.teamId === teamId);- }, [allApps, teamId]);+ }, [allApps, scope, teamId]);const environmentOptions = useMemo(() => {return standardVercelEnvironments@@ -109,13 +109,16 @@ export const VercelSyncFields = () => {name: env.slug})) || []);- }, [currentApp]);-- const previewBranchOptions =- selectedProject?.previewBranches?.map((branch) => ({- id: branch,- name: branch- })) || [];+ }, [selectedProject]);++ const previewBranchOptions = useMemo(+ () =>+ selectedProject?.previewBranches?.map((branch) => ({+ id: branch,+ name: branch+ })) ?? [],+ [selectedProject]+ );const isPreviewEnvironment = currentEnv === "preview";const isTeamScope = scope === VercelSyncScope.Team;@@ -188,22 +191,38 @@ export const VercelSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Team</FieldLabel>+ <FieldLabel+ id="secret-sync-vercel-team-id-label"+ htmlFor="secret-sync-vercel-team-id"+ >+ Team+ </FieldLabel><FieldContent>- <FilterableSelect- value={teams?.find((team) => team.id === value) ?? null}- onChange={(option) => {- const selectedOption = option as SingleValue<TVercelConnectionOrganization>;-- onChange(selectedOption?.id ?? null);- setValue("destinationConfig.teamName", selectedOption?.name || "");+ <Combobox+ aria-labelledby="secret-sync-vercel-team-id-label"+ aria-describedby={error ? "secret-sync-vercel-team-id-error" : undefined}+ id="secret-sync-vercel-team-id"+ isError={Boolean(error)}+ value={value || null}+ onValueChange={(id) => {+ const option = teams?.find((team) => team.id === id);+ if (!option || id === value) return;+ onChange(id);+ setValue("destinationConfig.teamName", option.name);}}- options={teams}+ options={(teams ?? []).map((team) => team.id)}placeholder="Select a team..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id}+ getOptionLabel={(id) =>+ teams?.find((team) => team.id === id)?.name ?? (teamName || id)+ }+ getOptionValue={(id) => id}+ getOptionKeywords={(id) => [+ id,+ teams?.find((team) => team.id === id)?.slug ?? ""+ ]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-vercel-team-id-error" errors={[error]} /></FieldContent></Field>)}@@ -214,24 +233,31 @@ export const VercelSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Target Environments</FieldLabel>+ <FieldLabel+ id="secret-sync-vercel-target-environments-label"+ htmlFor="secret-sync-vercel-target-environments"+ >+ Target Environments+ </FieldLabel><FieldContent>- <FilterableSelect- isMulti- value={teamVercelEnvironments.filter((env) => (value || []).includes(env.slug))}- onChange={(option) =>- onChange(- (option as MultiValue<(typeof teamVercelEnvironments)[number]>).map(- (o) => o.slug- )- )+ <Combobox+ aria-labelledby="secret-sync-vercel-target-environments-label"+ aria-describedby={+ error ? "secret-sync-vercel-target-environments-error" : undefined}+ id="secret-sync-vercel-target-environments"+ isError={Boolean(error)}+ multiple+ value={teamVercelEnvironments.filter((env) => (value || []).includes(env.slug))}+ onValueChange={(options) => onChange(options.map((option) => option.slug))}options={teamVercelEnvironments}placeholder="Select target environments..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.slug}+ getOptionKeywords={(option) => [option.slug]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-vercel-target-environments-error" errors={[error]} /></FieldContent></Field>)}@@ -242,22 +268,31 @@ export const VercelSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Target Projects (Optional)</FieldLabel>+ <FieldLabel+ id="secret-sync-vercel-target-projects-label"+ htmlFor="secret-sync-vercel-target-projects"+ >+ Target Projects (Optional)+ </FieldLabel><FieldContent>- <FilterableSelect- isMulti- value={availableApps.filter((app) => (value || []).includes(app.id))}- onChange={(option) =>- onChange(- (option as MultiValue<(typeof availableApps)[number]>).map((o) => o.id)- )+ <Combobox+ aria-labelledby="secret-sync-vercel-target-projects-label"+ aria-describedby={+ error ? "secret-sync-vercel-target-projects-error" : undefined}+ id="secret-sync-vercel-target-projects"+ isError={Boolean(error)}+ multiple+ value={availableApps.filter((app) => (value || []).includes(app.id))}+ onValueChange={(options) => onChange(options.map((option) => option.id))}options={availableApps}placeholder="Select target projects..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.id}+ getOptionKeywords={(option) => [option.id]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-vercel-target-projects-error" errors={[error]} /></FieldContent></Field>)}@@ -296,7 +331,7 @@ export const VercelSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>+ <FieldLabel id="secret-sync-vercel-app-label" htmlFor="secret-sync-vercel-app">Vercel Project<Tooltip><TooltipTrigger asChild>@@ -317,31 +352,46 @@ export const VercelSyncFields = () => {</Tooltip></FieldLabel><FieldContent>- <FilterableSelect- noOptionsMessage={({ inputValue }) => {+ <Combobox+ aria-labelledby="secret-sync-vercel-app-label"+ aria-describedby={error ? "secret-sync-vercel-app-error" : undefined}+ id="secret-sync-vercel-app"+ isError={Boolean(error)}+ emptyMessage={(inputValue) => {return inputValue? "No projects found matching your search.": "No projects found.";}}isLoading={isTeamsLoading && Boolean(connectionId)}isDisabled={!connectionId}- value={availableApps.find((app) => app.id === value) ?? null}- onChange={(option) => {- const selected = option as SingleValue<(typeof availableApps)[number]>;- onChange(selected?.id ?? null);+ value={value || null}+ onValueChange={(id) => {+ const selected = availableApps.find((app) => app.id === id);+ if (!selected || id === value) return;+ onChange(id);+ setValue("destinationConfig.env", VercelEnvironmentType.Production);setValue("destinationConfig.branch", "");- setValue("destinationConfig.teamId", selected?.teamId || "");- setValue("destinationConfig.appName", selected?.name || "");+ setValue("destinationConfig.teamId", selected.teamId);+ setValue("destinationConfig.teamName", selected.teamName);+ setValue("destinationConfig.appName", selected.name);}}- onInputChange={(newValue) => setProjectSearch(newValue)}- filterOption={null}- options={availableApps}+ onInputValueChange={setProjectSearch}+ shouldFilter={false}+ includeMissingSelectedOptions={!projectSearch}+ options={availableApps.map((app) => app.id)}placeholder="Search for a project..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id.toString()}- groupBy="teamName"+ getOptionLabel={(id) =>+ availableApps.find((app) => app.id === id)?.name ?? (currentAppName || id)+ }+ getOptionValue={(id) => id}+ getOptionGroup={(id) =>+ availableApps.find((app) => app.id === id)?.teamName ??+ teamName ??+ "Selected Team"+ }+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-vercel-app-error" errors={[error]} /></FieldContent></Field>)}@@ -352,9 +402,15 @@ export const VercelSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Vercel Project Environment</FieldLabel>+ <FieldLabel id="secret-sync-vercel-env-label" htmlFor="secret-sync-vercel-env">+ Vercel Project Environment+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-vercel-env-label"+ aria-describedby={error ? "secret-sync-vercel-env-error" : undefined}+ id="secret-sync-vercel-env"+ isError={Boolean(error)}isDisabled={!connectionId || !currentApp}value={value@@ -365,8 +421,8 @@ export const VercelSyncFields = () => {}: null}- onChange={(option) => {- const envKey = (option as any)?.key ?? null;+ onValueChange={(option) => {+ const envKey = option.key;onChange(envKey);setValue("destinationConfig.branch", "");@@ -379,8 +435,10 @@ export const VercelSyncFields = () => {placeholder="Select an environment..."getOptionLabel={(option) => option.name || option.key || ""}getOptionValue={(option) => option.key || ""}+ getOptionKeywords={(option) => [option.key || ""]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-vercel-env-error" errors={[error]} /></FieldContent></Field>)}@@ -395,37 +453,34 @@ export const VercelSyncFields = () => {<FieldLabel>Vercel Preview Branch (Optional)</FieldLabel><FieldContent><CreatableSelect+ isError={Boolean(error)}className="w-full"placeholder="Select a branch..."isLoading={isTeamsLoading && Boolean(connectionId) && Boolean(currentApp)}isDisabled={!connectionId || !currentApp}options={previewBranchOptions}- value={previewBranchOptions.find((branch) => branch.id === value) ?? null}+ value={+ value+ ? (previewBranchOptions.find((branch) => branch.id === value) ?? {+ id: value,+ name: value+ })+ : null+ }onChange={(option) =>onChange((option as SingleValue<{ id: string }>)?.id || "")}- onCreateOption={(option) => {- onChange(option);- if (!option || option.trim() === "") return;- previewBranchOptions.push({ id: option, name: option });- }}- // eslint-disable-next-line @typescript-eslint/no-unused-vars- getNewOptionData={(inputValue, _optionLabel) => {- return {- id: inputValue,- name: `${inputValue} - press Enter`- };- }}+ onCreateOption={onChange}+ getNewOptionData={(inputValue) => ({+ id: inputValue,+ name: `${inputValue} - press Enter`+ })}getOptionLabel={(option) => option.name}- getOptionValue={(option) => option?.id || ""}- // eslint-disable-next-line @typescript-eslint/no-unused-vars- isValidNewOption={(inputValue, _value, _options, _accessors) => {- return (- inputValue.trim().length > 0 &&- previewBranchOptions.filter((branch) => branch.id === inputValue)- .length === 0- );- }}+ getOptionValue={(option) => option.id}+ isValidNewOption={(inputValue) =>+ inputValue.trim().length > 0 &&+ !previewBranchOptions.some((branch) => branch.id === inputValue)+ }/><FieldError errors={[error]} /></FieldContent>diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/WindmillSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/WindmillSyncFields.tsxindex ed00959d43..e2af4b8dcd 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/WindmillSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/WindmillSyncFields.tsx@@ -1,24 +1,20 @@import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldError,FieldGroup,FieldLabel,- FilterableSelect,Input,Tooltip,TooltipContent,TooltipTrigger} from "@app/components/v3";-import {- TWindmillWorkspace,- useWindmillConnectionListWorkspaces-} from "@app/hooks/api/appConnections/windmill";+import { useWindmillConnectionListWorkspaces } from "@app/hooks/api/appConnections/windmill";import { SecretSync } from "@app/hooks/api/secretSyncs";import { TSecretSyncForm } from "../schemas";@@ -50,7 +46,10 @@ export const WindmillSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>+ <FieldLabel+ id="secret-sync-windmill-workspace-label"+ htmlFor="secret-sync-windmill-workspace"+ >Workspace<Tooltip><TooltipTrigger asChild>@@ -62,19 +61,22 @@ export const WindmillSyncFields = () => {</Tooltip></FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-windmill-workspace-label"+ aria-describedby={error ? "secret-sync-windmill-workspace-error" : undefined}+ id="secret-sync-windmill-workspace"+ isError={Boolean(error)}isLoading={isWorkspacesLoading && Boolean(connectionId)}isDisabled={!connectionId}value={workspaces?.find((workspace) => workspace.name === value) ?? null}- onChange={(option) =>- onChange((option as SingleValue<TWindmillWorkspace>)?.name ?? null)- }+ onValueChange={(option) => onChange(option.name ?? null)}options={workspaces}placeholder="Select a workspace..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.name}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-windmill-workspace-error" errors={[error]} /></FieldContent></Field>)}@@ -97,7 +99,7 @@ export const WindmillSyncFields = () => {rel="noopener noreferrer"href="https://www.windmill.dev/docs/core_concepts/roles_and_permissions#path">- <span className="cursor-pointer underline decoration-primary underline-offset-2 hover:text-mineshaft-200">+ <span className="cursor-pointer underline decoration-accent underline-offset-2 hover:text-foreground/80">owner path convention</span>.diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/ZabbixSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/ZabbixSyncFields.tsxindex cd23d70c9c..e9075ae887 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/ZabbixSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/ZabbixSyncFields.tsx@@ -1,15 +1,14 @@import { Controller, useFormContext, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Combobox,Field,FieldContent,FieldError,FieldGroup,FieldLabel,- FilterableSelect,Select,SelectContent,SelectItem,@@ -20,7 +19,6 @@ import {TooltipTrigger} from "@app/components/v3";import {- TZabbixHost,useZabbixConnectionListHosts,ZABBIX_SYNC_SCOPES,ZabbixMacroType,@@ -74,8 +72,8 @@ export const ZabbixSyncFields = () => {<ul className="flex list-disc flex-col gap-3 pl-4">{Object.values(ZABBIX_SYNC_SCOPES).map(({ name, description }) => (<li key={name}>- <p className="text-mineshaft-300">- <span className="font-medium text-bunker-200">{name}</span>:{" "}+ <p className="text-label">+ <span className="font-medium text-foreground">{name}</span>:{" "}{description}</p></li>@@ -116,14 +114,23 @@ export const ZabbixSyncFields = () => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field>- <FieldLabel>Host</FieldLabel>+ <FieldLabel+ id="secret-sync-zabbix-host-id-label"+ htmlFor="secret-sync-zabbix-host-id"+ >+ Host+ </FieldLabel><FieldContent>- <FilterableSelect+ <Combobox+ aria-labelledby="secret-sync-zabbix-host-id-label"+ aria-describedby={error ? "secret-sync-zabbix-host-id-error" : undefined}+ id="secret-sync-zabbix-host-id"+ isError={Boolean(error)}isLoading={isHostsPending && Boolean(connectionId)}isDisabled={!connectionId}value={hosts.find((host) => host.hostId === value) ?? null}- onChange={(option) => {- const selectedOption = option as SingleValue<TZabbixHost>;+ onValueChange={(option) => {+ const selectedOption = option;onChange(selectedOption?.hostId ?? null);if (selectedOption) {@@ -136,8 +143,10 @@ export const ZabbixSyncFields = () => {placeholder="Select a host..."getOptionLabel={(option) => option.host}getOptionValue={(option) => option.hostId}+ getOptionKeywords={(option) => [option.hostId]}+ modal/>- <FieldError errors={[error]} />+ <FieldError id="secret-sync-zabbix-host-id-error" errors={[error]} /></FieldContent></Field>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/shared/AwsRegionSelect.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/shared/AwsRegionSelect.tsxindex 369ac2bc9e..3f63bd2208 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/shared/AwsRegionSelect.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/shared/AwsRegionSelect.tsx@@ -1,38 +1,40 @@-import { components, OptionProps, SingleValue } from "react-select";-import { CheckIcon } from "lucide-react";--import { Badge, FilterableSelect } from "@app/components/v3";+import { Badge, Combobox } from "@app/components/v3";import { AWS_REGIONS } from "@app/helpers/appConnections";-const Option = ({ isSelected, children, ...props }: OptionProps<(typeof AWS_REGIONS)[number]>) => {- return (- <components.Option isSelected={isSelected} {...props}>- <div className="flex flex-row items-center justify-between">- <p className="truncate">{children}</p>- <Badge variant="neutral" className="mr-auto ml-1">- {props.data.slug}- </Badge>- {isSelected && <CheckIcon className="ml-2 size-4" />}- </div>- </components.Option>- );-};+const renderRegion = (option: (typeof AWS_REGIONS)[number]) => (+ <div className="flex min-w-0 items-center gap-1">+ <span className="truncate">{option.name}</span>+ <Badge variant="neutral" className="shrink-0">+ {option.slug}+ </Badge>+ </div>+);type Props = {+ id: string;value: string;onChange: (value: string | undefined) => void;+ isError?: boolean;+ "aria-describedby"?: string;+ "aria-labelledby"?: string;};-export const AwsRegionSelect = ({ value, onChange }: Props) => {+export const AwsRegionSelect = ({ id, value, onChange, isError, ...props }: Props) => {return (- <FilterableSelect+ <Combobox+ id={id}value={AWS_REGIONS.find((region) => region.slug === value)}- onChange={(option) => onChange((option as SingleValue<(typeof AWS_REGIONS)[number]>)?.slug)}+ onValueChange={(option) => onChange(option.slug)}options={AWS_REGIONS}+ isError={isError}placeholder="Select region..."getOptionLabel={(option) => option.name}getOptionValue={(option) => option.slug}- components={{ Option }}+ getOptionKeywords={(option) => [option.slug]}+ renderOption={renderRegion}+ renderValue={renderRegion}+ modal+ {...props}/>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncInitialSyncBehaviorFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncInitialSyncBehaviorFields.tsxindex 54ac65be93..321e282c83 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncInitialSyncBehaviorFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncInitialSyncBehaviorFields.tsx@@ -119,7 +119,7 @@ const SecretRow = ({ name, fate }: ReconciliationRow) => {const ReconciliationLegend = () => (<div className="flex flex-wrap items-center gap-x-3 gap-y-1 text-[9px] tracking-wider text-muted uppercase"><span className="flex items-center gap-1">- <span className="inline-block h-2 w-3 rounded-[2px] border border-border bg-mineshaft-800/80" />+ <span className="inline-block h-2 w-3 rounded-[2px] border border-border bg-container-hover/80" />unchanged</span><span className="flex items-center gap-1">@@ -200,7 +200,7 @@ const ReconciliationSection = ({infisicalRows: ReconciliationRow[];destinationRows: ReconciliationRow[];}) => (- <div className="rounded-md border border-border bg-mineshaft-800/30 p-3">+ <div className="rounded-md border border-border bg-container-hover/30 p-3"><div className="mb-3 flex items-baseline gap-2"><p className="text-xs font-semibold tracking-wider text-foreground uppercase">{title}</p><p className="text-xs text-muted">{subtitle}</p>diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/AwsParameterStoreSyncOptionsFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/AwsParameterStoreSyncOptionsFields.tsxindex 19c3882321..dec304886e 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/AwsParameterStoreSyncOptionsFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/AwsParameterStoreSyncOptionsFields.tsx@@ -1,6 +1,5 @@import { useEffect, useState } from "react";import { Controller, useFieldArray, useFormContext, useFormState, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { CircleHelp, Plus, Trash2 } from "lucide-react";import {@@ -9,12 +8,12 @@ import {AccordionItem,AccordionTrigger,Button,+ Combobox,Field,FieldContent,FieldDescription,FieldError,FieldLabel,- FilterableSelect,IconButton,Input,Label,@@ -23,10 +22,7 @@ import {TooltipContent,TooltipTrigger} from "@app/components/v3";-import {- TAwsConnectionKmsKey,- useListAwsConnectionKmsKeys-} from "@app/hooks/api/appConnections/aws";+import { useListAwsConnectionKmsKeys } from "@app/hooks/api/appConnections/aws";import { SecretSync } from "@app/hooks/api/secretSyncs";import { TSecretSyncForm } from "../schemas";@@ -176,46 +172,33 @@ export const AwsParameterStoreSyncOptionsFields = () => {</Tooltip></FieldLabel><FieldContent>- <FilterableSelect+ <ComboboxisLoading={isKmsKeysPending && Boolean(connectionId && region)}isDisabled={!connectionId}value={kmsKeys.find((org) => org.alias === value) ?? null}- onChange={(option) =>- onChange((option as SingleValue<TAwsConnectionKmsKey>)?.alias ?? null)- }+ onValueChange={(option) => onChange(option.alias ?? null)}+ onClear={() => onChange(undefined)}+ clearAriaLabel="Clear KMS key"isError={Boolean(error)}- // eslint-disable-next-line react/no-unstable-nested-components- noOptionsMessage={({ inputValue }) =>- inputValue ? undefined : (- <p>- To configure a KMS key, ensure the following permissions are present on- the selected IAM role:{" "}- <span className="rounded-sm bg-mineshaft-600 text-mineshaft-300">- "kms:ListAliases"- </span>- ,{" "}- <span className="rounded-sm bg-mineshaft-600 text-mineshaft-300">- "kms:DescribeKey"- </span>- ,{" "}- <span className="rounded-sm bg-mineshaft-600 text-mineshaft-300">- "kms:Encrypt"- </span>- ,{" "}- <span className="rounded-sm bg-mineshaft-600 text-mineshaft-300">- "kms:Decrypt"- </span>- .- </p>- )+ emptyMessage={(inputValue) =>+ inputValue ? "No KMS keys match your search." : "No KMS keys found."}options={kmsKeys}placeholder="Leave blank to use default KMS key"+ searchPlaceholder="Search KMS keys..."+ searchAriaLabel="Search KMS keys"getOptionLabel={(option) =>option.alias === "alias/aws/ssm" ? `${option.alias} (Default)` : option.alias}getOptionValue={(option) => option.alias}+ modal/>+ <FieldDescription>+ Custom keys require <span className="font-mono">kms:ListAliases</span>,{" "}+ <span className="font-mono">kms:DescribeKey</span>,{" "}+ <span className="font-mono">kms:Encrypt</span>, and{" "}+ <span className="font-mono">kms:Decrypt</span> on the selected IAM role.+ </FieldDescription></FieldContent><FieldError errors={[error]} /></Field>diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/AwsSecretsManagerSyncOptionsFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/AwsSecretsManagerSyncOptionsFields.tsxindex f5ad8fe132..8e59798672 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/AwsSecretsManagerSyncOptionsFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/AwsSecretsManagerSyncOptionsFields.tsx@@ -1,6 +1,5 @@import { useEffect, useState } from "react";import { Controller, useFieldArray, useFormContext, useFormState, useWatch } from "react-hook-form";-import { SingleValue } from "react-select";import { CircleHelp, Plus, Trash2 } from "lucide-react";import {@@ -9,12 +8,13 @@ import {AccordionItem,AccordionTrigger,Button,+ Code,+ Combobox,Field,FieldContent,FieldDescription,FieldError,FieldLabel,- FilterableSelect,IconButton,Input,Label,@@ -23,10 +23,7 @@ import {TooltipContent,TooltipTrigger} from "@app/components/v3";-import {- TAwsConnectionKmsKey,- useListAwsConnectionKmsKeys-} from "@app/hooks/api/appConnections/aws";+import { useListAwsConnectionKmsKeys } from "@app/hooks/api/appConnections/aws";import { SecretSync } from "@app/hooks/api/secretSyncs";import { AwsSecretsManagerSyncMappingBehavior } from "@app/hooks/api/secretSyncs/types/aws-secrets-manager-sync";@@ -177,51 +174,37 @@ export const AwsSecretsManagerSyncOptionsFields = () => {<TooltipTrigger asChild><CircleHelp className="size-3 cursor-help text-muted" /></TooltipTrigger>- <TooltipContent>The AWS KMS key to encrypt secrets with.</TooltipContent>+ <TooltipContent className="max-w-sm">+ The AWS KMS key to encrypt secrets with. Custom keys require{" "}+ <Code>kms:ListAliases</Code>, <Code>kms:DescribeKey</Code>,{" "}+ <Code>kms:Encrypt</Code>, and <Code>kms:Decrypt</Code> on the selected IAM+ role.+ </TooltipContent></Tooltip></FieldLabel><FieldContent>- <FilterableSelect+ <ComboboxisLoading={isKmsKeysPending && Boolean(connectionId && region)}isDisabled={!connectionId}value={kmsKeys.find((org) => org.alias === value) ?? null}- onChange={(option) =>- onChange((option as SingleValue<TAwsConnectionKmsKey>)?.alias ?? null)- }+ onValueChange={(option) => onChange(option.alias ?? null)}+ onClear={() => onChange(undefined)}+ clearAriaLabel="Clear KMS key"isError={Boolean(error)}- // eslint-disable-next-line react/no-unstable-nested-components- noOptionsMessage={({ inputValue }) =>- inputValue ? undefined : (- <p>- To configure a KMS key, ensure the following permissions are present on- the selected IAM role:{" "}- <span className="rounded-sm bg-mineshaft-600 text-mineshaft-300">- "kms:ListAliases"- </span>- ,{" "}- <span className="rounded-sm bg-mineshaft-600 text-mineshaft-300">- "kms:DescribeKey"- </span>- ,{" "}- <span className="rounded-sm bg-mineshaft-600 text-mineshaft-300">- "kms:Encrypt"- </span>- ,{" "}- <span className="rounded-sm bg-mineshaft-600 text-mineshaft-300">- "kms:Decrypt"- </span>- .- </p>- )+ emptyMessage={(inputValue) =>+ inputValue ? "No KMS keys match your search." : "No KMS keys found."}options={kmsKeys}placeholder="Leave blank to use default KMS key"+ searchPlaceholder="Search KMS keys..."+ searchAriaLabel="Search KMS keys"getOptionLabel={(option) =>option.alias === "alias/aws/secretsmanager"? `${option.alias} (Default)`: option.alias}getOptionValue={(option) => option.alias}+ modal/></FieldContent><FieldError errors={[error]} />diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/SecretSyncKeySchemaField.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/SecretSyncKeySchemaField.tsxindex fdb204d456..72790e839b 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/SecretSyncKeySchemaField.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/SecretSyncKeySchemaField.tsx@@ -116,11 +116,11 @@ export const SecretSyncKeySchemaField = () => {{!error && (<FieldDescription>Provide a template to rewrite each key — use{" "}- <code className="rounded bg-mineshaft-800/80 px-1 py-0.5 font-mono text-[11px] text-foreground/80">+ <code className="rounded bg-container-hover/80 px-1 py-0.5 font-mono text-[11px] text-foreground/80">{"{{secretKey}}"}</code>{" "}as a placeholder, and optionally include{" "}- <code className="rounded bg-mineshaft-800/80 px-1 py-0.5 font-mono text-[11px] text-foreground/80">+ <code className="rounded bg-container-hover/80 px-1 py-0.5 font-mono text-[11px] text-foreground/80">{"{{environment}}"}</code>.{" "}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/AzureEntraIdScimSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/AzureEntraIdScimSyncReviewFields.tsxindex 9596db2ec7..c436fc0691 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/AzureEntraIdScimSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/AzureEntraIdScimSyncReviewFields.tsx@@ -9,9 +9,7 @@ export const AzureEntraIdScimSyncReviewFields = () => {TSecretSyncForm & { destination: SecretSync.AzureEntraIdScim }>();- const servicePrincipalDisplayName = watch(- "destinationConfig.servicePrincipalDisplayName" as "destinationConfig.servicePrincipalId"- );+ const servicePrincipalDisplayName = watch("destinationConfig.servicePrincipalDisplayName");const servicePrincipalId = watch("destinationConfig.servicePrincipalId");const secretKey = watch("syncOptions.secretKey");diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/SecretSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/SecretSyncReviewFields.tsxindex df939a07f5..eb35f8d748 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/SecretSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/SecretSyncReviewFields.tsx@@ -2,7 +2,10 @@ import { ReactNode } from "react";import { useFormContext } from "react-hook-form";import { TriangleAlert } from "lucide-react";-import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";+import {+ getSecretSyncDestinationConfig,+ TSecretSyncForm+} from "@app/components/secret-syncs/forms/schemas";import {Alert,AlertDescription,@@ -108,7 +111,7 @@ export const SecretSyncReviewFields = () => {projectId: currentProject?.id || "",connectionId: connection?.id,enabled: true,- destinationConfig: watch("destinationConfig")+ destinationConfig: getSecretSyncDestinationConfig(destination, watch("destinationConfig"))});switch (destination) {diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncSourceFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncSourceFields.tsxindex 3fdc1593e4..76702824d6 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncSourceFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncSourceFields.tsx@@ -3,12 +3,12 @@ import { Controller, useFormContext, useWatch } from "react-hook-form";import { subject } from "@casl/ability";import {+ Combobox,Field,FieldContent,FieldError,FieldGroup,FieldLabel,- FilterableSelect,SecretPathInput} from "@app/components/v3";import { useProject, useProjectPermission } from "@app/context";@@ -63,14 +63,15 @@ const DefaultSecretSyncSourceFields = () => {<Field><FieldLabel>Environment</FieldLabel><FieldContent>- <FilterableSelect+ <Comboboxvalue={value}- onChange={onChange}+ onValueChange={onChange}options={currentProject.environments}placeholder="Select environment..."getOptionLabel={(option) => option?.name}getOptionValue={(option) => option?.id}isError={Boolean(error)}+ modal/><FieldError errors={[error]} /></FieldContent>diff --git a/frontend/src/components/secret-syncs/forms/schemas/1password-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/1password-sync-destination-schema.tsindex a4cddd7b6f..6abe4c1cb3 100644--- a/frontend/src/components/secret-syncs/forms/schemas/1password-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/1password-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const OnePassSyncDestinationSchema = BaseSecretSyncSchema().merge(z.object({diff --git a/frontend/src/components/secret-syncs/forms/schemas/aws-parameter-store-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/aws-parameter-store-sync-destination-schema.tsindex e2ccb98549..21b84f005a 100644--- a/frontend/src/components/secret-syncs/forms/schemas/aws-parameter-store-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/aws-parameter-store-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const AwsParameterStoreSyncDestinationSchema = BaseSecretSyncSchema(z.object({diff --git a/frontend/src/components/secret-syncs/forms/schemas/aws-secrets-manager-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/aws-secrets-manager-sync-destination-schema.tsindex 1bb161034c..2c972986d2 100644--- a/frontend/src/components/secret-syncs/forms/schemas/aws-secrets-manager-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/aws-secrets-manager-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";import { AwsSecretsManagerSyncMappingBehavior } from "@app/hooks/api/secretSyncs/types/aws-secrets-manager-sync";export const AwsSecretsManagerSyncDestinationSchema = BaseSecretSyncSchema(diff --git a/frontend/src/components/secret-syncs/forms/schemas/azure-app-configuration-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/azure-app-configuration-sync-destination-schema.tsindex 5fb9d28957..2d6d3b5b59 100644--- a/frontend/src/components/secret-syncs/forms/schemas/azure-app-configuration-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/azure-app-configuration-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const AzureAppConfigurationSyncDestinationSchema = BaseSecretSyncSchema().merge(z.object({diff --git a/frontend/src/components/secret-syncs/forms/schemas/azure-devops-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/azure-devops-sync-destination-schema.tsindex 00232e3cd1..87e94021f0 100644--- a/frontend/src/components/secret-syncs/forms/schemas/azure-devops-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/azure-devops-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const AzureDevOpsSyncDestinationSchema = BaseSecretSyncSchema().merge(z.object({diff --git a/frontend/src/components/secret-syncs/forms/schemas/azure-entra-id-scim-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/azure-entra-id-scim-sync-destination-schema.tsindex 7b5310c280..27fb40c9b1 100644--- a/frontend/src/components/secret-syncs/forms/schemas/azure-entra-id-scim-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/azure-entra-id-scim-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const AzureEntraIdScimSyncDestinationSchema = BaseSecretSyncSchema(z.object({@@ -11,7 +11,8 @@ export const AzureEntraIdScimSyncDestinationSchema = BaseSecretSyncSchema(z.object({destination: z.literal(SecretSync.AzureEntraIdScim),destinationConfig: z.object({- servicePrincipalId: z.string().trim().min(1, "Service Principal ID required")+ servicePrincipalId: z.string().trim().min(1, "Service Principal ID required"),+ servicePrincipalDisplayName: z.string().optional()})}));diff --git a/frontend/src/components/secret-syncs/forms/schemas/azure-key-vault-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/azure-key-vault-sync-destination-schema.tsindex 30c404ade2..128538eb42 100644--- a/frontend/src/components/secret-syncs/forms/schemas/azure-key-vault-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/azure-key-vault-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const AzureKeyVaultSyncDestinationSchema = BaseSecretSyncSchema(z.object({diff --git a/frontend/src/components/secret-syncs/forms/schemas/base-secret-sync-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/base-secret-sync-schema.tsindex 962649c1bb..63832e0b61 100644--- a/frontend/src/components/secret-syncs/forms/schemas/base-secret-sync-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/base-secret-sync-schema.ts@@ -1,6 +1,6 @@import { AnyZodObject, z } from "zod";-import { SecretSyncInitialSyncBehavior } from "@app/hooks/api/secretSyncs";+import { SecretSyncInitialSyncBehavior } from "@app/hooks/api/secretSyncs/enums";import { slugSchema } from "@app/lib/schemas";export const BaseSecretSyncSchema = <T extends AnyZodObject | undefined = undefined>(diff --git a/frontend/src/components/secret-syncs/forms/schemas/bitbucket-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/bitbucket-sync-destination-schema.tsindex a10a22d5a7..2da28f8495 100644--- a/frontend/src/components/secret-syncs/forms/schemas/bitbucket-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/bitbucket-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const BitbucketSyncDestinationSchema = BaseSecretSyncSchema().merge(z.object({diff --git a/frontend/src/components/secret-syncs/forms/schemas/camunda-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/camunda-sync-destination-schema.tsindex d95156e916..c88f487a00 100644--- a/frontend/src/components/secret-syncs/forms/schemas/camunda-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/camunda-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const CamundaSyncDestinationSchema = BaseSecretSyncSchema().merge(z.object({diff --git a/frontend/src/components/secret-syncs/forms/schemas/checkly-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/checkly-sync-destination-schema.tsindex 7684df9811..5a89286027 100644--- a/frontend/src/components/secret-syncs/forms/schemas/checkly-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/checkly-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const ChecklySyncDestinationSchema = BaseSecretSyncSchema().merge(z.object({diff --git a/frontend/src/components/secret-syncs/forms/schemas/chef-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/chef-sync-destination-schema.tsindex 8d27b616f5..c05708ca80 100644--- a/frontend/src/components/secret-syncs/forms/schemas/chef-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/chef-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const ChefSyncDestinationSchema = BaseSecretSyncSchema().merge(z.object({diff --git a/frontend/src/components/secret-syncs/forms/schemas/circleci-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/circleci-sync-destination-schema.tsindex 091021fa2c..8d26883bbc 100644--- a/frontend/src/components/secret-syncs/forms/schemas/circleci-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/circleci-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const CircleCISyncDestinationSchema = BaseSecretSyncSchema().merge(z.object({diff --git a/frontend/src/components/secret-syncs/forms/schemas/cloud-66-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/cloud-66-sync-destination-schema.tsindex 459e02e7aa..f6233e3080 100644--- a/frontend/src/components/secret-syncs/forms/schemas/cloud-66-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/cloud-66-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const Cloud66SyncDestinationSchema = BaseSecretSyncSchema().merge(z.object({diff --git a/frontend/src/components/secret-syncs/forms/schemas/cloudflare-pages-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/cloudflare-pages-sync-destination-schema.tsindex c44a579db5..807c99dc20 100644--- a/frontend/src/components/secret-syncs/forms/schemas/cloudflare-pages-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/cloudflare-pages-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const CloudflarePagesSyncDestinationSchema = BaseSecretSyncSchema().merge(z.object({diff --git a/frontend/src/components/secret-syncs/forms/schemas/cloudflare-workers-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/cloudflare-workers-sync-destination-schema.tsindex 5c73e4cb4b..ab59ad8e85 100644--- a/frontend/src/components/secret-syncs/forms/schemas/cloudflare-workers-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/cloudflare-workers-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const CloudflareWorkersSyncDestinationSchema = BaseSecretSyncSchema(z.object({diff --git a/frontend/src/components/secret-syncs/forms/schemas/databricks-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/databricks-sync-destination-schema.tsindex 4319f616d9..36028be0ed 100644--- a/frontend/src/components/secret-syncs/forms/schemas/databricks-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/databricks-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const DatabricksSyncDestinationSchema = BaseSecretSyncSchema().merge(z.object({diff --git a/frontend/src/components/secret-syncs/forms/schemas/daytona-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/daytona-sync-destination-schema.tsindex e181108793..ace8690a17 100644--- a/frontend/src/components/secret-syncs/forms/schemas/daytona-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/daytona-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const DaytonaSyncDestinationSchema = BaseSecretSyncSchema().merge(z.object({diff --git a/frontend/src/components/secret-syncs/forms/schemas/devin-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/devin-sync-destination-schema.tsindex 9adc328af3..0bfa523bbc 100644--- a/frontend/src/components/secret-syncs/forms/schemas/devin-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/devin-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const DevinSyncDestinationSchema = BaseSecretSyncSchema().merge(z.object({diff --git a/frontend/src/components/secret-syncs/forms/schemas/digital-ocean-app-platform-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/digital-ocean-app-platform-sync-destination-schema.tsindex 2840f8b275..509737c03b 100644--- a/frontend/src/components/secret-syncs/forms/schemas/digital-ocean-app-platform-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/digital-ocean-app-platform-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const DigitalOceanAppPlatformSyncDestinationSchema = BaseSecretSyncSchema().merge(z.object({diff --git a/frontend/src/components/secret-syncs/forms/schemas/external-infisical-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/external-infisical-sync-destination-schema.tsindex 96f12ea419..66951d68f4 100644--- a/frontend/src/components/secret-syncs/forms/schemas/external-infisical-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/external-infisical-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const ExternalInfisicalSyncDestinationSchema = BaseSecretSyncSchema().merge(z.object({diff --git a/frontend/src/components/secret-syncs/forms/schemas/flyio-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/flyio-sync-destination-schema.tsindex d7492cb3c9..6dcde8f51d 100644--- a/frontend/src/components/secret-syncs/forms/schemas/flyio-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/flyio-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const FlyioSyncDestinationSchema = BaseSecretSyncSchema(z.object({diff --git a/frontend/src/components/secret-syncs/forms/schemas/gcp-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/gcp-sync-destination-schema.tsindex 89bb9cf9a1..117efbb8b2 100644--- a/frontend/src/components/secret-syncs/forms/schemas/gcp-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/gcp-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";import { GcpSyncScope } from "@app/hooks/api/secretSyncs/types/gcp-sync";export const GcpSyncDestinationSchema = BaseSecretSyncSchema().merge(diff --git a/frontend/src/components/secret-syncs/forms/schemas/github-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/github-sync-destination-schema.tsindex 54a204528c..cee2a84f11 100644--- a/frontend/src/components/secret-syncs/forms/schemas/github-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/github-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";import {GitHubSyncScope,GitHubSyncVisibility@@ -16,7 +16,11 @@ export const GitHubSyncDestinationSchema = BaseSecretSyncSchema().merge(scope: z.literal(GitHubSyncScope.Organization),org: z.string().min(1, "Organization name required"),visibility: z.nativeEnum(GitHubSyncVisibility),- selectedRepositoryIds: z.number().array().optional()+ selectedRepositoryIds: z+ .number()+ .array()+ .optional()+ .transform((value) => (value?.length ? value : undefined))}),z.object({scope: z.literal(GitHubSyncScope.Repository),diff --git a/frontend/src/components/secret-syncs/forms/schemas/gitlab-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/gitlab-sync-destination-schema.tsindex b264d4e2ca..080bacc112 100644--- a/frontend/src/components/secret-syncs/forms/schemas/gitlab-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/gitlab-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";import { GitLabSyncScope } from "@app/hooks/api/secretSyncs/types/gitlab-sync";export const GitlabSyncDestinationSchema = BaseSecretSyncSchema().merge(diff --git a/frontend/src/components/secret-syncs/forms/schemas/hasura-cloud-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/hasura-cloud-sync-destination-schema.tsindex 69161a4753..e614566239 100644--- a/frontend/src/components/secret-syncs/forms/schemas/hasura-cloud-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/hasura-cloud-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const HasuraCloudSyncDestinationSchema = BaseSecretSyncSchema().merge(z.object({diff --git a/frontend/src/components/secret-syncs/forms/schemas/hc-vault-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/hc-vault-sync-destination-schema.tsindex a02778aaf0..604c3e895d 100644--- a/frontend/src/components/secret-syncs/forms/schemas/hc-vault-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/hc-vault-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const HCVaultSyncDestinationSchema = BaseSecretSyncSchema().merge(z.object({diff --git a/frontend/src/components/secret-syncs/forms/schemas/heroku-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/heroku-sync-destination-schema.tsindex 94cad7b83d..688ac65781 100644--- a/frontend/src/components/secret-syncs/forms/schemas/heroku-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/heroku-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const HerokuSyncDestinationSchema = BaseSecretSyncSchema().merge(z.object({diff --git a/frontend/src/components/secret-syncs/forms/schemas/humanitec-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/humanitec-sync-destination-schema.tsindex bb438557fd..6e7dd78b60 100644--- a/frontend/src/components/secret-syncs/forms/schemas/humanitec-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/humanitec-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";import { HumanitecSyncScope } from "@app/hooks/api/secretSyncs/types/humanitec-sync";export const HumanitecSyncDestinationSchema = BaseSecretSyncSchema().merge(diff --git a/frontend/src/components/secret-syncs/forms/schemas/laravel-forge-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/laravel-forge-sync-destination-schema.tsindex 011f835b7c..d7e118285b 100644--- a/frontend/src/components/secret-syncs/forms/schemas/laravel-forge-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/laravel-forge-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const LaravelForgeSyncDestinationSchema = BaseSecretSyncSchema().merge(z.object({diff --git a/frontend/src/components/secret-syncs/forms/schemas/netlify-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/netlify-sync-destination-schema.tsindex b0412bda1c..022eda0a0e 100644--- a/frontend/src/components/secret-syncs/forms/schemas/netlify-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/netlify-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export enum NetlifySyncContext {// All = "all", - Netlify doesn't allow "all" as the context when using is_secret: true@@ -18,9 +18,15 @@ export const NetlifySyncDestinationSchema = BaseSecretSyncSchema().merge(destinationConfig: z.object({accountId: z.string(),accountName: z.string(),- siteId: z.string().optional(),+ siteId: z+ .string()+ .nullish()+ .transform((value) => value || undefined),siteName: z.string().optional(),- context: z.nativeEnum(NetlifySyncContext).optional()+ context: z+ .nativeEnum(NetlifySyncContext)+ .nullish()+ .transform((value) => value || undefined)})}));diff --git a/frontend/src/components/secret-syncs/forms/schemas/northflank-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/northflank-sync-destination-schema.tsindex 1554da63b0..66573fa742 100644--- a/frontend/src/components/secret-syncs/forms/schemas/northflank-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/northflank-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const NorthflankSyncDestinationSchema = BaseSecretSyncSchema().merge(z.object({diff --git a/frontend/src/components/secret-syncs/forms/schemas/oci-vault-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/oci-vault-sync-destination-schema.tsindex 84eb6a362a..295dd809de 100644--- a/frontend/src/components/secret-syncs/forms/schemas/oci-vault-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/oci-vault-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const OCIVaultSyncDestinationSchema = BaseSecretSyncSchema().merge(z.object({diff --git a/frontend/src/components/secret-syncs/forms/schemas/octopus-deploy-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/octopus-deploy-sync-destination-schema.tsindex 4c5daf357b..d09dd7712d 100644--- a/frontend/src/components/secret-syncs/forms/schemas/octopus-deploy-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/octopus-deploy-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";import { OctopusDeploySyncScope } from "@app/hooks/api/secretSyncs/types/octopus-deploy-sync";export const OctopusDeploySyncDestinationSchema = BaseSecretSyncSchema().merge(diff --git a/frontend/src/components/secret-syncs/forms/schemas/ona-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/ona-sync-destination-schema.tsindex 19224f4040..25879d4a16 100644--- a/frontend/src/components/secret-syncs/forms/schemas/ona-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/ona-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const OnaSyncDestinationSchema = BaseSecretSyncSchema().merge(z.object({diff --git a/frontend/src/components/secret-syncs/forms/schemas/ovh-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/ovh-sync-destination-schema.tsindex 05441a6c7b..e671eee557 100644--- a/frontend/src/components/secret-syncs/forms/schemas/ovh-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/ovh-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const OvhSyncDestinationSchema = BaseSecretSyncSchema().merge(z.object({diff --git a/frontend/src/components/secret-syncs/forms/schemas/qovery-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/qovery-sync-destination-schema.tsindex 14275f4253..9498661bd9 100644--- a/frontend/src/components/secret-syncs/forms/schemas/qovery-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/qovery-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";import { QoveryVariableType } from "@app/hooks/api/secretSyncs/types/qovery-sync";export const QoverySyncDestinationSchema = BaseSecretSyncSchema().merge(diff --git a/frontend/src/components/secret-syncs/forms/schemas/railway-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/railway-sync-destination-schema.tsindex 2870d6087e..d1d2bccc72 100644--- a/frontend/src/components/secret-syncs/forms/schemas/railway-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/railway-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const RailwaySyncDestinationSchema = BaseSecretSyncSchema().merge(z.object({diff --git a/frontend/src/components/secret-syncs/forms/schemas/render-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/render-sync-destination-schema.tsindex b65705c149..a3144e2ab3 100644--- a/frontend/src/components/secret-syncs/forms/schemas/render-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/render-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";import { RenderSyncScope, RenderSyncType } from "@app/hooks/api/secretSyncs/types/render-sync";export const RenderSyncDestinationSchema = BaseSecretSyncSchema(diff --git a/frontend/src/components/secret-syncs/forms/schemas/rundeck-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/rundeck-sync-destination-schema.tsindex cd9c329f0d..307c5ea6d7 100644--- a/frontend/src/components/secret-syncs/forms/schemas/rundeck-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/rundeck-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const RundeckSyncDestinationSchema = BaseSecretSyncSchema().merge(z.object({diff --git a/frontend/src/components/secret-syncs/forms/schemas/secret-sync-schema.test.ts b/frontend/src/components/secret-syncs/forms/schemas/secret-sync-schema.test.tsnew file mode 100644index 0000000000..2466cb9d51--- /dev/null+++ b/frontend/src/components/secret-syncs/forms/schemas/secret-sync-schema.test.ts@@ -0,0 +1,165 @@+import assert from "node:assert/strict";+import { describe, it } from "node:test";++import { SecretSync, SecretSyncInitialSyncBehavior } from "@app/hooks/api/secretSyncs/enums";++import { getSecretSyncDestinationConfig, SecretSyncFormSchema } from "./secret-sync-schema";++const wireValue = (value: unknown) => JSON.parse(JSON.stringify(value));++const submittedConfig = (destination: SecretSync, destinationConfig: unknown) =>+ wireValue(+ SecretSyncFormSchema.parse({+ destination,+ destinationConfig,+ name: "test-sync",+ connection: { id: "00000000-0000-4000-8000-000000000001", name: "Connection" },+ environment: { id: "environment-id", name: "Development", slug: "dev" },+ secretPath: "/",+ syncOptions: { initialSyncBehavior: SecretSyncInitialSyncBehavior.OverwriteDestination },+ isAutoSyncEnabled: true+ }).destinationConfig+ );++describe("secret sync duplicate-check configuration", () => {+ const cases = [+ {+ destination: SecretSync.Netlify,+ unset: { accountId: "account-1", accountName: "Account" },+ cleared: { siteId: null, siteName: undefined, context: null }+ },+ {+ destination: SecretSync.Checkly,+ unset: { accountId: "account-1", accountName: "Account" },+ cleared: { groupId: null, groupName: undefined }+ },+ {+ destination: SecretSync.TravisCI,+ unset: { repositoryId: "repo-1", repositorySlug: "owner/repo" },+ cleared: { branch: null }+ },+ {+ destination: SecretSync.GCPSecretManager,+ unset: { scope: "global", projectId: "project-1" },+ cleared: { locationId: "" }+ }+ ];++ cases.forEach(({ destination, unset, cleared }) => {+ it(`checks the same destination after clearing optional ${destination} fields`, () => {+ const edited = { ...unset, ...cleared };+ const expected = submittedConfig(destination, unset);+ assert.deepEqual(wireValue(getSecretSyncDestinationConfig(destination, unset)), expected);+ assert.deepEqual(wireValue(getSecretSyncDestinationConfig(destination, edited)), expected);+ assert.deepEqual(submittedConfig(destination, edited), expected);+ assert.notDeepEqual(wireValue(edited), expected);+ });+ });++ it("preserves selected optional values", () => {+ const config = {+ accountId: "account-1",+ accountName: "Account",+ siteId: "site-1",+ siteName: "Site",+ context: "production"+ };+ assert.deepEqual(getSecretSyncDestinationConfig(SecretSync.Netlify, config), config);+ });++ it("applies path normalization before checking a Vault destination", () => {+ const config = { mount: " secret ", path: " /folder/path/ " };+ const expected = { mount: "secret", path: "folder/path" };+ assert.deepEqual(getSecretSyncDestinationConfig(SecretSync.HCVault, config), expected);+ assert.deepEqual(submittedConfig(SecretSync.HCVault, config), expected);+ });++ it("applies defaults and strips inactive GitLab scope fields exactly as Save does", () => {+ const config = {+ scope: "project",+ projectId: "project-1",+ projectName: "Project",+ groupId: "previous-group"+ };+ const preview = getSecretSyncDestinationConfig(SecretSync.GitLab, config);+ assert.deepEqual(preview, {+ scope: "project",+ projectId: "project-1",+ projectName: "Project",+ shouldProtectSecrets: false,+ shouldMaskSecrets: false,+ shouldHideSecrets: false+ });+ assert.deepEqual(preview, submittedConfig(SecretSync.GitLab, config));+ });++ it("preserves an empty Vercel team ID for a personal project", () => {+ const config = {+ scope: "project",+ app: "app-1",+ appName: "App",+ env: "production",+ teamId: ""+ };+ const preview = getSecretSyncDestinationConfig(SecretSync.Vercel, config);+ assert.deepEqual(preview, { ...config, sensitive: false });+ assert.deepEqual(preview, submittedConfig(SecretSync.Vercel, config));+ });++ it("preserves empty arrays and explicit false values", () => {+ const config = {+ scope: "team",+ teamId: "team-1",+ targetEnvironments: [],+ applyToAllCustomEnvironments: true,+ targetProjects: [],+ sensitive: false+ };+ assert.deepEqual(getSecretSyncDestinationConfig(SecretSync.Vercel, config), config);+ });++ it("does not check incomplete or invalid destinations", () => {+ assert.equal(getSecretSyncDestinationConfig(SecretSync.TravisCI, { branch: null }), undefined);+ assert.equal(getSecretSyncDestinationConfig(SecretSync.Netlify, undefined), undefined);+ assert.equal(+ getSecretSyncDestinationConfig(SecretSync.Netlify, {+ accountId: "a",+ accountName: "A",+ context: "invalid"+ }),+ undefined+ );+ });+});++describe("mounted optional-field resets", () => {+ it("omits empty-string Travis and Checkly selections from submitted destinations", () => {+ assert.deepEqual(+ submittedConfig(SecretSync.TravisCI, {+ repositoryId: "repo-b",+ repositorySlug: "owner/repo-b",+ branch: ""+ }),+ { repositoryId: "repo-b", repositorySlug: "owner/repo-b" }+ );+ assert.deepEqual(+ submittedConfig(SecretSync.Checkly, {+ accountId: "account-b",+ accountName: "Account B",+ groupId: ""+ }),+ { accountId: "account-b", accountName: "Account B" }+ );+ });+ it("requires a fresh GitHub repository selection after clearing the selected list", () => {+ assert.equal(+ getSecretSyncDestinationConfig(SecretSync.GitHub, {+ scope: "organization",+ org: "new-org",+ visibility: "selected",+ selectedRepositoryIds: []+ }),+ undefined+ );+ });+});diff --git a/frontend/src/components/secret-syncs/forms/schemas/secret-sync-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/secret-sync-schema.tsindex e23a0e9939..204b6e41d9 100644--- a/frontend/src/components/secret-syncs/forms/schemas/secret-sync-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/secret-sync-schema.ts@@ -107,3 +107,12 @@ export const SecretSyncFormSchema = SecretSyncUnionSchema;export const UpdateSecretSyncFormSchema = SecretSyncUnionSchema;export type TSecretSyncForm = z.infer<typeof SecretSyncFormSchema>;++export const getSecretSyncDestinationConfig = (+ destination: TSecretSyncForm["destination"],+ config: unknown+) => {+ const schema = SecretSyncFormSchema.optionsMap.get(destination)?.shape.destinationConfig;+ const result = schema?.safeParse(config);+ return result?.success ? result.data : undefined;+};diff --git a/frontend/src/components/secret-syncs/forms/schemas/snowflake-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/snowflake-sync-destination-schema.tsindex f21e320fc4..e620d38232 100644--- a/frontend/src/components/secret-syncs/forms/schemas/snowflake-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/snowflake-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const SnowflakeSyncDestinationSchema = BaseSecretSyncSchema().merge(z.object({diff --git a/frontend/src/components/secret-syncs/forms/schemas/spacelift-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/spacelift-sync-destination-schema.tsindex b1ee0fa374..e6e6691dd0 100644--- a/frontend/src/components/secret-syncs/forms/schemas/spacelift-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/spacelift-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";import {SpaceliftConfigType,SpaceliftFileMountFormatdiff --git a/frontend/src/components/secret-syncs/forms/schemas/supabase-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/supabase-sync-destination-schema.tsindex 3cbb49775f..c2d5884219 100644--- a/frontend/src/components/secret-syncs/forms/schemas/supabase-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/supabase-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const SupabaseSyncDestinationSchema = BaseSecretSyncSchema().merge(z.object({diff --git a/frontend/src/components/secret-syncs/forms/schemas/teamcity-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/teamcity-sync-destination-schema.tsindex e2cd600508..f0a2e03409 100644--- a/frontend/src/components/secret-syncs/forms/schemas/teamcity-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/teamcity-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const TeamCitySyncDestinationSchema = BaseSecretSyncSchema().merge(z.object({diff --git a/frontend/src/components/secret-syncs/forms/schemas/terraform-cloud-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/terraform-cloud-destination-schema.tsindex d818fd29a5..327ae1d437 100644--- a/frontend/src/components/secret-syncs/forms/schemas/terraform-cloud-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/terraform-cloud-destination-schema.ts@@ -4,8 +4,8 @@ import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemasimport {TerraformCloudSyncCategory,TerraformCloudSyncScope-} from "@app/hooks/api/appConnections/terraform-cloud";-import { SecretSync } from "@app/hooks/api/secretSyncs";+} from "@app/hooks/api/appConnections/terraform-cloud/types";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const TerraformCloudSyncDestinationSchema = BaseSecretSyncSchema().merge(z.object({diff --git a/frontend/src/components/secret-syncs/forms/schemas/travis-ci-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/travis-ci-sync-destination-schema.tsindex f7b25ffd27..97e2de1df1 100644--- a/frontend/src/components/secret-syncs/forms/schemas/travis-ci-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/travis-ci-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const TravisCISyncDestinationSchema = BaseSecretSyncSchema().merge(z.object({@@ -9,7 +9,10 @@ export const TravisCISyncDestinationSchema = BaseSecretSyncSchema().merge(destinationConfig: z.object({repositoryId: z.string().min(1, "Repository required"),repositorySlug: z.string().min(1, "Repository required"),- branch: z.string().optional()+ branch: z+ .string()+ .nullish()+ .transform((value) => value || undefined)})}));diff --git a/frontend/src/components/secret-syncs/forms/schemas/trigger-dev-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/trigger-dev-sync-destination-schema.tsindex da6e7ae1eb..e54fa15e77 100644--- a/frontend/src/components/secret-syncs/forms/schemas/trigger-dev-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/trigger-dev-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const TriggerDevSyncDestinationSchema = BaseSecretSyncSchema(z.object({diff --git a/frontend/src/components/secret-syncs/forms/schemas/vercel-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/vercel-sync-destination-schema.tsindex 89028ae56a..9039013868 100644--- a/frontend/src/components/secret-syncs/forms/schemas/vercel-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/vercel-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";import {VercelEnvironmentType,VercelSyncScopediff --git a/frontend/src/components/secret-syncs/forms/schemas/windmill-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/windmill-sync-destination-schema.tsindex 242f771404..baebadbcf7 100644--- a/frontend/src/components/secret-syncs/forms/schemas/windmill-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/windmill-sync-destination-schema.ts@@ -1,7 +1,7 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const WindmillSyncDestinationSchema = BaseSecretSyncSchema().merge(z.object({diff --git a/frontend/src/components/secret-syncs/forms/schemas/zabbix-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/zabbix-sync-destination-schema.tsindex 694c6c7af3..a6f62bc48a 100644--- a/frontend/src/components/secret-syncs/forms/schemas/zabbix-sync-destination-schema.ts+++ b/frontend/src/components/secret-syncs/forms/schemas/zabbix-sync-destination-schema.ts@@ -1,8 +1,8 @@import { z } from "zod";import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";-import { ZabbixMacroType, ZabbixSyncScope } from "@app/hooks/api/appConnections/zabbix";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { ZabbixMacroType, ZabbixSyncScope } from "@app/hooks/api/appConnections/zabbix/types";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";export const ZabbixSyncDestinationSchema = BaseSecretSyncSchema().merge(z.object({diff --git a/frontend/src/components/secret-syncs/github/GitHubSyncSelectedRepositoriesTooltipContent.tsx b/frontend/src/components/secret-syncs/github/GitHubSyncSelectedRepositoriesTooltipContent.tsxindex 7e1876adac..3c2c588a7e 100644--- a/frontend/src/components/secret-syncs/github/GitHubSyncSelectedRepositoriesTooltipContent.tsx+++ b/frontend/src/components/secret-syncs/github/GitHubSyncSelectedRepositoriesTooltipContent.tsx@@ -24,8 +24,8 @@ export const GitHubSyncSelectedRepositoriesTooltipContent = ({ secretSync }: Proif (destinationConfig.scope === GitHubSyncScope.Organization) {return (<>- <span className="text-xs text-bunker-300">Repositories:</span>- <p className={twMerge("text-sm", isPending && "text-mineshaft-400")}>+ <span className="text-xs text-label">Repositories:</span>+ <p className={twMerge("text-sm", isPending && "text-muted")}>{isPending? "Loading...": repositoriesdiff --git a/frontend/src/components/v3/generic/Accordion/Accordion.stories.tsx b/frontend/src/components/v3/generic/Accordion/Accordion.stories.tsxindex 74d12b58d2..c3171afb63 100644--- a/frontend/src/components/v3/generic/Accordion/Accordion.stories.tsx+++ b/frontend/src/components/v3/generic/Accordion/Accordion.stories.tsx@@ -1,5 +1,7 @@import type { Meta, StoryObj } from "@storybook/react-vite";+import { Field, FieldLabel } from "../Field";+import { Input } from "../Input";import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "./Accordion";/**@@ -97,3 +99,34 @@ export const Ghost: Story = {</Accordion>)};++export const InteractiveContent: Story = {+ name: "Example: Interactive Content",+ args: {+ variant: "ghost",+ type: "single",+ collapsible: true,+ defaultValue: "advanced-options"+ },+ parameters: {+ docs: {+ description: {+ story:+ "Expanded content allows intentional overflow so focus rings, validation rings, and portalled controls remain visible. Overflow is clipped only while the section animates open or closed."+ }+ }+ },+ render: (args) => (+ <Accordion {...args} className="w-80">+ <AccordionItem value="advanced-options">+ <AccordionTrigger>Advanced Options</AccordionTrigger>+ <AccordionContent className="py-3">+ <Field>+ <FieldLabel htmlFor="accordion-kms-key">KMS Key</FieldLabel>+ <Input id="accordion-kms-key" placeholder="Select a KMS key..." />+ </Field>+ </AccordionContent>+ </AccordionItem>+ </Accordion>+ )+};diff --git a/frontend/src/components/v3/generic/Accordion/Accordion.tsx b/frontend/src/components/v3/generic/Accordion/Accordion.tsxindex 510baf6a58..c118c1a2b3 100644--- a/frontend/src/components/v3/generic/Accordion/Accordion.tsx+++ b/frontend/src/components/v3/generic/Accordion/Accordion.tsx@@ -84,12 +84,38 @@ function AccordionTrigger({function AccordionContent({className,children,+ onAnimationEnd,+ onAnimationStart,...props}: React.ComponentProps<typeof AccordionPrimitive.Content>) {+ const [isExpanded, setIsExpanded] = React.useState(false);++ const syncExpandedState = (event: React.AnimationEvent<HTMLDivElement>) => {+ if (event.target === event.currentTarget) {+ setIsExpanded(event.currentTarget.dataset.state === "open");+ }+ };+return (<AccordionPrimitive.Contentdata-slot="accordion-content"- className="overflow-hidden text-sm transition data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"+ className={cn(+ "overflow-hidden text-sm transition data-[state=closed]:animate-accordion-up data-[state=closed]:overflow-hidden data-[state=open]:animate-accordion-down motion-reduce:data-[state=open]:overflow-visible",+ isExpanded && "overflow-visible"+ )}+ onAnimationStart={(event) => {+ onAnimationStart?.(event);+ if (+ event.target === event.currentTarget &&+ event.currentTarget.dataset.state === "closed"+ ) {+ setIsExpanded(false);+ }+ }}+ onAnimationEnd={(event) => {+ onAnimationEnd?.(event);+ syncExpandedState(event);+ }}{...props}><divdiff --git a/frontend/src/components/v3/generic/Code/Code.stories.tsx b/frontend/src/components/v3/generic/Code/Code.stories.tsxnew file mode 100644index 0000000000..c301b6da8c--- /dev/null+++ b/frontend/src/components/v3/generic/Code/Code.stories.tsx@@ -0,0 +1,40 @@+import type { Meta, StoryObj } from "@storybook/react-vite";++import { Code } from "./Code";++const meta = {+ title: "Generic/Code",+ component: Code,+ parameters: { layout: "centered" },+ tags: ["autodocs"],+ argTypes: {+ variant: {+ control: "select",+ options: ["default", "plain"]+ }+ },+ args: {+ children: "INFISICAL_{{secretKey}}"+ }+} satisfies Meta<typeof Code>;++export default meta;+type Story = StoryObj<typeof meta>;++export const Default: Story = {};++export const Plain: Story = {+ args: {+ variant: "plain"+ }+};++export const InlineContext: Story = {+ render: () => (+ <p className="max-w-md text-sm leading-relaxed">+ A path of <Code>/demo/path/</Code> and a key schema of{" "}+ <Code>INFISICAL_{"{{secretKey}}"}</Code> produce{" "}+ <Code>/demo/path/INFISICAL_{"{{secretKey}}"}</Code>.+ </p>+ )+};diff --git a/frontend/src/components/v3/generic/Code/Code.tsx b/frontend/src/components/v3/generic/Code/Code.tsxnew file mode 100644index 0000000000..1e80f85211--- /dev/null+++ b/frontend/src/components/v3/generic/Code/Code.tsx@@ -0,0 +1,28 @@+import { cva, type VariantProps } from "cva";++import { cn } from "@app/components/v3/utils";++const codeVariants = cva("box-decoration-clone font-mono", {+ variants: {+ variant: {+ default: "rounded-sm bg-foreground/10 px-1",+ plain: ""+ }+ },+ defaultVariants: {+ variant: "default"+ }+});++type CodeProps = React.ComponentProps<"code"> & VariantProps<typeof codeVariants>;++const Code = ({ className, variant = "default", ...props }: CodeProps) => (+ <code+ data-slot="code"+ data-variant={variant}+ className={cn(codeVariants({ variant }), className)}+ {...props}+ />+);++export { Code, type CodeProps, codeVariants };diff --git a/frontend/src/components/v3/generic/Code/index.ts b/frontend/src/components/v3/generic/Code/index.tsnew file mode 100644index 0000000000..e1be3258b7--- /dev/null+++ b/frontend/src/components/v3/generic/Code/index.ts@@ -0,0 +1 @@+export * from "./Code";diff --git a/frontend/src/components/v3/generic/Combobox/Combobox.stories.tsx b/frontend/src/components/v3/generic/Combobox/Combobox.stories.tsxindex 185fd13b72..0581f44038 100644--- a/frontend/src/components/v3/generic/Combobox/Combobox.stories.tsx+++ b/frontend/src/components/v3/generic/Combobox/Combobox.stories.tsx@@ -1,5 +1,6 @@import { createContext, type ReactNode, useContext, useState } from "react";import type { Meta, StoryObj } from "@storybook/react-vite";+import { expect, userEvent, within } from "storybook/test";import { Button } from "../Button";import {@@ -49,6 +50,12 @@ const PROJECTS = Array.from({ length: 18 }, (_, index) => ({index % 4 === 0 ? `Project ${index + 1} with a long descriptive name` : `Project ${index + 1}`}));+const VAULTS = [+ { id: "engineering", name: "Engineering", items: 42 },+ { id: "infrastructure", name: "Infrastructure", items: 18 },+ { id: "security", name: "Security", items: 7 }+] as const;+const ComboboxStoryPortalContext = createContext<HTMLElement | null>(null);const StoryCombobox = <TOption,>(props: ComboboxProps<TOption>) => {@@ -185,14 +192,58 @@ export const RichOptions: Story = {render: () => <RichOptionsRender />};+const OpaqueOptionFieldsRender = () => {+ const [value, setValue] = useState<(typeof VAULTS)[number] | null>(VAULTS[0]);++ return (+ <Field>+ <FieldLabel htmlFor="combobox-vault">Vault</FieldLabel>+ <StoryCombobox+ id="combobox-vault"+ options={VAULTS}+ value={value}+ onValueChange={setValue}+ getOptionValue={(option) => option.id}+ getOptionLabel={(option) => option.name}+ getOptionKeywords={(option) => [`${option.items} items`]}+ placeholder="Select vault..."+ searchPlaceholder="Search vaults..."+ searchAriaLabel="Search vaults"+ renderOption={(option) => (+ <div className="flex min-w-0 items-center justify-between gap-4">+ <span className="truncate">{option.name}</span>+ <span className="shrink-0 text-xs text-muted">{option.items} items</span>+ </div>+ )}+ />+ </Field>+ );+};++export const OpaqueOptionFields: Story = {+ name: "Example: Opaque Option Fields",+ parameters: {+ docs: {+ description: {+ story:+ "Consumer option objects are opaque to the underlying primitive. Fields such as a numeric `items` count cannot be mistaken for the combobox's internal grouped-item structure."+ }+ }+ },+ render: () => <OpaqueOptionFieldsRender />+};+const MultipleRender = () => {const [value, setValue] = useState<(typeof PROJECTS)[number][]>(PROJECTS.slice(0, 2));return (<Field>- <FieldLabel htmlFor="combobox-projects">Projects</FieldLabel>+ <FieldLabel id="combobox-projects-label" htmlFor="combobox-projects">+ Projects+ </FieldLabel><StoryComboboxid="combobox-projects"+ aria-labelledby="combobox-projects-label"multipleoptions={PROJECTS}value={value}@@ -215,7 +266,16 @@ const MultipleRender = () => {*/export const Multiple: Story = {name: "Multiple: Chips",- render: () => <MultipleRender />+ render: () => <MultipleRender />,+ play: async ({ canvasElement }) => {+ const canvas = within(canvasElement);+ const combobox = canvas.getByRole("combobox", { name: "Projects" });++ await userEvent.click(canvas.getByText("Projects"));+ await userEvent.type(combobox, "Project 3");+ await expect(combobox).toHaveFocus();+ await expect(combobox).toHaveAccessibleName("Projects");+ }};const SelectAllRender = () => {@@ -413,9 +473,12 @@ export const States: Story = {/></Field><Field data-disabled="true">- <FieldLabel htmlFor="combobox-disabled-projects">Projects</FieldLabel>+ <FieldLabel id="combobox-disabled-projects-label" htmlFor="combobox-disabled-projects">+ Projects+ </FieldLabel><StoryComboboxid="combobox-disabled-projects"+ aria-labelledby="combobox-disabled-projects-label"multipleoptions={PROJECTS}value={PROJECTS.slice(0, 2)}@@ -502,3 +565,29 @@ export const ViewportEdges: Story = {},render: () => <ViewportEdgesRender />};++/** Saved IDs remain visible even when a server search returns a different page. */+export const ServerFilteredSelection: Story = {+ name: "Example: Server-filtered Saved Selection",+ render: () => {+ const [value, setValue] = useState<string | null>("saved-workspace");+ const [query, setQuery] = useState("");+ const options = ["first-page-workspace", "another-workspace"].filter((id) =>+ id.includes(query)+ );+ return (+ <Combobox+ aria-label="Workspace"+ options={options}+ value={value}+ onValueChange={setValue}+ onClear={() => setValue(null)}+ getOptionValue={(id) => id}+ getOptionLabel={(id) => id}+ shouldFilter={false}+ includeMissingSelectedOptions={!query}+ onInputValueChange={setQuery}+ />+ );+ }+};diff --git a/frontend/src/components/v3/generic/Combobox/Combobox.tsx b/frontend/src/components/v3/generic/Combobox/Combobox.tsxindex 0466ee1492..727a1b4350 100644--- a/frontend/src/components/v3/generic/Combobox/Combobox.tsx+++ b/frontend/src/components/v3/generic/Combobox/Combobox.tsx@@ -4,6 +4,8 @@ import { CheckIcon, ChevronDownIcon, Loader2Icon, XIcon } from "lucide-react";import { cn } from "../../utils";import { useScrollEdges } from "../../utils/useScrollEdges";+import { getComboboxInputAriaLabel } from "./combobox-accessibility";+import { mergeComboboxItems } from "./combobox-items";import "../../utils/ScrollEdgeFade.css";@@ -12,10 +14,11 @@ type ComboboxRenderOptionState = {};type ComboboxSharedProps<TOption> = {- options: readonly TOption[];+ options?: readonly TOption[];getOptionValue: (option: TOption) => string;getOptionLabel: (option: TOption) => string;getOptionKeywords?: (option: TOption) => readonly string[];+ getOptionGroup?: (option: TOption) => string;isOptionDisabled?: (option: TOption) => boolean;renderOption?: (option: TOption, state: ComboboxRenderOptionState) => React.ReactNode;renderValue?: (option: TOption) => React.ReactNode;@@ -23,7 +26,7 @@ type ComboboxSharedProps<TOption> = {placeholder?: string;searchPlaceholder?: string;searchAriaLabel?: string;- emptyMessage?: React.ReactNode;+ emptyMessage?: React.ReactNode | ((inputValue: string) => React.ReactNode);loadingMessage?: React.ReactNode;isDisabled?: boolean;isLoading?: boolean;@@ -31,6 +34,10 @@ type ComboboxSharedProps<TOption> = {modal?: boolean;portalContainer?: HTMLElement | React.RefObject<HTMLElement | null> | null;contentClassName?: string;+ onInputValueChange?: (inputValue: string) => void;+ shouldFilter?: boolean;+ /** Keep selected values in the option list even when absent from the latest results. */+ includeMissingSelectedOptions?: boolean;};type ComboboxSingleProps<TOption> = ComboboxSharedProps<TOption> &@@ -80,37 +87,74 @@ const preventComboboxFormSubmit = (event: React.KeyboardEvent<HTMLInputElement>)const useComboboxItems = <TOption,>(options: readonly TOption[],selectedOptions: readonly TOption[],- getOptionValue: (option: TOption) => string+ getOptionValue: (option: TOption) => string,+ includeMissingSelectedOptions: boolean+) =>+ React.useMemo(+ () =>+ mergeComboboxItems(options, selectedOptions, getOptionValue, includeMissingSelectedOptions),+ [getOptionValue, includeMissingSelectedOptions, options, selectedOptions]+ );++type ComboboxItem<TOption> = {+ option: TOption;+};++type ComboboxGroup<TOption> = {+ value: string;+ items: ComboboxItem<TOption>[];+};++const usePrimitiveComboboxItems = <TOption,>(+ items: readonly TOption[],+ getOptionValue: (option: TOption) => string,+ getOptionGroup?: (option: TOption) => string) =>React.useMemo(() => {- const selectedByValue = new Map(- selectedOptions.map((option) => [getOptionValue(option), option] as const)+ // Base UI treats any object with an `items` property as a group. Wrapping every+ // consumer option keeps provider-specific fields opaque to the primitive and+ // reserves the grouped shape for groups created explicitly below.+ const flatItems = items.map((option) => ({ option }));+ const itemsByValue = new Map(+ flatItems.map((item) => [getOptionValue(item.option), item] as const));- const optionValues = new Set<string>();- const stableOptions = options.map((option) => {- const optionValue = getOptionValue(option);- optionValues.add(optionValue);- return selectedByValue.get(optionValue) ?? option;- });- selectedOptions.forEach((option) => {- if (!optionValues.has(getOptionValue(option))) stableOptions.push(option);+ if (!getOptionGroup) return { itemsByValue, rootItems: flatItems };++ const groupedItems = new Map<string, ComboboxItem<TOption>[]>();+ flatItems.forEach((item) => {+ const group = getOptionGroup(item.option);+ const groupItems = groupedItems.get(group);+ if (groupItems) groupItems.push(item);+ else groupedItems.set(group, [item]);});- return stableOptions;- }, [getOptionValue, options, selectedOptions]);--type ComboboxListProps<TOption> = Pick<- ComboboxSharedProps<TOption>,- | "emptyMessage"- | "getOptionLabel"- | "getOptionValue"- | "isLoading"- | "isOptionDisabled"- | "loadingMessage"- | "renderOption"+ return {+ itemsByValue,+ rootItems: Array.from(groupedItems, ([value, groupItems]) => ({+ value,+ items: groupItems+ }))+ };+ }, [getOptionGroup, getOptionValue, items]);++type ComboboxListProps<TOption> = Omit<+ Pick<+ ComboboxSharedProps<TOption>,+ | "emptyMessage"+ | "getOptionLabel"+ | "getOptionGroup"+ | "getOptionValue"+ | "isLoading"+ | "isOptionDisabled"+ | "loadingMessage"+ | "renderOption"+ >,+ "emptyMessage"> & {+ emptyMessage?: React.ReactNode;ariaLabel: string;+ isEmpty: boolean;selectedValues: ReadonlySet<string>;maxHeight: string;};@@ -118,56 +162,88 @@ type ComboboxListProps<TOption> = Pick<const ComboboxList = <TOption,>({emptyMessage,getOptionLabel,+ getOptionGroup,getOptionValue,isLoading,isOptionDisabled,loadingMessage,renderOption,ariaLabel,+ isEmpty,selectedValues,maxHeight-}: ComboboxListProps<TOption>) => (- <>- <ComboboxPrimitive.List- aria-label={ariaLabel}- aria-busy={isLoading || undefined}- onWheel={(event) => event.stopPropagation()}- className="thin-scrollbar scroll-py-1 overflow-y-auto overscroll-contain p-1 outline-none"- style={{ maxHeight }}- >- {(option: TOption) => {- const optionValue = getOptionValue(option);- const isSelected = selectedValues.has(optionValue);-- return (- <ComboboxPrimitive.Item- key={optionValue}- value={option}- disabled={isOptionDisabled?.(option)}- className={cn(- COMBOBOX_ROW_CLASS,- "relative pr-8 pl-2",- "data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-foreground/5 data-[highlighted]:text-foreground"- )}- >- <span className="min-w-0 flex-1">- {renderOption?.(option, { isSelected }) ?? (- <span className="block truncate">{getOptionLabel(option)}</span>- )}- </span>- <ComboboxPrimitive.ItemIndicator className="absolute right-2 flex size-4 items-center justify-center">- <CheckIcon className="size-4" />- </ComboboxPrimitive.ItemIndicator>- {isSelected && <span className="sr-only">Current selection</span>}- </ComboboxPrimitive.Item>- );- }}- </ComboboxPrimitive.List>- <ComboboxPrimitive.Empty className="py-6 text-center text-sm text-muted empty:hidden">- {isLoading ? loadingMessage : emptyMessage}- </ComboboxPrimitive.Empty>- </>-);+}: ComboboxListProps<TOption>) => {+ const renderItem = (item: ComboboxItem<TOption>) => {+ const { option } = item;+ const optionValue = getOptionValue(option);+ const isSelected = selectedValues.has(optionValue);++ return (+ <ComboboxPrimitive.Item+ key={optionValue}+ value={item}+ disabled={isOptionDisabled?.(option)}+ className={cn(+ COMBOBOX_ROW_CLASS,+ "relative pr-8 pl-2",+ "data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-foreground/5 data-[highlighted]:text-foreground"+ )}+ >+ <span className="min-w-0 flex-1">+ {renderOption?.(option, { isSelected }) ?? (+ <span className="block truncate">{getOptionLabel(option)}</span>+ )}+ </span>+ <ComboboxPrimitive.ItemIndicator className="absolute right-2 flex size-4 items-center justify-center">+ <CheckIcon className="size-4" />+ </ComboboxPrimitive.ItemIndicator>+ {isSelected && <span className="sr-only">Current selection</span>}+ </ComboboxPrimitive.Item>+ );+ };++ return (+ <>+ <ComboboxPrimitive.List+ aria-label={ariaLabel}+ aria-busy={isLoading || undefined}+ onWheel={(event) => event.stopPropagation()}+ className={() =>+ cn(+ "thin-scrollbar scroll-py-1 overflow-y-auto overscroll-contain p-1 outline-none",+ (isLoading || isEmpty) && "hidden"+ )+ }+ style={{ maxHeight }}+ >+ {getOptionGroup+ ? (group: ComboboxGroup<TOption>) => (+ <ComboboxPrimitive.Group key={group.value} items={group.items}>+ <ComboboxPrimitive.GroupLabel className="px-2 py-1.5 text-xs font-medium text-muted">+ {group.value}+ </ComboboxPrimitive.GroupLabel>+ <ComboboxPrimitive.Collection>{renderItem}</ComboboxPrimitive.Collection>+ </ComboboxPrimitive.Group>+ )+ : renderItem}+ </ComboboxPrimitive.List>+ {isLoading ? (+ <div+ role="status"+ className="flex min-h-16 items-center justify-center px-3 py-4 text-sm text-muted"+ >+ <span>{loadingMessage}</span>+ </div>+ ) : (+ isEmpty && (+ <div role="status" className="py-6 text-center text-sm text-muted">+ {emptyMessage}+ </div>+ )+ )}+ </>+ );+};type ComboboxSelectAllProps = {areAllSelected: boolean;@@ -261,12 +337,13 @@ const useComboboxFilter = <TOption,>({);const SingleCombobox = <TOption,>({- options,+ options = [],value,onValueChange,getOptionValue,getOptionLabel,getOptionKeywords,+ getOptionGroup,isOptionDisabled,renderOption,renderValue,@@ -284,39 +361,97 @@ const SingleCombobox = <TOption,>({portalContainer: portalContainerProp,className,contentClassName,+ onInputValueChange,+ shouldFilter = true,+ includeMissingSelectedOptions = true,id,onKeyDown,...inputProps}: ComboboxSingleProps<TOption>) => {const inputRef = React.useRef<HTMLInputElement | null>(null);+ const highlightedOptionValueRef = React.useRef<string | null>(null);const [open, setOpen] = React.useState(false);+ const selectedLabel = value == null ? "" : getOptionLabel(value);+ const [search, setSearch] = React.useState("");const selectedOptions = React.useMemo(() => (value == null ? [] : [value]), [value]);- const items = useComboboxItems(options, selectedOptions, getOptionValue);+ const items = useComboboxItems(+ options,+ selectedOptions,+ getOptionValue,+ includeMissingSelectedOptions+ );+ const { itemsByValue, rootItems } = usePrimitiveComboboxItems(+ items,+ getOptionValue,+ getOptionGroup+ );+ const selectedItem =+ value == null ? null : (itemsByValue.get(getOptionValue(value)) ?? { option: value });const filter = useComboboxFilter({ getOptionKeywords, getOptionLabel });+ const primitiveFilter = React.useCallback(+ (item: ComboboxItem<TOption>, query: string) => filter(item.option, query),+ [filter]+ );+ const visibleOptions = React.useMemo(+ () => items.filter((option) => !shouldFilter || filter(option, search)),+ [filter, items, search, shouldFilter]+ );+ const selectableOptions = React.useMemo(+ () => visibleOptions.filter((option) => !isOptionDisabled?.(option)),+ [isOptionDisabled, visibleOptions]+ );const selectedValues = React.useMemo(() => new Set(value == null ? [] : [getOptionValue(value)]),[getOptionValue, value]);return (- <ComboboxPrimitive.Root<TOption, false>- items={items}- value={value ?? null}+ <ComboboxPrimitive.Root<ComboboxItem<TOption>, false>+ items={rootItems}+ value={selectedItem}onValueChange={(nextValue, eventDetails) => {if (nextValue == null) {- if (eventDetails.reason === "clear-press") onClear?.();+ if (eventDetails.reason === "clear-press") {+ setSearch("");+ onClear?.();+ }return;}- onValueChange(nextValue);+ onValueChange(nextValue.option);}}open={open}- onOpenChange={setOpen}- itemToStringLabel={getOptionLabel}- itemToStringValue={getOptionValue}+ onOpenChange={(nextOpen, eventDetails) => {+ setOpen(nextOpen);+ if (nextOpen) {+ // Clicking into a selected combobox starts from its current label. When+ // typing itself opens the popup, preserve the query emitted just before+ // this event instead of replacing the user's first keystroke. Consumers+ // that search server-side never receive the seeded label (it would be+ // sent as a query and match nothing), so their input must stay in step+ // with the empty query the parent still holds.+ if (eventDetails.reason !== "input-change") setSearch(shouldFilter ? selectedLabel : "");+ } else {+ highlightedOptionValueRef.current = null;+ setSearch("");+ onInputValueChange?.("");+ }+ }}+ onItemHighlighted={(item) => {+ highlightedOptionValueRef.current = item ? getOptionValue(item.option) : null;+ }}+ inputValue={open ? search : selectedLabel}+ onInputValueChange={(nextValue, eventDetails) => {+ if (eventDetails.reason === "input-change" || eventDetails.reason === "input-clear") {+ setSearch(nextValue);+ onInputValueChange?.(nextValue);+ }+ }}+ itemToStringLabel={(item) => getOptionLabel(item.option)}+ itemToStringValue={(item) => getOptionValue(item.option)}isItemEqualToValue={(option, selectedOption) =>- getOptionValue(option) === getOptionValue(selectedOption)+ getOptionValue(option.option) === getOptionValue(selectedOption.option)}- filter={filter}+ filter={shouldFilter ? primitiveFilter : null}disabled={isDisabled}modal={modal}autoHighlight@@ -332,6 +467,24 @@ const SingleCombobox = <TOption,>({placeholder={open ? searchPlaceholder : placeholder}onKeyDown={(event) => {onKeyDown?.(event);++ const hasHighlightedOption = selectableOptions.some(+ (option) => getOptionValue(option) === highlightedOptionValueRef.current+ );+ if (+ !event.defaultPrevented &&+ event.key === "Enter" &&+ open &&+ !isLoading &&+ !hasHighlightedOption &&+ selectableOptions[0]+ ) {+ onValueChange(selectableOptions[0]);+ setOpen(false);+ setSearch("");+ onInputValueChange?.("");+ }+preventComboboxFormSubmit(event);}}className={cn(@@ -389,14 +542,16 @@ const SingleCombobox = <TOption,>({portalContainer={portalContainerProp}><ComboboxList- emptyMessage={emptyMessage}+ emptyMessage={typeof emptyMessage === "function" ? emptyMessage(search) : emptyMessage}loadingMessage={loadingMessage}isLoading={isLoading}getOptionValue={getOptionValue}getOptionLabel={getOptionLabel}+ getOptionGroup={getOptionGroup}isOptionDisabled={isOptionDisabled}renderOption={renderOption}ariaLabel={`${searchAriaLabel} suggestions`}+ isEmpty={visibleOptions.length === 0}selectedValues={selectedValues}maxHeight={SINGLE_LIST_MAX_HEIGHT}/>@@ -406,12 +561,13 @@ const SingleCombobox = <TOption,>({};const MultipleCombobox = <TOption,>({- options,+ options = [],value = [],onValueChange,getOptionValue,getOptionLabel,getOptionKeywords,+ getOptionGroup,isOptionDisabled,renderOption,renderValue,@@ -431,7 +587,12 @@ const MultipleCombobox = <TOption,>({portalContainer: portalContainerProp,className,contentClassName,+ onInputValueChange,+ shouldFilter = true,+ includeMissingSelectedOptions = true,id,+ "aria-label": ariaLabel,+ "aria-labelledby": ariaLabelledBy,onKeyDown,...inputProps}: ComboboxMultipleProps<TOption>) => {@@ -443,20 +604,39 @@ const MultipleCombobox = <TOption,>({const [open, setOpen] = React.useState(false);const [search, setSearch] = React.useState("");const selectedOptions = React.useMemo(() => [...value], [value]);- const items = useComboboxItems(options, selectedOptions, getOptionValue);+ const items = useComboboxItems(+ options,+ selectedOptions,+ getOptionValue,+ includeMissingSelectedOptions+ );+ const { itemsByValue, rootItems } = usePrimitiveComboboxItems(+ items,+ getOptionValue,+ getOptionGroup+ );+ const selectedItems = React.useMemo(+ () => selectedOptions.map((option) => itemsByValue.get(getOptionValue(option)) ?? { option }),+ [getOptionValue, itemsByValue, selectedOptions]+ );const filter = useComboboxFilter({ getOptionKeywords, getOptionLabel });+ const primitiveFilter = React.useCallback(+ (item: ComboboxItem<TOption>, query: string) => filter(item.option, query),+ [filter]+ );const selectedValues = React.useMemo(() => new Set(value.map(getOptionValue)),[getOptionValue, value]);- // Select all only covers the options matching the current search, so a filtered- // list toggles what is on screen instead of the entire option set.+ const visibleOptions = React.useMemo(+ () => items.filter((option) => !shouldFilter || filter(option, search)),+ [filter, items, search, shouldFilter]+ );+ // Select all only covers the visible result set. External-search consumers+ // provide an already-filtered list, so do not apply the local filter again.const selectAllOptions = React.useMemo(- () =>- isSelectAll- ? items.filter((option) => !isOptionDisabled?.(option) && filter(option, search))- : [],- [filter, isOptionDisabled, isSelectAll, items, search]+ () => (isSelectAll ? visibleOptions.filter((option) => !isOptionDisabled?.(option)) : []),+ [isOptionDisabled, isSelectAll, visibleOptions]);const areAllOptionsSelected =selectAllOptions.length > 0 &&@@ -476,10 +656,10 @@ const MultipleCombobox = <TOption,>({};return (- <ComboboxPrimitive.Root<TOption, true>+ <ComboboxPrimitive.Root<ComboboxItem<TOption>, true>multiple- items={items}- value={selectedOptions}+ items={rootItems}+ value={selectedItems}onValueChange={(nextValue, eventDetails) => {if (eventDetails.reason === "item-press") {eventDetails.cancel();@@ -493,21 +673,29 @@ const MultipleCombobox = <TOption,>({return;}- onValueChange(nextValue);+ onValueChange(nextValue.map((item) => item.option));}}open={open}onOpenChange={(nextOpen) => {setOpen(nextOpen);- if (!nextOpen) setSearch("");+ if (!nextOpen) {+ setSearch("");+ onInputValueChange?.("");+ }}}inputValue={search}- onInputValueChange={setSearch}- itemToStringLabel={getOptionLabel}- itemToStringValue={getOptionValue}+ onInputValueChange={(nextValue, eventDetails) => {+ setSearch(nextValue);+ if (eventDetails.reason === "input-change" || eventDetails.reason === "input-clear") {+ onInputValueChange?.(nextValue);+ }+ }}+ itemToStringLabel={(item) => getOptionLabel(item.option)}+ itemToStringValue={(item) => getOptionValue(item.option)}isItemEqualToValue={(option, selectedOption) =>- getOptionValue(option) === getOptionValue(selectedOption)+ getOptionValue(option.option) === getOptionValue(selectedOption.option)}- filter={filter}+ filter={shouldFilter ? primitiveFilter : null}disabled={isDisabled}modal={modal}autoHighlight@@ -537,9 +725,9 @@ const MultipleCombobox = <TOption,>({data-scrollable-end={scrollEdges.end}><ComboboxPrimitive.Value>- {(selectedValue: TOption[]) => (+ {(selectedValue: ComboboxItem<TOption>[]) => (<>- {selectedValue.map((option) => {+ {selectedValue.map(({ option }) => {const label = getOptionLabel(option);return (<ComboboxPrimitive.Chip@@ -564,7 +752,13 @@ const MultipleCombobox = <TOption,>({<ComboboxPrimitive.Inputref={inputRef}id={id}- aria-label={searchAriaLabel}+ aria-label={getComboboxInputAriaLabel({+ ariaLabel,+ ariaLabelledBy,+ id,+ searchAriaLabel+ })}+ aria-labelledby={ariaLabelledBy}aria-invalid={isError || undefined}aria-busy={isLoading || undefined}placeholder={value.length === 0 ? placeholder : undefined}@@ -615,14 +809,16 @@ const MultipleCombobox = <TOption,>({/>)}<ComboboxList- emptyMessage={emptyMessage}+ emptyMessage={typeof emptyMessage === "function" ? emptyMessage(search) : emptyMessage}loadingMessage={loadingMessage}isLoading={isLoading}getOptionValue={getOptionValue}getOptionLabel={getOptionLabel}+ getOptionGroup={getOptionGroup}isOptionDisabled={isOptionDisabled}renderOption={renderOption}ariaLabel={`${searchAriaLabel} suggestions`}+ isEmpty={visibleOptions.length === 0}selectedValues={selectedValues}maxHeight={MULTIPLE_LIST_MAX_HEIGHT}/>diff --git a/frontend/src/components/v3/generic/Combobox/combobox-accessibility.test.ts b/frontend/src/components/v3/generic/Combobox/combobox-accessibility.test.tsnew file mode 100644index 0000000000..15308bc5ef--- /dev/null+++ b/frontend/src/components/v3/generic/Combobox/combobox-accessibility.test.ts@@ -0,0 +1,38 @@+import assert from "node:assert/strict";+import { describe, it } from "node:test";++import { getComboboxInputAriaLabel } from "./combobox-accessibility";++describe("Combobox input accessible name", () => {+ it("lets an associated field label name an input with an ID", () => {+ assert.equal(+ getComboboxInputAriaLabel({ id: "projects", searchAriaLabel: "Search projects" }),+ undefined+ );+ });++ it("lets aria-labelledby take precedence over the search hint", () => {+ assert.equal(+ getComboboxInputAriaLabel({+ ariaLabelledBy: "projects-label",+ searchAriaLabel: "Search projects"+ }),+ undefined+ );+ });++ it("preserves explicit aria-label and unlabeled search fallback compatibility", () => {+ assert.equal(+ getComboboxInputAriaLabel({+ ariaLabel: "Project picker",+ id: "projects",+ searchAriaLabel: "Search projects"+ }),+ "Project picker"+ );+ assert.equal(+ getComboboxInputAriaLabel({ searchAriaLabel: "Search projects" }),+ "Search projects"+ );+ });+});diff --git a/frontend/src/components/v3/generic/Combobox/combobox-accessibility.ts b/frontend/src/components/v3/generic/Combobox/combobox-accessibility.tsnew file mode 100644index 0000000000..2441d83d5c--- /dev/null+++ b/frontend/src/components/v3/generic/Combobox/combobox-accessibility.ts@@ -0,0 +1,19 @@+type ComboboxInputAriaLabelProps = {+ ariaLabel?: string;+ ariaLabelledBy?: string;+ id?: string;+ searchAriaLabel: string;+};++const getComboboxInputAriaLabel = ({+ ariaLabel,+ ariaLabelledBy,+ id,+ searchAriaLabel+}: ComboboxInputAriaLabelProps) => {+ if (ariaLabel) return ariaLabel;+ if (ariaLabelledBy || id) return undefined;+ return searchAriaLabel;+};++export { getComboboxInputAriaLabel };diff --git a/frontend/src/components/v3/generic/Combobox/combobox-items.test.ts b/frontend/src/components/v3/generic/Combobox/combobox-items.test.tsnew file mode 100644index 0000000000..866c6f23b2--- /dev/null+++ b/frontend/src/components/v3/generic/Combobox/combobox-items.test.ts@@ -0,0 +1,40 @@+import assert from "node:assert/strict";+import { describe, it } from "node:test";++import { mergeComboboxItems } from "./combobox-items";++const id = (value: string) => value;+describe("Combobox selected items", () => {+ it("retains a saved ID absent from a server page without fabricating an API record", () => {+ assert.deepEqual(mergeComboboxItems(["first-page"], ["saved-workspace"], id, true), [+ "first-page",+ "saved-workspace"+ ]);+ });+ it("can omit saved selections from search results without mutating the controlled value", () => {+ const selection = ["saved-workspace"];+ assert.deepEqual(mergeComboboxItems([], selection, id, false), []);+ assert.deepEqual(selection, ["saved-workspace"]);+ });+ it("deduplicates a selection when a later page includes it", () => {+ assert.deepEqual(mergeComboboxItems(["saved"], ["saved"], id, true), ["saved"]);+ });+ it("retains multiple missing selections without duplicating IDs", () => {+ assert.deepEqual(mergeComboboxItems(["a"], ["a", "b", "b", "c"], id, true), ["a", "b", "c"]);+ });+ it("drops the prior selection after clearing or switching parent scope", () => {+ assert.deepEqual(mergeComboboxItems(["new-parent"], [], id, true), ["new-parent"]);+ });+ it("preserves selected object identity when its ID is present in refreshed results", () => {+ const selected = { id: "one", label: "Selected" };+ assert.equal(+ mergeComboboxItems(+ [{ id: "one", label: "Reloaded" }],+ [selected],+ (option) => option.id,+ true+ )[0],+ selected+ );+ });+});diff --git a/frontend/src/components/v3/generic/Combobox/combobox-items.ts b/frontend/src/components/v3/generic/Combobox/combobox-items.tsnew file mode 100644index 0000000000..42297e42c5--- /dev/null+++ b/frontend/src/components/v3/generic/Combobox/combobox-items.ts@@ -0,0 +1,23 @@+export const mergeComboboxItems = <TOption>(+ options: readonly TOption[],+ selectedOptions: readonly TOption[],+ getOptionValue: (option: TOption) => string,+ includeMissingSelectedOptions: boolean+): TOption[] => {+ const selectedByValue = new Map(+ selectedOptions.map((option) => [getOptionValue(option), option])+ );+ const optionValues = new Set(options.map(getOptionValue));+ const items = options.map((option) => selectedByValue.get(getOptionValue(option)) ?? option);++ if (includeMissingSelectedOptions) {+ selectedOptions.forEach((option) => {+ const value = getOptionValue(option);+ if (!optionValues.has(value)) {+ items.push(option);+ optionValues.add(value);+ }+ });+ }+ return items;+};diff --git a/frontend/src/components/v3/generic/Select/Select.stories.tsx b/frontend/src/components/v3/generic/Select/Select.stories.tsxindex 7e248284e5..5c0cefa498 100644--- a/frontend/src/components/v3/generic/Select/Select.stories.tsx+++ b/frontend/src/components/v3/generic/Select/Select.stories.tsx@@ -31,9 +31,9 @@ import {* you would for `Input` — the `id` belongs on the **trigger**, not the root.** Reach for `Select` when the option list is short and known. For searchable- * single-select lists use `Combobox`. Existing multi-select, grouped, and- * creatable use cases remain on `ReactSelect` while their replacement APIs are- * introduced — `Select` is single-value by design.+ * object lists, multi-selects, or grouped options, use `Combobox`. Creatable+ * use cases remain on `ReactSelect` until their replacement API is introduced.+ * `Select` is single-value by design.*/const meta = {title: "Generic/Select",@@ -103,6 +103,29 @@ export const Default: Story = {)};+export const ShortPopperList: Story = {+ name: "Example: Short Popper List",+ parameters: {+ docs: {+ description: {+ story:+ "Use popper positioning when the menu should align to the trigger while remaining collision-aware. A short list expands to fit its options without showing inactive scroll controls."+ }+ }+ },+ render: () => (+ <Select defaultValue="dotenv">+ <SelectTrigger className="w-full">+ <SelectValue placeholder="Choose a file format" />+ </SelectTrigger>+ <SelectContent position="popper">+ <SelectItem value="dotenv">.env File</SelectItem>+ <SelectItem value="file">One Secret Per File</SelectItem>+ </SelectContent>+ </Select>+ )+};+export const Outlined: Story = {parameters: {docs: {diff --git a/frontend/src/components/v3/generic/Select/Select.tsx b/frontend/src/components/v3/generic/Select/Select.tsxindex d1e69f7a5a..158743d555 100644--- a/frontend/src/components/v3/generic/Select/Select.tsx+++ b/frontend/src/components/v3/generic/Select/Select.tsx@@ -135,7 +135,7 @@ function SelectContent({<SelectPrimitive.Viewportdata-position={position}className={cn(- "p-1 data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)",+ "p-1 data-[position=popper]:min-h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)",position === "popper" && "")}>diff --git a/frontend/src/components/v3/generic/Toggle/Toggle.tsx b/frontend/src/components/v3/generic/Toggle/Toggle.tsxindex f97be97e46..8b2b459483 100644--- a/frontend/src/components/v3/generic/Toggle/Toggle.tsx+++ b/frontend/src/components/v3/generic/Toggle/Toggle.tsx@@ -13,8 +13,8 @@ const toggleVariants = cva("data-[size=default]:h-5 data-[size=default]:w-9","data-[size=sm]:h-4 data-[size=sm]:w-7","border-border bg-transparent hover:border-foreground/25",- "aria-invalid:border-destructive aria-invalid:ring-[3px] aria-invalid:ring-destructive/20",- "dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40"+ "aria-invalid:border-danger aria-invalid:ring-[3px] aria-invalid:ring-danger/20",+ "dark:aria-invalid:border-danger/50 dark:aria-invalid:ring-danger/40"),{variants: {diff --git a/frontend/src/components/v3/generic/index.ts b/frontend/src/components/v3/generic/index.tsindex 5f8e174345..73d5137c9a 100644--- a/frontend/src/components/v3/generic/index.ts+++ b/frontend/src/components/v3/generic/index.ts@@ -10,6 +10,7 @@ export * from "./ButtonGroup";export * from "./Calendar";export * from "./Card";export * from "./Checkbox";+export * from "./Code";export * from "./CodeBlock";export * from "./ColorPicker";export * from "./Combobox";diff --git a/frontend/src/components/v3/platform/SecretInput/SecretInput.tsx b/frontend/src/components/v3/platform/SecretInput/SecretInput.tsxindex 0f7bb6f57a..1c895fe1a2 100644--- a/frontend/src/components/v3/platform/SecretInput/SecretInput.tsx+++ b/frontend/src/components/v3/platform/SecretInput/SecretInput.tsx@@ -118,6 +118,7 @@ type Props = TextareaHTMLAttributes<HTMLTextAreaElement> & {canEditButNotView?: boolean;isLoadingValue?: boolean;isErrorLoadingValue?: boolean;+ isError?: boolean;onClickSegment?: (segment: string, allSegments: string[]) => void;};@@ -139,6 +140,7 @@ export const SecretInput = forwardRef<HTMLTextAreaElement, Props>(canEditButNotView,isLoadingValue,isErrorLoadingValue,+ isError,onClickSegment,placeholder,...props@@ -182,9 +184,11 @@ export const SecretInput = forwardRef<HTMLTextAreaElement, Props>(return (<div+ data-invalid={isError}className={cn("no-scrollbar min-h-9 w-full overflow-auto rounded-md border border-border bg-transparent transition-[color,box-shadow]","focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50",+ "data-[invalid=true]:border-danger data-[invalid=true]:ring-danger/40",containerClassName)}style={{ maxHeight: `${21 * 7}px` }}@@ -246,6 +250,7 @@ export const SecretInput = forwardRef<HTMLTextAreaElement, Props>(}}value={value && !shouldBindRealValue ? HIDDEN_SECRET_VALUE : (value ?? "")}{...props}+ aria-invalid={isError || props["aria-invalid"]}readOnly={isReadOnly || isLoadingValue || isErrorLoadingValue}/></div>diff --git a/frontend/src/helpers/appConnections.ts b/frontend/src/helpers/appConnections.tsindex d92b41383a..3f127e4f4a 100644--- a/frontend/src/helpers/appConnections.ts+++ b/frontend/src/helpers/appConnections.ts@@ -1,15 +1,16 @@-import { faGithub, IconDefinition } from "@fortawesome/free-brands-svg-icons";-import {- faBullseye,- faCertificate,- faKey,- faLink,- faLock,- faPassport,- faServer,- faUser-} from "@fortawesome/free-solid-svg-icons";import { useRouterState } from "@tanstack/react-router";+import {+ FileBadgeIcon,+ GithubIcon,+ IdCardIcon,+ KeyRoundIcon,+ LinkIcon,+ LockIcon,+ LucideIcon,+ RadarIcon,+ ServerIcon,+ UserIcon+} from "lucide-react";import { AppConnection } from "@app/hooks/api/appConnections/enums";import {@@ -109,7 +110,7 @@ export const APP_CONNECTION_MAP: Record<category: string;description: string;size?: number;- icon?: IconDefinition;+ icon?: LucideIcon;enterprise?: boolean;aliases?: string[];}@@ -129,7 +130,7 @@ export const APP_CONNECTION_MAP: Record<[AppConnection.GitHubRadar]: {name: "GitHub Radar",image: "GitHub.png",- icon: faBullseye,+ icon: RadarIcon,category: "SECURITY",description: "GitHub App connection used for secret scanning."},@@ -646,10 +647,10 @@ export const getAppConnectionMethodDetails = (method: TAppConnection["method"])switch (method) {case GitHubConnectionMethod.App:case GitHubRadarConnectionMethod.App:- return { name: "GitHub App", icon: faGithub };+ return { name: "GitHub App", icon: GithubIcon };case GitHubConnectionMethod.Pat:case OnaConnectionMethod.PersonalAccessToken:- return { name: "Personal Access Token", icon: faKey };+ return { name: "Personal Access Token", icon: KeyRoundIcon };case AzureKeyVaultConnectionMethod.OAuth:case AzureAppConfigurationConnectionMethod.OAuth:case AzureClientSecretsConnectionMethod.OAuth:@@ -658,18 +659,18 @@ export const getAppConnectionMethodDetails = (method: TAppConnection["method"])case HerokuConnectionMethod.OAuth:case GitLabConnectionMethod.OAuth:case VenafiTppConnectionMethod.OAuth:- return { name: "OAuth", icon: faPassport };+ return { name: "OAuth", icon: IdCardIcon };case AwsConnectionMethod.AccessKey:case OCIConnectionMethod.AccessKey:- return { name: "Access Key", icon: faKey };+ return { name: "Access Key", icon: KeyRoundIcon };case AwsConnectionMethod.AssumeRole:- return { name: "Assume Role", icon: faUser };+ return { name: "Assume Role", icon: UserIcon };case GcpConnectionMethod.ServiceAccountImpersonation:- return { name: "Service Account Impersonation", icon: faUser };+ return { name: "Service Account Impersonation", icon: UserIcon };case DatabricksConnectionMethod.ServicePrincipal:- return { name: "Service Principal", icon: faUser };+ return { name: "Service Principal", icon: UserIcon };case CamundaConnectionMethod.ClientCredentials:- return { name: "Client Credentials", icon: faKey };+ return { name: "Client Credentials", icon: KeyRoundIcon };case HumanitecConnectionMethod.ApiToken:case TerraformCloudConnectionMethod.ApiToken:case VercelConnectionMethod.ApiToken:@@ -686,9 +687,9 @@ export const getAppConnectionMethodDetails = (method: TAppConnection["method"])case TravisCIConnectionMethod.ApiToken:case DopplerConnectionMethod.ApiToken:case RundeckConnectionMethod.ApiToken:- return { name: "API Token", icon: faKey };+ return { name: "API Token", icon: KeyRoundIcon };case VenafiConnectionMethod.ApiKey:- return { name: "API Key", icon: faKey };+ return { name: "API Key", icon: KeyRoundIcon };case PostgresConnectionMethod.UsernameAndPassword:case MsSqlConnectionMethod.UsernameAndPassword:case MySqlConnectionMethod.UsernameAndPassword:@@ -697,9 +698,9 @@ export const getAppConnectionMethodDetails = (method: TAppConnection["method"])case AdcsConnectionMethod.UsernamePassword:case RedisConnectionMethod.UsernameAndPassword:case MongoDBConnectionMethod.UsernameAndPassword:- return { name: "Username & Password", icon: faLock };+ return { name: "Username & Password", icon: LockIcon };case SnowflakeConnectionMethod.UsernameAndToken:- return { name: "Username & Token", icon: faKey };+ return { name: "Username & Token", icon: KeyRoundIcon };case HCVaultConnectionMethod.AccessToken:case TeamCityConnectionMethod.AccessToken:case AzureDevOpsConnectionMethod.AccessToken:@@ -710,23 +711,23 @@ export const getAppConnectionMethodDetails = (method: TAppConnection["method"])case HasuraCloudConnectionMethod.AccessToken:case QoveryConnectionMethod.AccessToken:case Cloud66ConnectionMethod.AccessToken:- return { name: "Personal Access Token", icon: faKey };+ return { name: "Personal Access Token", icon: KeyRoundIcon };case Auth0ConnectionMethod.ClientCredentials:case SalesforceConnectionMethod.ClientCredentials:- return { name: "Client Credentials", icon: faServer };+ return { name: "Client Credentials", icon: ServerIcon };case HCVaultConnectionMethod.AppRole:- return { name: "App Role", icon: faUser };+ return { name: "App Role", icon: UserIcon };case LdapConnectionMethod.SimpleBind:- return { name: "Simple Bind", icon: faLink };+ return { name: "Simple Bind", icon: LinkIcon };case HerokuConnectionMethod.AuthToken:- return { name: "Auth Token", icon: faKey };+ return { name: "Auth Token", icon: KeyRoundIcon };case RailwayConnectionMethod.AccountToken:case SupabaseConnectionMethod.AccessToken:- return { name: "Account Token", icon: faKey };+ return { name: "Account Token", icon: KeyRoundIcon };case RailwayConnectionMethod.TeamToken:- return { name: "Team Token", icon: faKey };+ return { name: "Team Token", icon: KeyRoundIcon };case RailwayConnectionMethod.ProjectToken:- return { name: "Project Token", icon: faKey };+ return { name: "Project Token", icon: KeyRoundIcon };case RenderConnectionMethod.ApiKey:case ChecklyConnectionMethod.ApiKey:case OpenRouterConnectionMethod.ApiKey:@@ -740,47 +741,47 @@ export const getAppConnectionMethodDetails = (method: TAppConnection["method"])case TriggerDevConnectionMethod.ApiKey:case DatadogConnectionMethod.ApiKey:case DaytonaConnectionMethod.ApiKey:- return { name: "API Key", icon: faKey };+ return { name: "API Key", icon: KeyRoundIcon };case ChefConnectionMethod.UserKey:- return { name: "User Key", icon: faKey };+ return { name: "User Key", icon: KeyRoundIcon };case AzureClientSecretsConnectionMethod.ClientSecret:case AzureAppConfigurationConnectionMethod.ClientSecret:case AzureKeyVaultConnectionMethod.ClientSecret:case AzureDevOpsConnectionMethod.ClientSecret:- return { name: "Client Secret", icon: faKey };+ return { name: "Client Secret", icon: KeyRoundIcon };case AzureClientSecretsConnectionMethod.Certificate:case AzureKeyVaultConnectionMethod.Certificate:- return { name: "Certificate", icon: faCertificate };+ return { name: "Certificate", icon: FileBadgeIcon };case DNSMadeEasyConnectionMethod.APIKeySecret:case SpaceliftConnectionMethod.ApiKeySecret:- return { name: "API Key & Secret", icon: faKey };+ return { name: "API Key & Secret", icon: KeyRoundIcon };case AzureDNSConnectionMethod.ClientSecret:case AzureEntraIdConnectionMethod.ClientSecret:case MicrosoftIntuneConnectionMethod.ClientSecret:- return { name: "Client Secret", icon: faKey };+ return { name: "Client Secret", icon: KeyRoundIcon };case OctopusDeployConnectionMethod.ApiKey:- return { name: "API Key", icon: faKey };+ return { name: "API Key", icon: KeyRoundIcon };case DatadogConnectionMethod.Token:- return { name: "Service Access Token", icon: faKey };+ return { name: "Service Access Token", icon: KeyRoundIcon };case SshConnectionMethod.Password:- return { name: "Password", icon: faLock };+ return { name: "Password", icon: LockIcon };case SshConnectionMethod.SshKey:- return { name: "SSH Key", icon: faKey };+ return { name: "SSH Key", icon: KeyRoundIcon };case SmbConnectionMethod.Credentials:- return { name: "Credentials", icon: faLock };+ return { name: "Credentials", icon: LockIcon };case WinRMConnectionMethod.UsernamePassword:- return { name: "Username & Password", icon: faLock };+ return { name: "Username & Password", icon: LockIcon };case ExternalInfisicalConnectionMethod.MachineIdentityUniversalAuth:- return { name: "Machine Identity - Universal Auth", icon: faKey };+ return { name: "Machine Identity - Universal Auth", icon: KeyRoundIcon };case NetScalerConnectionMethod.BasicAuth:case KempLoadMasterConnectionMethod.BasicAuth:case NutanixPrismCentralConnectionMethod.BasicAuth:case F5BigIpConnectionMethod.BasicAuth:- return { name: "Basic Auth", icon: faLock };+ return { name: "Basic Auth", icon: LockIcon };case NutanixPrismCentralConnectionMethod.ApiKey:- return { name: "API Key", icon: faKey };+ return { name: "API Key", icon: KeyRoundIcon };case OVHConnectionMethod.Certificate:- return { name: "Certificate", icon: faCertificate };+ return { name: "Certificate", icon: FileBadgeIcon };default:throw new Error(`Unhandled App Connection Method: ${method}`);}diff --git a/frontend/src/hooks/api/appConnections/gitlab/queries.tsx b/frontend/src/hooks/api/appConnections/gitlab/queries.tsxindex e6346a7993..cbb86f71de 100644--- a/frontend/src/hooks/api/appConnections/gitlab/queries.tsx+++ b/frontend/src/hooks/api/appConnections/gitlab/queries.tsx@@ -29,10 +29,11 @@ export const useGitLabConnectionListProjects = () => {return useQuery({queryKey: gitlabConnectionKeys.listProjects(connectionId, search, limit),- queryFn: async () => {+ queryFn: async ({ signal }) => {const { data } = await apiRequest.get<TGitLabProject[]>(`/api/v1/app-connections/gitlab/${connectionId}/projects`,{+ signal,params: {...(search ? { search } : {}),...(limit !== undefined ? { limit } : {})@@ -42,6 +43,7 @@ export const useGitLabConnectionListProjects = (return data;},+ retry: false,...options});};@@ -62,10 +64,11 @@ export const useGitLabConnectionListGroups = () => {return useQuery({queryKey: gitlabConnectionKeys.listGroups(connectionId, search, limit),- queryFn: async () => {+ queryFn: async ({ signal }) => {const { data } = await apiRequest.get<TGitLabGroup[]>(`/api/v1/app-connections/gitlab/${connectionId}/groups`,{+ signal,params: {...(search ? { search } : {}),...(limit !== undefined ? { limit } : {})@@ -75,6 +78,7 @@ export const useGitLabConnectionListGroups = (return data;},+ retry: false,...options});};diff --git a/frontend/src/hooks/api/secretSyncs/types/aws-secrets-manager-sync.ts b/frontend/src/hooks/api/secretSyncs/types/aws-secrets-manager-sync.tsindex 0951adae0c..fc76d46c13 100644--- a/frontend/src/hooks/api/secretSyncs/types/aws-secrets-manager-sync.ts+++ b/frontend/src/hooks/api/secretSyncs/types/aws-secrets-manager-sync.ts@@ -1,5 +1,5 @@import { AppConnection } from "@app/hooks/api/appConnections/enums";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";import { RootSyncOptions, TRootSecretSync } from "@app/hooks/api/secretSyncs/types/root-sync";export type TAwsSecretsManagerSync = TRootSecretSync & {diff --git a/frontend/src/hooks/api/secretSyncs/types/gcp-sync.ts b/frontend/src/hooks/api/secretSyncs/types/gcp-sync.tsindex 928c7a2c8b..bc2711ecc1 100644--- a/frontend/src/hooks/api/secretSyncs/types/gcp-sync.ts+++ b/frontend/src/hooks/api/secretSyncs/types/gcp-sync.ts@@ -1,5 +1,5 @@import { AppConnection } from "@app/hooks/api/appConnections/enums";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";import { TRootSecretSync } from "@app/hooks/api/secretSyncs/types/root-sync";export enum GcpSyncScope {diff --git a/frontend/src/hooks/api/secretSyncs/types/gitlab-sync.ts b/frontend/src/hooks/api/secretSyncs/types/gitlab-sync.tsindex cf5fc5e0ed..19dc6b7b50 100644--- a/frontend/src/hooks/api/secretSyncs/types/gitlab-sync.ts+++ b/frontend/src/hooks/api/secretSyncs/types/gitlab-sync.ts@@ -1,5 +1,5 @@import { AppConnection } from "@app/hooks/api/appConnections/enums";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";import { TRootSecretSync } from "@app/hooks/api/secretSyncs/types/root-sync";export enum GitLabSyncScope {diff --git a/frontend/src/hooks/api/secretSyncs/types/humanitec-sync.ts b/frontend/src/hooks/api/secretSyncs/types/humanitec-sync.tsindex 5dc06e0316..f7e40ad2f4 100644--- a/frontend/src/hooks/api/secretSyncs/types/humanitec-sync.ts+++ b/frontend/src/hooks/api/secretSyncs/types/humanitec-sync.ts@@ -1,5 +1,5 @@import { AppConnection } from "@app/hooks/api/appConnections/enums";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";import { TRootSecretSync } from "@app/hooks/api/secretSyncs/types/root-sync";export type THumanitecSync = TRootSecretSync & {diff --git a/frontend/src/hooks/api/secretSyncs/types/octopus-deploy-sync.ts b/frontend/src/hooks/api/secretSyncs/types/octopus-deploy-sync.tsindex 21a8c2e0f9..1dd8f24c88 100644--- a/frontend/src/hooks/api/secretSyncs/types/octopus-deploy-sync.ts+++ b/frontend/src/hooks/api/secretSyncs/types/octopus-deploy-sync.ts@@ -1,5 +1,5 @@import { AppConnection } from "@app/hooks/api/appConnections/enums";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";import { TRootSecretSync } from "@app/hooks/api/secretSyncs/types/root-sync";export enum OctopusDeploySyncScope {diff --git a/frontend/src/hooks/api/secretSyncs/types/qovery-sync.ts b/frontend/src/hooks/api/secretSyncs/types/qovery-sync.tsindex 6f33254af7..e5f63764be 100644--- a/frontend/src/hooks/api/secretSyncs/types/qovery-sync.ts+++ b/frontend/src/hooks/api/secretSyncs/types/qovery-sync.ts@@ -1,5 +1,5 @@import { AppConnection } from "@app/hooks/api/appConnections/enums";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";import { TRootSecretSync } from "@app/hooks/api/secretSyncs/types/root-sync";export enum QoveryVariableType {diff --git a/frontend/src/hooks/api/secretSyncs/types/render-sync.ts b/frontend/src/hooks/api/secretSyncs/types/render-sync.tsindex 4d217e840d..2e501bdcaa 100644--- a/frontend/src/hooks/api/secretSyncs/types/render-sync.ts+++ b/frontend/src/hooks/api/secretSyncs/types/render-sync.ts@@ -1,5 +1,5 @@import { AppConnection } from "@app/hooks/api/appConnections/enums";-import { SecretSync } from "@app/hooks/api/secretSyncs";+import { SecretSync } from "@app/hooks/api/secretSyncs/enums";import { RootSyncOptions, TRootSecretSync } from "@app/hooks/api/secretSyncs/types/root-sync";export type TRenderSync = TRootSecretSync & {diff --git a/frontend/src/hooks/api/secretSyncs/types/root-sync.ts b/frontend/src/hooks/api/secretSyncs/types/root-sync.tsindex 38c9efdf2b..bbab240bbc 100644--- a/frontend/src/hooks/api/secretSyncs/types/root-sync.ts+++ b/frontend/src/hooks/api/secretSyncs/types/root-sync.ts@@ -1,5 +1,5 @@import { AppConnection } from "@app/hooks/api/appConnections/enums";-import { SecretSyncInitialSyncBehavior, SecretSyncStatus } from "@app/hooks/api/secretSyncs";+import { SecretSyncInitialSyncBehavior, SecretSyncStatus } from "@app/hooks/api/secretSyncs/enums";export type RootSyncOptions = {initialSyncBehavior: SecretSyncInitialSyncBehavior;diff --git a/frontend/src/hooks/api/secretSyncs/useDuplicateDestinationCheck.ts b/frontend/src/hooks/api/secretSyncs/useDuplicateDestinationCheck.tsindex 3615fa1a1d..b0c3a4646e 100644--- a/frontend/src/hooks/api/secretSyncs/useDuplicateDestinationCheck.ts+++ b/frontend/src/hooks/api/secretSyncs/useDuplicateDestinationCheck.ts@@ -1,5 +1,6 @@import { useMemo } from "react";+import { getSecretSyncDestinationConfig } from "@app/components/secret-syncs/forms/schemas/secret-sync-schema";import { SecretSync, useCheckDuplicateDestination } from "@app/hooks/api/secretSyncs";type UseDuplicateDestinationCheckProps = {@@ -19,15 +20,12 @@ export const useDuplicateDestinationCheck = ({enabled = true,destinationConfig}: UseDuplicateDestinationCheckProps) => {- const hasValidConfig = useMemo(() => {- if (!destinationConfig || typeof destinationConfig !== "object") return false;+ const normalizedConfig = useMemo(+ () => getSecretSyncDestinationConfig(destination, destinationConfig),+ [destination, destinationConfig]+ );- const values = Object.values(destinationConfig);- return (- values.length > 0 &&- values.some((value) => value !== null && value !== undefined && value !== "")- );- }, [destinationConfig]);+ const hasValidConfig = Boolean(normalizedConfig && Object.keys(normalizedConfig).length > 0);const shouldCheck = enabled && hasValidConfig;@@ -38,7 +36,7 @@ export const useDuplicateDestinationCheck = ({refetch} = useCheckDuplicateDestination(destination,- destinationConfig,+ normalizedConfig,projectId,excludeSyncId,connectionId,diff --git a/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/ExternalCaFields/AwsAcmPublicCaFields.tsx b/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/ExternalCaFields/AwsAcmPublicCaFields.tsxindex b9e4ab7cd6..5a592bd553 100644--- a/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/ExternalCaFields/AwsAcmPublicCaFields.tsx+++ b/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/ExternalCaFields/AwsAcmPublicCaFields.tsx@@ -70,11 +70,18 @@ export const AwsAcmPublicCaFields = ({ control, availableConnections, isPendingname="configuration.region"render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4">- <FieldLabel>+ <FieldLabel id="aws-acm-public-ca-region-label" htmlFor="aws-acm-public-ca-region">Region <span className="text-danger">*</span></FieldLabel>- <AwsRegionSelect value={value} onChange={(v) => onChange(v || "")} />- <FieldError errors={[error]} />+ <AwsRegionSelect+ id="aws-acm-public-ca-region"+ value={value}+ onChange={(v) => onChange(v || "")}+ isError={Boolean(error)}+ aria-labelledby="aws-acm-public-ca-region-label"+ aria-describedby={error ? "aws-acm-public-ca-region-error" : undefined}+ />+ <FieldError id="aws-acm-public-ca-region-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/ExternalCaFields/AwsPcaFields.tsx b/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/ExternalCaFields/AwsPcaFields.tsxindex e121ebb498..360a9e0399 100644--- a/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/ExternalCaFields/AwsPcaFields.tsx+++ b/frontend/src/pages/cert-manager/CertificateAuthoritiesPage/components/ExternalCaFields/AwsPcaFields.tsx@@ -47,11 +47,18 @@ export const AwsPcaFields = ({ control, availableConnections, isPending }: Propsname="configuration.region"render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4">- <FieldLabel>+ <FieldLabel id="aws-private-ca-region-label" htmlFor="aws-private-ca-region">Region <span className="text-danger">*</span></FieldLabel>- <AwsRegionSelect value={value} onChange={(v) => onChange(v || "")} />- <FieldError errors={[error]} />+ <AwsRegionSelect+ id="aws-private-ca-region"+ value={value}+ onChange={(v) => onChange(v || "")}+ isError={Boolean(error)}+ aria-labelledby="aws-private-ca-region-label"+ aria-describedby={error ? "aws-private-ca-region-error" : undefined}+ />+ <FieldError id="aws-private-ca-region-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/cert-manager/SettingsPage/components/AppConnectionsTab/AppConnectionRow.tsx b/frontend/src/pages/cert-manager/SettingsPage/components/AppConnectionsTab/AppConnectionRow.tsxindex 6241c52c25..53ab65f35e 100644--- a/frontend/src/pages/cert-manager/SettingsPage/components/AppConnectionsTab/AppConnectionRow.tsx+++ b/frontend/src/pages/cert-manager/SettingsPage/components/AppConnectionsTab/AppConnectionRow.tsx@@ -1,6 +1,5 @@import { useCallback } from "react";import { subject } from "@casl/ability";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";import {AsteriskIcon,CheckIcon,@@ -75,6 +74,8 @@ export const AppConnectionRow = ({const methodDetails = getAppConnectionMethodDetails(method);const connectionDetails = APP_CONNECTION_MAP[app];+ const MethodIcon = methodDetails.icon;+ const ConnectionIcon = connectionDetails.icon;return (<TableRow key={`app-connection-${id}`}>@@ -86,12 +87,8 @@ export const AppConnectionRow = ({src={`/images/integrations/${connectionDetails.image}`}className="mr-0.5 w-5"/>- {connectionDetails.icon && (- <FontAwesomeIcon- icon={connectionDetails.icon}- size="xs"- className="absolute -right-0.5 -bottom-0.5 text-primary-700"- />+ {ConnectionIcon && (+ <ConnectionIcon className="absolute -right-0.5 -bottom-0.5 size-3 text-primary-700" />)}</div><span>{connectionDetails.name}</span>@@ -112,7 +109,7 @@ export const AppConnectionRow = ({</TableCell><TableCell isTruncatable><div className="flex items-center gap-1.5">- <FontAwesomeIcon icon={methodDetails.icon} className="text-accent" />+ <MethodIcon className="size-3.5 text-accent" /><span className="truncate">{methodDetails.name}</span></div></TableCell>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/1PasswordConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/1PasswordConnectionForm.tsxindex ece7f92e8a..da9ea2cf4a 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/1PasswordConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/1PasswordConnectionForm.tsx@@ -136,8 +136,14 @@ export const OnePassConnectionForm = ({ appConnection, onSubmit }: Props) => {render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4"><FieldLabel htmlFor="api-token">API Token</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "api-token-error" : undefined}+ id="api-token"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="api-token-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AdcsConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AdcsConnectionForm.tsxindex 61cc2efdfb..c53daaf4fe 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AdcsConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AdcsConnectionForm.tsx@@ -141,6 +141,7 @@ export const AdcsConnectionForm = ({ appConnection, onSubmit }: Props) => {<FieldLabel>Gateway</FieldLabel>{isAllowed ? (<GatewayPicker+ isError={Boolean(error)}isRequiredisDisabled={!isAllowed}value={{@@ -157,6 +158,7 @@ export const AdcsConnectionForm = ({ appConnection, onSubmit }: Props) => {<TooltipTrigger asChild><div><GatewayPicker+ isError={Boolean(error)}isRequiredisDisabled={!isAllowed}value={{@@ -224,8 +226,14 @@ export const AdcsConnectionForm = ({ appConnection, onSubmit }: Props) => {render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4"><FieldLabel htmlFor="password">Password</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "password-error" : undefined}+ id="password"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="password-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AnthropicConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AnthropicConnectionForm.tsxindex 9ff99570f4..a119e6a51f 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AnthropicConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AnthropicConnectionForm.tsx@@ -118,8 +118,14 @@ export const AnthropicConnectionForm = ({ appConnection, onSubmit }: Props) => {</TooltipContent></Tooltip></FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "api-key-error" : undefined}+ id="api-key"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="api-key-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AppConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AppConnectionForm.tsxindex bb3648bb86..ef03e0bf80 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AppConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AppConnectionForm.tsx@@ -1,6 +1,5 @@import { useMemo, useState } from "react";-import { faInfoCircle } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";+import { InfoIcon } from "lucide-react";import { createNotification } from "@app/components/notifications";import { Button } from "@app/components/v3";@@ -131,7 +130,7 @@ const RotationConfirmation = ({<div className="p-4"><div className="flex flex-col rounded-xs border border-l-2 border-mineshaft-600 border-l-primary bg-mineshaft-700/80 px-4 py-3"><div className="mb-1 flex items-center text-sm">- <FontAwesomeIcon icon={faInfoCircle} size="sm" className="mr-1.5 text-primary" />+ <InfoIcon className="mr-1.5 size-4 text-primary" />Automatic Credential Rotation</div><p className="bor mt-1 text-sm text-bunker-200">diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/Auth0ConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/Auth0ConnectionForm.tsxindex d3b6979531..162a814f6b 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/Auth0ConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/Auth0ConnectionForm.tsx@@ -145,8 +145,14 @@ export const Auth0ConnectionForm = ({ appConnection, onSubmit }: Props) => {render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4"><FieldLabel htmlFor="client-secret">Client Secret</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "client-secret-error" : undefined}+ id="client-secret"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="client-secret-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AwsConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AwsConnectionForm.tsxindex 8f0eb00fb0..d455d6ca9a 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AwsConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AwsConnectionForm.tsx@@ -125,9 +125,15 @@ export const AwsConnectionForm = ({ appConnection, onSubmit }: Props) => {shouldUnregisterrender={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4">- <FieldLabel>Role ARN</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <FieldLabel htmlFor="app-connection-aws-role-arn">Role ARN</FieldLabel>+ <SecretInput+ aria-describedby={error ? "app-connection-aws-role-arn-error" : undefined}+ id="app-connection-aws-role-arn"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="app-connection-aws-role-arn-error" errors={[error]} /></Field>)}/>@@ -186,9 +192,19 @@ export const AwsConnectionForm = ({ appConnection, onSubmit }: Props) => {shouldUnregisterrender={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4">- <FieldLabel>Secret Access Key</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <FieldLabel htmlFor="app-connection-aws-secret-access-key">+ Secret Access Key+ </FieldLabel>+ <SecretInput+ aria-describedby={+ error ? "app-connection-aws-secret-access-key-error" : undefined+ }+ id="app-connection-aws-secret-access-key"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="app-connection-aws-secret-access-key-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AzureADCSConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AzureADCSConnectionForm.tsxindex bb3b658799..a420c0598b 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AzureADCSConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AzureADCSConnectionForm.tsx@@ -188,8 +188,14 @@ export const AzureADCSConnectionForm = ({ appConnection, onSubmit }: Props) => {render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4"><FieldLabel htmlFor="password">Password</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "password-error" : undefined}+ id="password"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="password-error" errors={[error]} /></Field>)}/>@@ -234,6 +240,7 @@ export const AzureADCSConnectionForm = ({ appConnection, onSubmit }: Props) => {</FieldDescription></FieldContent><Toggle+ aria-invalid={Boolean(error)}id="ssl-reject-unauthorized"variant={scopeVariant}checked={sslEnabled ? value : false}diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AzureClientSecretsConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AzureClientSecretsConnectionForm.tsxindex 6efa06eae2..6a8dfaeba9 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AzureClientSecretsConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AzureClientSecretsConnectionForm.tsx@@ -415,11 +415,14 @@ export const AzureClientSecretsConnectionForm = ({ appConnection, onSubmit, proj<Field className="mb-4"><FieldLabel htmlFor="credentials.certificateBody">Certificate</FieldLabel><SecretInput+ aria-describedby={error ? "credentials.certificateBody-error" : undefined}+ id="credentials.certificateBody"+ isError={Boolean(error)}value={value}onChange={(e) => onChange(e.target.value)}placeholder="-----BEGIN CERTIFICATE-----..."/>- <FieldError errors={[error]} />+ <FieldError id="credentials.certificateBody-error" errors={[error]} /></Field>)}/>@@ -430,11 +433,14 @@ export const AzureClientSecretsConnectionForm = ({ appConnection, onSubmit, proj<Field className="mb-4"><FieldLabel htmlFor="credentials.privateKey">Private Key</FieldLabel><SecretInput+ aria-describedby={error ? "credentials.privateKey-error" : undefined}+ id="credentials.privateKey"+ isError={Boolean(error)}placeholder="-----BEGIN PRIVATE KEY-----..."value={value}onChange={(e) => onChange(e.target.value)}/>- <FieldError errors={[error]} />+ <FieldError id="credentials.privateKey-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AzureDNSConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AzureDNSConnectionForm.tsxindex 41f15d4b8a..78fdba5ea7 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AzureDNSConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AzureDNSConnectionForm.tsx@@ -173,11 +173,14 @@ export const AzureDNSConnectionForm = ({ appConnection, onSubmit }: Props) => {<Field className="mb-4"><FieldLabel htmlFor="client-secret">Client Secret</FieldLabel><SecretInput+ aria-describedby={error ? "client-secret-error" : undefined}+ id="client-secret"+ isError={Boolean(error)}placeholder="~JzD8e6S.tH~w8XRaNnKcb7W1fM4rCns7FY"value={value}onChange={(e) => onChange(e.target.value)}/>- <FieldError errors={[error]} />+ <FieldError id="client-secret-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AzureKeyVaultConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AzureKeyVaultConnectionForm.tsxindex c3570e2307..6a881a3007 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AzureKeyVaultConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AzureKeyVaultConnectionForm.tsx@@ -537,11 +537,14 @@ export const AzureKeyVaultConnectionForm = ({ appConnection, onSubmit, projectId</Tooltip></FieldLabel><SecretInput+ aria-describedby={error ? "credentials.certificateBody-error" : undefined}+ id="credentials.certificateBody"+ isError={Boolean(error)}value={value}onChange={(e) => onChange(e.target.value)}placeholder="-----BEGIN CERTIFICATE-----..."/>- <FieldError errors={[error]} />+ <FieldError id="credentials.certificateBody-error" errors={[error]} /></Field>)}/>@@ -564,11 +567,14 @@ export const AzureKeyVaultConnectionForm = ({ appConnection, onSubmit, projectId</Tooltip></FieldLabel><SecretInput+ aria-describedby={error ? "credentials.privateKey-error" : undefined}+ id="credentials.privateKey"+ isError={Boolean(error)}value={value}onChange={(e) => onChange(e.target.value)}placeholder="-----BEGIN PRIVATE KEY-----..."/>- <FieldError errors={[error]} />+ <FieldError id="credentials.privateKey-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/BitbucketConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/BitbucketConnectionForm.tsxindex 8f9f11519b..3ed563796a 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/BitbucketConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/BitbucketConnectionForm.tsx@@ -126,8 +126,14 @@ export const BitbucketConnectionForm = ({ appConnection, onSubmit }: Props) => {render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4"><FieldLabel htmlFor="api-token">API Token</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "api-token-error" : undefined}+ id="api-token"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="api-token-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/CamundaConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/CamundaConnectionForm.tsxindex 737d6f7f44..f558a009fa 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/CamundaConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/CamundaConnectionForm.tsx@@ -126,8 +126,14 @@ export const CamundaConnectionForm = ({ appConnection, onSubmit }: Props) => {render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4"><FieldLabel htmlFor="client-secret">Client Secret</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "client-secret-error" : undefined}+ id="client-secret"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="client-secret-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/ChecklyConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/ChecklyConnectionForm.tsxindex 3078409374..91bd448bc4 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/ChecklyConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/ChecklyConnectionForm.tsx@@ -110,8 +110,14 @@ export const ChecklyConnectionForm = ({ appConnection, onSubmit }: Props) => {render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4"><FieldLabel htmlFor="api-key">API Key Value</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "api-key-error" : undefined}+ id="api-key"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="api-key-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/ChefConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/ChefConnectionForm.tsxindex d858b5d04c..d28b8713d4 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/ChefConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/ChefConnectionForm.tsx@@ -237,8 +237,14 @@ export const ChefConnectionForm = ({ appConnection, onSubmit }: Props) => {</TooltipContent></Tooltip></FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "private-key-error" : undefined}+ id="private-key"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="private-key-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/CircleCIConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/CircleCIConnectionForm.tsxindex 53d78a22f7..f83ab913eb 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/CircleCIConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/CircleCIConnectionForm.tsx@@ -154,8 +154,14 @@ export const CircleCIConnectionForm = ({ appConnection, onSubmit }: Props) => {</TooltipContent></Tooltip></FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "api-token-error" : undefined}+ id="api-token"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="api-token-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/Cloud66ConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/Cloud66ConnectionForm.tsxindex 94d31c5cf8..9978273bd3 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/Cloud66ConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/Cloud66ConnectionForm.tsx@@ -118,8 +118,14 @@ export const Cloud66ConnectionForm = ({ appConnection, onSubmit }: Props) => {</TooltipContent></Tooltip></FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "access-token-error" : undefined}+ id="access-token"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="access-token-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/CloudflareConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/CloudflareConnectionForm.tsxindex 5fb4cdb340..6c842e5daa 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/CloudflareConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/CloudflareConnectionForm.tsx@@ -127,8 +127,14 @@ export const CloudflareConnectionForm = ({ appConnection, onSubmit }: Props) =>render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4"><FieldLabel htmlFor="api-token">API Token</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "api-token-error" : undefined}+ id="api-token"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="api-token-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/ConvexConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/ConvexConnectionForm.tsxindex 0eaa8d81f1..f8d7f37b92 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/ConvexConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/ConvexConnectionForm.tsx@@ -116,8 +116,14 @@ export const ConvexConnectionForm = ({ appConnection, onSubmit }: Props) => {render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4"><FieldLabel htmlFor="access-token">Access Token</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "access-token-error" : undefined}+ id="access-token"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="access-token-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/DNSMadeEasyConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/DNSMadeEasyConnectionForm.tsxindex 6c96ccc2ef..108408da69 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/DNSMadeEasyConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/DNSMadeEasyConnectionForm.tsx@@ -132,8 +132,14 @@ export const DNSMadeEasyConnectionForm = ({ appConnection, onSubmit }: Props) =>render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4"><FieldLabel htmlFor="secret-key">Secret Key</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "secret-key-error" : undefined}+ id="secret-key"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="secret-key-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/DatabricksConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/DatabricksConnectionForm.tsxindex 24899a23f2..f855b924f5 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/DatabricksConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/DatabricksConnectionForm.tsx@@ -147,8 +147,14 @@ export const DatabricksConnectionForm = ({ appConnection, onSubmit }: Props) =>render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4"><FieldLabel htmlFor="client-secret">Client Secret</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "client-secret-error" : undefined}+ id="client-secret"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="client-secret-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/DatadogConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/DatadogConnectionForm.tsxindex ad9efb3863..f68b7b704a 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/DatadogConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/DatadogConnectionForm.tsx@@ -154,8 +154,14 @@ export const DatadogConnectionForm = ({ appConnection, onSubmit }: Props) => {render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4"><FieldLabel htmlFor="token">Service Access Token</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "token-error" : undefined}+ id="token"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="token-error" errors={[error]} /></Field>)}/>@@ -168,8 +174,14 @@ export const DatadogConnectionForm = ({ appConnection, onSubmit }: Props) => {render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4"><FieldLabel htmlFor="api-key">API Key</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "api-key-error" : undefined}+ id="api-key"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="api-key-error" errors={[error]} /></Field>)}/>@@ -180,8 +192,14 @@ export const DatadogConnectionForm = ({ appConnection, onSubmit }: Props) => {render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4"><FieldLabel htmlFor="application-key">Application Key</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "application-key-error" : undefined}+ id="application-key"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="application-key-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/DbtConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/DbtConnectionForm.tsxindex 569dbe7a07..9b538ed0f7 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/DbtConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/DbtConnectionForm.tsx@@ -154,8 +154,14 @@ export const DbtConnectionForm = ({ appConnection, onSubmit }: Props) => {render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4"><FieldLabel htmlFor="api-token">API Token</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "api-token-error" : undefined}+ id="api-token"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="api-token-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/DevinConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/DevinConnectionForm.tsxindex 01301084fa..ffb178413f 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/DevinConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/DevinConnectionForm.tsx@@ -120,8 +120,14 @@ export const DevinConnectionForm = ({ appConnection, onSubmit }: Props) => {</TooltipContent></Tooltip></FieldLabel>- <SecretInput id="api-key" value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "api-key-error" : undefined}+ isError={Boolean(error)}+ id="api-key"+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="api-key-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/DigiCertConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/DigiCertConnectionForm.tsxindex 32404dc901..3aeba02749 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/DigiCertConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/DigiCertConnectionForm.tsx@@ -145,13 +145,21 @@ export const DigiCertConnectionForm = ({ appConnection, onSubmit }: Props) => {render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4"><FieldLabel htmlFor="api-key">CertCentral API Key</FieldLabel>- <SecretInput id="api-key" value={value} onChange={(e) => onChange(e.target.value)} />+ <SecretInput+ aria-describedby={+ error ? "api-key-description api-key-error" : "api-key-description"+ }+ isError={Boolean(error)}+ id="api-key"+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />{!error && (- <FieldDescription>+ <FieldDescription id="api-key-description">Generate an API key in CertCentral under Automation > API Keys.</FieldDescription>)}- <FieldError errors={[error]} />+ <FieldError id="api-key-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/DigitalOceanConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/DigitalOceanConnectionForm.tsxindex 4d2f3f4058..2ec0895e96 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/DigitalOceanConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/DigitalOceanConnectionForm.tsx@@ -111,11 +111,13 @@ export const DigitalOceanConnectionForm = ({ appConnection, onSubmit }: Props) =<Field className="mb-4"><FieldLabel htmlFor="api-token">API Key Value</FieldLabel><SecretInput+ aria-describedby={error ? "api-token-error" : undefined}+ isError={Boolean(error)}id="api-token"value={value}onChange={(e) => onChange(e.target.value)}/>- <FieldError errors={[error]} />+ <FieldError id="api-token-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/DopplerConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/DopplerConnectionForm.tsxindex 8e013e78e3..bbaf68a8c8 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/DopplerConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/DopplerConnectionForm.tsx@@ -109,11 +109,13 @@ export const DopplerConnectionForm = ({ appConnection, onSubmit }: Props) => {<Field className="mb-4"><FieldLabel htmlFor="api-token">API Token</FieldLabel><SecretInput+ aria-describedby={error ? "api-token-error" : undefined}+ isError={Boolean(error)}id="api-token"value={value}onChange={(e) => onChange(e.target.value)}/>- <FieldError errors={[error]} />+ <FieldError id="api-token-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/ExternalInfisicalConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/ExternalInfisicalConnectionForm.tsxindex 4a97769ca1..a4f7ef8f16 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/ExternalInfisicalConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/ExternalInfisicalConnectionForm.tsx@@ -186,11 +186,13 @@ export const ExternalInfisicalConnectionForm = ({ appConnection, onSubmit }: ProMachine Identity Client Secret</FieldLabel><SecretInput+ aria-describedby={error ? "machine-identity-client-secret-error" : undefined}+ isError={Boolean(error)}id="machine-identity-client-secret"value={value}onChange={(e) => onChange(e.target.value)}/>- <FieldError errors={[error]} />+ <FieldError id="machine-identity-client-secret-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/F5BigIpConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/F5BigIpConnectionForm.tsxindex 6adfc61b45..eff7823b61 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/F5BigIpConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/F5BigIpConnectionForm.tsx@@ -260,11 +260,13 @@ export const F5BigIpConnectionForm = ({ appConnection, onSubmit }: Props) => {<Field className="mb-4"><FieldLabel htmlFor="password">Password</FieldLabel><SecretInput+ aria-describedby={error ? "password-error" : undefined}+ isError={Boolean(error)}id="password"value={value}onChange={(e) => onChange(e.target.value)}/>- <FieldError errors={[error]} />+ <FieldError id="password-error" errors={[error]} /></Field>)}/>@@ -305,6 +307,7 @@ export const F5BigIpConnectionForm = ({ appConnection, onSubmit }: Props) => {</FieldDescription></FieldContent><Toggle+ aria-invalid={Boolean(error)}id="ssl-reject-unauthorized"variant={scopeVariant}checked={value}diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/FireworksConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/FireworksConnectionForm.tsxindex 9b3afebd6d..0a6e225ef8 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/FireworksConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/FireworksConnectionForm.tsx@@ -121,6 +121,7 @@ export const FireworksConnectionForm = ({ appConnection, onSubmit }: Props) => {</Tooltip></FieldLabel><Input+ isError={Boolean(error)}value={value}onChange={(e) => onChange(e.target.value)}placeholder="Account ID"@@ -146,8 +147,14 @@ export const FireworksConnectionForm = ({ appConnection, onSubmit }: Props) => {</TooltipContent></Tooltip></FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "api-key-error" : undefined}+ id="api-key"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="api-key-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/FlyioConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/FlyioConnectionForm.tsxindex 12e62dd564..381f73cb36 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/FlyioConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/FlyioConnectionForm.tsx@@ -112,11 +112,13 @@ export const FlyioConnectionForm = ({ appConnection, onSubmit }: Props) => {<Field className="mb-4"><FieldLabel htmlFor="access-token">Access Token</FieldLabel><SecretInput+ aria-describedby={error ? "access-token-error" : undefined}+ isError={Boolean(error)}id="access-token"value={value}onChange={(e) => onChange(e.target.value)}/>- <FieldError errors={[error]} />+ <FieldError id="access-token-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/GcpConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/GcpConnectionForm.tsxindex bd6f2ed1b9..f5fbdab68d 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/GcpConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/GcpConnectionForm.tsx@@ -1,8 +1,6 @@import { Controller, FormProvider, useForm } from "react-hook-form";-import { faCheck, faCopy } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";import { zodResolver } from "@hookform/resolvers/zod";-import { Info } from "lucide-react";+import { CheckIcon, CopyIcon, Info } from "lucide-react";import { z } from "zod";import { createNotification } from "@app/components/notifications";@@ -119,12 +117,18 @@ export const GcpConnectionForm = ({ appConnection, onSubmit }: Props) => {<Field className="group mb-4"><FieldLabel htmlFor="service-account-email">Service Account Email</FieldLabel><SecretInput+ aria-describedby={+ error+ ? "service-account-email-description service-account-email-error"+ : "service-account-email-description"+ }+ isError={Boolean(error)}id="service-account-email"value={value}onChange={(e) => onChange(e.target.value)}/>{!error && (- <FieldDescription>+ <FieldDescription id="service-account-email-description"><span className="block">{`Service account ID must be suffixed with "${expectedAccountIdSuffix}"`}<Tooltip>@@ -149,11 +153,11 @@ export const GcpConnectionForm = ({ appConnection, onSubmit }: Props) => {}}className="ml-1">- <FontAwesomeIcon- icon={!isCopied ? faCopy : faCheck}- size="sm"- className="cursor-pointer"- />+ {isCopied ? (+ <CheckIcon className="size-4" />+ ) : (+ <CopyIcon className="size-4" />+ )}</IconButton></TooltipTrigger><TooltipContent side="bottom">Copy</TooltipContent>@@ -167,7 +171,7 @@ export const GcpConnectionForm = ({ appConnection, onSubmit }: Props) => {</span></FieldDescription>)}- <FieldError errors={[error]} />+ <FieldError id="service-account-email-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/GitHubConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/GitHubConnectionForm.tsxindex 9347a8b73f..ed5eff7536 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/GitHubConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/GitHubConnectionForm.tsx@@ -622,9 +622,22 @@ export const GitHubConnectionForm = ({ appConnection, projectId, onSubmit }: ProshouldUnregisterrender={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4">- <FieldLabel>Personal Access Token</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <FieldLabel htmlFor="app-connection-git-hub-personal-access-token">+ Personal Access Token+ </FieldLabel>+ <SecretInput+ aria-describedby={+ error ? "app-connection-git-hub-personal-access-token-error" : undefined+ }+ id="app-connection-git-hub-personal-access-token"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError+ id="app-connection-git-hub-personal-access-token-error"+ errors={[error]}+ /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/GitLabConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/GitLabConnectionForm.tsxindex a1711dda5d..fe2f6c93ac 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/GitLabConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/GitLabConnectionForm.tsx@@ -341,8 +341,14 @@ export const GitLabConnectionForm = ({ appConnection, onSubmit: formSubmit, proj<TooltipContent className="max-w-sm">Your GitLab Access Token</TooltipContent></Tooltip></FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "gitlab-access-token-error" : undefined}+ id="gitlab-access-token"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="gitlab-access-token-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/GoDaddyConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/GoDaddyConnectionForm.tsxindex e59ffa3ee8..8c4b632ac0 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/GoDaddyConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/GoDaddyConnectionForm.tsx@@ -137,11 +137,13 @@ export const GoDaddyConnectionForm = ({ appConnection, onSubmit }: Props) => {<Field className="mb-4"><FieldLabel htmlFor="api-secret">API Secret</FieldLabel><SecretInput+ aria-describedby={error ? "api-secret-error" : undefined}+ isError={Boolean(error)}id="api-secret"value={value}onChange={(e) => onChange(e.target.value)}/>- <FieldError errors={[error]} />+ <FieldError id="api-secret-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/HCVaultConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/HCVaultConnectionForm.tsxindex d7d6977591..f97add2a90 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/HCVaultConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/HCVaultConnectionForm.tsx@@ -241,9 +241,14 @@ export const HCVaultConnectionForm = ({ appConnection, onSubmit }: Props) => {shouldUnregisterrender={({ field, fieldState: { error } }) => (<Field className="mb-4">- <FieldLabel>Access Token</FieldLabel>- <SecretInput {...field} />- <FieldError errors={[error]} />+ <FieldLabel htmlFor="app-connection-hcvault-access-token">Access Token</FieldLabel>+ <SecretInput+ aria-describedby={error ? "app-connection-hcvault-access-token-error" : undefined}+ id="app-connection-hcvault-access-token"+ isError={Boolean(error)}+ {...field}+ />+ <FieldError id="app-connection-hcvault-access-token-error" errors={[error]} /></Field>)}/>@@ -272,9 +277,14 @@ export const HCVaultConnectionForm = ({ appConnection, onSubmit }: Props) => {shouldUnregisterrender={({ field, fieldState: { error } }) => (<Field className="mb-4">- <FieldLabel>Secret ID</FieldLabel>- <SecretInput {...field} />- <FieldError errors={[error]} />+ <FieldLabel htmlFor="app-connection-hcvault-secret-id">Secret ID</FieldLabel>+ <SecretInput+ aria-describedby={error ? "app-connection-hcvault-secret-id-error" : undefined}+ id="app-connection-hcvault-secret-id"+ isError={Boolean(error)}+ {...field}+ />+ <FieldError id="app-connection-hcvault-secret-id-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/HasuraCloudConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/HasuraCloudConnectionForm.tsxindex 7adb00cac6..9605368be6 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/HasuraCloudConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/HasuraCloudConnectionForm.tsx@@ -118,8 +118,14 @@ export const HasuraCloudConnectionForm = ({ appConnection, onSubmit }: Props) =></TooltipContent></Tooltip></FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "access-token-error" : undefined}+ id="access-token"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="access-token-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/HerokuAppConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/HerokuAppConnectionForm.tsxindex 942af92962..8c2752c962 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/HerokuAppConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/HerokuAppConnectionForm.tsx@@ -250,8 +250,14 @@ export const HerokuConnectionForm = ({ appConnection, onSubmit: formSubmit, proj<TooltipContent className="max-w-sm">Your Heroku Auth Token</TooltipContent></Tooltip></FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "heroku-auth-token-error" : undefined}+ id="heroku-auth-token"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="heroku-auth-token-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/HumanitecConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/HumanitecConnectionForm.tsxindex 6d80d98e2d..a28eef0747 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/HumanitecConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/HumanitecConnectionForm.tsx@@ -106,9 +106,17 @@ export const HumanitecConnectionForm = ({ appConnection, onSubmit }: Props) => {shouldUnregisterrender={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4">- <FieldLabel>Service API Token</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <FieldLabel htmlFor="app-connection-humanitec-api-token">+ Service API Token+ </FieldLabel>+ <SecretInput+ aria-describedby={error ? "app-connection-humanitec-api-token-error" : undefined}+ id="app-connection-humanitec-api-token"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="app-connection-humanitec-api-token-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/KempLoadMasterConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/KempLoadMasterConnectionForm.tsxindex 7bbb517314..9c5f005c1c 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/KempLoadMasterConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/KempLoadMasterConnectionForm.tsx@@ -242,9 +242,22 @@ export const KempLoadMasterConnectionForm = ({ appConnection, onSubmit }: Props)control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4">- <FieldLabel>Password</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <FieldLabel htmlFor="app-connection-kemp-load-master-password">+ Password+ </FieldLabel>+ <SecretInput+ aria-describedby={+ error ? "app-connection-kemp-load-master-password-error" : undefined+ }+ id="app-connection-kemp-load-master-password"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError+ id="app-connection-kemp-load-master-password-error"+ errors={[error]}+ /></Field>)}/>@@ -305,6 +318,7 @@ export const KempLoadMasterConnectionForm = ({ appConnection, onSubmit }: Props)</FieldDescription></FieldContent><Toggle+ aria-invalid={Boolean(error)}id="ssl-reject-unauthorized"variant={scopeVariant}checked={value}diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/LaravelForgeConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/LaravelForgeConnectionForm.tsxindex 0f4568f9b9..cb650bb27b 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/LaravelForgeConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/LaravelForgeConnectionForm.tsx@@ -110,9 +110,17 @@ export const LaravelForgeConnectionForm = ({ appConnection, onSubmit }: Props) =shouldUnregisterrender={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4">- <FieldLabel>API Token</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <FieldLabel htmlFor="app-connection-laravel-forge-api-token">API Token</FieldLabel>+ <SecretInput+ aria-describedby={+ error ? "app-connection-laravel-forge-api-token-error" : undefined+ }+ id="app-connection-laravel-forge-api-token"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="app-connection-laravel-forge-api-token-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/LdapConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/LdapConnectionForm.tsxindex 87b8efb08a..695fc3b0d7 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/LdapConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/LdapConnectionForm.tsx@@ -296,9 +296,15 @@ export const LdapConnectionForm = ({ appConnection, onSubmit }: Props) => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4">- <FieldLabel>Binding Password</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <FieldLabel htmlFor="app-connection-ldap-password">Binding Password</FieldLabel>+ <SecretInput+ aria-describedby={error ? "app-connection-ldap-password-error" : undefined}+ id="app-connection-ldap-password"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="app-connection-ldap-password-error" errors={[error]} /></Field>)}/>@@ -340,6 +346,7 @@ export const LdapConnectionForm = ({ appConnection, onSubmit }: Props) => {</FieldDescription></FieldContent><Toggle+ aria-invalid={Boolean(error)}id="ssl-reject-unauthorized"variant={scopeVariant}checked={sslEnabled ? value : false}diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/LiteLLMConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/LiteLLMConnectionForm.tsxindex 1f10053fbc..64e1c70ac8 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/LiteLLMConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/LiteLLMConnectionForm.tsx@@ -112,8 +112,14 @@ export const LiteLLMConnectionForm = ({ appConnection, onSubmit }: Props) => {</TooltipContent></Tooltip></FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "api-key-error" : undefined}+ id="api-key"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="api-key-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/MongoDBConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/MongoDBConnectionForm.tsxindex 7eea8b6a3a..22166d607e 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/MongoDBConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/MongoDBConnectionForm.tsx@@ -206,9 +206,17 @@ export const MongoDBConnectionForm = ({ appConnection, onSubmit }: Props) => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="flex-1">- <FieldLabel>Password</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <FieldLabel htmlFor="app-connection-mongo-db-password">Password</FieldLabel>+ <SecretInput+ aria-describedby={+ error ? "app-connection-mongo-db-password-error" : undefined+ }+ id="app-connection-mongo-db-password"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="app-connection-mongo-db-password-error" errors={[error]} /></Field>)}/>@@ -225,6 +233,7 @@ export const MongoDBConnectionForm = ({ appConnection, onSubmit }: Props) => {<Label htmlFor="tls-enabled">Enable TLS</Label></FieldContent><Toggle+ aria-invalid={Boolean(error)}id="tls-enabled"variant={scopeVariant}checked={value}@@ -268,6 +277,7 @@ export const MongoDBConnectionForm = ({ appConnection, onSubmit }: Props) => {</FieldDescription></FieldContent><Toggle+ aria-invalid={Boolean(error)}id="tls-reject-unauthorized"variant={scopeVariant}checked={tlsEnabled ? value : false}diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/NetScalerConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/NetScalerConnectionForm.tsxindex 51acc610cd..d18b32d763 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/NetScalerConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/NetScalerConnectionForm.tsx@@ -239,9 +239,17 @@ export const NetScalerConnectionForm = ({ appConnection, onSubmit }: Props) => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4">- <FieldLabel>Password</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <FieldLabel htmlFor="app-connection-net-scaler-password">Password</FieldLabel>+ <SecretInput+ aria-describedby={+ error ? "app-connection-net-scaler-password-error" : undefined+ }+ id="app-connection-net-scaler-password"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="app-connection-net-scaler-password-error" errors={[error]} /></Field>)}/>@@ -302,6 +310,7 @@ export const NetScalerConnectionForm = ({ appConnection, onSubmit }: Props) => {</FieldDescription></FieldContent><Toggle+ aria-invalid={Boolean(error)}id="ssl-reject-unauthorized"variant={scopeVariant}checked={value}diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/NetlifyConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/NetlifyConnectionForm.tsxindex 9478a95729..33d4257bcd 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/NetlifyConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/NetlifyConnectionForm.tsx@@ -109,9 +109,17 @@ export const NetlifyConnectionForm = ({ appConnection, onSubmit }: Props) => {shouldUnregisterrender={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4">- <FieldLabel>Access Token Value</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <FieldLabel htmlFor="app-connection-netlify-access-token">+ Access Token Value+ </FieldLabel>+ <SecretInput+ aria-describedby={error ? "app-connection-netlify-access-token-error" : undefined}+ id="app-connection-netlify-access-token"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="app-connection-netlify-access-token-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/NorthflankConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/NorthflankConnectionForm.tsxindex ffa2c1bc78..d5f30cef60 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/NorthflankConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/NorthflankConnectionForm.tsx@@ -109,9 +109,15 @@ export const NorthflankConnectionForm = ({ appConnection, onSubmit }: Props) =>shouldUnregisterrender={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4">- <FieldLabel>API Token</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <FieldLabel htmlFor="app-connection-northflank-api-token">API Token</FieldLabel>+ <SecretInput+ aria-describedby={error ? "app-connection-northflank-api-token-error" : undefined}+ id="app-connection-northflank-api-token"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="app-connection-northflank-api-token-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/NutanixPrismCentralConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/NutanixPrismCentralConnectionForm.tsxindex ae41139b08..f81e1498c8 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/NutanixPrismCentralConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/NutanixPrismCentralConnectionForm.tsx@@ -276,11 +276,13 @@ export const NutanixPrismCentralConnectionForm = ({ appConnection, onSubmit }: P</Tooltip></FieldLabel><SecretInput+ aria-describedby={error ? "api-key-error" : undefined}+ isError={Boolean(error)}id="api-key"value={value}onChange={(e) => onChange(e.target.value)}/>- <FieldError errors={[error]} />+ <FieldError id="api-key-error" errors={[error]} /></Field>)}/>@@ -311,11 +313,13 @@ export const NutanixPrismCentralConnectionForm = ({ appConnection, onSubmit }: P<Field className="mb-4"><FieldLabel htmlFor="password">Password</FieldLabel><SecretInput+ aria-describedby={error ? "password-error" : undefined}+ isError={Boolean(error)}id="password"value={value}onChange={(e) => onChange(e.target.value)}/>- <FieldError errors={[error]} />+ <FieldError id="password-error" errors={[error]} /></Field>)}/>@@ -357,6 +361,7 @@ export const NutanixPrismCentralConnectionForm = ({ appConnection, onSubmit }: P</FieldDescription></FieldContent><Toggle+ aria-invalid={Boolean(error)}id="ssl-reject-unauthorized"variant={scopeVariant}checked={value}diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/OCIConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/OCIConnectionForm.tsxindex ac83851d10..2955ff03d2 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/OCIConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/OCIConnectionForm.tsx@@ -232,9 +232,15 @@ export const OCIConnectionForm = ({ appConnection, onSubmit }: Props) => {shouldUnregisterrender={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4">- <FieldLabel>Private Key PEM</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <FieldLabel htmlFor="app-connection-oci-private-key">Private Key PEM</FieldLabel>+ <SecretInput+ aria-describedby={error ? "app-connection-oci-private-key-error" : undefined}+ id="app-connection-oci-private-key"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="app-connection-oci-private-key-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/OVHConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/OVHConnectionForm.tsxindex 0a48cbf6fd..ade5f8d1e3 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/OVHConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/OVHConnectionForm.tsx@@ -122,8 +122,14 @@ export const OVHConnectionForm = ({ appConnection, onSubmit }: Props) => {</TooltipContent></Tooltip></FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "private-key-error" : undefined}+ id="private-key"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="private-key-error" errors={[error]} /></Field>)}/>@@ -145,8 +151,14 @@ export const OVHConnectionForm = ({ appConnection, onSubmit }: Props) => {</TooltipContent></Tooltip></FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "certificate-error" : undefined}+ id="certificate"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="certificate-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/OctopusDeployConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/OctopusDeployConnectionForm.tsxindex 748b171672..f4873ba0e7 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/OctopusDeployConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/OctopusDeployConnectionForm.tsx@@ -144,8 +144,14 @@ export const OctopusDeployConnectionForm = ({ appConnection, onSubmit }: Props)render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4"><FieldLabel htmlFor="api-key">Octopus Deploy API Key</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "api-key-error" : undefined}+ id="api-key"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="api-key-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/OktaConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/OktaConnectionForm.tsxindex d5d5606a3b..26598e0325 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/OktaConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/OktaConnectionForm.tsx@@ -135,8 +135,14 @@ export const OktaConnectionForm = ({ appConnection, onSubmit }: Props) => {render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4"><FieldLabel htmlFor="api-token">API Token</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "api-token-error" : undefined}+ id="api-token"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="api-token-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/OnaConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/OnaConnectionForm.tsxindex f3d0544a79..8115a52cef 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/OnaConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/OnaConnectionForm.tsx@@ -110,8 +110,14 @@ export const OnaConnectionForm = ({ appConnection, onSubmit }: Props) => {render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4"><FieldLabel htmlFor="personal-access-token">Personal Access Token</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "personal-access-token-error" : undefined}+ id="personal-access-token"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="personal-access-token-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/OpenAIConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/OpenAIConnectionForm.tsxindex d96c1493a6..d14464f3d9 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/OpenAIConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/OpenAIConnectionForm.tsx@@ -118,8 +118,14 @@ export const OpenAIConnectionForm = ({ appConnection, onSubmit }: Props) => {</TooltipContent></Tooltip></FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "api-key-error" : undefined}+ id="api-key"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="api-key-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/OpenRouterConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/OpenRouterConnectionForm.tsxindex 2f366ab37b..918b9b8495 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/OpenRouterConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/OpenRouterConnectionForm.tsx@@ -117,8 +117,14 @@ export const OpenRouterConnectionForm = ({ appConnection, onSubmit }: Props) =></TooltipContent></Tooltip></FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "api-key-error" : undefined}+ id="api-key"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="api-key-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/QoveryConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/QoveryConnectionForm.tsxindex 3a9ee85b25..a8136f36bb 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/QoveryConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/QoveryConnectionForm.tsx@@ -118,8 +118,14 @@ export const QoveryConnectionForm = ({ appConnection, onSubmit }: Props) => {</TooltipContent></Tooltip></FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "access-token-error" : undefined}+ id="access-token"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="access-token-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/RailwayConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/RailwayConnectionForm.tsxindex ba24647094..7718b7f24f 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/RailwayConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/RailwayConnectionForm.tsx@@ -110,8 +110,14 @@ export const RailwayConnectionForm = ({ appConnection, onSubmit }: Props) => {render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4"><FieldLabel htmlFor="api-token">Token Value</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "api-token-error" : undefined}+ id="api-token"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="api-token-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/RedisConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/RedisConnectionForm.tsxindex e93a103f66..d67a1e011a 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/RedisConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/RedisConnectionForm.tsx@@ -193,9 +193,15 @@ export const RedisConnectionForm = ({ appConnection, onSubmit }: Props) => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="flex-1">- <FieldLabel>Password</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <FieldLabel htmlFor="app-connection-redis-password">Password</FieldLabel>+ <SecretInput+ aria-describedby={error ? "app-connection-redis-password-error" : undefined}+ id="app-connection-redis-password"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="app-connection-redis-password-error" errors={[error]} /></Field>)}/>@@ -212,6 +218,7 @@ export const RedisConnectionForm = ({ appConnection, onSubmit }: Props) => {<Label htmlFor="ssl-enabled">Enable SSL</Label></FieldContent><Toggle+ aria-invalid={Boolean(error)}id="ssl-enabled"variant={scopeVariant}checked={value}@@ -255,6 +262,7 @@ export const RedisConnectionForm = ({ appConnection, onSubmit }: Props) => {</FieldDescription></FieldContent><Toggle+ aria-invalid={Boolean(error)}id="ssl-reject-unauthorized"variant={scopeVariant}checked={sslEnabled ? value : false}diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/RenderConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/RenderConnectionForm.tsxindex 62f097015d..5bffa3b34d 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/RenderConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/RenderConnectionForm.tsx@@ -107,8 +107,14 @@ export const RenderConnectionForm = ({ appConnection, onSubmit }: Props) => {render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4"><FieldLabel htmlFor="api-key">API Key</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "api-key-error" : undefined}+ id="api-key"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="api-key-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/RundeckConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/RundeckConnectionForm.tsxindex c5842e2db8..1446f27e59 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/RundeckConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/RundeckConnectionForm.tsx@@ -142,11 +142,13 @@ export const RundeckConnectionForm = ({ appConnection, onSubmit }: Props) => {<Field className="mb-4"><FieldLabel htmlFor="api-token">Rundeck API Token</FieldLabel><SecretInput+ aria-describedby={error ? "api-token-error" : undefined}+ isError={Boolean(error)}id="api-token"value={value}onChange={(e) => onChange(e.target.value)}/>- <FieldError errors={[error]} />+ <FieldError id="api-token-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/SalesforceConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/SalesforceConnectionForm.tsxindex 857e3ac963..6bc7eedced 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/SalesforceConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/SalesforceConnectionForm.tsx@@ -115,8 +115,14 @@ export const SalesforceConnectionForm = ({ appConnection, onSubmit }: Props) =>render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4"><FieldLabel htmlFor="consumer-secret">Consumer Secret</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "consumer-secret-error" : undefined}+ id="consumer-secret"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="consumer-secret-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/SmbConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/SmbConnectionForm.tsxindex 55abcaede0..b66c6a0569 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/SmbConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/SmbConnectionForm.tsx@@ -238,8 +238,14 @@ export const SmbConnectionForm = ({ appConnection, onSubmit }: Props) => {render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4"><FieldLabel htmlFor="password">Password</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "password-error" : undefined}+ id="password"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="password-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/SnowflakeConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/SnowflakeConnectionForm.tsxindex 4ca0efb867..a37a32fa5e 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/SnowflakeConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/SnowflakeConnectionForm.tsx@@ -143,8 +143,14 @@ export const SnowflakeConnectionForm = ({ appConnection, onSubmit }: Props) => {</TooltipContent></Tooltip></FieldLabel>- <SecretInput id="password" value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "password-error" : undefined}+ isError={Boolean(error)}+ id="password"+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="password-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/SpaceliftConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/SpaceliftConnectionForm.tsxindex 8d1b516015..663df978dd 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/SpaceliftConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/SpaceliftConnectionForm.tsx@@ -161,8 +161,14 @@ export const SpaceliftConnectionForm = ({ appConnection, onSubmit }: Props) => {render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4"><FieldLabel htmlFor="api-key-secret">API Key Secret</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "api-key-secret-error" : undefined}+ id="api-key-secret"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="api-key-secret-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/SshConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/SshConnectionForm.tsxindex b4fafb9e3c..da74e311b3 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/SshConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/SshConnectionForm.tsx@@ -263,9 +263,15 @@ export const SshConnectionForm = ({ appConnection, onSubmit }: Props) => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4">- <FieldLabel>Password</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <FieldLabel htmlFor="app-connection-ssh-password">Password</FieldLabel>+ <SecretInput+ aria-describedby={error ? "app-connection-ssh-password-error" : undefined}+ id="app-connection-ssh-password"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="app-connection-ssh-password-error" errors={[error]} /></Field>)}/>@@ -276,13 +282,16 @@ export const SshConnectionForm = ({ appConnection, onSubmit }: Props) => {control={control}render={({ field, fieldState: { error } }) => (<Field className="mb-4">- <FieldLabel>Private Key</FieldLabel>+ <FieldLabel htmlFor="app-connection-ssh-private-key">Private Key</FieldLabel><SecretInput+ aria-describedby={error ? "app-connection-ssh-private-key-error" : undefined}+ id="app-connection-ssh-private-key"+ isError={Boolean(error)}value={field.value}onChange={(e) => field.onChange(e.target.value)}placeholder="-----BEGIN OPENSSH PRIVATE KEY-----"/>- <FieldError errors={[error]} />+ <FieldError id="app-connection-ssh-private-key-error" errors={[error]} /></Field>)}/>@@ -291,11 +300,17 @@ export const SshConnectionForm = ({ appConnection, onSubmit }: Props) => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4">- <FieldLabel>+ <FieldLabel htmlFor="app-connection-ssh-passphrase">Passphrase <span className="text-muted">(optional)</span></FieldLabel>- <SecretInput value={value ?? ""} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "app-connection-ssh-passphrase-error" : undefined}+ id="app-connection-ssh-passphrase"+ isError={Boolean(error)}+ value={value ?? ""}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="app-connection-ssh-passphrase-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/SupabaseConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/SupabaseConnectionForm.tsxindex 687a0e236a..1ef0d8efa6 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/SupabaseConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/SupabaseConnectionForm.tsx@@ -141,11 +141,13 @@ export const SupabaseConnectionForm = ({ appConnection, onSubmit }: Props) => {<Field className="mb-4"><FieldLabel htmlFor="access-key">Access Key Value</FieldLabel><SecretInput+ aria-describedby={error ? "access-key-error" : undefined}+ isError={Boolean(error)}id="access-key"value={value}onChange={(e) => onChange(e.target.value)}/>- <FieldError errors={[error]} />+ <FieldError id="access-key-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/TeamCityConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/TeamCityConnectionForm.tsxindex e967a536ec..33cc2012e3 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/TeamCityConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/TeamCityConnectionForm.tsx@@ -137,11 +137,13 @@ export const TeamCityConnectionForm = ({ appConnection, onSubmit }: Props) => {<Field className="mb-4"><FieldLabel htmlFor="access-token">Access Token</FieldLabel><SecretInput+ aria-describedby={error ? "access-token-error" : undefined}+ isError={Boolean(error)}id="access-token"value={value}onChange={(e) => onChange(e.target.value)}/>- <FieldError errors={[error]} />+ <FieldError id="access-token-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/TerraformCloudConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/TerraformCloudConnectionForm.tsxindex a0999b2480..11aa324442 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/TerraformCloudConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/TerraformCloudConnectionForm.tsx@@ -111,11 +111,13 @@ export const TerraformCloudConnectionForm = ({ appConnection, onSubmit }: Props)<Field className="mb-4"><FieldLabel htmlFor="api-token">API Token</FieldLabel><SecretInput+ aria-describedby={error ? "api-token-error" : undefined}+ isError={Boolean(error)}id="api-token"value={value}onChange={(e) => onChange(e.target.value)}/>- <FieldError errors={[error]} />+ <FieldError id="api-token-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/TravisCIConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/TravisCIConnectionForm.tsxindex dcc7e3f5fe..fbdfcf6ca0 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/TravisCIConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/TravisCIConnectionForm.tsx@@ -111,11 +111,13 @@ export const TravisCIConnectionForm = ({ appConnection, onSubmit }: Props) => {<Field className="mb-4"><FieldLabel htmlFor="api-token">API Token</FieldLabel><SecretInput+ aria-describedby={error ? "api-token-error" : undefined}+ isError={Boolean(error)}id="api-token"value={value}onChange={(e) => onChange(e.target.value)}/>- <FieldError errors={[error]} />+ <FieldError id="api-token-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/TriggerDevConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/TriggerDevConnectionForm.tsxindex db27816265..e8f99b56bb 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/TriggerDevConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/TriggerDevConnectionForm.tsx@@ -140,8 +140,14 @@ export const TriggerDevConnectionForm = ({ appConnection, onSubmit }: Props) =>render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4"><FieldLabel htmlFor="api-key">Personal Access Token</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "api-key-error" : undefined}+ id="api-key"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="api-key-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/VenafiConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/VenafiConnectionForm.tsxindex e0169ef13e..704e7086e5 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/VenafiConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/VenafiConnectionForm.tsx@@ -146,9 +146,15 @@ export const VenafiConnectionForm = ({ appConnection, onSubmit }: Props) => {shouldUnregisterrender={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4">- <FieldLabel>API Key</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <FieldLabel htmlFor="app-connection-venafi-api-key">API Key</FieldLabel>+ <SecretInput+ aria-describedby={error ? "app-connection-venafi-api-key-error" : undefined}+ id="app-connection-venafi-api-key"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="app-connection-venafi-api-key-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/VenafiTppConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/VenafiTppConnectionForm.tsxindex a203fff7ea..9d2e11afd2 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/VenafiTppConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/VenafiTppConnectionForm.tsx@@ -239,9 +239,15 @@ export const VenafiTppConnectionForm = ({ appConnection, onSubmit }: Props) => {control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4">- <FieldLabel>Password</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <FieldLabel htmlFor="app-connection-venafi-tpp-password">Password</FieldLabel>+ <SecretInput+ aria-describedby={error ? "app-connection-venafi-tpp-password-error" : undefined}+ id="app-connection-venafi-tpp-password"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="app-connection-venafi-tpp-password-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/VercelConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/VercelConnectionForm.tsxindex 31b90281f0..78fc6a93f9 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/VercelConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/VercelConnectionForm.tsx@@ -111,11 +111,13 @@ export const VercelConnectionForm = ({ appConnection, onSubmit }: Props) => {<Field className="mb-4"><FieldLabel htmlFor="api-token">API Token</FieldLabel><SecretInput+ aria-describedby={error ? "api-token-error" : undefined}+ isError={Boolean(error)}id="api-token"value={value}onChange={(e) => onChange(e.target.value)}/>- <FieldError errors={[error]} />+ <FieldError id="api-token-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/WinRMConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/WinRMConnectionForm.tsxindex dff7018e3e..68d6d111fe 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/WinRMConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/WinRMConnectionForm.tsx@@ -156,6 +156,7 @@ export const WinRMConnectionForm = ({ appConnection, onSubmit }: Props) => {<TooltipTrigger asChild><div><GatewayPicker+ isError={Boolean(error)}isRequiredisDisabled={!isAllowed}value={{@@ -243,8 +244,14 @@ export const WinRMConnectionForm = ({ appConnection, onSubmit }: Props) => {render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="mb-4"><FieldLabel htmlFor="password">Password</FieldLabel>- <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />- <FieldError errors={[error]} />+ <SecretInput+ aria-describedby={error ? "password-error" : undefined}+ id="password"+ isError={Boolean(error)}+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ <FieldError id="password-error" errors={[error]} /></Field>)}/>@@ -262,7 +269,12 @@ export const WinRMConnectionForm = ({ appConnection, onSubmit }: Props) => {no server certificate is required.</FieldDescription></FieldContent>- <Toggle id="ssl-enabled" checked={value} onCheckedChange={onChange} />+ <Toggle+ aria-invalid={Boolean(error)}+ id="ssl-enabled"+ checked={value}+ onCheckedChange={onChange}+ /></Field><FieldError errors={[error]} /></Field>@@ -306,6 +318,7 @@ export const WinRMConnectionForm = ({ appConnection, onSubmit }: Props) => {</FieldDescription></FieldContent><Toggle+ aria-invalid={Boolean(error)}id="ssl-reject-unauthorized"checked={sslEnabled ? value : false}onCheckedChange={onChange}diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/WindmillConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/WindmillConnectionForm.tsxindex 3d5414a41d..c93d40bec5 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/WindmillConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/WindmillConnectionForm.tsx@@ -144,11 +144,13 @@ export const WindmillConnectionForm = ({ appConnection, onSubmit }: Props) => {<Field className="mb-4"><FieldLabel htmlFor="access-token">Access Token</FieldLabel><SecretInput+ aria-describedby={error ? "access-token-error" : undefined}+ isError={Boolean(error)}id="access-token"value={value}onChange={(e) => onChange(e.target.value)}/>- <FieldError errors={[error]} />+ <FieldError id="access-token-error" errors={[error]} /></Field>)}/>diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/shared/CredentialRotationBadge.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/shared/CredentialRotationBadge.tsxindex ee385493e2..75f74f46ff 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/shared/CredentialRotationBadge.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/shared/CredentialRotationBadge.tsx@@ -1,5 +1,3 @@-import { faXmark } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";import { format, formatDistanceToNow } from "date-fns";import { PauseIcon, RefreshCwIcon, XIcon } from "lucide-react";@@ -49,7 +47,7 @@ export const CredentialRotationStatusBadge = ({ appConnection }: Props) => {<div className="flex flex-col gap-2 py-1 whitespace-normal"><div><div className="mb-2 flex self-start text-red">- <FontAwesomeIcon icon={faXmark} className="ml-1 pt-0.5 pr-1.5 text-sm" />+ <XIcon className="mr-1.5 ml-1 size-3 shrink-0" /><div className="text-xs">Failure Reason</div></div><div className="rounded-sm bg-mineshaft-600 p-2 text-xs break-words">diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/shared/CredentialRotationForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/shared/CredentialRotationForm.tsxindex fade7eace6..ec6a62276d 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/shared/CredentialRotationForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/shared/CredentialRotationForm.tsx@@ -47,6 +47,7 @@ export const CredentialRotationForm = ({ children }: Props) => {</FieldDescription></FieldContent><Toggle+ aria-invalid={Boolean(error)}id="auto-rotation-enabled"variant={scopeVariant}checked={value}diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/shared/SqlConnectionFields.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/shared/SqlConnectionFields.tsxindex b10c8d2faf..7a33d91faa 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/shared/SqlConnectionFields.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/shared/SqlConnectionFields.tsx@@ -122,13 +122,23 @@ export const SqlConnectionFields = ({control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (<Field className="flex-1">- <FieldLabel>Password</FieldLabel>+ <FieldLabel htmlFor="app-connection-sql-connection-fields-password">+ Password+ </FieldLabel><SecretInput+ aria-describedby={+ error ? "app-connection-sql-connection-fields-password-error" : undefined+ }+ id="app-connection-sql-connection-fields-password"+ isError={Boolean(error)}value={value}onChange={(e) => onChange(e.target.value)}isDisabled={isPlatformManagedCredentials}/>- <FieldError errors={[error]} />+ <FieldError+ id="app-connection-sql-connection-fields-password-error"+ errors={[error]}+ /></Field>)}/>@@ -145,6 +155,7 @@ export const SqlConnectionFields = ({<Label htmlFor="ssl-enabled">Enable SSL</Label></FieldContent><Toggle+ aria-invalid={Boolean(error)}id="ssl-enabled"variant={scopeVariant}checked={value}@@ -189,6 +200,7 @@ export const SqlConnectionFields = ({</FieldDescription></FieldContent><Toggle+ aria-invalid={Boolean(error)}id="ssl-reject-unauthorized"variant={scopeVariant}checked={sslEnabled ? value : false}@@ -217,6 +229,7 @@ export const SqlConnectionFields = ({</FieldDescription></FieldContent><Toggle+ aria-invalid={Boolean(error)}id="platform-managed"variant={scopeVariant}checked={value}diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionHeader.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionHeader.tsxindex 63a3d52fae..c51c5fb32f 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionHeader.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionHeader.tsx@@ -1,5 +1,3 @@-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";-import { DocumentationLinkBadge } from "@app/components/v3";import { APP_CONNECTION_MAP } from "@app/helpers/appConnections";import { AppConnection } from "@app/hooks/api/appConnections/enums";@@ -11,6 +9,7 @@ type Props = {export const AppConnectionHeader = ({ app, isConnected }: Props) => {const appDetails = APP_CONNECTION_MAP[app];+ const AppIcon = appDetails.icon;return (<div className="flex w-full items-start gap-2">@@ -20,12 +19,7 @@ export const AppConnectionHeader = ({ app, isConnected }: Props) => {src={`/images/integrations/${appDetails.image}`}className="h-7 w-7 object-contain"/>- {appDetails.icon && (- <FontAwesomeIcon- icon={appDetails.icon}- className="absolute right-0.5 bottom-0.5 text-primary-700"- />- )}+ {AppIcon && <AppIcon className="absolute right-0.5 bottom-0.5 size-3 text-primary-700" />}</div><div><div className="flex items-center gap-x-2 text-mineshaft-300">diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionList.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionList.tsxindex 1757ab9f1c..438fb0ae66 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionList.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionList.tsx@@ -1,5 +1,4 @@import { useMemo, useState } from "react";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";import { Loader2Icon, Search } from "lucide-react";import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal";@@ -27,7 +26,7 @@ type Props = {};const ProviderCard = ({ app, onClick }: { app: AppConnection; onClick: () => void }) => {- const { name, image, category, description, icon } = APP_CONNECTION_MAP[app];+ const { name, image, category, description, icon: AppIcon } = APP_CONNECTION_MAP[app];return (<button@@ -42,13 +41,7 @@ const ProviderCard = ({ app, onClick }: { app: AppConnection; onClick: () => voialt={`${name} logo`}className="h-6 w-6 object-contain"/>- {icon && (- <FontAwesomeIcon- icon={icon}- className="absolute -right-1 -bottom-1 text-primary-700"- size="sm"- />- )}+ {AppIcon && <AppIcon className="absolute -right-1 -bottom-1 size-3.5 text-primary-700" />}</div><span className="text-[10px] font-medium tracking-wider text-muted uppercase">{category}diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionRow.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionRow.tsxindex b486145c00..600d4006e3 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionRow.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionRow.tsx@@ -1,6 +1,5 @@import { useCallback } from "react";import { subject } from "@casl/ability";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";import { Link } from "@tanstack/react-router";import {AsteriskIcon,@@ -98,8 +97,9 @@ export const AppConnectionRow = ({}, [isIdCopied]);const methodDetails = getAppConnectionMethodDetails(method);-const connectionDetails = APP_CONNECTION_MAP[app];+ const MethodIcon = methodDetails.icon;+ const ConnectionIcon = connectionDetails.icon;const isGitHubAppConnection =app === AppConnection.GitHub && method === GitHubConnectionMethod.App;@@ -139,12 +139,8 @@ export const AppConnectionRow = ({src={`/images/integrations/${connectionDetails.image}`}className="mr-0.5 w-5"/>- {connectionDetails.icon && (- <FontAwesomeIcon- icon={connectionDetails.icon}- size="xs"- className="absolute -right-0.5 -bottom-0.5 text-primary-700"- />+ {ConnectionIcon && (+ <ConnectionIcon className="absolute -right-0.5 -bottom-0.5 size-3 text-primary-700" />)}</div><span className="hidden lg:inline">{connectionDetails.name}</span>@@ -174,11 +170,7 @@ export const AppConnectionRow = ({onClick={(e) => e.stopPropagation()}className="inline-flex items-center gap-1.5 text-mineshaft-100 underline-offset-2 hover:text-primary hover:underline">- <FontAwesomeIcon- size="sm"- className="text-mineshaft-300/75"- icon={methodDetails.icon}- />+ <MethodIcon className="size-3.5 text-mineshaft-300/75" /><span className="truncate underline">{methodDetails.name}</span></a></TooltipTrigger>@@ -193,11 +185,7 @@ export const AppConnectionRow = ({</Tooltip>) : (<p className="truncate">- <FontAwesomeIcon- size="sm"- className="mr-1.5 text-mineshaft-300/75"- icon={methodDetails.icon}- />+ <MethodIcon className="mr-1.5 inline size-3.5 text-mineshaft-300/75" />{methodDetails.name}</p>)}diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/DeleteAppConnectionModal.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/DeleteAppConnectionModal.tsxindex fb49250308..8e1e06cd45 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/DeleteAppConnectionModal.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/DeleteAppConnectionModal.tsx@@ -1,24 +1,17 @@-import { useEffect, useState } from "react";-import { Trash2Icon } from "lucide-react";-import { createNotification } from "@app/components/notifications";import {Alert,AlertDescription,AlertDialog,+ AlertDialogAction,AlertDialogCancel,+ AlertDialogConfirmationField,AlertDialogContent,AlertDialogDescription,AlertDialogFooter,AlertDialogHeader,- AlertDialogMedia,AlertDialogTitle,- AlertTitle,- Button,- Field,- FieldContent,- FieldLabel,- Input+ AlertTitle} from "@app/components/v3";import { APP_CONNECTION_MAP } from "@app/helpers/appConnections";import { TAppConnection, useDeleteAppConnection } from "@app/hooks/api/appConnections";@@ -31,19 +24,13 @@ type Props = {export const DeleteAppConnectionModal = ({ isOpen, onOpenChange, appConnection }: Props) => {const deleteAppConnection = useDeleteAppConnection();- const [inputData, setInputData] = useState("");-- useEffect(() => {- setInputData("");- }, [isOpen]);if (!appConnection) return null;const { id: connectionId, name, app } = appConnection;- const isConfirmed = inputData === name;const handleDeleteAppConnection = async () => {- if (!isConfirmed || deleteAppConnection.isPending) return;+ if (deleteAppConnection.isPending) return;try {await deleteAppConnection.mutateAsync({@@ -63,14 +50,15 @@ export const DeleteAppConnectionModal = ({ isOpen, onOpenChange, appConnection }};return (- <AlertDialog open={isOpen} onOpenChange={onOpenChange}>+ <AlertDialog open={isOpen} confirmationValue={name} onOpenChange={onOpenChange}><AlertDialogContent><AlertDialogHeader>- <AlertDialogMedia>- <Trash2Icon />- </AlertDialogMedia><AlertDialogTitle>Are you sure you want to delete {name}?</AlertDialogTitle>- <AlertDialogDescription>This action is irreversible.</AlertDialogDescription>+ <AlertDialogDescription asChild>+ <Alert variant="danger" appearance="borderless">+ <AlertDescription>This action is irreversible.</AlertDescription>+ </Alert>+ </AlertDialogDescription></AlertDialogHeader>{appConnection.isPlatformManagedCredentials && (<Alert variant="warning">@@ -81,37 +69,27 @@ export const DeleteAppConnectionModal = ({ isOpen, onOpenChange, appConnection }</AlertDescription></Alert>)}- <form- onSubmit={(e) => {- e.preventDefault();- handleDeleteAppConnection();+ <AlertDialogConfirmationField+ onConfirm={() => {+ if (!deleteAppConnection.isPending) {+ handleDeleteAppConnection().catch(() => undefined);+ }}}- >- <Field>- <FieldLabel>- Type <span className="font-bold">{name}</span> to confirm- </FieldLabel>- <FieldContent>- <Input- value={inputData}- onChange={(e) => setInputData(e.target.value)}- placeholder={`Type ${name} here`}- autoComplete="off"- />- </FieldContent>- </Field>- </form>+ /><AlertDialogFooter>- <AlertDialogCancel>Cancel</AlertDialogCancel>- <Button+ <AlertDialogCancel isDisabled={deleteAppConnection.isPending}>Cancel</AlertDialogCancel>+ <AlertDialogActionvariant="danger"- size="sm"- isDisabled={!isConfirmed}isPending={deleteAppConnection.isPending}- onClick={handleDeleteAppConnection}+ onClick={(event) => {+ event.preventDefault();+ if (!deleteAppConnection.isPending) {+ handleDeleteAppConnection().catch(() => undefined);+ }+ }}>Delete- </Button>+ </AlertDialogAction></AlertDialogFooter></AlertDialogContent></AlertDialog>diff --git a/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncDestinationCol/AwsSecretsManagerSyncDestinationCol.tsx b/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncDestinationCol/AwsSecretsManagerSyncDestinationCol.tsxindex 9cfe9af2b2..72e35d4994 100644--- a/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncDestinationCol/AwsSecretsManagerSyncDestinationCol.tsx+++ b/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncDestinationCol/AwsSecretsManagerSyncDestinationCol.tsx@@ -25,7 +25,7 @@ export const AwsSecretsManagerSyncDestinationCol = ({ secretSync }: Props) => {infoBadge: "secondary",additionalTooltipContent: (<div className="mt-4">- <span className="text-xs text-bunker-300">Secret Name:</span>+ <span className="text-xs text-label">Secret Name:</span><p className="text-sm">{destinationConfig.secretName}</p></div>)diff --git a/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncRow.tsx b/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncRow.tsxindex 9d8538ac14..e6ac709d97 100644--- a/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncRow.tsx+++ b/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncRow.tsx@@ -144,7 +144,7 @@ export const SecretSyncRow = ({}className={twMerge("group h-12",- syncStatus === SecretSyncStatus.Failed && "bg-red/5 hover:bg-red/10"+ syncStatus === SecretSyncStatus.Failed && "bg-danger/5 hover:bg-danger/10")}><TableCell>@@ -267,7 +267,7 @@ export const SecretSyncRow = ({<RefreshCwIcon />Trigger Sync</span>- <InfoIcon className="size-3.5 text-bunker-300" />+ <InfoIcon className="size-3.5 text-label" /></div></TooltipTrigger><TooltipContent side="left" sideOffset={20}>@@ -298,7 +298,7 @@ export const SecretSyncRow = ({<DownloadIcon />Import Secrets</span>- <InfoIcon className="size-3.5 text-bunker-300" />+ <InfoIcon className="size-3.5 text-label" /></div></TooltipTrigger><TooltipContent side="left" sideOffset={20}>@@ -330,7 +330,7 @@ export const SecretSyncRow = ({<EraserIcon />Remove Secrets</span>- <InfoIcon className="size-3.5 text-bunker-300" />+ <InfoIcon className="size-3.5 text-label" /></div></TooltipTrigger><TooltipContent side="left" sideOffset={20}>diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/CreateDynamicSecretLease.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/CreateDynamicSecretLease.tsxindex df20ac2f87..2f3cc2d8b2 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/CreateDynamicSecretLease.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/DynamicSecretListView/CreateDynamicSecretLease.tsx@@ -561,6 +561,7 @@ export const CreateSshDynamicSecretLease = ({id="ssh-lease-principal"value={principalInput}aria-describedby="ssh-lease-principals-feedback"+ isError={Boolean(error)}onChange={(event) => setPrincipalInput(event.target.value)}placeholder="Enter principal name..."onKeyDown={(event) => {diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/SecretSyncDetailsByIDPage.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/SecretSyncDetailsByIDPage.tsxindex f2ea9407e3..4c7cf8fd91 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/SecretSyncDetailsByIDPage.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/SecretSyncDetailsByIDPage.tsx@@ -1,8 +1,6 @@import { Helmet } from "react-helmet";-import { faChevronLeft } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";import { Link, useParams } from "@tanstack/react-router";-import { BanIcon } from "lucide-react";+import { BanIcon, ChevronLeftIcon } from "lucide-react";import { ProjectPermissionCan } from "@app/components/permissions";import {@@ -82,15 +80,15 @@ const PageContent = () => {return (<>- <div className="container mx-auto flex flex-col justify-between font-inter text-white">+ <div className="container mx-auto flex flex-col justify-between font-inter text-foreground"><div className="mx-auto mb-6 w-full max-w-8xl"><Linkto={ROUTE_PATHS.SecretManager.IntegrationsListPage.path}params={{ orgId, projectId }}search={{ selectedTab: IntegrationsListPageTabs.SecretSyncs }}- className="mb-4 flex w-fit items-center gap-x-1 text-sm text-mineshaft-400 transition duration-100 hover:text-mineshaft-400/80"+ className="mb-4 flex w-fit items-center gap-x-1 text-sm text-muted transition duration-100 hover:text-foreground">- <FontAwesomeIcon icon={faChevronLeft} />+ <ChevronLeftIcon className="size-4" />Secret Syncs</Link><div className="mb-6 flex w-full items-center gap-3">@@ -100,7 +98,7 @@ const PageContent = () => {className="mt-1.5 ml-1 w-12"/><div className="min-w-0">- <p className="truncate text-2xl font-medium text-white">{secretSync.name}</p>+ <p className="truncate text-2xl font-medium text-foreground">{secretSync.name}</p><p className="mt-1 leading-3 text-accent">{secretSync.description || `${destinationDetails.name} Sync`}</p>diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncAuditLogsSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncAuditLogsSection.tsxindex 02ce9986cd..9549fb0991 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncAuditLogsSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncAuditLogsSection.tsx@@ -97,7 +97,7 @@ export const SecretSyncAuditLogsSection = ({ secretSync }: Props) => {}}/>) : (- <div className="flex h-full items-center justify-center rounded-lg bg-mineshaft-800 text-sm text-mineshaft-200">+ <div className="flex h-full items-center justify-center rounded-lg bg-container-hover text-sm text-foreground/80"><div className="flex flex-col items-center gap-4 py-20"><FingerprintIcon className="size-8" /><p>@@ -110,7 +110,7 @@ export const SecretSyncAuditLogsSection = ({ secretSync }: Props) => {rel="noopener noreferrer"><a- className="cursor-pointer underline transition-all hover:text-white"+ className="cursor-pointer underline transition-all hover:text-foreground"target="_blank">upgrade your subscription@@ -123,7 +123,7 @@ export const SecretSyncAuditLogsSection = ({ secretSync }: Props) => {rel="noopener noreferrer"><a- className="cursor-pointer underline transition-all hover:text-white"+ className="cursor-pointer underline transition-all hover:text-foreground"target="_blank">upgrade your subscriptiondiff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/GitHubSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/GitHubSyncDestinationSection.tsxindex 09e1a63810..bed63ad43a 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/GitHubSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/GitHubSyncDestinationSection.tsx@@ -43,7 +43,7 @@ export const GitHubSyncDestinationSection = ({ secretSync }: Props) => {{destinationConfig.selectedRepositoryIds?.length ?? 0} Repositories<Tooltip><TooltipTrigger asChild>- <InfoIcon className="ml-1 inline size-3 text-bunker-300" />+ <InfoIcon className="ml-1 inline size-3 text-label" /></TooltipTrigger><TooltipContent side="bottom"><GitHubSyncSelectedRepositoriesTooltipContent secretSync={secretSync} />diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDetailsSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDetailsSection.tsxindex a58d47b529..c57058cd38 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDetailsSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDetailsSection.tsx@@ -61,9 +61,9 @@ export const SecretSyncDetailsSection = ({ secretSync }: Props) => {)}{syncStatus === SecretSyncStatus.Failed && failureMessage && (<Detail>- <DetailLabel className="text-red">Last Sync Error</DetailLabel>+ <DetailLabel className="text-danger">Last Sync Error</DetailLabel><DetailValue>- <p className="rounded-sm bg-mineshaft-600 p-2 text-xs break-words">{failureMessage}</p>+ <p className="rounded-sm bg-ring p-2 text-xs break-words">{failureMessage}</p></DetailValue></Detail>)}