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
feat: re-vamp secret syncs ui
Scott Wilson6e8674ccfe6e
diff --git a/backend/src/db/seeds/6-app-connections.ts b/backend/src/db/seeds/6-app-connections.tsnew file mode 100644index 0000000000..075e29dc04--- /dev/null+++ b/backend/src/db/seeds/6-app-connections.ts@@ -0,0 +1,118 @@+import { Knex } from "knex";++import { inMemoryKeyStore } from "@app/keystore/memory";+import { initLogger } from "@app/lib/logger";+import { AppConnection } from "@app/services/app-connection/app-connection-enums";+import { APP_CONNECTION_NAME_MAP } from "@app/services/app-connection/app-connection-maps";+import { kmsRootConfigDALFactory } from "@app/services/kms/kms-root-config-dal";+import { KmsDataKey } from "@app/services/kms/kms-types";+import { SECRET_SYNC_CONNECTION_MAP } from "@app/services/secret-sync/secret-sync-maps";+import { superAdminDALFactory } from "@app/services/super-admin/super-admin-dal";++import { getMigrationEnvConfig, getMigrationHsmConfig } from "../migrations/utils/env-config";+import { getMigrationEncryptionServices, getMigrationHsmService } from "../migrations/utils/services";+import { TableName } from "../schemas";++// Default auth method per provider — mirrors the first/default value from each+// provider's *-connection-enums.ts. The DB stores `method` as a plain string,+// so no per-provider enum imports are needed.+const DEFAULT_METHOD_BY_APP: Partial<Record<AppConnection, string>> = {+ [AppConnection.AWS]: "access-key",+ [AppConnection.GitHub]: "github-app",+ [AppConnection.GCP]: "service-account-impersonation",+ [AppConnection.AzureKeyVault]: "client-secret",+ [AppConnection.AzureAppConfiguration]: "client-secret",+ [AppConnection.AzureDevOps]: "access-token",+ [AppConnection.Databricks]: "service-principal",+ [AppConnection.Humanitec]: "api-token",+ [AppConnection.TerraformCloud]: "api-token",+ [AppConnection.Camunda]: "client-credentials",+ [AppConnection.Vercel]: "api-token",+ [AppConnection.Windmill]: "access-token",+ [AppConnection.HCVault]: "access-token",+ [AppConnection.TeamCity]: "access-token",+ [AppConnection.OCI]: "access-key",+ [AppConnection.OnePass]: "api-token",+ [AppConnection.Heroku]: "auth-token",+ [AppConnection.Render]: "api-key",+ [AppConnection.Flyio]: "access-token",+ [AppConnection.GitLab]: "access-token",+ [AppConnection.Cloudflare]: "api-token",+ [AppConnection.Supabase]: "access-token",+ [AppConnection.Zabbix]: "api-token",+ [AppConnection.Railway]: "account-token",+ [AppConnection.Checkly]: "api-key",+ [AppConnection.DigitalOcean]: "api-token",+ [AppConnection.Netlify]: "access-token",+ [AppConnection.Northflank]: "api-token",+ [AppConnection.Bitbucket]: "api-token",+ [AppConnection.LaravelForge]: "api-token",+ [AppConnection.Chef]: "user-key",+ [AppConnection.OctopusDeploy]: "api-key",+ [AppConnection.CircleCI]: "api-token",+ [AppConnection.AzureEntraId]: "client-secret",+ [AppConnection.ExternalInfisical]: "machine-identity-universal-auth",+ [AppConnection.OVH]: "certificate",+ [AppConnection.Devin]: "api-key",+ [AppConnection.Ona]: "personal-access-token",+ [AppConnection.TravisCI]: "api-token",+ [AppConnection.Snowflake]: "username-and-token"+};++export async function seed(knex: Knex): Promise<void> {+ initLogger();++ // The KMS service uses db.replicaNode() for reads. The knex instance handed+ // to seeds doesn't have it patched on, so we add it inline (same pattern as+ // migrations that need read-side access, e.g. 20250513081738_remove-gateway-project-link.ts).+ // eslint-disable-next-line no-param-reassign+ knex.replicaNode = () => knex;++ const superAdminDAL = superAdminDALFactory(knex);+ const kmsRootConfigDAL = kmsRootConfigDALFactory(knex);++ const { hsmService } = await getMigrationHsmService({ envConfig: getMigrationHsmConfig() });+ const envConfig = await getMigrationEnvConfig(superAdminDAL, hsmService, kmsRootConfigDAL);+ const keyStore = inMemoryKeyStore();+ const { kmsService } = await getMigrationEncryptionServices({ envConfig, keyStore, db: knex });++ const orgId = "373ec1de-d16e-48d1-9261-2c4264aac691";++ await knex(TableName.AppConnection).where({ orgId }).whereILike("name", "Dummy %").del();++ // All 40 connections are org-scoped (projectId=null) so they share the same+ // KMS data key. Build the encryptor once instead of inside the loop.+ const { encryptor } = await kmsService.createCipherPairWithDataKey({ type: KmsDataKey.Organization, orgId });++ // Form flow only decrypts + JSON.parses at sync-create time (no Zod validation),+ // so an empty object is sufficient. Background sync jobs will fail — expected.+ const dummyCredentialsBlob = Buffer.from(JSON.stringify({}));++ // Stable, recognizable IDs of the form 00000000-0000-0000-0000-000000000001..N.+ // The dummy-stub Fastify hook detects requests against these IDs and returns canned+ // fixtures without hitting any external provider API.+ const dummyId = (n: number) => `00000000-0000-0000-0000-${n.toString().padStart(12, "0")}`;++ const uniqueApps = Array.from(new Set(Object.values(SECRET_SYNC_CONNECTION_MAP)));++ const rows = uniqueApps.map((app, idx) => {+ const method = DEFAULT_METHOD_BY_APP[app];+ if (!method) {+ throw new Error(`Missing default method for AppConnection "${app}" in 6-app-connections seed`);+ }++ const { cipherTextBlob: encryptedCredentials } = encryptor({ plainText: dummyCredentialsBlob });++ return {+ id: dummyId(idx + 1),+ name: `Dummy ${APP_CONNECTION_NAME_MAP[app]}`,+ app,+ method,+ encryptedCredentials,+ orgId,+ version: 1+ };+ });++ await knex(TableName.AppConnection).insert(rows);+}diff --git a/backend/src/server/routes/v1/app-connection-routers/app-connection-dummy-stub.ts b/backend/src/server/routes/v1/app-connection-routers/app-connection-dummy-stub.tsnew file mode 100644index 0000000000..a94828285c--- /dev/null+++ b/backend/src/server/routes/v1/app-connection-routers/app-connection-dummy-stub.ts@@ -0,0 +1,541 @@+// Stub layer for seeded "dummy" app connections used by the secret-sync form-flow+// test seed (backend/src/db/seeds/6-app-connections.ts).+//+// The seed inserts one app connection per provider with an ID of the form+// 00000000-0000-0000-0000-000000000NNN. This Fastify preHandler hook recognises+// requests against those IDs and short-circuits the provider-specific list-resource+// endpoints (e.g. GET /:connectionId/repositories) with canned fixtures, so the+// secret-sync destination-config dropdowns populate without any real provider API call.+//+// Real (non-dummy) connections pass through untouched.++export const DUMMY_CONNECTION_ID_PREFIX = "00000000-0000-0000-0000-";++const isDummyConnectionId = (id: string): boolean => id.startsWith(DUMMY_CONNECTION_ID_PREFIX);++// Fixtures keyed by URL prefix (the AppConnection enum's string value, e.g. "github", "aws")+// then by route pattern relative to /:connectionId/. Patterns may include `:param`+// placeholders, which match any non-slash segment when looking up.+//+// Response shapes mirror each provider's route response schema in+// backend/src/server/routes/v1/app-connection-routers/<provider>-connection-router.ts.+// If a provider router's schema is updated, the corresponding fixture needs an update too.+const STUB_FIXTURES: Record<string, Record<string, unknown>> = {+ aws: {+ "kms-keys": {+ kmsKeys: [+ { alias: "alias/dummy-key-1", id: "dummy-aws-kms-key-1" },+ { alias: "alias/dummy-key-2", id: "dummy-aws-kms-key-2" }+ ]+ },+ users: {+ iamUsers: [+ { UserName: "dummy-user-1", Arn: "arn:aws:iam::123456789012:user/dummy-user-1" },+ { UserName: "dummy-user-2", Arn: "arn:aws:iam::123456789012:user/dummy-user-2" }+ ]+ }+ },++ github: {+ repositories: {+ repositories: [+ { id: 1, name: "dummy-repo-1", owner: { login: "dummy-owner", id: 1 } },+ { id: 2, name: "dummy-repo-2", owner: { login: "dummy-owner", id: 1 } }+ ]+ },+ organizations: {+ organizations: [+ { id: 1, login: "dummy-org-1" },+ { id: 2, login: "dummy-org-2" }+ ]+ },+ environments: {+ environments: [+ { id: 1, name: "production" },+ { id: 2, name: "staging" }+ ]+ }+ },++ gcp: {+ "secret-manager-projects": [+ { id: "dummy-gcp-project-1", name: "Dummy GCP Project 1" },+ { id: "dummy-gcp-project-2", name: "Dummy GCP Project 2" }+ ],+ "secret-manager-project-locations": [+ { displayName: "us-central1 (Iowa)", locationId: "us-central1" },+ { displayName: "us-east1 (South Carolina)", locationId: "us-east1" }+ ]+ },++ "azure-devops": {+ projects: {+ projects: [+ { name: "Dummy Azure DevOps Project 1", id: "dummy-azdo-project-1", appId: "dummy-app-1" },+ { name: "Dummy Azure DevOps Project 2", id: "dummy-azdo-project-2", appId: "dummy-app-2" }+ ]+ }+ },++ "azure-entra-id": {+ "scim-service-principals": {+ servicePrincipals: [+ { id: "dummy-sp-1", displayName: "Dummy Service Principal 1", appId: "dummy-app-1" },+ { id: "dummy-sp-2", displayName: "Dummy Service Principal 2", appId: "dummy-app-2" }+ ]+ }+ },++ databricks: {+ "secret-scopes": {+ secretScopes: [{ name: "dummy-scope-1" }, { name: "dummy-scope-2" }]+ },+ "service-principals": {+ servicePrincipals: [+ { id: "dummy-sp-1", name: "Dummy SP 1", clientId: "dummy-client-1" },+ { id: "dummy-sp-2", name: "Dummy SP 2", clientId: "dummy-client-2" }+ ]+ }+ },++ humanitec: {+ organizations: [+ {+ id: "dummy-humanitec-org",+ name: "Dummy Humanitec Org",+ apps: [+ {+ id: "dummy-app-1",+ name: "Dummy App 1",+ envs: [+ { id: "dev", name: "Development" },+ { id: "prod", name: "Production" }+ ]+ }+ ]+ }+ ]+ },++ "terraform-cloud": {+ organizations: [+ {+ id: "dummy-tfc-org",+ name: "dummy-tfc-org",+ variableSets: [{ id: "dummy-varset-1", name: "Dummy Variable Set 1", description: "Stub", global: false }],+ workspaces: [+ { id: "dummy-workspace-1", name: "dummy-workspace-1" },+ { id: "dummy-workspace-2", name: "dummy-workspace-2" }+ ]+ }+ ]+ },++ camunda: {+ clusters: {+ clusters: [+ { uuid: "dummy-camunda-cluster-1", name: "Dummy Cluster 1" },+ { uuid: "dummy-camunda-cluster-2", name: "Dummy Cluster 2" }+ ]+ }+ },++ vercel: {+ projects: [+ {+ id: "dummy-vercel-project-1",+ name: "Dummy Vercel Project 1",+ slug: "dummy-vercel-project-1",+ apps: [+ {+ id: "dummy-app-1",+ name: "dummy-app-1",+ envs: [+ {+ id: "dummy-env-1",+ slug: "production",+ type: "production",+ target: ["production"],+ description: "Production env",+ createdAt: 1700000000000,+ updatedAt: 1700000000000+ }+ ],+ previewBranches: ["main", "staging"]+ }+ ]+ }+ ]+ },++ windmill: {+ workspaces: [+ { id: "dummy-workspace-1", name: "Dummy Workspace 1" },+ { id: "dummy-workspace-2", name: "Dummy Workspace 2" }+ ]+ },++ "hashicorp-vault": {+ mounts: ["dummy-mount-1/", "dummy-mount-2/"]+ },++ teamcity: {+ projects: [+ {+ id: "dummy-tc-project-1",+ name: "Dummy TeamCity Project 1",+ buildTypes: {+ buildType: [+ { id: "dummy-bt-1", name: "Dummy Build Type 1" },+ { id: "dummy-bt-2", name: "Dummy Build Type 2" }+ ]+ }+ }+ ]+ },++ oci: {+ compartments: [+ { id: "ocid1.compartment.oc1..dummy1", name: "Dummy Compartment 1" },+ { id: "ocid1.compartment.oc1..dummy2", name: "Dummy Compartment 2" }+ ],+ vaults: [+ { id: "ocid1.vault.oc1..dummy1", displayName: "Dummy Vault 1" },+ { id: "ocid1.vault.oc1..dummy2", displayName: "Dummy Vault 2" }+ ],+ "vault-keys": [+ { id: "ocid1.key.oc1..dummy1", displayName: "Dummy Key 1" },+ { id: "ocid1.key.oc1..dummy2", displayName: "Dummy Key 2" }+ ]+ },++ "1password": {+ vaults: [+ {+ id: "dummy-1p-vault-1",+ name: "Dummy 1P Vault 1",+ type: "USER_CREATED",+ items: 5,+ attributeVersion: 1,+ contentVersion: 1,+ createdAt: "2024-01-01T00:00:00Z",+ updatedAt: "2024-01-01T00:00:00Z"+ },+ {+ id: "dummy-1p-vault-2",+ name: "Dummy 1P Vault 2",+ type: "USER_CREATED",+ items: 3,+ attributeVersion: 1,+ contentVersion: 1,+ createdAt: "2024-01-01T00:00:00Z",+ updatedAt: "2024-01-01T00:00:00Z"+ }+ ]+ },++ heroku: {+ apps: [+ { id: "dummy-heroku-app-1", name: "dummy-heroku-app-1" },+ { id: "dummy-heroku-app-2", name: "dummy-heroku-app-2" }+ ]+ },++ render: {+ services: [+ { id: "dummy-render-svc-1", name: "Dummy Render Service 1" },+ { id: "dummy-render-svc-2", name: "Dummy Render Service 2" }+ ],+ "environment-groups": [+ { id: "dummy-render-envgroup-1", name: "Dummy Env Group 1" },+ { id: "dummy-render-envgroup-2", name: "Dummy Env Group 2" }+ ]+ },++ flyio: {+ apps: [+ { id: "dummy-flyio-app-1", name: "dummy-flyio-app-1" },+ { id: "dummy-flyio-app-2", name: "dummy-flyio-app-2" }+ ]+ },++ gitlab: {+ projects: [+ { id: "1001", name: "Dummy GitLab Project 1" },+ { id: "1002", name: "Dummy GitLab Project 2" }+ ],+ groups: [+ { id: "2001", fullName: "dummy-group-1" },+ { id: "2002", fullName: "dummy-group-2" }+ ]+ },++ cloudflare: {+ "cloudflare-pages-projects": [+ { id: "dummy-cf-pages-1", name: "Dummy Pages Project 1" },+ { id: "dummy-cf-pages-2", name: "Dummy Pages Project 2" }+ ],+ "cloudflare-workers-scripts": [{ id: "dummy-cf-worker-1" }, { id: "dummy-cf-worker-2" }],+ "cloudflare-zones": [+ { id: "dummy-cf-zone-1", name: "dummy-zone-1.example.com" },+ { id: "dummy-cf-zone-2", name: "dummy-zone-2.example.com" }+ ]+ },++ supabase: {+ projects: {+ projects: [+ { name: "Dummy Supabase Project 1", id: "dummy-sb-project-1" },+ { name: "Dummy Supabase Project 2", id: "dummy-sb-project-2" }+ ]+ }+ },++ zabbix: {+ hosts: [+ { hostId: "10001", host: "dummy-zabbix-host-1" },+ { hostId: "10002", host: "dummy-zabbix-host-2" }+ ]+ },++ railway: {+ projects: {+ projects: [+ {+ name: "Dummy Railway Project 1",+ id: "dummy-rw-project-1",+ services: [+ { name: "dummy-service-1", id: "dummy-rw-svc-1" },+ { name: "dummy-service-2", id: "dummy-rw-svc-2" }+ ],+ environments: [+ { name: "production", id: "dummy-rw-env-prod" },+ { name: "staging", id: "dummy-rw-env-staging" }+ ]+ }+ ]+ }+ },++ checkly: {+ accounts: {+ accounts: [+ { name: "Dummy Checkly Account 1", id: "dummy-checkly-acc-1", runtimeId: "2024.02" },+ { name: "Dummy Checkly Account 2", id: "dummy-checkly-acc-2", runtimeId: "2024.02" }+ ]+ },+ "accounts/:accountId/groups": {+ groups: [+ { name: "Dummy Group 1", id: "dummy-checkly-group-1" },+ { name: "Dummy Group 2", id: "dummy-checkly-group-2" }+ ]+ }+ },++ "digital-ocean": {+ apps: {+ apps: [+ { id: "dummy-do-app-1", spec: { name: "Dummy DO App 1" } },+ { id: "dummy-do-app-2", spec: { name: "Dummy DO App 2" } }+ ]+ }+ },++ netlify: {+ accounts: {+ accounts: [+ { name: "Dummy Netlify Account 1", id: "dummy-netlify-acc-1" },+ { name: "Dummy Netlify Account 2", id: "dummy-netlify-acc-2" }+ ]+ },+ "accounts/:accountId/sites": {+ sites: [+ { name: "dummy-netlify-site-1", id: "dummy-netlify-site-1" },+ { name: "dummy-netlify-site-2", id: "dummy-netlify-site-2" }+ ]+ }+ },++ northflank: {+ projects: {+ projects: [+ { name: "Dummy Northflank Project 1", id: "dummy-nf-project-1" },+ { name: "Dummy Northflank Project 2", id: "dummy-nf-project-2" }+ ]+ },+ "projects/:projectId/secret-groups": {+ secretGroups: [+ { name: "dummy-secret-group-1", id: "dummy-nf-sg-1" },+ { name: "dummy-secret-group-2", id: "dummy-nf-sg-2" }+ ]+ }+ },++ bitbucket: {+ workspaces: {+ workspaces: [{ slug: "dummy-bb-workspace-1" }, { slug: "dummy-bb-workspace-2" }]+ },+ repositories: {+ repositories: [+ { slug: "dummy-bb-repo-1", full_name: "dummy-bb-workspace-1/dummy-bb-repo-1", uuid: "{dummy-bb-uuid-1}" },+ { slug: "dummy-bb-repo-2", full_name: "dummy-bb-workspace-1/dummy-bb-repo-2", uuid: "{dummy-bb-uuid-2}" }+ ]+ },+ environments: {+ environments: [+ { slug: "production", name: "Production", uuid: "{dummy-bb-env-prod}" },+ { slug: "staging", name: "Staging", uuid: "{dummy-bb-env-staging}" }+ ]+ }+ },++ "laravel-forge": {+ organizations: [+ { id: "1", name: "Dummy Forge Org 1", slug: "dummy-forge-org-1" },+ { id: "2", name: "Dummy Forge Org 2", slug: "dummy-forge-org-2" }+ ],+ servers: [+ { id: "101", name: "dummy-forge-server-1" },+ { id: "102", name: "dummy-forge-server-2" }+ ],+ sites: [+ { id: "1001", name: "dummy-forge-site-1.example.com" },+ { id: "1002", name: "dummy-forge-site-2.example.com" }+ ]+ },++ chef: {+ "data-bags": [{ name: "dummy-data-bag-1" }, { name: "dummy-data-bag-2" }],+ "data-bag-items": [{ name: "dummy-item-1" }, { name: "dummy-item-2" }]+ },++ "octopus-deploy": {+ spaces: [+ { id: "Spaces-1", name: "Default Space", slug: "default", isDefault: true },+ { id: "Spaces-2", name: "Secondary Space", slug: "secondary", isDefault: false }+ ],+ projects: [+ { id: "Projects-1", name: "Dummy Octopus Project 1", slug: "dummy-octopus-project-1" },+ { id: "Projects-2", name: "Dummy Octopus Project 2", slug: "dummy-octopus-project-2" }+ ],+ "scope-values": {+ environments: [+ { id: "Environments-1", name: "Production" },+ { id: "Environments-2", name: "Staging" }+ ],+ roles: [{ id: "Roles-1", name: "web-server" }],+ machines: [{ id: "Machines-1", name: "dummy-machine-1" }],+ processes: [{ id: "Processes-1", name: "dummy-process-1" }],+ actions: [{ id: "Actions-1", name: "Deploy Web App" }],+ channels: [{ id: "Channels-1", name: "default" }]+ }+ },++ circleci: {+ projects: {+ organizations: [+ {+ name: "dummy-circleci-org",+ projects: [+ { name: "dummy-circleci-project-1", id: "dummy-cci-project-1" },+ { name: "dummy-circleci-project-2", id: "dummy-cci-project-2" }+ ]+ }+ ]+ }+ },++ "external-infisical": {+ projects: {+ projects: [+ {+ id: "dummy-extinf-project-1",+ name: "Dummy External Infisical Project 1",+ slug: "dummy-extinf-project-1",+ environments: [+ { id: "dummy-extinf-env-dev", name: "Development", slug: "dev" },+ { id: "dummy-extinf-env-prod", name: "Production", slug: "prod" }+ ]+ }+ ]+ },+ "projects/:projectId/environment-folder-tree": {+ dev: {+ id: "dummy-extinf-env-dev",+ name: "Development",+ slug: "dev",+ folders: [{ id: "dummy-folder-1", name: "Root", path: "/" }]+ },+ prod: {+ id: "dummy-extinf-env-prod",+ name: "Production",+ slug: "prod",+ folders: [{ id: "dummy-folder-2", name: "Root", path: "/" }]+ }+ }+ },++ ona: {+ projects: [+ { id: "dummy-ona-project-1", name: "Dummy Ona Project 1" },+ { id: "dummy-ona-project-2", name: "Dummy Ona Project 2" }+ ]+ },++ "travis-ci": {+ repositories: [+ { id: "100001", name: "dummy-repo-1", slug: "dummy-owner/dummy-repo-1" },+ { id: "100002", name: "dummy-repo-2", slug: "dummy-owner/dummy-repo-2" }+ ],+ branches: [+ { name: "main", isDefault: true },+ { name: "staging", isDefault: false }+ ]+ },++ snowflake: {+ databases: { databases: [{ name: "DUMMY_DB_1" }, { name: "DUMMY_DB_2" }] },+ schemas: { schemas: [{ name: "PUBLIC" }, { name: "ANALYTICS" }] }+ }+};++const matchStubRoute = (app: string, resourcePath: string): unknown => {+ const routes = STUB_FIXTURES[app];+ if (!routes) return undefined;++ if (resourcePath in routes) return routes[resourcePath];++ const dynamicEntry = Object.entries(routes).find(([pattern]) => {+ if (!pattern.includes(":")) return false;+ return new RegExp(`^${pattern.replace(/:[^/]+/g, "[^/]+")}$`).test(resourcePath);+ });++ return dynamicEntry?.[1];+};++const APP_CONNECTION_URL_RE = /^\/api\/v1\/app-connections\/([^/]+)\/([^/?]+)\/(.+?)\/?$/;++type FastifyServerLike = {+ addHook: (+ name: "preHandler",+ fn: (req: { url: string; method: string }, reply: { send: (body: unknown) => unknown }) => unknown+ ) => unknown;+};++export const registerDummyConnectionStubHook = (server: FastifyServerLike) => {+ server.addHook("preHandler", async (req, reply) => {+ if (req.method !== "GET") return;++ const path = req.url.split("?")[0];+ const match = path.match(APP_CONNECTION_URL_RE);+ if (!match) return;++ const [, app, connectionId, resourcePath] = match;+ if (!isDummyConnectionId(connectionId)) return;++ const stub = matchStubRoute(app, resourcePath);+ if (stub === undefined) return;++ return reply.send(stub);+ });+};diff --git a/backend/src/server/routes/v1/index.ts b/backend/src/server/routes/v1/index.tsindex f6e6a1eb56..385fa879d3 100644--- a/backend/src/server/routes/v1/index.ts+++ b/backend/src/server/routes/v1/index.ts@@ -4,6 +4,7 @@ import {APP_CONNECTION_REGISTER_ROUTER_MAP,registerAppConnectionRouter} from "@app/server/routes/v1/app-connection-routers";+import { registerDummyConnectionStubHook } from "@app/server/routes/v1/app-connection-routers/app-connection-dummy-stub";import { registerCmekRouter } from "@app/server/routes/v1/cmek-router";import { registerDashboardRouter } from "@app/server/routes/v1/dashboard-router";import { registerSecretSyncRouter, SECRET_SYNC_REGISTER_ROUTER_MAP } from "@app/server/routes/v1/secret-sync-routers";@@ -316,6 +317,11 @@ export const registerV1Routes = async (server: FastifyZodProvider) => {await server.register(async (appConnectionRouter) => {+ // Short-circuit list-resource calls against seeded "Dummy" connections+ // (id prefix 00000000-0000-0000-0000-) with canned fixtures so the+ // secret-sync destination-config dropdowns work without real provider credentials.+ registerDummyConnectionStubHook(appConnectionRouter);+// register generic app connection endpointsawait appConnectionRouter.register(registerAppConnectionRouter);diff --git a/frontend/src/components/app-connections/AppConnectionOption.tsx b/frontend/src/components/app-connections/AppConnectionOption.tsxindex 8dd3c86214..bdd45a62c1 100644--- a/frontend/src/components/app-connections/AppConnectionOption.tsx+++ b/frontend/src/components/app-connections/AppConnectionOption.tsx@@ -1,7 +1,7 @@import { components, OptionProps } from "react-select";-import { faCheckCircle } from "@fortawesome/free-regular-svg-icons";import { faPlus } from "@fortawesome/free-solid-svg-icons";import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";+import { CheckIcon } from "lucide-react";import { Tooltip } from "@app/components/v2";import { Badge, OrgIcon, SubOrgIcon } from "@app/components/v3";@@ -14,6 +14,7 @@ export const AppConnectionOption = ({...props}: OptionProps<TAvailableAppConnection>) => {const isCreateOption = props.data.id === "_create";+ const isOnlyOption = isCreateOption && props.selectProps.options.length === 1;const { isSubOrganization } = useOrganization();@@ -21,7 +22,9 @@ export const AppConnectionOption = ({<components.Option isSelected={isSelected} {...props}><div className="flex flex-row items-center justify-between">{isCreateOption ? (- <div className="flex items-center gap-x-1 text-mineshaft-200">+ <div+ className={`flex items-center gap-x-1 ${isOnlyOption ? "text-foreground" : "text-accent"}`}+ ><FontAwesomeIcon icon={faPlus} size="sm" /><span className="mr-auto">Create New Connection</span></div>@@ -45,9 +48,7 @@ export const AppConnectionOption = ({)}</Tooltip>)}- {isSelected && (- <FontAwesomeIcon className="ml-2 text-primary" icon={faCheckCircle} size="sm" />- )}+ {isSelected && <CheckIcon className="ml-2 size-4" />}</>)}</div>diff --git a/frontend/src/components/secret-syncs/CreateSecretSyncModal.tsx b/frontend/src/components/secret-syncs/CreateSecretSyncModal.tsxindex 1ea95d613a..9ce854deda 100644--- a/frontend/src/components/secret-syncs/CreateSecretSyncModal.tsx+++ b/frontend/src/components/secret-syncs/CreateSecretSyncModal.tsx@@ -1,7 +1,23 @@import { useEffect, useState } from "react";+import { AlertTriangleIcon } from "lucide-react";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";-import { Modal, ModalContent } from "@app/components/v2";+import {+ AlertDialog,+ AlertDialogAction,+ AlertDialogCancel,+ AlertDialogContent,+ AlertDialogDescription,+ AlertDialogFooter,+ AlertDialogHeader,+ AlertDialogMedia,+ AlertDialogTitle,+ Sheet,+ SheetContent,+ SheetDescription,+ SheetHeader,+ SheetTitle+} from "@app/components/v3";import { SecretSync, TSecretSync } from "@app/hooks/api/secretSyncs";import { CreateSecretSyncForm } from "./forms";@@ -37,48 +53,107 @@ const Content = ({ onComplete, setSelectedSync, selectedSync, initialFormData }:return <SecretSyncSelect onSelect={setSelectedSync} />;};+// DEV: auto-open the sync modal with AWS Parameter Store pre-selected so the+// form is mounted on every reload. Remove before shipping.+// const DEV_AUTO_OPEN = import.meta.env.DEV;+export const CreateSecretSyncModal = ({+ isOpen,onOpenChange,selectSync = null,- initialFormData,- ...props+ initialFormData}: Props) => {const [selectedSync, setSelectedSync] = useState<SecretSync | null>(selectSync);+ // const [selectedSync, setSelectedSync] = useState<SecretSync | null>(+ // selectSync ?? (DEV_AUTO_OPEN ? SecretSync.AWSParameterStore : null)+ // );+ const [confirmDiscardOpen, setConfirmDiscardOpen] = useState(false);useEffect(() => {setSelectedSync(selectSync);+ // setSelectedSync(selectSync ?? (DEV_AUTO_OPEN ? SecretSync.AWSParameterStore : null));}, [selectSync]);+ // useEffect(() => {+ // if (DEV_AUTO_OPEN && !isOpen) onOpenChange(true);+ // // eslint-disable-next-line react-hooks/exhaustive-deps+ // }, []);++ const closeSheet = () => {+ setSelectedSync(null);+ onOpenChange(false);+ };++ const handleSheetOpenChange = (nextOpen: boolean) => {+ if (!nextOpen && selectedSync) {+ // User has started filling out the form — confirm before discarding.+ setConfirmDiscardOpen(true);+ return;+ }+ if (!nextOpen) setSelectedSync(null);+ onOpenChange(nextOpen);+ };+return (- <Modal- {...props}- onOpenChange={(isOpen) => {- if (!isOpen) setSelectedSync(null);- onOpenChange(isOpen);- }}- >- <ModalContent- title={- selectedSync ? (- <SecretSyncModalHeader isConfigured={false} destination={selectedSync} />+ <>+ <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 ? (+ <SecretSyncModalHeader isConfigured={false} destination={selectedSync} />+ ) : (+ "Choose a destination"+ )}+ </SheetTitle>+ {!selectedSync && (+ <SheetDescription>+ Where should Infisical write these secrets? You can change this later only by+ creating a new sync.+ </SheetDescription>+ )}+ </SheetHeader>+ {selectedSync ? (+ <div className="flex min-h-0 flex-1 flex-col">+ <Content+ onComplete={closeSheet}+ selectedSync={selectedSync}+ setSelectedSync={setSelectedSync}+ initialFormData={initialFormData}+ />+ </div>) : (- "Add Sync"- )- }- className="max-w-2xl"- bodyClassName={selectedSync ? "overflow-visible" : undefined}- subTitle={selectedSync ? undefined : "Select a third-party service to sync secrets to."}- >- <Content- onComplete={() => {- setSelectedSync(null);- onOpenChange(false);- }}- selectedSync={selectedSync}- setSelectedSync={setSelectedSync}- initialFormData={initialFormData}- />- </ModalContent>- </Modal>+ <div className="flex min-h-0 flex-1 flex-col overflow-y-auto p-4">+ <Content+ onComplete={closeSheet}+ selectedSync={selectedSync}+ setSelectedSync={setSelectedSync}+ initialFormData={initialFormData}+ />+ </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>+ </>);};diff --git a/frontend/src/components/secret-syncs/DeleteSecretSyncModal.tsx b/frontend/src/components/secret-syncs/DeleteSecretSyncModal.tsxindex 5a07b8ca93..49a407f928 100644--- a/frontend/src/components/secret-syncs/DeleteSecretSyncModal.tsx+++ b/frontend/src/components/secret-syncs/DeleteSecretSyncModal.tsx@@ -1,7 +1,25 @@-import { useState } from "react";+import { useEffect, useState } from "react";+import { Trash2Icon } from "lucide-react";import { createNotification } from "@app/components/notifications";-import { DeleteActionModal, Switch } from "@app/components/v2";+import {+ AlertDialog,+ AlertDialogAction,+ AlertDialogCancel,+ AlertDialogContent,+ AlertDialogDescription,+ AlertDialogFooter,+ AlertDialogHeader,+ AlertDialogMedia,+ AlertDialogTitle,+ Field,+ FieldContent,+ FieldDescription,+ FieldLabel,+ FieldTitle,+ Input,+ Switch+} from "@app/components/v3";import { SECRET_SYNC_MAP } from "@app/helpers/secretSyncs";import { TSecretSync, useDeleteSecretSync, useSecretSyncOption } from "@app/hooks/api/secretSyncs";@@ -15,14 +33,22 @@ 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]);+if (!secretSync) return null;const { id: syncId, name, destination, projectId } = secretSync;+ const destinationName = SECRET_SYNC_MAP[destination].name;+ const isConfirmed = inputData === name;const handleDeleteSecretSync = async () => {- const destinationName = SECRET_SYNC_MAP[destination].name;+ if (!isConfirmed) return;await deleteSync.mutateAsync({syncId,@@ -36,30 +62,67 @@ export const DeleteSecretSyncModal = ({ isOpen, onOpenChange, secretSync, onComptype: "success"});- if (onComplete) onComplete();+ onComplete?.();onOpenChange(false);};return (- <DeleteActionModal- isOpen={isOpen}- onChange={onOpenChange}- title={`Are you sure you want to delete ${name}?`}- deleteKey={name}- onDeleteApproved={handleDeleteSecretSync}- >- {syncOption?.canRemoveSecretsOnDeletion && (- <Switch- containerClassName="mt-4"- className="bg-mineshaft-400/50 shadow-inner data-[state=checked]:bg-red/50"- thumbClassName="bg-mineshaft-800"- isChecked={removeSecrets}- onCheckedChange={setRemoveSecrets}- id="remove-secrets"+ <AlertDialog open={isOpen} onOpenChange={onOpenChange}>+ <AlertDialogContent>+ <AlertDialogHeader>+ <AlertDialogMedia>+ <Trash2Icon />+ </AlertDialogMedia>+ <AlertDialogTitle>Are you sure you want to delete {name}?</AlertDialogTitle>+ <AlertDialogDescription>This action is irreversible.</AlertDialogDescription>+ </AlertDialogHeader>+ <form+ onSubmit={(e) => {+ e.preventDefault();+ handleDeleteSecretSync();+ }}>- Remove Synced Secrets- </Switch>- )}- </DeleteActionModal>+ <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>+ <FieldTitle>Remove Synced Secrets</FieldTitle>+ <FieldDescription>+ Also delete the secrets synced to {destinationName}. This cannot be undone.+ </FieldDescription>+ </FieldContent>+ <Switch+ id="remove-secrets"+ variant="danger"+ checked={removeSecrets}+ onCheckedChange={setRemoveSecrets}+ />+ </Field>+ )}+ <AlertDialogFooter>+ <AlertDialogCancel>Cancel</AlertDialogCancel>+ <AlertDialogAction+ variant="danger"+ onClick={handleDeleteSecretSync}+ disabled={!isConfirmed}+ >+ Delete+ </AlertDialogAction>+ </AlertDialogFooter>+ </AlertDialogContent>+ </AlertDialog>);};diff --git a/frontend/src/components/secret-syncs/EditSecretSyncModal.tsx b/frontend/src/components/secret-syncs/EditSecretSyncModal.tsxindex c7d0661d31..9b46f98718 100644--- a/frontend/src/components/secret-syncs/EditSecretSyncModal.tsx+++ b/frontend/src/components/secret-syncs/EditSecretSyncModal.tsx@@ -1,5 +1,4 @@-import { SecretSyncEditFields } from "@app/components/secret-syncs/types";-import { Modal, ModalContent } from "@app/components/v2";+import { Sheet, SheetContent, SheetHeader, SheetTitle } from "@app/components/v3";import { TSecretSync } from "@app/hooks/api/secretSyncs";import { EditSecretSyncForm } from "./forms";@@ -9,25 +8,23 @@ type Props = {isOpen: boolean;onOpenChange: (isOpen: boolean) => void;secretSync?: TSecretSync;- fields: SecretSyncEditFields;};-export const EditSecretSyncModal = ({ secretSync, onOpenChange, fields, ...props }: Props) => {+export const EditSecretSyncModal = ({ isOpen, secretSync, onOpenChange }: Props) => {if (!secretSync) return null;return (- <Modal {...props} onOpenChange={onOpenChange}>- <ModalContent- title={<SecretSyncModalHeader isConfigured destination={secretSync.destination} />}- className="max-w-2xl"- bodyClassName="overflow-visible"- >- <EditSecretSyncForm- onComplete={() => onOpenChange(false)}- fields={fields}- secretSync={secretSync}- />- </ModalContent>- </Modal>+ <Sheet open={isOpen} onOpenChange={onOpenChange}>+ <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} />+ </SheetTitle>+ </SheetHeader>+ <div className="flex min-h-0 flex-1 flex-col">+ <EditSecretSyncForm secretSync={secretSync} onComplete={() => onOpenChange(false)} />+ </div>+ </SheetContent>+ </Sheet>);};diff --git a/frontend/src/components/secret-syncs/SecretSyncImportSecretsModal.tsx b/frontend/src/components/secret-syncs/SecretSyncImportSecretsModal.tsxindex 656faffeb7..ca5deb8584 100644--- a/frontend/src/components/secret-syncs/SecretSyncImportSecretsModal.tsx+++ b/frontend/src/components/secret-syncs/SecretSyncImportSecretsModal.tsx@@ -5,13 +5,23 @@ import { z } from "zod";import { createNotification } from "@app/components/notifications";import {Button,- FormControl,- Modal,- ModalClose,- ModalContent,+ Dialog,+ DialogClose,+ DialogContent,+ DialogDescription,+ DialogFooter,+ DialogHeader,+ DialogTitle,+ Field,+ FieldContent,+ FieldError,+ FieldLabel,Select,- SelectItem-} from "@app/components/v2";+ SelectContent,+ SelectItem,+ SelectTrigger,+ SelectValue+} from "@app/components/v3";import { SECRET_SYNC_IMPORT_BEHAVIOR_MAP, SECRET_SYNC_MAP } from "@app/helpers/secretSyncs";import {SecretSyncImportBehavior,@@ -68,77 +78,50 @@ const Content = ({ secretSync, onComplete }: ContentProps) => {return (<form onSubmit={handleSubmit(handleTriggerImportSecrets)}>- <p className="mb-8 text-sm text-mineshaft-200">+ <p className="mb-6 text-sm text-accent">Are you sure you want to import secrets from this {destinationName} destination into- Infiscal?+ Infisical?</p><Controllername="importBehavior"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- tooltipClassName="max-w-lg py-3"- tooltipText={- <div className="flex flex-col gap-3">- <p>- Specify how Infisical should resolve importing secrets from {destinationName}. The- following options are available:- </p>- <ul className="flex list-disc flex-col gap-3 pl-4">- {Object.values(SECRET_SYNC_IMPORT_BEHAVIOR_MAP).map((details) => {+ <Field>+ <FieldLabel>Import Behavior</FieldLabel>+ <FieldContent>+ <Select value={value} onValueChange={onChange}>+ <SelectTrigger className="w-full" isError={Boolean(error)}>+ <SelectValue placeholder="Select an option..." />+ </SelectTrigger>+ <SelectContent position="popper" className="max-w-(--radix-select-trigger-width)">+ {Object.entries(SECRET_SYNC_IMPORT_BEHAVIOR_MAP).map(([key, details]) => {const { name, description } = details(destinationName);-return (- <li key={name}>- <p className="text-mineshaft-300">- <span className="font-medium text-bunker-200">{name}</span>: {description}- </p>- </li>+ <SelectItem value={key} key={key} description={description}>+ {name}+ </SelectItem>);})}- </ul>- </div>- }- errorText={error?.message}- isError={Boolean(error?.message)}- label="Import Behavior"- >- <Select- value={value}- onValueChange={(val) => onChange(val)}- className="w-full border border-mineshaft-500"- position="popper"- placeholder="Select an option..."- dropdownContainerClassName="max-w-none"- >- {Object.entries(SECRET_SYNC_IMPORT_BEHAVIOR_MAP).map(([key, details]) => {- const { name } = details(destinationName);-- return (- <SelectItem value={key} key={key}>- {name}- </SelectItem>- );- })}- </Select>- </FormControl>+ </SelectContent>+ </Select>+ <FieldError>{error?.message}</FieldError>+ </FieldContent>+ </Field>)}/>- <div className="mt-8 flex w-full items-center justify-between gap-2">- <ModalClose asChild>- <Button colorSchema="secondary" variant="plain">- Cancel- </Button>- </ModalClose>+ <DialogFooter className="mt-6">+ <DialogClose asChild>+ <Button variant="outline">Cancel</Button>+ </DialogClose><Buttontype="submit"+ variant="project"isDisabled={isSubmitting || !isDirty}- isLoading={isSubmitting}- colorSchema="secondary"+ isPending={isSubmitting}>Import Secrets</Button>- </div>+ </DialogFooter></form>);};@@ -149,13 +132,16 @@ export const SecretSyncImportSecretsModal = ({ isOpen, onOpenChange, secretSyncconst destinationName = SECRET_SYNC_MAP[secretSync.destination].name;return (- <Modal isOpen={isOpen} onOpenChange={onOpenChange}>- <ModalContent- title="Import Secrets"- subTitle={`Import secrets into Infisical from this ${destinationName} Sync destination.`}- >+ <Dialog open={isOpen} onOpenChange={onOpenChange}>+ <DialogContent className="max-w-xl">+ <DialogHeader>+ <DialogTitle>Import Secrets</DialogTitle>+ <DialogDescription>+ Import secrets into Infisical from this {destinationName} Sync destination.+ </DialogDescription>+ </DialogHeader><Content secretSync={secretSync} onComplete={() => onOpenChange(false)} />- </ModalContent>- </Modal>+ </DialogContent>+ </Dialog>);};diff --git a/frontend/src/components/secret-syncs/SecretSyncModalHeader.tsx b/frontend/src/components/secret-syncs/SecretSyncModalHeader.tsxindex 41cbbcf584..d96d86b7d9 100644--- a/frontend/src/components/secret-syncs/SecretSyncModalHeader.tsx+++ b/frontend/src/components/secret-syncs/SecretSyncModalHeader.tsx@@ -12,11 +12,13 @@ export const SecretSyncModalHeader = ({ destination, isConfigured }: Props) => {return (<div className="flex w-full items-start gap-2">- <img- alt={`${destinationDetails.name} logo`}- src={`/images/integrations/${destinationDetails.image}`}- className="h-12 w-12 rounded-md bg-bunker-500 object-contain p-2"- />+ <div className="flex h-10 w-10 items-center justify-center rounded-md bg-container">+ <img+ alt={`${destinationDetails.name} logo`}+ src={`/images/integrations/${destinationDetails.image}`}+ className="h-7 w-7 object-contain"+ />+ </div><div><div className="flex items-center gap-x-2 text-mineshaft-300">{destinationDetails.name} Syncdiff --git a/frontend/src/components/secret-syncs/SecretSyncRemoveSecretsModal.tsx b/frontend/src/components/secret-syncs/SecretSyncRemoveSecretsModal.tsxindex 9c9c0e6595..fdce421604 100644--- a/frontend/src/components/secret-syncs/SecretSyncRemoveSecretsModal.tsx+++ b/frontend/src/components/secret-syncs/SecretSyncRemoveSecretsModal.tsx@@ -1,5 +1,17 @@+import { EraserIcon } from "lucide-react";+import { createNotification } from "@app/components/notifications";-import { Button, Modal, ModalClose, ModalContent } from "@app/components/v2";+import {+ AlertDialog,+ AlertDialogAction,+ AlertDialogCancel,+ AlertDialogContent,+ AlertDialogDescription,+ AlertDialogFooter,+ AlertDialogHeader,+ AlertDialogMedia,+ AlertDialogTitle+} from "@app/components/v3";import { SECRET_SYNC_MAP } from "@app/helpers/secretSyncs";import { TSecretSync, useTriggerSecretSyncRemoveSecrets } from "@app/hooks/api/secretSyncs";@@ -9,19 +21,16 @@ type Props = {onOpenChange: (isOpen: boolean) => void;};-type ContentProps = {- secretSync: TSecretSync;- onComplete: () => void;-};+export const SecretSyncRemoveSecretsModal = ({ isOpen, onOpenChange, secretSync }: Props) => {+ const triggerRemoveSecrets = useTriggerSecretSyncRemoveSecrets();++ if (!secretSync) return null;-const Content = ({ secretSync, onComplete }: ContentProps) => {const { id: syncId, destination, projectId } = secretSync;const destinationName = SECRET_SYNC_MAP[destination].name;- const triggerSyncImport = useTriggerSecretSyncRemoveSecrets();-const handleTriggerRemoveSecrets = async () => {- await triggerSyncImport.mutateAsync({+ await triggerRemoveSecrets.mutateAsync({syncId,destination,projectId@@ -32,46 +41,32 @@ const Content = ({ secretSync, onComplete }: ContentProps) => {type: "success"});- onComplete();+ onOpenChange(false);};return (- <>- <p className="mb-8 text-sm text-mineshaft-200">- Are you sure you want to remove synced secrets from this {destinationName} destination?- </p>- <div className="mt-8 flex w-full items-center justify-between gap-2">- <ModalClose asChild>- <Button colorSchema="secondary" variant="plain">- Cancel- </Button>- </ModalClose>- <Button- isDisabled={triggerSyncImport.isPending}- isLoading={triggerSyncImport.isPending}- onClick={handleTriggerRemoveSecrets}- colorSchema="secondary"- >- Remove Secrets- </Button>- </div>- </>- );-};--export const SecretSyncRemoveSecretsModal = ({ isOpen, onOpenChange, secretSync }: Props) => {- if (!secretSync) return null;-- const destinationName = SECRET_SYNC_MAP[secretSync.destination].name;-- return (- <Modal isOpen={isOpen} onOpenChange={onOpenChange}>- <ModalContent- title="Remove Secrets"- subTitle={`Remove synced secrets from this ${destinationName} Sync destination.`}- >- <Content secretSync={secretSync} onComplete={() => onOpenChange(false)} />- </ModalContent>- </Modal>+ <AlertDialog open={isOpen} onOpenChange={onOpenChange}>+ <AlertDialogContent className="sm:max-w-xl!">+ <AlertDialogHeader>+ <AlertDialogMedia>+ <EraserIcon />+ </AlertDialogMedia>+ <AlertDialogTitle>Remove synced secrets?</AlertDialogTitle>+ <AlertDialogDescription>+ Are you sure you want to remove synced secrets from this {destinationName} destination?+ </AlertDialogDescription>+ </AlertDialogHeader>+ <AlertDialogFooter>+ <AlertDialogCancel>Cancel</AlertDialogCancel>+ <AlertDialogAction+ variant="danger"+ isDisabled={triggerRemoveSecrets.isPending}+ onClick={handleTriggerRemoveSecrets}+ >+ Remove Secrets+ </AlertDialogAction>+ </AlertDialogFooter>+ </AlertDialogContent>+ </AlertDialog>);};diff --git a/frontend/src/components/secret-syncs/SecretSyncSelect.tsx b/frontend/src/components/secret-syncs/SecretSyncSelect.tsxindex c1e3e0405e..ea3629a0d8 100644--- a/frontend/src/components/secret-syncs/SecretSyncSelect.tsx+++ b/frontend/src/components/secret-syncs/SecretSyncSelect.tsx@@ -1,11 +1,20 @@-import { useMemo } from "react";-import { faInfoCircle, faMagnifyingGlass, faSearch } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";+import { useMemo, useState } from "react";+import { Search } from "lucide-react";-import { EmptyState, Input, Pagination, Spinner, Tooltip } from "@app/components/v2";+import { Spinner } from "@app/components/v2";+import {+ Empty,+ EmptyDescription,+ EmptyHeader,+ EmptyMedia,+ EmptyTitle,+ InputGroup,+ InputGroupAddon,+ InputGroupInput+} from "@app/components/v3";import { useSubscription } from "@app/context";-import { SECRET_SYNC_MAP } from "@app/helpers/secretSyncs";-import { usePagination, usePopUp, useResetPageHelper } from "@app/hooks";+import { POPULAR_SECRET_SYNCS, SECRET_SYNC_MAP } from "@app/helpers/secretSyncs";+import { usePopUp } from "@app/hooks";import { SecretSync, useSecretSyncOptions } from "@app/hooks/api/secretSyncs";import { UpgradePlanModal } from "../license/UpgradePlanModal";@@ -14,39 +23,105 @@ type Props = {onSelect: (destination: SecretSync) => void;};+type SyncOption = {+ destination: SecretSync;+ enterprise?: boolean;+};++const ProviderCard = ({+ destination,+ onClick+}: {+ destination: SecretSync;+ onClick: () => void;+}) => {+ const { name, image, category, description } = SECRET_SYNC_MAP[destination];++ return (+ <button+ type="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"+ >+ <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">+ <img+ src={`/images/integrations/${image}`}+ alt={`${name} logo`}+ className="h-6 w-6 object-contain"+ />+ </div>+ <span className="text-[10px] font-medium tracking-wider text-muted uppercase">+ {category}+ </span>+ </div>+ <div className="flex flex-col gap-1">+ <p className="text-sm font-semibold text-foreground">{name}</p>+ <p className="text-xs leading-relaxed text-muted">{description}</p>+ </div>+ </button>+ );+};++const SectionLabel = ({ children }: { children: React.ReactNode }) => (+ <p className="mb-3 text-[11px] font-medium tracking-wider text-muted uppercase">{children}</p>+);+export const SecretSyncSelect = ({ onSelect }: Props) => {const { subscription } = useSubscription();const { isPending, data: secretSyncOptions } = useSecretSyncOptions();-const { popUp, handlePopUpOpen, handlePopUpToggle } = usePopUp(["upgradePlan"] as const);+ const [search, setSearch] = useState("");- const { search, setSearch, setPage, page, perPage, setPerPage, offset } = usePagination("", {- initPerPage: 16- });+ const handleSelect = (option: SyncOption) => {+ if (option.enterprise && !subscription.enterpriseSecretSyncs) {+ handlePopUpOpen("upgradePlan", {+ isEnterpriseFeature: true,+ text: "All Secret Syncs can be unlocked if you switch to Infisical Enterprise plan."+ });+ return;+ }+ onSelect(option.destination);+ };++ const optionsByDestination = useMemo(() => {+ const map = new Map<SecretSync, SyncOption>();+ secretSyncOptions?.forEach((option) => map.set(option.destination, option));+ return map;+ }, [secretSyncOptions]);const filteredOptions = useMemo(() => {- const searchLower = search.trim().toLowerCase();+ const query = search.trim().toLowerCase();+ if (!query) return secretSyncOptions ?? [];+return (- secretSyncOptions?.filter(({ name, destination }) => {- const aliases = SECRET_SYNC_MAP[destination]?.aliases ?? [];+ secretSyncOptions?.filter(({ destination }) => {+ const entry = SECRET_SYNC_MAP[destination];+ if (!entry) return false;+ const aliases = entry.aliases ?? [];return (- name?.toLowerCase().includes(searchLower) ||- destination.toLowerCase().includes(searchLower) ||- aliases.some((alias) => alias.toLowerCase().includes(searchLower))+ entry.name.toLowerCase().includes(query) ||+ entry.category.toLowerCase().includes(query) ||+ destination.toLowerCase().includes(query) ||+ aliases.some((alias) => alias.toLowerCase().includes(query)));}) ?? []);}, [secretSyncOptions, search]);- useResetPageHelper({- totalCount: filteredOptions.length,- offset,- setPage- });+ const popularOptions = useMemo(+ () =>+ POPULAR_SECRET_SYNCS.map((destination) => optionsByDestination.get(destination)).filter(+ (option): option is SyncOption => Boolean(option)+ ),+ [optionsByDestination]+ );++ const isSearching = search.trim().length > 0;if (isPending) {return (- <div className="flex h-full flex-col items-center justify-center py-2.5">+ <div className="flex h-full flex-col items-center justify-center py-10"><Spinner size="lg" className="text-mineshaft-500" /><p className="mt-4 text-sm text-mineshaft-400">Loading options...</p></div>@@ -54,102 +129,73 @@ export const SecretSyncSelect = ({ onSelect }: Props) => {}return (- <div className="flex flex-col gap-4">- <Input- value={search}- onChange={(e) => setSearch(e.target.value)}- leftIcon={<FontAwesomeIcon icon={faMagnifyingGlass} />}- placeholder="Search options..."- className="bg-mineshaft-800 placeholder:text-mineshaft-400"- />- <div className="grid h-118 grid-cols-4 content-start gap-2">- {filteredOptions.slice(offset, perPage * page)?.map(({ destination, enterprise }) => {- const { image, name } = SECRET_SYNC_MAP[destination];- return (- <button- key={name}- type="button"- onClick={() =>- enterprise && !subscription.enterpriseSecretSyncs- ? handlePopUpOpen("upgradePlan", {- isEnterpriseFeature: true,- text: "All Secret Syncs can be unlocked if you switch to Infisical Enterprise plan."- })- : onSelect(destination)- }- className="group relative flex h-28 cursor-pointer flex-col items-center justify-center overflow-hidden rounded-md border border-mineshaft-600 bg-mineshaft-700 p-4 duration-200 hover:bg-mineshaft-600"- >- <img- src={`/images/integrations/${image}`}- height={40}- width={40}- className="mt-auto"- alt={`${name} logo`}- />- <div className="mt-auto max-w-xs text-center text-xs font-medium text-gray-300 duration-200 group-hover:text-gray-200">- {name}- </div>- </button>- );- })}- {!filteredOptions?.length && (- <EmptyState- className="col-span-full mt-40"- title="No Secret Syncs match search"- icon={faSearch}- />- )}- </div>- {Boolean(filteredOptions.length) && (- <Pagination- startAdornment={- <Tooltip- side="bottom"- className="max-w-sm py-4"- content={- <>- <p className="mb-2">Infisical is constantly adding support for more services.</p>- <p>- {`If you don't see the third-party- service you're looking for,`}{" "}- <a- target="_blank"- className="underline hover:text-mineshaft-300"- href="https://infisical.com/slack"- rel="noopener noreferrer"- >- let us know on Slack- </a>{" "}- or{" "}- <a- target="_blank"- className="underline hover:text-mineshaft-300"- href="https://github.com/Infisical/infisical/discussions"- rel="noopener noreferrer"- >- make a request on GitHub- </a>- .- </p>- </>- }- >- <div className="-ml-3 flex items-center gap-1.5 text-mineshaft-400">- <span className="text-xs">- Don't see the third-party service you're looking for?- </span>- <FontAwesomeIcon size="xs" icon={faInfoCircle} />- </div>- </Tooltip>- }- count={filteredOptions.length}- page={page}- perPage={perPage}- onChangePage={setPage}- onChangePerPage={setPerPage}- perPageList={[16]}+ <div className="flex flex-col gap-6">+ <InputGroup>+ <InputGroupAddon align="inline-start">+ <Search />+ </InputGroupAddon>+ <InputGroupInput+ value={search}+ onChange={(e) => setSearch(e.target.value)}+ placeholder="Search providers — AWS, Vercel, GitHub Actions, Vault..."/>+ </InputGroup>++ {isSearching ? (+ <section>+ {filteredOptions.length ? (+ <div className="grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3">+ {filteredOptions.map((option) => (+ <ProviderCard+ key={option.destination}+ destination={option.destination}+ onClick={() => handleSelect(option)}+ />+ ))}+ </div>+ ) : (+ <Empty className="border">+ <EmptyHeader>+ <EmptyMedia variant="icon">+ <Search />+ </EmptyMedia>+ <EmptyTitle>No matching providers</EmptyTitle>+ <EmptyDescription>Try a different search term.</EmptyDescription>+ </EmptyHeader>+ </Empty>+ )}+ </section>+ ) : (+ <>+ {popularOptions.length > 0 && (+ <section>+ <SectionLabel>Popular</SectionLabel>+ <div className="grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3">+ {popularOptions.map((option) => (+ <ProviderCard+ key={option.destination}+ destination={option.destination}+ onClick={() => handleSelect(option)}+ />+ ))}+ </div>+ </section>+ )}+ <section>+ <SectionLabel>All providers</SectionLabel>+ <div className="grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3">+ {(secretSyncOptions ?? []).map((option) => (+ <ProviderCard+ key={option.destination}+ destination={option.destination}+ onClick={() => handleSelect(option)}+ />+ ))}+ </div>+ </section>+ </>)}+<UpgradePlanModalisOpen={popUp.upgradePlan.isOpen}isEnterpriseFeature={popUp.upgradePlan.data?.isEnterpriseFeature}diff --git a/frontend/src/components/secret-syncs/SecretSyncStatusBadge.tsx b/frontend/src/components/secret-syncs/SecretSyncStatusBadge.tsxindex b8b31ae08b..4af0753760 100644--- a/frontend/src/components/secret-syncs/SecretSyncStatusBadge.tsx+++ b/frontend/src/components/secret-syncs/SecretSyncStatusBadge.tsx@@ -1,17 +1,22 @@import { useMemo } from "react";-import { faCalendarCheck, faXmark } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";import { format } from "date-fns";import {AlertTriangleIcon,+ CalendarCheckIcon,CheckIcon,HourglassIcon,LucideIcon,- RefreshCwIcon+ RefreshCwIcon,+ XIcon} from "lucide-react";-import { Tooltip } from "@app/components/v2";-import { Badge, TBadgeProps } from "@app/components/v3";+import {+ Badge,+ HoverCard,+ HoverCardContent,+ HoverCardTrigger,+ TBadgeProps+} from "@app/components/v3";import { SecretSyncStatus } from "@app/hooks/api/secretSyncs";type Props = {@@ -78,17 +83,16 @@ export const SecretSyncStatusBadge = ({ status, lastSyncedAt, lastSyncMessage }:}return (- <Tooltip- position="left"- className="max-w-sm"- content={+ <HoverCard openDelay={150} closeDelay={150}>+ <HoverCardTrigger asChild>{badge}</HoverCardTrigger>+ <HoverCardContent side="left" className="w-auto max-w-sm"><div className="flex flex-col gap-2 py-1 whitespace-normal">{lastSyncedAt && (<div><div- className={`mb-2 flex self-start ${status === SecretSyncStatus.Failed ? "text-yellow" : "text-green"}`}+ className={`mb-2 flex items-center gap-1.5 self-start ${status === SecretSyncStatus.Failed ? "text-warning" : "text-success"}`}>- <FontAwesomeIcon icon={faCalendarCheck} className="ml-1 pt-0.5 pr-1.5 text-sm" />+ <CalendarCheckIcon className="size-3" /><div className="text-xs">Last Synced</div></div><div className="rounded-sm bg-mineshaft-600 p-2 text-xs">@@ -98,8 +102,8 @@ export const SecretSyncStatusBadge = ({ status, lastSyncedAt, lastSyncMessage }:)}{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 items-center gap-1.5 self-start text-danger">+ <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">@@ -108,9 +112,7 @@ export const SecretSyncStatusBadge = ({ status, lastSyncedAt, lastSyncMessage }:</div>)}</div>- }- >- <div>{badge}</div>- </Tooltip>+ </HoverCardContent>+ </HoverCard>);};diff --git a/frontend/src/components/secret-syncs/forms/AzureEntraIdScimSyncSourceFields.tsx b/frontend/src/components/secret-syncs/forms/AzureEntraIdScimSyncSourceFields.tsxindex 5fe18ad4b8..454668c62a 100644--- a/frontend/src/components/secret-syncs/forms/AzureEntraIdScimSyncSourceFields.tsx+++ b/frontend/src/components/secret-syncs/forms/AzureEntraIdScimSyncSourceFields.tsx@@ -1,9 +1,20 @@import { useEffect } from "react";import { Controller, useFormContext, useWatch } from "react-hook-form";import { subject } from "@casl/ability";+import { Info } from "lucide-react";-import { FilterableSelect, FormControl } from "@app/components/v2";-import { SecretPathInput } from "@app/components/v2/SecretPathInput";+import {+ Field,+ FieldContent,+ FieldError,+ FieldGroup,+ FieldLabel,+ FilterableSelect,+ SecretPathInput,+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import { useProject, useProjectPermission } from "@app/context";import {ProjectPermissionSecretSyncActions,@@ -51,15 +62,18 @@ export const AzureEntraIdScimSyncSourceFields = () => {}, [existingSecretId, currentSecretKey, secrets, setValue]);useEffect(() => {- const hasAccessToSource =- selectedEnvironment &&- permission.can(- ProjectPermissionSecretSyncActions.Create,- subject(ProjectPermissionSub.SecretSyncs, {- environment: selectedEnvironment.slug,- secretPath: selectedSecretPath- })- );+ if (!selectedEnvironment) {+ clearErrors("secretPath");+ return;+ }++ const hasAccessToSource = permission.can(+ ProjectPermissionSecretSyncActions.Create,+ subject(ProjectPermissionSub.SecretSyncs, {+ environment: selectedEnvironment.slug,+ secretPath: selectedSecretPath+ })+ );if (!hasAccessToSource) {setError("secretPath", {@@ -76,63 +90,85 @@ export const AzureEntraIdScimSyncSourceFields = () => {Specify the environment and path where you would like to sync secrets from.</p>- <Controller- defaultValue={currentProject.environments[0]}- control={control}- name="environment"- render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl label="Environment" isError={Boolean(error)} errorText={error?.message}>- <FilterableSelect- value={value}- onChange={onChange}- options={currentProject.environments}- placeholder="Select environment..."- getOptionLabel={(option) => option?.name}- getOptionValue={(option) => option?.id}- />- </FormControl>- )}- />- <Controller- defaultValue="/"- render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl isError={Boolean(error)} errorText={error?.message} label="Secret Path">- <SecretPathInput- environment={selectedEnvironment?.slug}- value={value}- onChange={onChange}- />- </FormControl>- )}- control={control}- name="secretPath"- />- <Controller- name="syncOptions.secretKey"- control={control}- render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Secret"- tooltipText="The secret whose value will be used as the SCIM provisioning token."- >- <FilterableSelect- value={secrets?.find((s) => s.key === value) ?? null}- onChange={(option) => {- const selected = option as { id: string; key: string } | null;- onChange(selected?.key ?? "");- }}- isLoading={isLoading}- options={secrets ?? []}- placeholder="Select a secret..."- getOptionLabel={(option) => option.key}- getOptionValue={(option) => option.id}- isDisabled={!selectedEnvironment?.slug || !selectedSecretPath}- />- </FormControl>- )}- />+ <FieldGroup>+ <Controller+ defaultValue={currentProject.environments[0]}+ control={control}+ name="environment"+ render={({ field: { value, onChange }, fieldState: { error } }) => (+ <Field>+ <FieldLabel>Environment</FieldLabel>+ <FieldContent>+ <FilterableSelect+ value={value}+ onChange={onChange}+ options={currentProject.environments}+ placeholder="Select environment..."+ getOptionLabel={(option) => option?.name}+ getOptionValue={(option) => option?.id}+ isError={Boolean(error)}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>+ )}+ />+ <Controller+ defaultValue="/"+ control={control}+ name="secretPath"+ render={({ field: { value, onChange }, fieldState: { error } }) => (+ <Field>+ <FieldLabel>Secret Path</FieldLabel>+ <FieldContent>+ <SecretPathInput+ environment={selectedEnvironment?.slug}+ value={value}+ onChange={onChange}+ isError={Boolean(error)}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>+ )}+ />+ <Controller+ name="syncOptions.secretKey"+ control={control}+ render={({ field: { value, onChange }, fieldState: { error } }) => (+ <Field>+ <FieldLabel>+ Secret+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent className="max-w-sm">+ The secret whose value will be used as the SCIM provisioning token.+ </TooltipContent>+ </Tooltip>+ </FieldLabel>+ <FieldContent>+ <FilterableSelect+ value={secrets?.find((s) => s.key === value) ?? null}+ onChange={(option) => {+ const selected = option as { id: string; key: string } | null;+ onChange(selected?.key ?? "");+ }}+ isLoading={isLoading}+ options={secrets ?? []}+ placeholder="Select a secret..."+ getOptionLabel={(option) => option.key}+ getOptionValue={(option) => option.id}+ isDisabled={!selectedEnvironment?.slug || !selectedSecretPath}+ isError={Boolean(error)}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>+ )}+ />+ </FieldGroup></>);};diff --git a/frontend/src/components/secret-syncs/forms/CreateSecretSyncForm.tsx b/frontend/src/components/secret-syncs/forms/CreateSecretSyncForm.tsxindex 626dc19492..e6d292d59a 100644--- a/frontend/src/components/secret-syncs/forms/CreateSecretSyncForm.tsx+++ b/frontend/src/components/secret-syncs/forms/CreateSecretSyncForm.tsx@@ -1,13 +1,30 @@import { useState } from "react";import { Controller, FormProvider, useForm } from "react-hook-form";-import { faInfoCircle } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";-import { Tab } from "@headlessui/react";import { zodResolver } from "@hookform/resolvers/zod";-import { twMerge } from "tailwind-merge";+import { AlertTriangleIcon } from "lucide-react";import { createNotification } from "@app/components/notifications";-import { Button, FormControl, Switch } from "@app/components/v2";+import {+ AlertDialog,+ AlertDialogAction,+ AlertDialogCancel,+ AlertDialogContent,+ AlertDialogDescription,+ AlertDialogFooter,+ AlertDialogHeader,+ AlertDialogMedia,+ AlertDialogTitle,+ Button,+ Field,+ FieldContent,+ FieldDescription,+ FieldError,+ Label,+ Stepper,+ StepperList,+ StepperStep,+ Switch+} from "@app/components/v3";import { useOrganization, useProject } from "@app/context";import { SECRET_SYNC_MAP } from "@app/helpers/secretSyncs";import {@@ -23,6 +40,10 @@ import { SecretSyncOptionsFields } from "./SecretSyncOptionsFields/SecretSyncOptimport { SecretSyncFormSchema, TSecretSyncForm } from "./schemas";import { SecretSyncDestinationFields } from "./SecretSyncDestinationFields";import { SecretSyncDetailsFields } from "./SecretSyncDetailsFields";+import {+ InitialSyncAlerts,+ SecretSyncInitialSyncBehaviorFields+} from "./SecretSyncInitialSyncBehaviorFields";import { SecretSyncReviewFields } from "./SecretSyncReviewFields";import { SecretSyncSourceFields } from "./SecretSyncSourceFields";@@ -33,20 +54,89 @@ type Props = {initialFormData?: Partial<TSecretSyncForm>;};-const getFormTabs = (- destination: SecretSync-): { name: string; key: string; fields: (keyof TSecretSyncForm)[] }[] => {+type FormTab = {+ name: string;+ key: string;+ shortDescription: string;+ title: string;+ subtitle: string;+ rightLabel: string;+ rightDescription: string;+ fields: (keyof TSecretSyncForm)[];+};++const getFormTabs = (destination: SecretSync, destinationName: string): FormTab[] => {const sourceFields: (keyof TSecretSyncForm)[] =destination === SecretSync.AzureEntraIdScim? ["secretPath", "environment", "syncOptions"]: ["secretPath", "environment"];return [- { name: "Source", key: "source", fields: sourceFields },- { name: "Destination", key: "destination", fields: ["connection", "destinationConfig"] },- { name: "Sync Options", key: "options", fields: ["syncOptions"] },- { name: "Details", key: "details", fields: ["name", "description"] },- { name: "Review", key: "review", fields: [] }+ {+ name: "Source",+ key: "source",+ shortDescription: "Pick env and path",+ title: "Source Secrets",+ subtitle: "Pick the Infisical environment and path to read from.",+ rightLabel: "SOURCE",+ rightDescription:+ "Choose what Infisical reads. The environment + path together define the set of secrets this sync will push out.",+ fields: sourceFields+ },+ {+ name: "Destination",+ key: "destination",+ shortDescription: "Connect provider",+ title: `Connect to ${destinationName}`,+ subtitle: "Choose a connection and configure the target location.",+ rightLabel: "DESTINATION",+ rightDescription: `Tell Infisical where to write. Pick a ${destinationName} connection and the exact destination — workspace, project, namespace, or whatever this provider expects.`,+ fields: ["connection", "destinationConfig"]+ },+ {+ name: "Initial Sync",+ key: "initialSync",+ shortDescription: "How to resolve the first run",+ title: "Initial Sync Behavior",+ subtitle: `Choose how Infisical should reconcile existing secrets in ${destinationName} the first time this sync runs.`,+ rightLabel: "INITIAL SYNC",+ rightDescription:+ "The first run is special — Infisical can either overwrite everything in the destination or import existing secrets back into Infisical. Subsequent runs follow your sync options.",+ fields: ["syncOptions"]+ },+ {+ name: "Sync Options",+ key: "options",+ shortDescription: "Behavior + advanced",+ title: "Sync Options",+ subtitle: "Control how secrets are written and whether they sync automatically.",+ rightLabel: "SYNC OPTIONS",+ rightDescription:+ "Decide how Infisical reconciles changes on every run — auto-sync, key schema, and how conflicts are handled.",+ fields: ["syncOptions"]+ },+ {+ name: "Details",+ key: "details",+ shortDescription: "Name + description",+ title: "Sync Details",+ subtitle: "Give this sync a name and an optional description.",+ rightLabel: "DETAILS",+ rightDescription:+ "A clear name helps when you have multiple syncs. The description shows up in the sync list as a tooltip.",+ fields: ["name", "description"]+ },+ {+ name: "Review",+ key: "review",+ shortDescription: "Confirm",+ title: "Review and Create",+ subtitle: "Double-check everything before creating the sync.",+ rightLabel: "REVIEW",+ rightDescription:+ "Verify your configuration. Once created, you can edit most fields, but you can't change the destination provider.",+ fields: []+ }];};@@ -60,7 +150,7 @@ export const CreateSecretSyncForm = ({const { currentProject } = useProject();const { currentOrg } = useOrganization();const { name: destinationName } = SECRET_SYNC_MAP[destination];- const formTabs = getFormTabs(destination);+ const formTabs = getFormTabs(destination, destinationName);const [showConfirmation, setShowConfirmation] = useState(false);@@ -76,8 +166,9 @@ export const CreateSecretSyncForm = ({isAutoSyncEnabled: true,syncOptions: {initialSyncBehavior: syncOption?.canImportSecrets- ? undefined- : SecretSyncInitialSyncBehavior.OverwriteDestination+ ? SecretSyncInitialSyncBehavior.ImportPrioritizeSource+ : SecretSyncInitialSyncBehavior.OverwriteDestination,+ disableSecretDeletion: true},...initialFormData} as Partial<TSecretSyncForm>,@@ -112,7 +203,7 @@ export const CreateSecretSyncForm = ({setSelectedTabIndex((prev) => prev - 1);};- const { handleSubmit, trigger, control, watch } = formMethods;+ const { handleSubmit, trigger, control, watch, formState } = formMethods;const { hasDuplicate } = useDuplicateDestinationCheck({destination,@@ -140,135 +231,172 @@ export const CreateSecretSyncForm = ({setSelectedTabIndex((prev) => prev + 1);};- const isTabEnabled = async (index: number) => {- let isEnabled = true;- for (let i = index - 1; i >= 0; i -= 1) {- // eslint-disable-next-line no-await-in-loop- isEnabled = isEnabled && (await isStepValid(i));+ const handleStepperChange = async (stepperIndex: number) => {+ // 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) {+ onCancel();+ return;+ }++ const targetTab = stepperIndex - 1;+ if (targetTab === selectedTabIndex) return;++ // Allow jumping backwards freely; for forward jumps, validate every step in between+ if (targetTab < selectedTabIndex) {+ setSelectedTabIndex(targetTab);+ return;}- return isEnabled;+ let canJump = true;+ for (let i = selectedTabIndex; i < targetTab; i += 1) {+ // eslint-disable-next-line no-await-in-loop+ canJump = canJump && (await isStepValid(i));+ }+ if (canJump) setSelectedTabIndex(targetTab);};- if (showConfirmation)- return (- <>- <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" />- Secret Sync Behavior+ const currentTab = formTabs[selectedTabIndex];+ // Stepper has Provider at index 0; form tabs start at stepper index 1.+ const stepperActiveStep = selectedTabIndex + 1;+ const totalSteps = formTabs.length + 1;+ const displayedStepNumber = stepperActiveStep + 1;++ return (+ <FormProvider {...formMethods}>+ <form className="flex h-full min-h-0 flex-col" onSubmit={(e) => e.preventDefault()}>+ <div className="flex min-h-0 flex-1 overflow-hidden">+ <aside className="flex w-60 shrink-0 flex-col border-r border-border px-5 py-6">+ <p className="mb-5 text-[11px] font-medium tracking-wider text-muted uppercase">+ Setup steps+ </p>+ <Stepper+ activeStep={stepperActiveStep}+ orientation="vertical"+ onStepChange={handleStepperChange}+ >+ <StepperList>+ <StepperStep+ index={0}+ title="Provider"+ description={SECRET_SYNC_MAP[destination].name}+ />+ {formTabs.map((tab, i) => (+ <StepperStep+ key={tab.key}+ index={i + 1}+ title={tab.name}+ description={tab.shortDescription}+ />+ ))}+ </StepperList>+ </Stepper>+ </aside>++ <div className="flex min-w-0 flex-1 flex-col gap-y-2 overflow-y-auto px-8 py-6">+ <div className="mb-6">+ <h2 className="text-lg font-semibold text-foreground">{currentTab.title}</h2>+ <p className="mt-1 text-sm text-muted">{currentTab.subtitle}</p>+ </div>++ {selectedTabIndex === 0 && <SecretSyncSourceFields />}+ {selectedTabIndex === 1 && <SecretSyncDestinationFields />}+ {selectedTabIndex === 2 && <SecretSyncInitialSyncBehaviorFields />}+ {selectedTabIndex === 3 && (+ <SecretSyncOptionsFields hideInitialSync>+ <Controller+ control={control}+ name="isAutoSyncEnabled"+ render={({ field: { value, onChange }, fieldState: { error } }) => (+ <Field className="mb-4">+ <Field orientation="horizontal">+ <FieldContent>+ <Label htmlFor="auto-sync-enabled">Auto-sync on changes</Label>+ <FieldDescription>+ When secrets in the source change, sync to {destinationName}{" "}+ automatically. Turn off to only sync manually.+ </FieldDescription>+ </FieldContent>+ <Switch+ id="auto-sync-enabled"+ variant="project"+ checked={value}+ onCheckedChange={onChange}+ />+ </Field>+ <FieldError errors={[error]} />+ </Field>+ )}+ />+ </SecretSyncOptionsFields>+ )}+ {selectedTabIndex === 4 && <SecretSyncDetailsFields />}+ {selectedTabIndex === 5 && <SecretSyncReviewFields />}</div>- <p className="mt-1 text-sm text-bunker-200">- Secret Syncs are the source of truth for connected third-party services. Any secret,- including associated data, not present or imported in Infisical before syncing will be- overwritten, and changes made directly in the connected service outside of infisical may- also be overwritten by future syncs.- </p>- </div>- <div className="mt-4 flex gap-4">- <Button- isDisabled={createSecretSync.isPending}- isLoading={createSecretSync.isPending}- onClick={handleSubmit(onSubmit)}- colorSchema="secondary"- >- I Understand- </Button>-- <Button- isDisabled={createSecretSync.isPending}- variant="plain"- onClick={() => setShowConfirmation(false)}- colorSchema="secondary"- >- Cancel- </Button>++ <aside className="hidden w-80 shrink-0 flex-col gap-4 overflow-y-auto border-l border-border px-6 py-6 lg:flex">+ <div className="mb-auto">+ <p className="text-[11px] font-medium tracking-wider text-muted uppercase">+ Step {displayedStepNumber} · {currentTab.rightLabel}+ </p>+ <p className="mt-4 text-sm font-semibold text-foreground">What this step does</p>+ <p className="mt-2 text-sm leading-relaxed text-muted">+ {currentTab.rightDescription}+ </p>+ </div>+ {selectedTabIndex >= 2 && <InitialSyncAlerts />}+ </aside></div>- </>- );- return (- <form className={twMerge(isFinalStep && "max-h-[70vh] overflow-y-auto")}>- <FormProvider {...formMethods}>- <Tab.Group selectedIndex={selectedTabIndex} onChange={setSelectedTabIndex}>- <Tab.List className="-pb-1 mb-6 w-full border-b-2 border-mineshaft-600">- {formTabs.map((tab, index) => (- <Tab- onClick={async (e) => {- e.preventDefault();- const isEnabled = await isTabEnabled(index);- setSelectedTabIndex((prev) => (isEnabled ? index : prev));- }}- className={({ selected }) =>- `-mb-[0.14rem] whitespace-nowrap ${index > selectedTabIndex ? "opacity-30" : ""} px-4 py-2 text-sm font-medium outline-hidden disabled:opacity-60 ${- selected- ? "border-b-2 border-mineshaft-300 text-mineshaft-200"- : "text-bunker-300"- }`- }- key={tab.key}- >- {index + 1}. {tab.name}- </Tab>- ))}- </Tab.List>- <Tab.Panels>- <Tab.Panel>- <SecretSyncSourceFields />- </Tab.Panel>- <Tab.Panel>- <SecretSyncDestinationFields />- </Tab.Panel>- <Tab.Panel>- <SecretSyncOptionsFields />- <Controller- control={control}- name="isAutoSyncEnabled"- render={({ field: { value, onChange }, fieldState: { error } }) => {- return (- <FormControl- helperText={- value- ? "Secrets will automatically be synced when changes occur in the source location."- : "Secrets will not automatically be synced when changes occur in the source location. You can still trigger syncs manually."- }- isError={Boolean(error)}- errorText={error?.message}- >- <Switch- className="bg-mineshaft-400/80 shadow-inner data-[state=checked]:bg-green/80"- id="auto-sync-enabled"- thumbClassName="bg-mineshaft-800"- onCheckedChange={onChange}- isChecked={value}- >- <p className="w-[8.4rem]">Auto-Sync {value ? "Enabled" : "Disabled"}</p>- </Switch>- </FormControl>- );- }}- />- </Tab.Panel>- <Tab.Panel>- <SecretSyncDetailsFields />- </Tab.Panel>- <Tab.Panel>- <SecretSyncReviewFields />- </Tab.Panel>- </Tab.Panels>- </Tab.Group>- </FormProvider>-- <div className="flex w-full flex-row-reverse justify-between gap-4 pt-4">- <Button onClick={handleNext} colorSchema="secondary" isDisabled={isCreateButtonDisabled}>- {isFinalStep ? "Create Sync" : "Next"}- </Button>- {selectedTabIndex > 0 && (- <Button onClick={handlePrev} colorSchema="secondary">- Back- </Button>- )}- </div>- </form>+ <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>+ <div className="flex items-center gap-3">+ <span className="text-xs text-muted">+ Step {displayedStepNumber} of {totalSteps}+ </span>+ <Button variant="outline" onClick={handlePrev}>+ Back+ </Button>+ <Button variant="project" onClick={handleNext} isDisabled={isCreateButtonDisabled}>+ {isFinalStep ? "Create Sync" : "Continue"}+ </Button>+ </div>+ </div>+ </form>+ <AlertDialog+ open={showConfirmation}+ onOpenChange={(open) => {+ if (!createSecretSync.isPending) setShowConfirmation(open);+ }}+ >+ <AlertDialogContent>+ <AlertDialogHeader>+ <AlertDialogMedia>+ <AlertTriangleIcon className="text-warning" />+ </AlertDialogMedia>+ <AlertDialogTitle>Secret Sync Behavior</AlertDialogTitle>+ <AlertDialogDescription asChild>+ <div className="flex flex-col gap-2">+ <p>Infisical is the source of truth for synced destinations.</p>+ <p>+ Secrets not in Infisical will be overwritten in the destination, and any direct+ edits there may be overwritten by future syncs.+ </p>+ </div>+ </AlertDialogDescription>+ </AlertDialogHeader>+ <AlertDialogFooter>+ <AlertDialogCancel isDisabled={createSecretSync.isPending}>Cancel</AlertDialogCancel>+ <AlertDialogAction+ variant="project"+ isDisabled={createSecretSync.isPending}+ onClick={handleSubmit(onSubmit)}+ >+ I Understand+ </AlertDialogAction>+ </AlertDialogFooter>+ </AlertDialogContent>+ </AlertDialog>+ </FormProvider>);};diff --git a/frontend/src/components/secret-syncs/forms/EditSecretSyncForm.tsx b/frontend/src/components/secret-syncs/forms/EditSecretSyncForm.tsxindex 207b72cd88..a7c8ea11ad 100644--- a/frontend/src/components/secret-syncs/forms/EditSecretSyncForm.tsx+++ b/frontend/src/components/secret-syncs/forms/EditSecretSyncForm.tsx@@ -1,10 +1,20 @@-import { ReactNode, useCallback, useEffect, useState } from "react";-import { FormProvider, useForm } from "react-hook-form";+import { useCallback, useEffect, useState } from "react";+import { Controller, FormProvider, useForm } from "react-hook-form";import { zodResolver } from "@hookform/resolvers/zod";import { createNotification } from "@app/components/notifications";-import { SecretSyncEditFields } from "@app/components/secret-syncs/types";-import { Button, ModalClose } from "@app/components/v2";+import {+ Button,+ Field,+ FieldContent,+ FieldDescription,+ FieldError,+ Label,+ Stepper,+ StepperList,+ StepperStep,+ Switch+} from "@app/components/v3";import { useOrganization } from "@app/context";import { SECRET_SYNC_MAP } from "@app/helpers/secretSyncs";import {@@ -18,20 +28,113 @@ import { DuplicateDestinationConfirmationModal } from "./DuplicateDestinationConimport { TSecretSyncForm, UpdateSecretSyncFormSchema } from "./schemas";import { SecretSyncDestinationFields } from "./SecretSyncDestinationFields";import { SecretSyncDetailsFields } from "./SecretSyncDetailsFields";+import { SecretSyncInitialSyncBehaviorFields } from "./SecretSyncInitialSyncBehaviorFields";import { SecretSyncSourceFields } from "./SecretSyncSourceFields";type Props = {onComplete: (secretSync: TSecretSync) => void;secretSync: TSecretSync;- fields: SecretSyncEditFields;};-export const EditSecretSyncForm = ({ secretSync, fields, onComplete }: Props) => {+type FormStep = {+ key: string;+ name: string;+ description: string;+ title: string;+ subtitle: string;+ rightLabel: string;+ rightDescription: string;+};++const getFormSteps = (secretSync: TSecretSync, destinationName: string): FormStep[] => {+ const steps: FormStep[] = [+ {+ key: "source",+ name: "Source",+ description: "Pick env and path",+ title: "Source Secrets",+ subtitle: "Pick the Infisical environment and path to read from.",+ rightLabel: "SOURCE",+ rightDescription:+ "Choose what Infisical reads. The environment + path together define the set of secrets this sync will push out."+ },+ {+ key: "destination",+ name: "Destination",+ description: "Connect provider",+ title: `Connect to ${destinationName}`,+ subtitle: "Choose a connection and configure the target location.",+ rightLabel: "DESTINATION",+ rightDescription: `Tell Infisical where to write. Pick a ${destinationName} connection and the exact destination — workspace, project, namespace, or whatever this provider expects.`+ }+ ];++ if (!secretSync.lastSyncedAt) {+ steps.push({+ key: "initialSync",+ name: "Initial Sync",+ description: "First-run behavior",+ title: "Initial Sync Behavior",+ subtitle: `Choose how Infisical should reconcile existing secrets in ${destinationName} the first time this sync runs.`,+ rightLabel: "INITIAL SYNC",+ rightDescription:+ "The first run is special — Infisical can either overwrite everything in the destination or import existing secrets back into Infisical. Subsequent runs follow your sync options."+ });+ }++ steps.push({+ key: "options",+ name: "Sync Options",+ description: "Behavior + advanced",+ title: "Sync Options",+ subtitle: "Control how secrets are written and whether they sync automatically.",+ rightLabel: "SYNC OPTIONS",+ rightDescription:+ "Decide how Infisical reconciles changes on every run — auto-sync, key schema, and how conflicts are handled."+ });++ steps.push({+ key: "details",+ name: "Details",+ description: "Name + description",+ title: "Sync Details",+ subtitle: "Give this sync a name and an optional description.",+ rightLabel: "DETAILS",+ rightDescription:+ "A clear name helps when you have multiple syncs. The description shows up in the sync list as a tooltip."+ });++ return steps;+};++const normalizeConfig = (config: unknown): unknown => {+ if (config === null || config === undefined || typeof config !== "object") {+ return config;+ }+ if (Array.isArray(config)) {+ return config.map(normalizeConfig);+ }+ const normalized: Record<string, unknown> = {};+ Object.keys(config as Record<string, unknown>)+ .sort()+ .forEach((key) => {+ normalized[key] = normalizeConfig((config as Record<string, unknown>)[key]);+ });+ return normalized;+};++export const EditSecretSyncForm = ({ secretSync, onComplete }: Props) => {const updateSecretSync = useUpdateSecretSync();const { name: destinationName } = SECRET_SYNC_MAP[secretSync.destination];+ const { currentOrg } = useOrganization();+ const steps = getFormSteps(secretSync, destinationName);++ const [selectedStepIndex, setSelectedStepIndex] = useState(0);const [showDuplicateConfirmation, setShowDuplicateConfirmation] = useState(false);const [pendingFormData, setPendingFormData] = useState<TSecretSyncForm | null>(null);- const { currentOrg } = useOrganization();+ const [destinationConfigToCheck, setDestinationConfigToCheck] = useState<unknown>(null);+ const [checkDuplicateEnabled, setCheckDuplicateEnabled] = useState(false);+ const [storedDuplicateProjectId, setStoredDuplicateProjectId] = useState<string | undefined>();const formMethods = useForm<TSecretSyncForm>({resolver: zodResolver(UpdateSecretSyncFormSchema),@@ -44,10 +147,6 @@ export const EditSecretSyncForm = ({ secretSync, fields, onComplete }: Props) =>reValidateMode: "onChange"});- const [destinationConfigToCheck, setDestinationConfigToCheck] = useState<unknown>(null);- const [checkDuplicateEnabled, setCheckDuplicateEnabled] = useState(false);- const [storedDuplicateProjectId, setStoredDuplicateProjectId] = useState<string | undefined>();-const { data: duplicateData, isLoading: isCheckingDuplicate } = useCheckDuplicateDestination(secretSync.destination,destinationConfigToCheck,@@ -98,40 +197,19 @@ export const EditSecretSyncForm = ({ secretSync, fields, onComplete }: Props) =>performUpdate]);- const normalizeConfig = (config: unknown): unknown => {- if (config === null || config === undefined || typeof config !== "object") {- return config;- }-- if (Array.isArray(config)) {- return config.map(normalizeConfig);- }-- const normalized: Record<string, unknown> = {};- Object.keys(config as Record<string, unknown>)- .sort()- .forEach((key) => {- normalized[key] = normalizeConfig((config as Record<string, unknown>)[key]);- });-- return normalized;- };-const hasDestinationConfigChanged = (formData: TSecretSyncForm) => {const originalConfig = normalizeConfig(secretSync.destinationConfig);const currentConfig = normalizeConfig(formData.destinationConfig);-return JSON.stringify(originalConfig) !== JSON.stringify(currentConfig);};const onSubmit = async (formData: TSecretSyncForm) => {- if (fields === SecretSyncEditFields.Destination && hasDestinationConfigChanged(formData)) {+ if (hasDestinationConfigChanged(formData)) {setDestinationConfigToCheck(formData.destinationConfig);setPendingFormData(formData);setCheckDuplicateEnabled(true);return;}-await performUpdate(formData);};@@ -145,49 +223,143 @@ export const EditSecretSyncForm = ({ secretSync, fields, onComplete }: Props) =>setDestinationConfigToCheck(null);};- let Component: ReactNode;-- switch (fields) {- case SecretSyncEditFields.Destination:- Component = <SecretSyncDestinationFields />;- break;- case SecretSyncEditFields.Options:- Component = <SecretSyncOptionsFields hideInitialSync={Boolean(secretSync.lastSyncedAt)} />;- break;- case SecretSyncEditFields.Source:- Component = <SecretSyncSourceFields />;- break;- case SecretSyncEditFields.Details:- default:- Component = <SecretSyncDetailsFields />;- break;- }-const {handleSubmit,+ control,formState: { isSubmitting, isDirty }} = formMethods;const isLoading = isSubmitting || isCheckingDuplicate;+ const currentStep = steps[selectedStepIndex];++ const renderStep = () => {+ switch (currentStep.key) {+ case "details":+ return <SecretSyncDetailsFields />;+ case "source":+ return <SecretSyncSourceFields />;+ case "destination":+ return <SecretSyncDestinationFields />;+ case "initialSync":+ return <SecretSyncInitialSyncBehaviorFields />;+ case "options":+ return (+ <SecretSyncOptionsFields hideInitialSync>+ <Controller+ control={control}+ name="isAutoSyncEnabled"+ render={({ field: { value, onChange }, fieldState: { error } }) => (+ <Field className="mb-4">+ <Field orientation="horizontal">+ <FieldContent>+ <Label htmlFor="auto-sync-enabled">Auto-sync on changes</Label>+ <FieldDescription>+ When secrets in the source change, sync to {destinationName} automatically.+ Turn off to only sync manually.+ </FieldDescription>+ </FieldContent>+ <Switch+ id="auto-sync-enabled"+ variant="project"+ checked={value}+ onCheckedChange={onChange}+ />+ </Field>+ <FieldError errors={[error]} />+ </Field>+ )}+ />+ </SecretSyncOptionsFields>+ );+ default:+ return null;+ }+ };return (- <>- <form onSubmit={handleSubmit(onSubmit)}>- <FormProvider {...formMethods}>{Component}</FormProvider>- <div className="flex w-full justify-between gap-4 pt-4">- <ModalClose asChild>- <Button colorSchema="secondary" variant="plain">+ <FormProvider {...formMethods}>+ <form className="flex h-full min-h-0 flex-col" onSubmit={handleSubmit(onSubmit)}>+ <div className="flex min-h-0 flex-1 overflow-hidden">+ <aside className="flex w-60 shrink-0 flex-col border-r border-border px-5 py-6">+ <p className="mb-5 text-[11px] font-medium tracking-wider text-muted uppercase">+ Sections+ </p>+ <Stepper+ activeStep={selectedStepIndex}+ orientation="vertical"+ onStepChange={setSelectedStepIndex}+ nonLinear+ >+ <StepperList>+ {steps.map((step, i) => (+ <StepperStep+ key={step.key}+ index={i}+ title={step.name}+ description={step.description}+ />+ ))}+ </StepperList>+ </Stepper>+ </aside>++ <div className="flex min-w-0 flex-1 flex-col gap-y-2 overflow-y-auto px-8 py-6">+ <div className="mb-6">+ <h2 className="text-lg font-semibold text-foreground">{currentStep.title}</h2>+ <p className="mt-1 text-sm text-muted">{currentStep.subtitle}</p>+ </div>+ {renderStep()}+ </div>++ <aside className="hidden w-80 shrink-0 flex-col gap-4 overflow-y-auto border-l border-border px-6 py-6 lg:flex">+ <div className="mb-auto">+ <p className="text-[11px] font-medium tracking-wider text-muted uppercase">+ Step {selectedStepIndex + 1} · {currentStep.rightLabel}+ </p>+ <p className="mt-4 text-sm font-semibold text-foreground">What this step does</p>+ <p className="mt-2 text-sm leading-relaxed text-muted">+ {currentStep.rightDescription}+ </p>+ </div>+ </aside>+ </div>++ <div className="flex shrink-0 items-center justify-between gap-3 border-t border-border px-6 py-4">+ <div className="flex items-center gap-3">+ <Button+ variant="project"+ type="submit"+ isPending={isLoading}+ isDisabled={!isDirty || isLoading}+ >+ {isCheckingDuplicate ? "Checking..." : "Save"}+ </Button>+ <Button variant="outline" type="button" onClick={() => onComplete(secretSync)}>Cancel</Button>- </ModalClose>- <Button- isLoading={isLoading}- isDisabled={!isDirty || isLoading}- type="submit"- colorSchema="secondary"- >- {isCheckingDuplicate ? "Checking..." : "Update Sync"}- </Button>+ <span className="text-xs text-muted">{isDirty ? "Unsaved changes" : ""}</span>+ </div>+ <div className="flex items-center gap-3">+ <span className="text-xs text-muted">+ Step {selectedStepIndex + 1} of {steps.length}+ </span>+ <Button+ variant="outline"+ type="button"+ onClick={() => setSelectedStepIndex((i) => Math.max(0, i - 1))}+ isDisabled={selectedStepIndex === 0}+ >+ Back+ </Button>+ <Button+ variant="outline"+ type="button"+ onClick={() => setSelectedStepIndex((i) => Math.min(steps.length - 1, i + 1))}+ isDisabled={selectedStepIndex === steps.length - 1}+ >+ Next+ </Button>+ </div></div></form>@@ -204,6 +376,6 @@ export const EditSecretSyncForm = ({ secretSync, fields, onComplete }: Props) =>duplicateProjectId={storedDuplicateProjectId}isDisabled={currentOrg?.blockDuplicateSecretSyncDestinations}/>- </>+ </FormProvider>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncConnectionField.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncConnectionField.tsxindex a704bdab1d..a730734b21 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncConnectionField.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncConnectionField.tsx@@ -2,11 +2,19 @@ import { useMemo } from "react";import { Controller, useFormContext } from "react-hook-form";import { SingleValue } from "react-select";import { subject } from "@casl/ability";-import { faInfoCircle } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";+import { Info } from "lucide-react";import { AppConnectionOption } from "@app/components/app-connections";-import { FilterableSelect, FormControl } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldError,+ FieldLabel,+ FilterableSelect,+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import { ProjectPermissionSub, useProject, useProjectPermission } from "@app/context";import {ProjectPermissionAppConnectionActions,@@ -69,51 +77,57 @@ export const SecretSyncConnectionField = ({ onChange: callback }: Props) => {return (<>- <p className="mb-4 text-sm text-bunker-300">- Specify the {appName} Connection to use to connect to {connectionName} and configure- destination parameters.- </p><Controller+ control={control}+ name="connection"render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- tooltipText="App Connections can be created from the Organization Settings page."- isError={Boolean(error)}- errorText={error?.message}- label={`${connectionName} Connection`}- >- <FilterableSelect- value={value}- onChange={(newValue) => {- if ((newValue as SingleValue<{ id: string; name: string }>)?.id === "_create") {- handlePopUpOpen("addConnection");- onChange(null);- // store for oauth callback connections- localStorage.setItem("secretSyncFormData", JSON.stringify(watch()));- if (callback) callback();- return;- }+ <Field>+ <FieldLabel>+ {connectionName} Connection+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent>+ App Connections can be created from the Organization Settings page.+ </TooltipContent>+ </Tooltip>+ </FieldLabel>+ <FieldContent>+ <FilterableSelect+ value={value}+ onChange={(newValue) => {+ if ((newValue as SingleValue<{ id: string; name: string }>)?.id === "_create") {+ handlePopUpOpen("addConnection");+ onChange(null);+ // store for oauth callback connections+ localStorage.setItem("secretSyncFormData", JSON.stringify(watch()));+ if (callback) callback();+ return;+ }- onChange(newValue);- if (callback) callback();- }}- isLoading={isPending}- options={[- ...(canCreateConnection ? [{ id: "_create", name: "Create Connection" }] : []),- ...allowedConnections- ]}- placeholder="Select connection..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id}- components={{ Option: AppConnectionOption }}- />- </FormControl>+ onChange(newValue);+ if (callback) callback();+ }}+ isLoading={isPending}+ isError={Boolean(error)}+ options={[+ ...(canCreateConnection ? [{ id: "_create", name: "Create Connection" }] : []),+ ...allowedConnections+ ]}+ placeholder="Select connection..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id}+ components={{ Option: AppConnectionOption }}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}- control={control}- name="connection"/>{!isPending && !allowedConnections.length && !canCreateConnection && (- <p className="-mt-2.5 mb-2.5 text-xs text-yellow">- <FontAwesomeIcon className="mr-1" size="xs" icon={faInfoCircle} />+ <p className="mt-2 flex items-center gap-1.5 text-xs text-warning">+ <Info className="size-3.5" />You do not have access to any {appName} Connections. Contact an admin to create one.</p>)}diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/1PasswordSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/1PasswordSyncFields.tsxindex 15169c73ab..ab86fe1d33 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/1PasswordSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/1PasswordSyncFields.tsx@@ -1,10 +1,20 @@import { Controller, useFormContext, useWatch } from "react-hook-form";import { SingleValue } from "react-select";-import { faCircleInfo } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";+import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";-import { FilterableSelect, FormControl, Input, Tooltip } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldError,+ FieldGroup,+ FieldLabel,+ FilterableSelect,+ Input,+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import {TOnePassVault,useOnePassConnectionListVaults@@ -28,7 +38,7 @@ export const OnePassSyncFields = () => {);return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.vaultId", "");@@ -40,52 +50,67 @@ export const OnePassSyncFields = () => {name="destinationConfig.vaultId"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Vault"- helperText={- <Tooltip- className="max-w-md"- content="Ensure the vault exists in the connection's OnePass instance URL."- >- <div>- <span>Don't see the vault you're looking for?</span>{" "}- <FontAwesomeIcon icon={faCircleInfo} className="text-mineshaft-400" />- </div>+ <Field>+ <FieldLabel>+ Vault+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent className="max-w-md">+ Ensure the vault exists in the connection's OnePass instance URL.+ </TooltipContent></Tooltip>- }- >- <FilterableSelect- menuPlacement="top"- isLoading={isVaultsLoading && Boolean(connectionId)}- isDisabled={!connectionId}- value={vaults?.find((v) => v.id === value) || null}- onChange={(option) => onChange((option as SingleValue<TOnePassVault>)?.id ?? null)}- options={vaults}- placeholder="Select a vault..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id}- />- </FormControl>+ </FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isVaultsLoading && Boolean(connectionId)}+ isDisabled={!connectionId}+ value={vaults?.find((v) => v.id === value) || null}+ onChange={(option) => onChange((option as SingleValue<TOnePassVault>)?.id ?? null)}+ options={vaults}+ placeholder="Select a vault..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/><Controllerrender={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- isOptional- label="Value Label"- tooltipText="It's the label of the 1Password item field which will hold your secret value. For example, if you were to sync Infisical secret 'foo: bar', the 1Password item equivalent would have an item title of 'foo', and a field on that item 'value: bar'. The field label 'value' is what gets changed by this option."- >- <Input value={value} onChange={onChange} placeholder="value" />- </FormControl>+ <Field>+ <FieldLabel>+ Value Label (Optional)+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent className="max-w-md">+ It's the label of the 1Password item field which will hold your secret value.+ For example, if you were to sync Infisical secret 'foo: bar', the+ 1Password item equivalent would have an item title of 'foo', and a field+ on that item 'value: bar'. The field label 'value' is what+ gets changed by this option.+ </TooltipContent>+ </Tooltip>+ </FieldLabel>+ <FieldContent>+ <Input+ value={value}+ onChange={onChange}+ placeholder="value"+ isError={Boolean(error)}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}control={control}name="destinationConfig.valueLabel"/>- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AwsParameterStoreSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AwsParameterStoreSyncFields.tsxindex dc35c1f0e6..882300ce8f 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AwsParameterStoreSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AwsParameterStoreSyncFields.tsx@@ -1,7 +1,18 @@import { Controller, useFormContext } from "react-hook-form";+import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";-import { FormControl, Input } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldError,+ FieldGroup,+ FieldLabel,+ Input,+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";import { TSecretSyncForm } from "../schemas";@@ -13,52 +24,65 @@ export const AwsParameterStoreSyncFields = () => {>();return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("syncOptions.keyId", undefined);}}/><Controller- render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl isError={Boolean(error)} errorText={error?.message} label="Region">- <AwsRegionSelect value={value} onChange={onChange} />- </FormControl>- )}control={control}name="destinationConfig.region"- />- <Controllerrender={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Path"- tooltipText={- <>- 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>- </>- }- tooltipClassName="max-w-lg"- >- <Input value={value} onChange={onChange} placeholder="Path..." />- </FormControl>+ <Field>+ <FieldLabel>Region</FieldLabel>+ <FieldContent>+ <AwsRegionSelect value={value} onChange={onChange} />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}+ />+ <Controllercontrol={control}name="destinationConfig.path"+ render={({ field: { value, onChange }, fieldState: { error } }) => (+ <Field>+ <FieldLabel>+ Path+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </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>+ </TooltipContent>+ </Tooltip>+ </FieldLabel>+ <FieldContent>+ <Input+ value={value}+ onChange={onChange}+ placeholder="Path..."+ isError={Boolean(error)}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>+ )}/>- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AwsSecretsManagerSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AwsSecretsManagerSyncFields.tsxindex fe1a4c2873..3b3a4724e8 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AwsSecretsManagerSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AwsSecretsManagerSyncFields.tsx@@ -1,7 +1,23 @@import { Controller, useFormContext } from "react-hook-form";+import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";-import { FormControl, Input, Select, SelectItem } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldError,+ FieldGroup,+ FieldLabel,+ Input,+ Select,+ SelectContent,+ SelectItem,+ SelectTrigger,+ SelectValue,+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";import { AwsSecretsManagerSyncMappingBehavior } from "@app/hooks/api/secretSyncs/types/aws-secrets-manager-sync";@@ -16,13 +32,17 @@ export const AwsSecretsManagerSyncFields = () => {const mappingBehavior = watch("destinationConfig.mappingBehavior");return (- <>+ <FieldGroup><SecretSyncConnectionField /><Controllerrender={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl isError={Boolean(error)} errorText={error?.message} label="Region">- <AwsRegionSelect value={value} onChange={onChange} />- </FormControl>+ <Field>+ <FieldLabel>Region</FieldLabel>+ <FieldContent>+ <AwsRegionSelect value={value} onChange={onChange} />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}control={control}name="destinationConfig.region"@@ -32,68 +52,78 @@ export const AwsSecretsManagerSyncFields = () => {control={control}defaultValue={AwsSecretsManagerSyncMappingBehavior.OneToOne}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- tooltipClassName="max-w-lg py-3"- tooltipText={- <div className="flex flex-col gap-3">- <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- Infisical 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- Infisical secrets will be mapped to a single AWS Secrets Manager secret.- </p>- </li>- </ul>- </div>- }- errorText={error?.message}- isError={Boolean(error?.message)}- label="Mapping Behavior"- >- <Select- value={value}- onValueChange={(val) => {- onChange(val);- setValue("syncOptions.syncSecretMetadataAsTags", false);- }}- className="w-full border border-mineshaft-500 capitalize"- position="popper"- placeholder="Select an option..."- dropdownContainerClassName="max-w-none"- >- {Object.values(AwsSecretsManagerSyncMappingBehavior).map((behavior) => {- return (- <SelectItem className="capitalize" value={behavior} key={behavior}>- {behavior}- </SelectItem>- );- })}- </Select>- </FormControl>+ <Field>+ <FieldLabel>+ Mapping Behavior+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent className="max-w-lg">+ <div className="flex flex-col gap-3">+ <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+ Infisical 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+ Infisical secrets will be mapped to a single AWS Secrets Manager secret.+ </p>+ </li>+ </ul>+ </div>+ </TooltipContent>+ </Tooltip>+ </FieldLabel>+ <FieldContent>+ <Select+ value={value}+ onValueChange={(val) => {+ onChange(val);+ setValue("syncOptions.syncSecretMetadataAsTags", false);+ }}+ >+ <SelectTrigger className="w-full capitalize" isError={Boolean(error)}>+ <SelectValue placeholder="Select an option..." />+ </SelectTrigger>+ <SelectContent position="popper">+ {Object.values(AwsSecretsManagerSyncMappingBehavior).map((behavior) => (+ <SelectItem className="capitalize" value={behavior} key={behavior}>+ {behavior}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>{mappingBehavior === AwsSecretsManagerSyncMappingBehavior.ManyToOne && (<Controllerrender={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="AWS Secrets Manager Secret Name"- >- <Input value={value} onChange={onChange} placeholder="Secret name..." />- </FormControl>+ <Field>+ <FieldLabel>AWS Secrets Manager Secret Name</FieldLabel>+ <FieldContent>+ <Input+ value={value}+ onChange={onChange}+ placeholder="Secret name..."+ isError={Boolean(error)}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}control={control}name="destinationConfig.secretName"/>)}- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AzureAppConfigurationSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AzureAppConfigurationSyncFields.tsxindex b4d1f8c42d..047262ea40 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AzureAppConfigurationSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AzureAppConfigurationSyncFields.tsx@@ -1,7 +1,18 @@import { Controller, useFormContext } from "react-hook-form";+import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";-import { FormControl, Input } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldError,+ FieldGroup,+ FieldLabel,+ Input,+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";import { TSecretSyncForm } from "../schemas";@@ -12,7 +23,7 @@ export const AzureAppConfigurationSyncFields = () => {>();return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.configurationUrl", "");@@ -22,14 +33,28 @@ export const AzureAppConfigurationSyncFields = () => {name="destinationConfig.configurationUrl"control={control}render={({ field, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Configuration URL"- tooltipText="Enter your Azure App Configuration URL. This is the base URL for your Azure App Configuration, e.g. https://resource-name-here.azconfig.io."- >- <Input {...field} placeholder="https://resource-name-here.azconfig.io" />- </FormControl>+ <Field>+ <FieldLabel>+ Configuration URL+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent>+ Enter your Azure App Configuration URL. This is the base URL for your Azure App+ Configuration, e.g. https://resource-name-here.azconfig.io.+ </TooltipContent>+ </Tooltip>+ </FieldLabel>+ <FieldContent>+ <Input+ {...field}+ placeholder="https://resource-name-here.azconfig.io"+ isError={Boolean(error)}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>@@ -37,17 +62,25 @@ export const AzureAppConfigurationSyncFields = () => {name="destinationConfig.label"control={control}render={({ field, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Label"- isOptional- tooltipText="Enter the label for the secret in Azure App Configuration."- >- <Input {...field} placeholder="infisical-secret" />- </FormControl>+ <Field>+ <FieldLabel>+ Label (Optional)+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent>+ Enter the label for the secret in Azure App Configuration.+ </TooltipContent>+ </Tooltip>+ </FieldLabel>+ <FieldContent>+ <Input {...field} placeholder="infisical-secret" isError={Boolean(error)} />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AzureDevOpsSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AzureDevOpsSyncFields.tsxindex 4cc41057f4..07eafde285 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AzureDevOpsSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AzureDevOpsSyncFields.tsx@@ -1,10 +1,19 @@import { Controller, useFormContext, useWatch } from "react-hook-form";import { SingleValue } from "react-select";-import { faCircleInfo } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";+import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";-import { FilterableSelect, FormControl, Tooltip } from "@app/components/v2";+import {+ 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";@@ -24,7 +33,7 @@ export const AzureDevOpsSyncFields = () => {});return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.devopsProjectId", "");@@ -35,42 +44,40 @@ export const AzureDevOpsSyncFields = () => {name="destinationConfig.devopsProjectId"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Project"- helperText={- <Tooltip- className="max-w-md"- content="Ensure the project exists in the connection's Azure DevOps instance URL."- >- <div>- <span>Don't see the project you're looking for?</span>{" "}- <FontAwesomeIcon icon={faCircleInfo} className="text-mineshaft-400" />- </div>+ <Field>+ <FieldLabel>+ Project+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent className="max-w-md">+ Ensure the project exists in the connection's Azure DevOps instance URL.+ </TooltipContent></Tooltip>- }- >- <FilterableSelect- menuPlacement="top"- 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 ?? ""- );- }}- options={projects}- placeholder="Select a project..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id}- />- </FormControl>+ </FieldLabel>+ <FieldContent>+ <FilterableSelect+ 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 ?? ""+ );+ }}+ options={projects}+ placeholder="Select a project..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AzureEntraIdScimSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AzureEntraIdScimSyncFields.tsxindex 9b8256be41..35b2213765 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AzureEntraIdScimSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AzureEntraIdScimSyncFields.tsx@@ -1,8 +1,19 @@import { useMemo, 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 { FilterableSelect, FormControl } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldError,+ FieldGroup,+ FieldLabel,+ FilterableSelect,+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import {TAzureScimServicePrincipal,useAzureEntraIdConnectionListScimServicePrincipals@@ -28,7 +39,6 @@ export const AzureEntraIdScimSyncFields = () => {enabled: Boolean(connectionId)});- // Ensure the selected SP is always present in the options listconst options = useMemo(() => {const results = servicePrincipals ?? [];if (selectedSp && !results.some((sp) => sp.id === selectedSp.id)) {@@ -38,7 +48,7 @@ export const AzureEntraIdScimSyncFields = () => {}, [servicePrincipals, selectedSp]);return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.servicePrincipalId", "");@@ -50,37 +60,47 @@ export const AzureEntraIdScimSyncFields = () => {name="destinationConfig.servicePrincipalId"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="SCIM Service Principal"- tooltipText="Select the Enterprise Application with SCIM provisioning configured. Type to search by name."- >- <FilterableSelect- value={options.find((sp) => sp.id === value) ?? null}- onChange={(option) => {- const selected = option as TAzureScimServicePrincipal | null;- setSelectedSp(selected);- onChange(selected?.id ?? "");- }}- onInputChange={(newValue) => setSearchInput(newValue)}- filterOption={null}- isLoading={isLoadingServicePrincipals}- options={options}- placeholder="Search for a SCIM service principal..."- getOptionLabel={(option) => option.displayName}- getOptionValue={(option) => option.id}- isClearable- isDisabled={!connectionId}- noOptionsMessage={() =>- debouncedSearch- ? "No matching service principals found"- : "Type to search for service principals"- }- />- </FormControl>+ <Field>+ <FieldLabel>+ SCIM Service Principal+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent>+ Select the Enterprise Application with SCIM provisioning configured. Type to+ search by name.+ </TooltipContent>+ </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 ?? "");+ }}+ onInputChange={(newValue) => setSearchInput(newValue)}+ filterOption={null}+ isLoading={isLoadingServicePrincipals}+ options={options}+ placeholder="Search for a SCIM service principal..."+ getOptionLabel={(option) => option.displayName}+ getOptionValue={(option) => option.id}+ isClearable+ isDisabled={!connectionId}+ noOptionsMessage={() =>+ debouncedSearch+ ? "No matching service principals found"+ : "Type to search for service principals"+ }+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AzureKeyVaultSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AzureKeyVaultSyncFields.tsxindex a5316d81e4..0245547b91 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AzureKeyVaultSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AzureKeyVaultSyncFields.tsx@@ -1,9 +1,21 @@import { Controller, useFormContext } from "react-hook-form";-import { faInfoCircle } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";+import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";-import { FormControl, Input } from "@app/components/v2";+import {+ Alert,+ AlertDescription,+ AlertTitle,+ Field,+ FieldContent,+ FieldError,+ FieldGroup,+ FieldLabel,+ Input,+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";import { TSecretSyncForm } from "../schemas";@@ -14,7 +26,7 @@ export const AzureKeyVaultSyncFields = () => {>();return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.vaultBaseUrl", "");@@ -24,24 +36,38 @@ export const AzureKeyVaultSyncFields = () => {name="destinationConfig.vaultBaseUrl"control={control}render={({ field, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Vault Base URL"- tooltipText="Enter your Azure Key Vault URL. This is the base URL for your Azure Key Vault, e.g. https://example.vault.azure.net."- >- <Input {...field} placeholder="https://example.vault.azure.net" />- </FormControl>+ <Field>+ <FieldLabel>+ Vault Base URL+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent>+ Enter your Azure Key Vault URL. This is the base URL for your Azure Key Vault,+ e.g. https://example.vault.azure.net.+ </TooltipContent>+ </Tooltip>+ </FieldLabel>+ <FieldContent>+ <Input+ {...field}+ placeholder="https://example.vault.azure.net"+ isError={Boolean(error)}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>-- <div className="mt-4 flex items-center gap-2 text-xs text-yellow-400">- <FontAwesomeIcon icon={faInfoCircle} />- <p>+ <Alert variant="info">+ <Info />+ <AlertTitle>Key Naming</AlertTitle>+ <AlertDescription>Secret keys with underscores (_) will be converted to hyphens (-) when syncing to AzureKey Vault.- </p>- </div>- </>+ </AlertDescription>+ </Alert>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/BitbucketSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/BitbucketSyncFields.tsxindex 330d75811f..d6341d3a56 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/BitbucketSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/BitbucketSyncFields.tsx@@ -2,7 +2,14 @@ import { Controller, useFormContext, useWatch } from "react-hook-form";import { SingleValue } from "react-select";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";-import { FilterableSelect, FormControl } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldError,+ FieldGroup,+ FieldLabel,+ FilterableSelect+} from "@app/components/v3";import {TBitbucketEnvironment,TBitbucketRepo,@@ -40,7 +47,7 @@ export const BitbucketSyncFields = () => {});return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.workspaceSlug", "");@@ -53,29 +60,27 @@ export const BitbucketSyncFields = () => {name="destinationConfig.workspaceSlug"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Bitbucket Workspace"- tooltipClassName="max-w-md"- >- <FilterableSelect- 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 ?? "");- // Clear downstream selections- setValue("destinationConfig.repositorySlug", "");- setValue("destinationConfig.environmentId", "");- }}- options={workspaces}- placeholder="Select workspace..."- getOptionLabel={(option) => option.slug}- getOptionValue={(option) => option.slug}- />- </FormControl>+ <Field>+ <FieldLabel>Bitbucket Workspace</FieldLabel>+ <FieldContent>+ <FilterableSelect+ 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 ?? "");+ setValue("destinationConfig.repositorySlug", "");+ setValue("destinationConfig.environmentId", "");+ }}+ options={workspaces}+ placeholder="Select workspace..."+ getOptionLabel={(option) => option.slug}+ getOptionValue={(option) => option.slug}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>@@ -83,28 +88,26 @@ export const BitbucketSyncFields = () => {name="destinationConfig.repositorySlug"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Bitbucket Repository"- tooltipClassName="max-w-md"- >- <FilterableSelect- 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 ?? "");- // Clear downstream selections- setValue("destinationConfig.environmentId", "");- }}- options={repositories}- placeholder="Select repository..."- getOptionLabel={(option) => option.full_name}- getOptionValue={(option) => option.slug}- />- </FormControl>+ <Field>+ <FieldLabel>Bitbucket Repository</FieldLabel>+ <FieldContent>+ <FilterableSelect+ 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 ?? "");+ setValue("destinationConfig.environmentId", "");+ }}+ options={repositories}+ placeholder="Select repository..."+ getOptionLabel={(option) => option.full_name}+ getOptionValue={(option) => option.slug}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>@@ -112,30 +115,28 @@ export const BitbucketSyncFields = () => {name="destinationConfig.environmentId"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- isOptional- label="Bitbucket Deployment Environment"- tooltipClassName="max-w-md"- >- <FilterableSelect- 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 ?? "");- }}- options={environments}- placeholder="Select environment..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.uuid}- isClearable- />- </FormControl>+ <Field>+ <FieldLabel>Bitbucket Deployment Environment (Optional)</FieldLabel>+ <FieldContent>+ <FilterableSelect+ 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 ?? "");+ }}+ options={environments}+ placeholder="Select environment..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.uuid}+ isClearable+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/CamundaSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/CamundaSyncFields.tsxindex 8206999510..5aae038771 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/CamundaSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/CamundaSyncFields.tsx@@ -1,11 +1,20 @@import { useEffect } from "react";import { Controller, useFormContext, useWatch } from "react-hook-form";import { SingleValue } from "react-select";-import { faCircleInfo } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";+import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";-import { FilterableSelect, FormControl, Tooltip } from "@app/components/v2";+import {+ 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";@@ -29,7 +38,7 @@ export const CamundaSyncFields = () => {}, []);return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.clusterUUID", "");@@ -39,42 +48,40 @@ export const CamundaSyncFields = () => {name="destinationConfig.clusterUUID"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Cluster"- helperText={- <Tooltip- className="max-w-md"- content="Ensure that your credential has been granted access to the cluster"- >- <div>- <span>Don't see the cluster you're looking for?</span>{" "}- <FontAwesomeIcon icon={faCircleInfo} className="text-mineshaft-400" />- </div>+ <Field>+ <FieldLabel>+ Cluster+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent className="max-w-md">+ Ensure that your credential has been granted access to the cluster.+ </TooltipContent></Tooltip>- }- >- <FilterableSelect- menuPlacement="top"- 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 ?? ""- );- }}- options={clusters}- placeholder="Select a cluster..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.uuid}- />- </FormControl>+ </FieldLabel>+ <FieldContent>+ <FilterableSelect+ 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 ?? ""+ );+ }}+ options={clusters}+ placeholder="Select a cluster..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.uuid}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/ChecklySyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/ChecklySyncFields.tsxindex c553138984..166ea5207a 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/ChecklySyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/ChecklySyncFields.tsx@@ -2,7 +2,15 @@ import { Controller, useFormContext, useWatch } from "react-hook-form";import { SingleValue } from "react-select";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";-import { FilterableSelect, FormControl } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldDescription,+ FieldError,+ FieldGroup,+ FieldLabel,+ FilterableSelect+} from "@app/components/v3";import {TChecklyAccount,useChecklyConnectionListAccounts,@@ -37,7 +45,7 @@ export const ChecklySyncFields = () => {);return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.accountId", "");@@ -50,27 +58,26 @@ export const ChecklySyncFields = () => {name="destinationConfig.accountId"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Select an account"- tooltipClassName="max-w-md"- >- <FilterableSelect- isLoading={isAccountsLoading && Boolean(connectionId)}- isDisabled={!connectionId}- value={accounts.find((p) => p.id === value) ?? null}- onChange={(option) => {- const v = option as SingleValue<TChecklyAccount>;- onChange(v?.id ?? null);- setValue("destinationConfig.accountName", v?.name ?? "");- }}- options={accounts}- placeholder="Select an account..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id}- />- </FormControl>+ <Field>+ <FieldLabel>Select an account</FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isAccountsLoading && Boolean(connectionId)}+ isDisabled={!connectionId}+ value={accounts.find((p) => p.id === value) ?? null}+ onChange={(option) => {+ const v = option as SingleValue<TChecklyAccount>;+ onChange(v?.id ?? null);+ setValue("destinationConfig.accountName", v?.name ?? "");+ }}+ options={accounts}+ placeholder="Select an account..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>@@ -78,32 +85,32 @@ export const ChecklySyncFields = () => {name="destinationConfig.groupId"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Select a group"- isOptional- helperText="If provided, secrets will be scoped to a check group instead"- tooltipClassName="max-w-md"- >- <FilterableSelect- isLoading={isGroupsLoading && Boolean(connectionId)}- isDisabled={!connectionId}- isClearable- value={groups.find((p) => p.id === value) ?? null}- onChange={(option) => {- const v = option as SingleValue<TChecklyAccount>;- onChange(v?.id ?? null);- setValue("destinationConfig.groupName", v?.name ?? undefined);- }}- options={groups}- placeholder="Select a group..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id}- />- </FormControl>+ <Field>+ <FieldLabel>Select a group (Optional)</FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isGroupsLoading && Boolean(connectionId)}+ isDisabled={!connectionId}+ isClearable+ value={groups.find((p) => p.id === value) ?? null}+ onChange={(option) => {+ const v = option as SingleValue<TChecklyAccount>;+ onChange(v?.id ?? null);+ setValue("destinationConfig.groupName", v?.name ?? undefined);+ }}+ options={groups}+ placeholder="Select a group..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id}+ />+ <FieldDescription>+ If provided, secrets will be scoped to a check group instead+ </FieldDescription>+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/ChefSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/ChefSyncFields.tsxindex bf5e0908c5..9ef545dc56 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/ChefSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/ChefSyncFields.tsx@@ -2,7 +2,14 @@ import { Controller, useFormContext, useWatch } from "react-hook-form";import { SingleValue } from "react-select";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";-import { FilterableSelect, FormControl } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldError,+ FieldGroup,+ FieldLabel,+ FilterableSelect+} from "@app/components/v3";import {TChefDataBag,TChefDataBagItem,@@ -39,30 +46,33 @@ export const ChefSyncFields = () => {};return (- <>+ <FieldGroup><SecretSyncConnectionField onChange={handleChangeConnection} /><Controllername="destinationConfig.dataBagName"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl isError={Boolean(error)} errorText={error?.message} label="Data Bag">- <FilterableSelect- menuPlacement="top"- isLoading={isDataBagsLoading && Boolean(connectionId)}- isDisabled={!connectionId}- value={dataBags?.find((dataBag) => dataBag.name === value) ?? null}- onChange={(option) => {- const selectedDataBag = option as SingleValue<TChefDataBag>;- onChange(selectedDataBag?.name ?? "");- setValue("destinationConfig.dataBagItemName", "");- }}- options={dataBags}- placeholder="Select a data bag..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.name}- />- </FormControl>+ <Field>+ <FieldLabel>Data Bag</FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isDataBagsLoading && Boolean(connectionId)}+ isDisabled={!connectionId}+ value={dataBags?.find((dataBag) => dataBag.name === value) ?? null}+ onChange={(option) => {+ const selectedDataBag = option as SingleValue<TChefDataBag>;+ onChange(selectedDataBag?.name ?? "");+ setValue("destinationConfig.dataBagItemName", "");+ }}+ options={dataBags}+ placeholder="Select a data bag..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.name}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>@@ -70,24 +80,27 @@ export const ChefSyncFields = () => {name="destinationConfig.dataBagItemName"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl isError={Boolean(error)} errorText={error?.message} label="Data Bag Item">- <FilterableSelect- menuPlacement="top"- isLoading={isDataBagItemsLoading && Boolean(connectionId && dataBagName)}- isDisabled={!connectionId || !dataBagName}- value={dataBagItems?.find((dataBagItem) => dataBagItem.name === value) ?? null}- onChange={(option) => {- const selectedDataBagItem = option as SingleValue<TChefDataBagItem>;- onChange(selectedDataBagItem?.name ?? "");- }}- options={dataBagItems}- placeholder="Select a data bag item..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.name}- />- </FormControl>+ <Field>+ <FieldLabel>Data Bag Item</FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isDataBagItemsLoading && Boolean(connectionId && dataBagName)}+ isDisabled={!connectionId || !dataBagName}+ value={dataBagItems?.find((dataBagItem) => dataBagItem.name === value) ?? null}+ onChange={(option) => {+ const selectedDataBagItem = option as SingleValue<TChefDataBagItem>;+ onChange(selectedDataBagItem?.name ?? "");+ }}+ options={dataBagItems}+ placeholder="Select a data bag item..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.name}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/CircleCISyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/CircleCISyncFields.tsxindex eafab7785a..5397c5c722 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/CircleCISyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/CircleCISyncFields.tsx@@ -3,7 +3,14 @@ import { Controller, useFormContext, useWatch } from "react-hook-form";import { SingleValue } from "react-select";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";-import { FilterableSelect, FormControl } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldError,+ FieldGroup,+ FieldLabel,+ FilterableSelect+} from "@app/components/v3";import {TCircleCIOrganization,TCircleCIProject,@@ -34,7 +41,7 @@ export const CircleCISyncFields = () => {const projects = selectedOrganization?.projects ?? [];return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.orgName", "");@@ -47,23 +54,27 @@ export const CircleCISyncFields = () => {name="destinationConfig.orgName"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl isError={Boolean(error)} errorText={error?.message} label="Organization">- <FilterableSelect- isLoading={isOrganizationsPending && Boolean(connectionId)}- isDisabled={!connectionId}- value={organizations.find((org) => org.name === value) ?? null}- onChange={(option) => {- const selectedOrg = option as SingleValue<TCircleCIOrganization>;- onChange(selectedOrg?.name ?? "");- setValue("destinationConfig.projectId", "");- setValue("destinationConfig.projectName", "");- }}- options={organizations}- placeholder="Select an organization..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.name}- />- </FormControl>+ <Field>+ <FieldLabel>Organization</FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isOrganizationsPending && Boolean(connectionId)}+ isDisabled={!connectionId}+ value={organizations.find((org) => org.name === value) ?? null}+ onChange={(option) => {+ const selectedOrg = option as SingleValue<TCircleCIOrganization>;+ onChange(selectedOrg?.name ?? "");+ setValue("destinationConfig.projectId", "");+ setValue("destinationConfig.projectName", "");+ }}+ options={organizations}+ placeholder="Select an organization..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.name}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>@@ -71,27 +82,31 @@ export const CircleCISyncFields = () => {name="destinationConfig.projectId"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl isError={Boolean(error)} errorText={error?.message} label="Project">- <FilterableSelect- noOptionsMessage={() =>- "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>;- onChange(selectedProject?.id ?? "");- setValue("destinationConfig.projectName", selectedProject?.name ?? "");- }}- options={projects}- placeholder="Select a project..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id}- />- </FormControl>+ <Field>+ <FieldLabel>Project</FieldLabel>+ <FieldContent>+ <FilterableSelect+ noOptionsMessage={() =>+ "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>;+ onChange(selectedProject?.id ?? "");+ setValue("destinationConfig.projectName", selectedProject?.name ?? "");+ }}+ options={projects}+ placeholder="Select a project..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/CloudflarePagesSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/CloudflarePagesSyncFields.tsxindex eb196c9a45..09f5dda763 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/CloudflarePagesSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/CloudflarePagesSyncFields.tsx@@ -2,7 +2,19 @@ import { Controller, useFormContext, useWatch } from "react-hook-form";import { SingleValue } from "react-select";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";-import { FilterableSelect, FormControl, Select, SelectItem } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldError,+ FieldGroup,+ FieldLabel,+ FilterableSelect,+ Select,+ SelectContent,+ SelectItem,+ SelectTrigger,+ SelectValue+} from "@app/components/v3";import {TCloudflarePagesProject,useCloudflareConnectionListPagesProjects@@ -35,7 +47,7 @@ export const CloudflarePagesSyncFields = () => {});return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.projectName", "");@@ -46,20 +58,24 @@ export const CloudflarePagesSyncFields = () => {name="destinationConfig.projectName"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl errorText={error?.message} isError={Boolean(error?.message)} label="Project">- <FilterableSelect- isLoading={isProjectsPending && Boolean(connectionId)}- isDisabled={!connectionId}- value={projects ? (projects.find((project) => project.name === value) ?? []) : []}- onChange={(option) => {- onChange((option as SingleValue<TCloudflarePagesProject>)?.name ?? null);- }}- options={projects}- placeholder="Select a project..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id.toString()}- />- </FormControl>+ <Field>+ <FieldLabel>Project</FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isProjectsPending && Boolean(connectionId)}+ isDisabled={!connectionId}+ value={projects ? (projects.find((project) => project.name === value) ?? []) : []}+ onChange={(option) => {+ onChange((option as SingleValue<TCloudflarePagesProject>)?.name ?? null);+ }}+ options={projects}+ placeholder="Select a project..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id.toString()}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/><Controller@@ -67,29 +83,26 @@ export const CloudflarePagesSyncFields = () => {control={control}defaultValue="preview"render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- errorText={error?.message}- isError={Boolean(error?.message)}- label="Environment"- tooltipClassName="max-w-lg py-3"- >- <Select- value={value}- onValueChange={(val) => onChange(val)}- className="w-full border border-mineshaft-500 capitalize"- position="popper"- placeholder="Select an environment..."- dropdownContainerClassName="max-w-none"- >- {CLOUDFLARE_ENVIRONMENTS.map(({ name, value: envValue }) => (- <SelectItem className="capitalize" value={envValue} key={envValue}>- {name}- </SelectItem>- ))}- </Select>- </FormControl>+ <Field>+ <FieldLabel>Environment</FieldLabel>+ <FieldContent>+ <Select value={value} onValueChange={(val) => onChange(val)}>+ <SelectTrigger className="w-full capitalize" isError={Boolean(error)}>+ <SelectValue placeholder="Select an environment..." />+ </SelectTrigger>+ <SelectContent position="popper">+ {CLOUDFLARE_ENVIRONMENTS.map(({ name, value: envValue }) => (+ <SelectItem className="capitalize" value={envValue} key={envValue}>+ {name}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/CloudflareWorkersSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/CloudflareWorkersSyncFields.tsxindex c8354fabc1..cc8cd7b437 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/CloudflareWorkersSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/CloudflareWorkersSyncFields.tsx@@ -2,7 +2,14 @@ import { Controller, useFormContext, useWatch } from "react-hook-form";import { SingleValue } from "react-select";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";-import { FilterableSelect, FormControl } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldError,+ FieldGroup,+ FieldLabel,+ FilterableSelect+} from "@app/components/v3";import {TCloudflareWorkersScript,useCloudflareConnectionListWorkersScripts@@ -24,7 +31,7 @@ export const CloudflareWorkersSyncFields = () => {});return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.scriptId", "");@@ -34,26 +41,26 @@ export const CloudflareWorkersSyncFields = () => {name="destinationConfig.scriptId"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- errorText={error?.message}- isError={Boolean(error?.message)}- label="Worker Script"- >- <FilterableSelect- isLoading={isScriptsPending && Boolean(connectionId)}- isDisabled={!connectionId}- value={scripts?.find((script) => script.id === value) || []}- onChange={(option) => {- onChange((option as SingleValue<TCloudflareWorkersScript>)?.id ?? null);- }}- options={scripts}- placeholder="Select a worker script..."- getOptionLabel={(option) => option.id}- getOptionValue={(option) => option.id}- />- </FormControl>+ <Field>+ <FieldLabel>Worker Script</FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isScriptsPending && Boolean(connectionId)}+ isDisabled={!connectionId}+ value={scripts?.find((script) => script.id === value) || []}+ onChange={(option) => {+ onChange((option as SingleValue<TCloudflareWorkersScript>)?.id ?? null);+ }}+ options={scripts}+ placeholder="Select a worker script..."+ getOptionLabel={(option) => option.id}+ getOptionValue={(option) => option.id}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/DatabricksSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/DatabricksSyncFields.tsxindex 533d0d2cfc..76a7b1b66b 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/DatabricksSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/DatabricksSyncFields.tsx@@ -1,10 +1,19 @@import { Controller, useFormContext, useWatch } from "react-hook-form";import { SingleValue } from "react-select";-import { faCircleInfo } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";+import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";-import { FilterableSelect, FormControl, Tooltip } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldError,+ FieldGroup,+ FieldLabel,+ FilterableSelect,+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import {TDatabricksSecretScope,useDatabricksConnectionListSecretScopes@@ -26,7 +35,7 @@ export const DatabricksSyncFields = () => {});return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.scope", "");@@ -36,39 +45,40 @@ export const DatabricksSyncFields = () => {name="destinationConfig.scope"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Secret Scope"- tooltipClassName="max-w-md"- tooltipText="Infisical recommends creating a designated Databricks secret scope for your sync to prevent removal of secrets not managed by Infisical."- helperText={- <Tooltip- className="max-w-md"- content="Ensure that you've created the secret scope in the selected workspace, the service principal has been assigned to the respective workspace and that your service principal has write permissions for the specified secret scope."- >- <div>- <span>Don't see the secret scope you're looking for?</span>{" "}- <FontAwesomeIcon icon={faCircleInfo} className="text-mineshaft-400" />- </div>+ <Field>+ <FieldLabel>+ Secret Scope+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent className="max-w-md">+ Infisical recommends creating a designated Databricks secret scope for your sync+ to prevent removal of secrets not managed by Infisical. Ensure that you've+ created the secret scope in the selected workspace, the service principal has been+ assigned to the respective workspace and that your service principal has write+ permissions for the specified secret scope.+ </TooltipContent></Tooltip>- }- >- <FilterableSelect- isLoading={isSecretScopesPending && Boolean(connectionId)}- isDisabled={!connectionId}- value={secretScopes.find((scope) => scope.name === value) ?? null}- onChange={(option) =>- onChange((option as SingleValue<TDatabricksSecretScope>)?.name ?? null)- }- options={secretScopes}- placeholder="Select a secret scope..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.name}- />- </FormControl>+ </FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isSecretScopesPending && Boolean(connectionId)}+ isDisabled={!connectionId}+ value={secretScopes.find((scope) => scope.name === value) ?? null}+ onChange={(option) =>+ onChange((option as SingleValue<TDatabricksSecretScope>)?.name ?? null)+ }+ options={secretScopes}+ placeholder="Select a secret scope..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.name}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/DevinSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/DevinSyncFields.tsxindex 7c79aa0bac..291822b87c 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/DevinSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/DevinSyncFields.tsx@@ -1,7 +1,18 @@import { Controller, useFormContext } from "react-hook-form";+import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";-import { FormControl, Input } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldError,+ FieldGroup,+ FieldLabel,+ Input,+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";import { TSecretSyncForm } from "../schemas";@@ -10,22 +21,32 @@ export const DevinSyncFields = () => {const { control } = useFormContext<TSecretSyncForm & { destination: SecretSync.Devin }>();return (- <>+ <FieldGroup><SecretSyncConnectionField /><Controllername="destinationConfig.orgId"control={control}render={({ field, fieldState: { error } }) => (- <FormControl- errorText={error?.message}- isError={Boolean(error?.message)}- label="Organization ID"- tooltipText="The Devin organization ID that secrets should be synced to. You can find this in your Devin organization settings."- >- <Input {...field} placeholder="org-..." />- </FormControl>+ <Field>+ <FieldLabel>+ Organization ID+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent>+ The Devin organization ID that secrets should be synced to. You can find this in+ your Devin organization settings.+ </TooltipContent>+ </Tooltip>+ </FieldLabel>+ <FieldContent>+ <Input {...field} placeholder="org-..." isError={Boolean(error)} />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/DigitalOceanAppPlatformSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/DigitalOceanAppPlatformSyncFields.tsxindex e50c82c3fe..a5e3933326 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/DigitalOceanAppPlatformSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/DigitalOceanAppPlatformSyncFields.tsx@@ -2,7 +2,14 @@ import { Controller, useFormContext, useWatch } from "react-hook-form";import { SingleValue } from "react-select";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";-import { FilterableSelect, FormControl } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldError,+ FieldGroup,+ FieldLabel,+ FilterableSelect+} 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";@@ -24,7 +31,7 @@ export const DigitalOceanAppPlatformSyncFields = () => {);return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.appId", "");@@ -35,29 +42,28 @@ export const DigitalOceanAppPlatformSyncFields = () => {name="destinationConfig.appId"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Select an app"- tooltipClassName="max-w-md"- >- <FilterableSelect- isLoading={isAccountsLoading && Boolean(connectionId)}- isDisabled={!connectionId}- value={apps.find((p) => p.id === value) ?? null}- onChange={(option) => {- const v = option as SingleValue<TDigitalOceanApp>;- onChange(v?.id ?? null);- setValue("destinationConfig.appName", v?.spec.name ?? "");- }}- options={apps}- placeholder="Select an app..."- getOptionLabel={(option) => option.spec.name}- getOptionValue={(option) => option.id}- />- </FormControl>+ <Field>+ <FieldLabel>Select an app</FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isAccountsLoading && Boolean(connectionId)}+ isDisabled={!connectionId}+ value={apps.find((p) => p.id === value) ?? null}+ onChange={(option) => {+ const v = option as SingleValue<TDigitalOceanApp>;+ onChange(v?.id ?? null);+ setValue("destinationConfig.appName", v?.spec.name ?? "");+ }}+ options={apps}+ placeholder="Select an app..."+ getOptionLabel={(option) => option.spec.name}+ getOptionValue={(option) => option.id}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/ExternalInfisicalSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/ExternalInfisicalSyncFields.tsxindex a574580477..9a309f5ec1 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/ExternalInfisicalSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/ExternalInfisicalSyncFields.tsx@@ -1,10 +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 { FilterableSelect, FormControl } from "@app/components/v2";-import { SecretPathInput } from "@app/components/v2/SecretPathInput";+import {+ Field,+ FieldContent,+ FieldError,+ FieldGroup,+ FieldLabel,+ FilterableSelect,+ SecretPathInput,+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import {TRemoteInfisicalEnvironmentFolderTree,TRemoteInfisicalProject,@@ -63,7 +74,7 @@ export const ExternalInfisicalSyncFields = () => {}, [folderTree, environmentSlug, currentSecretPath]);return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.projectId", "");@@ -75,55 +86,72 @@ export const ExternalInfisicalSyncFields = () => {name="destinationConfig.projectId"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- errorText={error?.message}- isError={Boolean(error?.message)}- label="Project"- tooltipText="The project on the remote Infisical instance to sync secrets to. Ensure the machine identity used by this connection has access to the project."- >- <FilterableSelect- isLoading={isProjectsLoading && Boolean(connectionId)}- isDisabled={!connectionId}- value={projects.find((p) => p.id === value) ?? null}- onChange={(option) => {- const v = option as SingleValue<TRemoteInfisicalProject>;- onChange(v?.id ?? "");- setValue("destinationConfig.environment", "");- setValue("destinationConfig.secretPath", "/");- }}- options={projects}- placeholder="Select a project..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id}- />- </FormControl>+ <Field>+ <FieldLabel>+ Project+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent>+ The project on the remote Infisical instance to sync secrets to. Ensure the+ machine identity used by this connection has access to the project.+ </TooltipContent>+ </Tooltip>+ </FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isProjectsLoading && Boolean(connectionId)}+ isDisabled={!connectionId}+ value={projects.find((p) => p.id === value) ?? null}+ onChange={(option) => {+ const v = option as SingleValue<TRemoteInfisicalProject>;+ onChange(v?.id ?? "");+ setValue("destinationConfig.environment", "");+ setValue("destinationConfig.secretPath", "/");+ }}+ options={projects}+ placeholder="Select a project..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/><Controllername="destinationConfig.environment"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- errorText={error?.message}- isError={Boolean(error?.message)}- label="Environment"- tooltipText="The environment on the remote Infisical instance"- >- <FilterableSelect- 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 }>;- onChange(v?.slug ?? "");- setValue("destinationConfig.secretPath", "/");- }}- options={environments}- placeholder="Select an environment..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.slug}- />- </FormControl>+ <Field>+ <FieldLabel>+ Environment+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent>The environment on the remote Infisical instance.</TooltipContent>+ </Tooltip>+ </FieldLabel>+ <FieldContent>+ <FilterableSelect+ 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 }>;+ onChange(v?.slug ?? "");+ setValue("destinationConfig.secretPath", "/");+ }}+ options={environments}+ placeholder="Select an environment..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.slug}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/><Controller@@ -131,21 +159,30 @@ export const ExternalInfisicalSyncFields = () => {control={control}defaultValue="/"render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- errorText={error?.message}- isError={Boolean(error?.message)}- label="Secret path"- tooltipText="The folder path on the remote Infisical instance to sync secrets to"- >- <SecretPathInput- isDisabled={!connectionId || !projectId || !environmentSlug}- value={value}- onChange={onChange}- folderNames={childFolderNamesAtPath}- />- </FormControl>+ <Field>+ <FieldLabel>+ Secret path+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent>+ The folder path on the remote Infisical instance to sync secrets to.+ </TooltipContent>+ </Tooltip>+ </FieldLabel>+ <FieldContent>+ <SecretPathInput+ disabled={!connectionId || !projectId || !environmentSlug}+ value={value}+ onChange={onChange}+ folderNames={childFolderNamesAtPath}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/FlyioSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/FlyioSyncFields.tsxindex f650a53938..86e779dd20 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/FlyioSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/FlyioSyncFields.tsx@@ -2,7 +2,14 @@ import { Controller, useFormContext, useWatch } from "react-hook-form";import { SingleValue } from "react-select";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";-import { FilterableSelect, FormControl } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldError,+ FieldGroup,+ FieldLabel,+ FilterableSelect+} from "@app/components/v3";import { TFlyioApp, useFlyioConnectionListApps } from "@app/hooks/api/appConnections/flyio";import { SecretSync } from "@app/hooks/api/secretSyncs";@@ -20,7 +27,7 @@ export const FlyioSyncFields = () => {});return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.appId", "");@@ -31,24 +38,27 @@ export const FlyioSyncFields = () => {name="destinationConfig.appId"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl isError={Boolean(error)} errorText={error?.message} label="App">- <FilterableSelect- menuPlacement="top"- isLoading={isAppsLoading && Boolean(connectionId)}- isDisabled={!connectionId}- value={apps?.find((v) => v.id === value) ?? null}- onChange={(option) => {- const selected = option as SingleValue<TFlyioApp>;- onChange(selected?.id ?? null);- }}- options={apps}- placeholder="Select an app..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id}- />- </FormControl>+ <Field>+ <FieldLabel>App</FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isAppsLoading && Boolean(connectionId)}+ isDisabled={!connectionId}+ value={apps?.find((v) => v.id === value) ?? null}+ onChange={(option) => {+ const selected = option as SingleValue<TFlyioApp>;+ onChange(selected?.id ?? null);+ }}+ options={apps}+ placeholder="Select an app..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GcpSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GcpSyncFields.tsxindex 08414c14e8..6575d1ca93 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GcpSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GcpSyncFields.tsx@@ -1,12 +1,26 @@import { useEffect } from "react";import { Controller, useFormContext, useWatch } from "react-hook-form";import { SingleValue } from "react-select";-import { faCircleInfo } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";+import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";-import { FilterableSelect, FormControl, Select, SelectItem, Tooltip } from "@app/components/v2";-import { Badge } from "@app/components/v3";+import {+ Badge,+ Field,+ FieldContent,+ FieldError,+ FieldGroup,+ FieldLabel,+ FilterableSelect,+ Select,+ SelectContent,+ SelectItem,+ SelectTrigger,+ SelectValue,+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import { GCP_SYNC_SCOPES } from "@app/helpers/secretSyncs";import {useGcpConnectionListProjectLocations,@@ -49,7 +63,7 @@ export const GcpSyncFields = () => {}, []);return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.projectId", "");@@ -60,84 +74,86 @@ export const GcpSyncFields = () => {name="destinationConfig.projectId"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Project"- helperText={- <Tooltip- className="max-w-md"- content="Ensure that you've enabled the Secret Manager API, Cloud Resource Manager API, and Service Usage API on your GCP project. Additionally, make sure that the service account is assigned the appropriate GCP roles."- >- <div>- <span>Don't see the project you're looking for?</span>{" "}- <FontAwesomeIcon icon={faCircleInfo} className="text-mineshaft-400" />- </div>+ <Field>+ <FieldLabel>+ Project+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent className="max-w-md">+ Ensure that you've enabled the Secret Manager API, Cloud Resource Manager+ API, and Service Usage API on your GCP project. Additionally, make sure that the+ service account is assigned the appropriate GCP roles.+ </TooltipContent></Tooltip>- }- >- <FilterableSelect- menuPlacement="top"- isLoading={isPending && Boolean(connectionId)}- isDisabled={!connectionId}- value={projects?.find((project) => project.id === value) ?? null}- onChange={(option) => {- setValue("destinationConfig.locationId", "");- onChange((option as SingleValue<TGcpProject>)?.id ?? null);- }}- options={projects}- placeholder="Select a GCP project..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id.toString()}- />- </FormControl>+ </FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isPending && Boolean(connectionId)}+ isDisabled={!connectionId}+ value={projects?.find((project) => project.id === value) ?? null}+ onChange={(option) => {+ setValue("destinationConfig.locationId", "");+ onChange((option as SingleValue<TGcpProject>)?.id ?? null);+ }}+ options={projects}+ placeholder="Select a GCP project..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id.toString()}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/><Controllername="destinationConfig.scope"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error?.message)}- tooltipText={- <div className="flex flex-col gap-3">- <p>- Specify how Infisical should sync secrets to GCP. The following options are- available:- </p>- <ul className="flex list-disc flex-col gap-3 pl-4">- {Object.values(GCP_SYNC_SCOPES).map(({ name, description }) => {- return (- <li key={name}>- <p className="text-mineshaft-300">- <span className="font-medium text-bunker-200">{name}</span>: {description}- </p>- </li>- );- })}- </ul>- </div>- }- tooltipClassName="max-w-lg"- label="Scope"- >- <Select- value={value}- onValueChange={(val) => onChange(val)}- className="w-full border border-mineshaft-500 capitalize"- position="popper"- dropdownContainerClassName="max-w-none"- isDisabled={!projectId}- >- {Object.values(GcpSyncScope).map((scope) => {- return (- <SelectItem className="capitalize" value={scope} key={scope}>- {scope}- </SelectItem>- );- })}- </Select>- </FormControl>+ <Field>+ <FieldLabel>+ Scope+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent className="max-w-lg">+ <div className="flex flex-col gap-3">+ <p>+ Specify how Infisical should sync secrets to GCP. The following options are+ available:+ </p>+ <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>:{" "}+ {description}+ </p>+ </li>+ ))}+ </ul>+ </div>+ </TooltipContent>+ </Tooltip>+ </FieldLabel>+ <FieldContent>+ <Select value={value} onValueChange={(val) => onChange(val)} disabled={!projectId}>+ <SelectTrigger className="w-full capitalize" isError={Boolean(error)}>+ <SelectValue placeholder="Select a scope..." />+ </SelectTrigger>+ <SelectContent position="popper">+ {Object.values(GcpSyncScope).map((scope) => (+ <SelectItem className="capitalize" value={scope} key={scope}>+ {scope}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>{selectedScope === GcpSyncScope.Region && (@@ -145,24 +161,27 @@ export const GcpSyncFields = () => {name="destinationConfig.locationId"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl isError={Boolean(error)} errorText={error?.message} label="Region">- <FilterableSelect- menuPlacement="top"- isLoading={areLocationsPending && Boolean(projectId)}- isDisabled={!projectId}- value={locations?.find((option) => option.locationId === value) ?? null}- onChange={(option) =>- onChange((option as SingleValue<TGcpLocation>)?.locationId ?? null)- }- options={locations}- placeholder="Select a region..."- getOptionValue={(option) => option.locationId}- formatOptionLabel={formatOptionLabel}- />- </FormControl>+ <Field>+ <FieldLabel>Region</FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={areLocationsPending && Boolean(projectId)}+ isDisabled={!projectId}+ value={locations?.find((option) => option.locationId === value) ?? null}+ onChange={(option) =>+ onChange((option as SingleValue<TGcpLocation>)?.locationId ?? null)+ }+ options={locations}+ placeholder="Select a region..."+ getOptionValue={(option) => option.locationId}+ formatOptionLabel={formatOptionLabel}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>)}- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GitHubSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GitHubSyncFields.tsxindex cabda1e669..a3879aeae1 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GitHubSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GitHubSyncFields.tsx@@ -2,7 +2,19 @@ import { Controller, useFormContext, useWatch } from "react-hook-form";import { MultiValue, SingleValue } from "react-select";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";-import { FilterableSelect, FormControl, Select, SelectItem } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldError,+ FieldGroup,+ FieldLabel,+ FilterableSelect,+ Select,+ SelectContent,+ SelectItem,+ SelectTrigger,+ SelectValue+} from "@app/components/v3";import {TGitHubConnectionEnvironment,TGitHubConnectionOrganization,@@ -59,7 +71,7 @@ export const GitHubSyncFields = () => {);return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.org", "");@@ -73,24 +85,24 @@ export const GitHubSyncFields = () => {control={control}defaultValue={GitHubSyncScope.Repository}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl errorText={error?.message} isError={Boolean(error?.message)} label="Scope">- <Select- value={value}- onValueChange={(val) => {- onChange(val);- }}- className="w-full border border-mineshaft-500 capitalize"- position="popper"- placeholder="Select a scope..."- dropdownContainerClassName="max-w-none"- >- {Object.values(GitHubSyncScope).map((scope) => (- <SelectItem className="capitalize" value={scope} key={scope}>- {scope.replace("-", " ")}- </SelectItem>- ))}- </Select>- </FormControl>+ <Field>+ <FieldLabel>Scope</FieldLabel>+ <FieldContent>+ <Select value={value} onValueChange={(val) => onChange(val)}>+ <SelectTrigger className="w-full capitalize" isError={Boolean(error)}>+ <SelectValue placeholder="Select a scope..." />+ </SelectTrigger>+ <SelectContent position="popper">+ {Object.values(GitHubSyncScope).map((scope) => (+ <SelectItem className="capitalize" value={scope} key={scope}>+ {scope.replace("-", " ")}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>{currentScope === GitHubSyncScope.Organization && (@@ -99,20 +111,26 @@ export const GitHubSyncFields = () => {name="destinationConfig.org"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl isError={Boolean(error)} errorText={error?.message} label="Organization">- <FilterableSelect- isLoading={isOrganizationsPending && Boolean(connectionId)}- isDisabled={!connectionId}- value={organizations.find((org) => org.login === value) ?? null}- onChange={(option) =>- onChange((option as SingleValue<TGitHubConnectionOrganization>)?.login ?? null)- }- options={organizations}- placeholder="Select an organization..."- getOptionLabel={(option) => option.login}- getOptionValue={(option) => option.login}- />- </FormControl>+ <Field>+ <FieldLabel>Organization</FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isOrganizationsPending && Boolean(connectionId)}+ isDisabled={!connectionId}+ value={organizations.find((org) => org.login === value) ?? null}+ onChange={(option) =>+ onChange(+ (option as SingleValue<TGitHubConnectionOrganization>)?.login ?? null+ )+ }+ options={organizations}+ placeholder="Select an organization..."+ getOptionLabel={(option) => option.login}+ getOptionValue={(option) => option.login}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/><Controller@@ -120,55 +138,55 @@ export const GitHubSyncFields = () => {control={control}defaultValue={GitHubSyncVisibility.All}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- errorText={error?.message}- isError={Boolean(error?.message)}- label="Visibility"- >- <Select- value={value}- onValueChange={(val) => {- onChange(val);- setValue("destinationConfig.selectedRepositoryIds", undefined);- }}- className="w-full border border-mineshaft-500 capitalize"- position="popper"- placeholder="Select visibility..."- dropdownContainerClassName="max-w-none"- >- {Object.values(GitHubSyncVisibility).map((scope) => (- <SelectItem className="capitalize" value={scope} key={scope}>- {scope.replace("-", " ")} Repositories- </SelectItem>- ))}- </Select>- </FormControl>+ <Field>+ <FieldLabel>Visibility</FieldLabel>+ <FieldContent>+ <Select+ value={value}+ onValueChange={(val) => {+ onChange(val);+ setValue("destinationConfig.selectedRepositoryIds", undefined);+ }}+ >+ <SelectTrigger className="w-full capitalize" isError={Boolean(error)}>+ <SelectValue placeholder="Select visibility..." />+ </SelectTrigger>+ <SelectContent position="popper">+ {Object.values(GitHubSyncVisibility).map((scope) => (+ <SelectItem className="capitalize" value={scope} key={scope}>+ {scope.replace("-", " ")} Repositories+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>{currentVisibility === GitHubSyncVisibility.Selected && (<Controllerrender={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Selected Repositories"- >- <FilterableSelect- menuPlacement="top"- isLoading={isRepositoriesPending && Boolean(currentOrg)}- isDisabled={!currentOrg || !connectionId}- isMulti- value={repositories.filter((repo) => value?.includes(repo.id))}- onChange={(option) => {- const repos = option as MultiValue<TGitHubConnectionRepository>;- 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()}- />- </FormControl>+ <Field>+ <FieldLabel>Selected Repositories</FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isRepositoriesPending && Boolean(currentOrg)}+ isDisabled={!currentOrg || !connectionId}+ isMulti+ value={repositories.filter((repo) => value?.includes(repo.id))}+ onChange={(option) => {+ const repos = option as MultiValue<TGitHubConnectionRepository>;+ 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()}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}control={control}name="destinationConfig.selectedRepositoryIds"@@ -179,25 +197,28 @@ export const GitHubSyncFields = () => {{currentScope !== GitHubSyncScope.Organization && (<Controllerrender={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl isError={Boolean(error)} errorText={error?.message} label="Repository">- <FilterableSelect- menuPlacement="top"- isLoading={isRepositoriesPending && Boolean(connectionId)}- isDisabled={!connectionId}- value={repositories.find((repo) => repo.name === value) ?? null}- onChange={(option) => {- const repo = option as SingleValue<TGitHubConnectionRepository>;+ <Field>+ <FieldLabel>Repository</FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isRepositoriesPending && Boolean(connectionId)}+ isDisabled={!connectionId}+ value={repositories.find((repo) => repo.name === value) ?? null}+ onChange={(option) => {+ const repo = option as SingleValue<TGitHubConnectionRepository>;- onChange(repo?.name);- setValue("destinationConfig.owner", repo?.owner.login ?? "");- setValue("destinationConfig.env", "");- }}- options={repositories}- placeholder="Select a repository..."- getOptionLabel={(option) => `${option.owner.login}/${option.name}`}- getOptionValue={(option) => option.id.toString()}- />- </FormControl>+ onChange(repo?.name);+ setValue("destinationConfig.owner", repo?.owner.login ?? "");+ setValue("destinationConfig.env", "");+ }}+ options={repositories}+ placeholder="Select a repository..."+ getOptionLabel={(option) => `${option.owner.login}/${option.name}`}+ getOptionValue={(option) => option.id.toString()}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}control={control}name="destinationConfig.repo"@@ -208,24 +229,27 @@ export const GitHubSyncFields = () => {name="destinationConfig.env"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl isError={Boolean(error)} errorText={error?.message} label="Environment">- <FilterableSelect- menuPlacement="top"- 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)- }- options={environments}- placeholder="Select an environment..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id.toString()}- />- </FormControl>+ <Field>+ <FieldLabel>Environment</FieldLabel>+ <FieldContent>+ <FilterableSelect+ 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)+ }+ options={environments}+ placeholder="Select an environment..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id.toString()}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>)}- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GitLabSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GitLabSyncFields.tsxindex 81ed815747..0528f795b0 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GitLabSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GitLabSyncFields.tsx@@ -1,18 +1,28 @@import { Controller, useFormContext, useWatch } from "react-hook-form";import { SingleValue } from "react-select";-import { faCircleInfo, faQuestionCircle } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";+import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Field,+ FieldContent,+ FieldDescription,+ FieldError,+ FieldGroup,+ FieldLabel,FilterableSelect,- FormControl,Input,+ Label,Select,+ SelectContent,SelectItem,+ SelectTrigger,+ SelectValue,Switch,- Tooltip-} from "@app/components/v2";+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import {TGitLabGroup,TGitLabProject,@@ -26,38 +36,33 @@ import { TSecretSyncForm } from "../schemas";const SecretProtectionOption = ({title,+ description,isEnabled,onChange,id,- isDisabled = false,- tooltip+ isDisabled = false}: {title: string;+ description: string;isEnabled: boolean;onChange: (checked: boolean) => void;id: string;isDisabled?: boolean;- tooltip?: string;}) => {return (- <Switch- className="bg-mineshaft-400/80 shadow-inner data-[state=checked]:bg-green/80"- id={id}- thumbClassName="bg-mineshaft-800"- onCheckedChange={onChange}- isChecked={isEnabled}- isDisabled={isDisabled}- containerClassName="w-full"- >- <p>- {title}{" "}- {tooltip && (- <Tooltip className="max-w-md" content={tooltip}>- <FontAwesomeIcon icon={faQuestionCircle} size="sm" className="ml-1" />- </Tooltip>- )}- </p>- </Switch>+ <Field orientation="horizontal">+ <FieldContent className={isDisabled ? "pointer-events-none opacity-50" : undefined}>+ <Label htmlFor={id}>{title}</Label>+ <FieldDescription>{description}</FieldDescription>+ </FieldContent>+ <Switch+ id={id}+ variant="project"+ checked={isEnabled}+ onCheckedChange={onChange}+ disabled={isDisabled}+ />+ </Field>);};@@ -82,7 +87,7 @@ export const GitLabSyncFields = () => {);return (- <div className="h-full overflow-auto">+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.projectId", "");@@ -98,28 +103,33 @@ export const GitLabSyncFields = () => {control={control}defaultValue={GitLabSyncScope.Project}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl errorText={error?.message} isError={Boolean(error?.message)} label="Scope">- <Select- value={value}- onValueChange={(val) => {- onChange(val);- setValue("destinationConfig.projectId", "");- setValue("destinationConfig.projectName", "");- setValue("destinationConfig.groupId", "");- setValue("destinationConfig.groupName", "");- }}- className="w-full border border-mineshaft-500 capitalize"- position="popper"- placeholder="Select a scope..."- dropdownContainerClassName="max-w-none"- >- {Object.values(GitLabSyncScope).map((projectScope) => (- <SelectItem className="capitalize" value={projectScope} key={projectScope}>- {projectScope.replace("-", " ")}- </SelectItem>- ))}- </Select>- </FormControl>+ <Field>+ <FieldLabel>Scope</FieldLabel>+ <FieldContent>+ <Select+ value={value}+ onValueChange={(val) => {+ onChange(val);+ setValue("destinationConfig.projectId", "");+ setValue("destinationConfig.projectName", "");+ setValue("destinationConfig.groupId", "");+ setValue("destinationConfig.groupName", "");+ }}+ >+ <SelectTrigger className="w-full capitalize" isError={Boolean(error)}>+ <SelectValue placeholder="Select a scope..." />+ </SelectTrigger>+ <SelectContent position="popper">+ {Object.values(GitLabSyncScope).map((projectScope) => (+ <SelectItem className="capitalize" value={projectScope} key={projectScope}>+ {projectScope.replace("-", " ")}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>@@ -128,40 +138,38 @@ export const GitLabSyncFields = () => {name="destinationConfig.groupId"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Group"- helperText={- <Tooltip- className="max-w-md"- content="Ensure the group exists in the connection's GitLab instance URL."- >- <div>- <span>Don't see the group you're looking for?</span>{" "}- <FontAwesomeIcon icon={faCircleInfo} className="text-mineshaft-400" />- </div>+ <Field>+ <FieldLabel>+ Group+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent className="max-w-md">+ Ensure the group exists in the connection's GitLab instance URL.+ </TooltipContent></Tooltip>- }- >- <FilterableSelect- menuPlacement="top"- isLoading={isGroupsLoading && Boolean(connectionId)}- isDisabled={!connectionId}- value={groups?.find((group) => group.id === value) ?? null}- onChange={(option) => {- onChange((option as SingleValue<TGitLabGroup>)?.id ?? "");- setValue(- "destinationConfig.groupName",- (option as SingleValue<TGitLabGroup>)?.fullName ?? ""- );- }}- options={groups}- placeholder="Select a group..."- getOptionLabel={(option) => option.fullName}- getOptionValue={(option) => option.id}- />- </FormControl>+ </FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isGroupsLoading && Boolean(connectionId)}+ isDisabled={!connectionId}+ value={groups?.find((group) => group.id === value) ?? null}+ onChange={(option) => {+ onChange((option as SingleValue<TGitLabGroup>)?.id ?? "");+ setValue(+ "destinationConfig.groupName",+ (option as SingleValue<TGitLabGroup>)?.fullName ?? ""+ );+ }}+ options={groups}+ placeholder="Select a group..."+ getOptionLabel={(option) => option.fullName}+ getOptionValue={(option) => option.id}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>)}@@ -171,40 +179,39 @@ export const GitLabSyncFields = () => {name="destinationConfig.projectId"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="GitLab Project"- helperText={- <Tooltip- className="max-w-md"- content="Ensure the project exists in the connection's GitLab instance URL and the connection has access to it."- >- <div>- <span>Don't see the project you're looking for?</span>{" "}- <FontAwesomeIcon icon={faCircleInfo} className="text-mineshaft-400" />- </div>+ <Field>+ <FieldLabel>+ GitLab Project+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent className="max-w-md">+ Ensure the project exists in the connection's GitLab instance URL and the+ connection has access to it.+ </TooltipContent></Tooltip>- }- >- <FilterableSelect- menuPlacement="top"- isLoading={isProjectsLoading && Boolean(connectionId)}- isDisabled={!connectionId}- value={projects?.find((project) => project.id === value) ?? null}- onChange={(option) => {- onChange((option as SingleValue<TGitLabProject>)?.id ?? "");- setValue(- "destinationConfig.projectName",- (option as SingleValue<TGitLabProject>)?.name ?? ""- );- }}- options={projects}- placeholder="Select a project..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id}- />- </FormControl>+ </FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isProjectsLoading && Boolean(connectionId)}+ isDisabled={!connectionId}+ value={projects?.find((project) => project.id === value) ?? null}+ onChange={(option) => {+ onChange((option as SingleValue<TGitLabProject>)?.id ?? "");+ setValue(+ "destinationConfig.projectName",+ (option as SingleValue<TGitLabProject>)?.name ?? ""+ );+ }}+ options={projects}+ placeholder="Select a project..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>)}@@ -214,69 +221,65 @@ export const GitLabSyncFields = () => {defaultValue=""name="destinationConfig.targetEnvironment"render={({ field, fieldState: { error } }) => (- <FormControl- label="GitLab Environment Scope (Optional)"- isError={Boolean(error)}- errorText={error?.message}- >- <Input {...field} placeholder="*" />- </FormControl>+ <Field>+ <FieldLabel>GitLab Environment Scope (Optional)</FieldLabel>+ <FieldContent>+ <Input {...field} placeholder="*" isError={Boolean(error)} />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>- {/* Secret Protection Settings Section */}- <div className="mt-6">- <div className="space-y-4">- <Controller- control={control}- name="destinationConfig.shouldProtectSecrets"- render={({ field: { onChange, value } }) => (- <SecretProtectionOption- id="should-protect-secrets"- title="Mark secrets as Protected"- isEnabled={value || false}- onChange={onChange}- />- )}- />+ <div className="flex flex-col gap-4">+ <Controller+ control={control}+ name="destinationConfig.shouldProtectSecrets"+ render={({ field: { onChange, value } }) => (+ <SecretProtectionOption+ id="should-protect-secrets"+ title="Mark secrets as Protected"+ description="When enabled, variables are only exposed to pipelines running on protected branches and protected tags in GitLab."+ isEnabled={value || false}+ onChange={onChange}+ />+ )}+ />- <Controller- control={control}- name="destinationConfig.shouldMaskSecrets"- render={({ field: { onChange, value } }) => (- <SecretProtectionOption- id="should-mask-secrets"- title="Mark secrets as Masked"- tooltip="GitLab has limitations for masked variables: secrets must be at least 8 characters long and not match existing CI/CD variable names. Secrets not meeting these criteria won't be masked."- isEnabled={value || false}- onChange={(checked) => {- onChange(checked);- if (!checked) {- setValue("destinationConfig.shouldHideSecrets", false);- }- }}- />- )}- />+ <Controller+ control={control}+ name="destinationConfig.shouldMaskSecrets"+ render={({ field: { onChange, value } }) => (+ <SecretProtectionOption+ id="should-mask-secrets"+ title="Mark secrets as Masked"+ description="GitLab hides masked variables in job logs. Variables must be at least 8 characters and meet GitLab's masking requirements to be masked successfully."+ isEnabled={value || false}+ onChange={(checked) => {+ onChange(checked);+ if (!checked) {+ setValue("destinationConfig.shouldHideSecrets", false);+ }+ }}+ />+ )}+ />- <Controller- control={control}- name="destinationConfig.shouldHideSecrets"- render={({ field: { onChange, value } }) => (- <div className="max-h-32 opacity-100 transition-all duration-300">- <SecretProtectionOption- id="should-hide-secrets"- title="Mark secrets as Hidden"- tooltip="Secrets can only be marked as hidden if they are also masked. If this is enabled, Infisical will not be able to unhide/unmask secrets from the sync destination if you disable the option later."- isEnabled={value || false}- onChange={onChange}- isDisabled={!shouldMaskSecrets}- />- </div>- )}- />- </div>+ <Controller+ control={control}+ name="destinationConfig.shouldHideSecrets"+ render={({ field: { onChange, value } }) => (+ <SecretProtectionOption+ id="should-hide-secrets"+ title="Mark secrets as Hidden"+ description="Hides the variable value in the GitLab UI. Requires masking to be enabled. Once enabled, Infisical can no longer unhide or unmask the variable from GitLab."+ isEnabled={value || false}+ onChange={onChange}+ isDisabled={!shouldMaskSecrets}+ />+ )}+ /></div>- </div>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/HCVaultSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/HCVaultSyncFields.tsxindex d06d242bbf..7ac9a966f4 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/HCVaultSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/HCVaultSyncFields.tsx@@ -1,10 +1,20 @@import { Controller, useFormContext, useWatch } from "react-hook-form";import { SingleValue } from "react-select";-import { faCircleInfo } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";+import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";-import { FilterableSelect, FormControl, Input, Tooltip } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldError,+ FieldGroup,+ FieldLabel,+ FilterableSelect,+ Input,+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import { useHCVaultConnectionListMounts } from "@app/hooks/api/appConnections/hc-vault";import { SecretSync } from "@app/hooks/api/secretSyncs";@@ -25,7 +35,7 @@ export const HCVaultSyncFields = () => {);return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.mount", "");@@ -37,50 +47,65 @@ export const HCVaultSyncFields = () => {name="destinationConfig.mount"control={control}render={({ field: { onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Secrets Engine Mount"- helperText={- <Tooltip- className="max-w-md"- content="Ensure the Secrets Engine mount exists and that your App Role / Access Token has permission to access it. Infisical currently supports KV Engines version 1 and 2. If you're using Hashicorp Cloud Platform, ensure that you correctly defined your 'namespace' when creating the App Connection."- >- <div>- <span>Don't see the mount you're looking for?</span>{" "}- <FontAwesomeIcon icon={faCircleInfo} className="text-mineshaft-400" />- </div>+ <Field>+ <FieldLabel>+ Secrets Engine Mount+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent className="max-w-md">+ Ensure the Secrets Engine mount exists and that your App Role / Access Token has+ permission to access it. Infisical currently supports KV Engines version 1 and 2.+ If you're using Hashicorp Cloud Platform, ensure that you correctly defined+ your 'namespace' when creating the App Connection.+ </TooltipContent></Tooltip>- }- >- <FilterableSelect- menuPlacement="top"- isLoading={isMountsLoading && Boolean(connectionId)}- isDisabled={!connectionId}- onChange={(option) =>- onChange((option as SingleValue<{ value: string }>)?.value ?? null)- }- options={mounts?.map((v) => ({ label: v, value: v }))}- placeholder="Select a Secrets Engine Mount..."- />- </FormControl>+ </FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isMountsLoading && Boolean(connectionId)}+ isDisabled={!connectionId}+ onChange={(option) =>+ onChange((option as SingleValue<{ value: string }>)?.value ?? null)+ }+ options={mounts?.map((v) => ({ label: v, value: v }))}+ placeholder="Select a Secrets Engine Mount..."+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/><Controllername="destinationConfig.path"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- tooltipClassName="max-w-sm"- tooltipText="The Secrets Engine mount path where secrets should be synced to. If the path does not exist, it will be created."- isError={Boolean(error)}- errorText={error?.message}- label="Path"- >- <Input value={value} onChange={onChange} placeholder="dev/example" />- </FormControl>+ <Field>+ <FieldLabel>+ Path+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent className="max-w-sm">+ The Secrets Engine mount path where secrets should be synced to. If the path does+ not exist, it will be created.+ </TooltipContent>+ </Tooltip>+ </FieldLabel>+ <FieldContent>+ <Input+ value={value}+ onChange={onChange}+ placeholder="dev/example"+ isError={Boolean(error)}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/HerokuSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/HerokuSyncFields.tsxindex 6ceb94b3f5..bddabc5d3d 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/HerokuSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/HerokuSyncFields.tsx@@ -1,10 +1,19 @@import { Controller, useFormContext, useWatch } from "react-hook-form";import { SingleValue } from "react-select";-import { faCircleInfo } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";+import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";-import { FilterableSelect, FormControl, Tooltip } from "@app/components/v2";+import {+ 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";@@ -23,7 +32,7 @@ export const HerokuSyncFields = () => {});return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.app", "");@@ -35,42 +44,40 @@ export const HerokuSyncFields = () => {name="destinationConfig.app"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="App"- helperText={- <Tooltip- className="max-w-md"- content="Ensure the app exists in the connection's Heroku instance URL."- >- <div>- <span>Don't see the app you're looking for?</span>{" "}- <FontAwesomeIcon icon={faCircleInfo} className="text-mineshaft-400" />- </div>+ <Field>+ <FieldLabel>+ App+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent className="max-w-md">+ Ensure the app exists in the connection's Heroku instance URL.+ </TooltipContent></Tooltip>- }- >- <FilterableSelect- menuPlacement="top"- 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 ?? ""- );- }}- options={apps}- placeholder="Select an app..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id}- />- </FormControl>+ </FieldLabel>+ <FieldContent>+ <FilterableSelect+ 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 ?? ""+ );+ }}+ options={apps}+ placeholder="Select an app..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/HumanitecSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/HumanitecSyncFields.tsxindex 229f54b017..cfcda256ae 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/HumanitecSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/HumanitecSyncFields.tsx@@ -1,10 +1,24 @@import { Controller, useFormContext, useWatch } from "react-hook-form";import { SingleValue } from "react-select";-import { faCircleInfo } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";+import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";-import { FilterableSelect, FormControl, Select, SelectItem, Tooltip } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldError,+ FieldGroup,+ FieldLabel,+ FilterableSelect,+ Select,+ SelectContent,+ SelectItem,+ SelectTrigger,+ SelectValue,+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import { HUMANITEC_SYNC_SCOPES } from "@app/helpers/secretSyncs";import {THumanitecConnectionApp,@@ -37,7 +51,7 @@ export const HumanitecSyncFields = () => {const environments = selectedApp?.envs || [];return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.org", "");@@ -49,69 +63,68 @@ export const HumanitecSyncFields = () => {name="destinationConfig.org"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- errorText={error?.message}- isError={Boolean(error?.message)}- label="Organization"- >- <FilterableSelect- isLoading={isOrganizationsPending && Boolean(connectionId)}- isDisabled={!connectionId}- value={organizations ? (organizations.find((org) => org.id === value) ?? []) : []}- onChange={(option) => {- onChange((option as SingleValue<THumanitecConnectionOrganization>)?.id ?? null);- setValue("destinationConfig.app", "");- setValue("destinationConfig.env", "");- }}- options={organizations}- placeholder="Select an organization..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id.toString()}- />- </FormControl>+ <Field>+ <FieldLabel>Organization</FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isOrganizationsPending && Boolean(connectionId)}+ isDisabled={!connectionId}+ value={organizations ? (organizations.find((org) => org.id === value) ?? []) : []}+ onChange={(option) => {+ onChange((option as SingleValue<THumanitecConnectionOrganization>)?.id ?? null);+ setValue("destinationConfig.app", "");+ setValue("destinationConfig.env", "");+ }}+ options={organizations}+ placeholder="Select an organization..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id.toString()}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/><Controllername="destinationConfig.app"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="App"- helperText={- <Tooltip- className="max-w-md"- content="Ensure that the app exists in the selected organization and the service account used on this connection has write permissions for the specified app."- >- <div>- <span>Don't see the app you're looking for?</span>{" "}- <FontAwesomeIcon icon={faCircleInfo} className="text-mineshaft-400" />- </div>+ <Field>+ <FieldLabel>+ App+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent className="max-w-md">+ Ensure that the app exists in the selected organization and the service account+ used on this connection has write permissions for the specified app.+ </TooltipContent></Tooltip>- }- >- <FilterableSelect- menuPlacement="top"- isLoading={isOrganizationsPending && Boolean(connectionId) && Boolean(currentOrg)}- isDisabled={!connectionId || !currentOrg}- value={- organizations- .find((org) => org.id === currentOrg)- ?.apps?.find((app) => app.id === value) ?? null- }- onChange={(option) => {- onChange((option as SingleValue<THumanitecConnectionApp>)?.id ?? null);- setValue("destinationConfig.env", "");- }}- options={- currentOrg ? (organizations.find((org) => org.id === currentOrg)?.apps ?? []) : []- }- placeholder="Select an app..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id.toString()}- />- </FormControl>+ </FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isOrganizationsPending && Boolean(connectionId) && Boolean(currentOrg)}+ isDisabled={!connectionId || !currentOrg}+ value={+ organizations+ .find((org) => org.id === currentOrg)+ ?.apps?.find((app) => app.id === value) ?? null+ }+ onChange={(option) => {+ onChange((option as SingleValue<THumanitecConnectionApp>)?.id ?? null);+ setValue("destinationConfig.env", "");+ }}+ options={+ currentOrg ? (organizations.find((org) => org.id === currentOrg)?.apps ?? []) : []+ }+ placeholder="Select an app..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id.toString()}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/><Controller@@ -119,49 +132,55 @@ export const HumanitecSyncFields = () => {control={control}defaultValue={HumanitecSyncScope.Application}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- errorText={error?.message}- isError={Boolean(error?.message)}- label="Scope"- tooltipClassName="max-w-lg py-3"- tooltipText={- <div className="flex flex-col gap-3">- <p>- Specify how Infisical should manage secrets from Humanitec. The following options- are available:- </p>- <ul className="flex list-disc flex-col gap-3 pl-4">- {Object.values(HUMANITEC_SYNC_SCOPES).map(({ name, description }) => {- return (- <li key={name}>- <p className="text-mineshaft-300">- <span className="font-medium text-bunker-200">{name}</span>: {description}- </p>- </li>- );- })}- </ul>- </div>- }- >- <Select- value={value}- onValueChange={(val) => {- onChange(val);- setValue("destinationConfig.env", "");- }}- className="w-full border border-mineshaft-500 capitalize"- position="popper"- placeholder="Select a scope..."- dropdownContainerClassName="max-w-none"- >- {Object.values(HumanitecSyncScope).map((scope) => (- <SelectItem className="capitalize" value={scope} key={scope}>- {scope.replace("-", " ")}- </SelectItem>- ))}- </Select>- </FormControl>+ <Field>+ <FieldLabel>+ Scope+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent className="max-w-lg">+ <div className="flex flex-col gap-3">+ <p>+ Specify how Infisical should manage secrets from Humanitec. The following+ options are available:+ </p>+ <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>:{" "}+ {description}+ </p>+ </li>+ ))}+ </ul>+ </div>+ </TooltipContent>+ </Tooltip>+ </FieldLabel>+ <FieldContent>+ <Select+ value={value}+ onValueChange={(val) => {+ onChange(val);+ setValue("destinationConfig.env", "");+ }}+ >+ <SelectTrigger className="w-full capitalize" isError={Boolean(error)}>+ <SelectValue placeholder="Select a scope..." />+ </SelectTrigger>+ <SelectContent position="popper">+ {Object.values(HumanitecSyncScope).map((scope) => (+ <SelectItem className="capitalize" value={scope} key={scope}>+ {scope.replace("-", " ")}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>{currentScope === HumanitecSyncScope.Environment && (@@ -169,29 +188,32 @@ export const HumanitecSyncFields = () => {name="destinationConfig.env"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl isError={Boolean(error)} errorText={error?.message} label="Environment">- <FilterableSelect- menuPlacement="top"- isLoading={- isOrganizationsPending &&- Boolean(connectionId) &&- Boolean(currentOrg) &&- Boolean(currentApp)- }- isDisabled={!connectionId || !currentApp}- value={environments.find((env) => env.id === value) ?? null}- onChange={(option) =>- onChange((option as SingleValue<THumanitecConnectionEnvironment>)?.id ?? null)- }- options={environments}- placeholder="Select an env..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id.toString()}- />- </FormControl>+ <Field>+ <FieldLabel>Environment</FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={+ isOrganizationsPending &&+ Boolean(connectionId) &&+ Boolean(currentOrg) &&+ Boolean(currentApp)+ }+ isDisabled={!connectionId || !currentApp}+ value={environments.find((env) => env.id === value) ?? null}+ onChange={(option) =>+ onChange((option as SingleValue<THumanitecConnectionEnvironment>)?.id ?? null)+ }+ options={environments}+ placeholder="Select an env..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id.toString()}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>)}- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/LaravelForgeSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/LaravelForgeSyncFields.tsxindex 90409da4f0..bfc8832d48 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/LaravelForgeSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/LaravelForgeSyncFields.tsx@@ -2,7 +2,14 @@ import { Controller, useFormContext, useWatch } from "react-hook-form";import { SingleValue } from "react-select";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";-import { FilterableSelect, FormControl } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldError,+ FieldGroup,+ FieldLabel,+ FilterableSelect+} from "@app/components/v3";import {TLaravelForgeOrganization,TLaravelForgeServer,@@ -56,32 +63,35 @@ export const LaravelForgeSyncFields = () => {};return (- <>+ <FieldGroup><SecretSyncConnectionField onChange={handleChangeConnection} /><Controllername="destinationConfig.orgSlug"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl isError={Boolean(error)} errorText={error?.message} label="Organization">- <FilterableSelect- menuPlacement="top"- isLoading={isOrganizationsLoading && Boolean(connectionId)}- isDisabled={!connectionId}- value={organizations?.find((org) => org.slug === value) ?? null}- onChange={(option) => {- const selectedOrg = option as SingleValue<TLaravelForgeOrganization>;- onChange(selectedOrg?.slug ?? "");- setValue("destinationConfig.orgName", selectedOrg?.name ?? "");- setValue("destinationConfig.serverId", "");- setValue("destinationConfig.siteId", "");- }}- options={organizations}- placeholder="Select an organization..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id}- />- </FormControl>+ <Field>+ <FieldLabel>Organization</FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isOrganizationsLoading && Boolean(connectionId)}+ isDisabled={!connectionId}+ value={organizations?.find((org) => org.slug === value) ?? null}+ onChange={(option) => {+ const selectedOrg = option as SingleValue<TLaravelForgeOrganization>;+ onChange(selectedOrg?.slug ?? "");+ setValue("destinationConfig.orgName", selectedOrg?.name ?? "");+ setValue("destinationConfig.serverId", "");+ setValue("destinationConfig.siteId", "");+ }}+ options={organizations}+ placeholder="Select an organization..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>@@ -89,24 +99,27 @@ export const LaravelForgeSyncFields = () => {name="destinationConfig.serverId"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl isError={Boolean(error)} errorText={error?.message} label="Server">- <FilterableSelect- menuPlacement="top"- isLoading={isServersLoading && Boolean(connectionId && orgSlug)}- isDisabled={!connectionId || !orgSlug}- value={servers?.find((server) => server.id === value) ?? null}- onChange={(option) => {- const selectedServer = option as SingleValue<TLaravelForgeServer>;- onChange(selectedServer?.id ?? "");- setValue("destinationConfig.serverName", selectedServer?.name ?? "");- setValue("destinationConfig.siteId", "");- }}- options={servers}- placeholder="Select a server..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id}- />- </FormControl>+ <Field>+ <FieldLabel>Server</FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isServersLoading && Boolean(connectionId && orgSlug)}+ isDisabled={!connectionId || !orgSlug}+ value={servers?.find((server) => server.id === value) ?? null}+ onChange={(option) => {+ const selectedServer = option as SingleValue<TLaravelForgeServer>;+ onChange(selectedServer?.id ?? "");+ setValue("destinationConfig.serverName", selectedServer?.name ?? "");+ setValue("destinationConfig.siteId", "");+ }}+ options={servers}+ placeholder="Select a server..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>@@ -114,25 +127,28 @@ export const LaravelForgeSyncFields = () => {name="destinationConfig.siteId"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl isError={Boolean(error)} errorText={error?.message} label="Site">- <FilterableSelect- menuPlacement="top"- 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>;- onChange(selectedSite?.id ?? "");- setValue("destinationConfig.siteName", selectedSite?.name ?? "");- }}- options={sites}- placeholder="Select a site..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id}- />- </FormControl>+ <Field>+ <FieldLabel>Site</FieldLabel>+ <FieldContent>+ <FilterableSelect+ 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>;+ onChange(selectedSite?.id ?? "");+ setValue("destinationConfig.siteName", selectedSite?.name ?? "");+ }}+ options={sites}+ placeholder="Select a site..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/NetlifySyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/NetlifySyncFields.tsxindex fd977ec2ac..6091522783 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/NetlifySyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/NetlifySyncFields.tsx@@ -2,7 +2,15 @@ import { Controller, useFormContext, useWatch } from "react-hook-form";import { SingleValue } from "react-select";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";-import { FilterableSelect, FormControl } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldDescription,+ FieldError,+ FieldGroup,+ FieldLabel,+ FilterableSelect+} from "@app/components/v3";import {TNetlifyAccount,TNetlifySite,@@ -43,7 +51,7 @@ export const NetlifySyncFields = () => {}));return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.accountId", "");@@ -54,91 +62,89 @@ export const NetlifySyncFields = () => {name="destinationConfig.accountId"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Account"- isRequired- tooltipClassName="max-w-md"- >- <FilterableSelect- isLoading={isAccountsLoading && Boolean(connectionId)}- isDisabled={!connectionId}- value={accounts.find((p) => p.id === value) ?? null}- onChange={(option) => {- const v = option as SingleValue<TNetlifyAccount>;- onChange(v?.id ?? null);- setValue("destinationConfig.accountName", v?.name ?? "");- }}- options={accounts}- placeholder="Select an account..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id}- />- </FormControl>+ <Field>+ <FieldLabel>Account</FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isAccountsLoading && Boolean(connectionId)}+ isDisabled={!connectionId}+ value={accounts.find((p) => p.id === value) ?? null}+ onChange={(option) => {+ const v = option as SingleValue<TNetlifyAccount>;+ onChange(v?.id ?? null);+ setValue("destinationConfig.accountName", v?.name ?? "");+ }}+ options={accounts}+ placeholder="Select an account..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/><Controllername="destinationConfig.siteId"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Site"- isOptional- helperText="If you do not select a site, the secrets will be synced to all sites in the account."- tooltipClassName="max-w-md"- >- <FilterableSelect- 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);- }- }}- options={sites}- placeholder="Select a site..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id}- />- </FormControl>+ <Field>+ <FieldLabel>Site (Optional)</FieldLabel>+ <FieldContent>+ <FilterableSelect+ 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);+ }+ }}+ options={sites}+ placeholder="Select a site..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id}+ />+ <FieldDescription>+ If you do not select a site, the secrets will be synced to all sites in the account.+ </FieldDescription>+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/><Controllername="destinationConfig.context"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Context"- isOptional- helperText="If you do not select a context, the secrets will be synced to all contexts."- tooltipClassName="max-w-md"- >- <FilterableSelect- 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);- }}- options={contexts}- placeholder="Select a context..."- getOptionLabel={(option) => option.label}- getOptionValue={(option) => option.value}- />- </FormControl>+ <Field>+ <FieldLabel>Context (Optional)</FieldLabel>+ <FieldContent>+ <FilterableSelect+ 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);+ }}+ options={contexts}+ placeholder="Select a context..."+ getOptionLabel={(option) => option.label}+ getOptionValue={(option) => option.value}+ />+ <FieldDescription>+ If you do not select a context, the secrets will be synced to all contexts.+ </FieldDescription>+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/NorthflankSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/NorthflankSyncFields.tsxindex 2392e43945..ea12d466a1 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/NorthflankSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/NorthflankSyncFields.tsx@@ -1,10 +1,19 @@import { Controller, useFormContext, useWatch } from "react-hook-form";import { SingleValue } from "react-select";-import { faCircleInfo } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";+import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";-import { FilterableSelect, FormControl, Tooltip } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldError,+ FieldGroup,+ FieldLabel,+ FilterableSelect,+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import {TNorthflankProject,TNorthflankSecretGroup,@@ -36,7 +45,7 @@ export const NorthflankSyncFields = () => {});return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.projectId", "");@@ -49,75 +58,78 @@ export const NorthflankSyncFields = () => {name="destinationConfig.projectId"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Project"- isRequired- helperText={- <Tooltip content="Ensure the project exists in the connection's Northflank team and the connection has access to it.">- <div>- <span>Don't see the project you're looking for?</span>{" "}- <FontAwesomeIcon icon={faCircleInfo} className="text-mineshaft-400" />- </div>+ <Field>+ <FieldLabel>+ Project+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent className="max-w-md">+ Ensure the project exists in the connection's Northflank team and the+ connection has access to it.+ </TooltipContent></Tooltip>- }- >- <FilterableSelect- menuPlacement="top"- isLoading={isProjectsLoading && Boolean(connectionId)}- isDisabled={!connectionId}- value={projects.find((p) => p.id === value) ?? null}- onChange={(option) => {- const v = option as SingleValue<TNorthflankProject>;- onChange(v?.id ?? null);- setValue("destinationConfig.projectName", v?.name ?? "");- setValue("destinationConfig.secretGroupId", "");- setValue("destinationConfig.secretGroupName", "");- }}- options={projects}- placeholder="Select a project..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id}- />- </FormControl>+ </FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isProjectsLoading && Boolean(connectionId)}+ isDisabled={!connectionId}+ value={projects.find((p) => p.id === value) ?? null}+ onChange={(option) => {+ const v = option as SingleValue<TNorthflankProject>;+ onChange(v?.id ?? null);+ setValue("destinationConfig.projectName", v?.name ?? "");+ setValue("destinationConfig.secretGroupId", "");+ setValue("destinationConfig.secretGroupName", "");+ }}+ options={projects}+ placeholder="Select a project..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/><Controllername="destinationConfig.secretGroupId"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Secret Group"- isRequired- helperText={- <Tooltip content="Ensure the secret group exists in the connection's Northflank project and the connection has access to it.">- <div>- <span>Don't see the secret group you're looking for?</span>{" "}- <FontAwesomeIcon icon={faCircleInfo} className="text-mineshaft-400" />- </div>+ <Field>+ <FieldLabel>+ Secret Group+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent className="max-w-md">+ Ensure the secret group exists in the connection's Northflank project and the+ connection has access to it.+ </TooltipContent></Tooltip>- }- >- <FilterableSelect- isLoading={isSecretGroupsLoading && Boolean(projectId)}- isDisabled={!projectId}- value={secretGroups.find((sg) => sg.id === value) ?? null}- onChange={(option) => {- const v = option as SingleValue<TNorthflankSecretGroup>;- onChange(v?.id ?? null);- setValue("destinationConfig.secretGroupName", v?.name ?? "");- }}- options={secretGroups}- placeholder="Select a secret group..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id}- />- </FormControl>+ </FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isSecretGroupsLoading && Boolean(projectId)}+ isDisabled={!projectId}+ value={secretGroups.find((sg) => sg.id === value) ?? null}+ onChange={(option) => {+ const v = option as SingleValue<TNorthflankSecretGroup>;+ onChange(v?.id ?? null);+ setValue("destinationConfig.secretGroupName", v?.name ?? "");+ }}+ options={secretGroups}+ placeholder="Select a secret group..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/OCIVaultSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/OCIVaultSyncFields.tsxindex 12092e3017..7625f3f7ce 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/OCIVaultSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/OCIVaultSyncFields.tsx@@ -1,10 +1,19 @@import { Controller, useFormContext, useWatch } from "react-hook-form";import { SingleValue } from "react-select";-import { faCircleInfo } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";+import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";-import { FilterableSelect, FormControl, Tooltip } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldError,+ FieldGroup,+ FieldLabel,+ FilterableSelect,+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import {useOCIConnectionListCompartments,useOCIConnectionListVaultKeys,@@ -21,7 +30,6 @@ export const OCIVaultSyncFields = () => {const connectionId = useWatch({ name: "connection.id", control });- // Compartmentsconst { data: compartments, isLoading: isCompartmentsLoading } = useOCIConnectionListCompartments(connectionId,{@@ -29,7 +37,6 @@ export const OCIVaultSyncFields = () => {});- // Vaultsconst selectedCompartment = useWatch({ name: "destinationConfig.compartmentOcid", control });const { data: vaults, isLoading: isVaultsLoading } = useOCIConnectionListVaults({ connectionId, compartmentOcid: selectedCompartment },@@ -38,7 +45,6 @@ export const OCIVaultSyncFields = () => {});- // Keysconst selectedVault = useWatch({ name: "destinationConfig.vaultOcid", control });const { data: keys, isLoading: isKeysLoading } = useOCIConnectionListVaultKeys({ connectionId, compartmentOcid: selectedCompartment, vaultOcid: selectedVault },@@ -48,7 +54,7 @@ export const OCIVaultSyncFields = () => {);return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.compartmentOcid", "");@@ -61,38 +67,36 @@ export const OCIVaultSyncFields = () => {name="destinationConfig.compartmentOcid"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Compartment"- helperText={- <Tooltip- className="max-w-md"- content="Ensure the compartment exists and that the connection has permission to view it."- >- <div>- <span>Don't see the compartment you're looking for?</span>{" "}- <FontAwesomeIcon icon={faCircleInfo} className="text-mineshaft-400" />- </div>+ <Field>+ <FieldLabel>+ Compartment+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent className="max-w-md">+ Ensure the compartment exists and that the connection has permission to view it.+ </TooltipContent></Tooltip>- }- >- <FilterableSelect- menuPlacement="top"- isLoading={isCompartmentsLoading && Boolean(connectionId)}- isDisabled={!connectionId}- value={compartments?.find((c) => c.id === value) ?? null}- onChange={(option) => {- onChange((option as SingleValue<{ id: string }>)?.id ?? null);- setValue("destinationConfig.vaultOcid", "");- setValue("destinationConfig.keyOcid", "");- }}- options={compartments}- placeholder="Select a compartment..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id}- />- </FormControl>+ </FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isCompartmentsLoading && Boolean(connectionId)}+ isDisabled={!connectionId}+ value={compartments?.find((c) => c.id === value) ?? null}+ onChange={(option) => {+ onChange((option as SingleValue<{ id: string }>)?.id ?? null);+ setValue("destinationConfig.vaultOcid", "");+ setValue("destinationConfig.keyOcid", "");+ }}+ options={compartments}+ placeholder="Select a compartment..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>@@ -100,37 +104,36 @@ export const OCIVaultSyncFields = () => {name="destinationConfig.vaultOcid"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Vault"- helperText={- <Tooltip- className="max-w-md"- content="Ensure the vault exists in the selected compartment and that the connection has permission to view it."- >- <div>- <span>Don't see the vault you're looking for?</span>{" "}- <FontAwesomeIcon icon={faCircleInfo} className="text-mineshaft-400" />- </div>+ <Field>+ <FieldLabel>+ Vault+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent className="max-w-md">+ Ensure the vault exists in the selected compartment and that the connection has+ permission to view it.+ </TooltipContent></Tooltip>- }- >- <FilterableSelect- menuPlacement="top"- 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);- setValue("destinationConfig.keyOcid", "");- }}- options={vaults}- placeholder="Select a vault..."- getOptionLabel={(option) => option.displayName}- getOptionValue={(option) => option.id}- />- </FormControl>+ </FieldLabel>+ <FieldContent>+ <FilterableSelect+ 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);+ setValue("destinationConfig.keyOcid", "");+ }}+ options={vaults}+ placeholder="Select a vault..."+ getOptionLabel={(option) => option.displayName}+ getOptionValue={(option) => option.id}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>@@ -138,38 +141,37 @@ export const OCIVaultSyncFields = () => {name="destinationConfig.keyOcid"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Encryption Key"- helperText={- <Tooltip- className="max-w-md"- content="Ensure the key exists in the selected vault and that the connection has permission to view it."- >- <div>- <span>Don't see the key you're looking for?</span>{" "}- <FontAwesomeIcon icon={faCircleInfo} className="text-mineshaft-400" />- </div>+ <Field>+ <FieldLabel>+ Encryption Key+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent className="max-w-md">+ Ensure the key exists in the selected vault and that the connection has permission+ to view it.+ </TooltipContent></Tooltip>- }- >- <FilterableSelect- menuPlacement="top"- 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);- }}- options={keys}- placeholder="Select a key..."- getOptionLabel={(option) => option.displayName}- getOptionValue={(option) => option.id}- />- </FormControl>+ </FieldLabel>+ <FieldContent>+ <FilterableSelect+ 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);+ }}+ options={keys}+ placeholder="Select a key..."+ getOptionLabel={(option) => option.displayName}+ getOptionValue={(option) => option.id}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/OctopusDeploySyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/OctopusDeploySyncFields.tsxindex a8e1ce41fd..785100061c 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/OctopusDeploySyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/OctopusDeploySyncFields.tsx@@ -1,20 +1,28 @@import { Controller, useFormContext, useWatch } from "react-hook-form";import { MultiValue, SingleValue } from "react-select";-import { faCircleInfo } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";+import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";import {+ Field,+ FieldContent,+ FieldError,+ FieldGroup,+ FieldLabel,FilterableSelect,- FormControl,Select,+ SelectContent,SelectItem,- Tab,- TabList,- TabPanel,+ SelectTrigger,+ SelectValue,Tabs,- Tooltip-} from "@app/components/v2";+ TabsContent,+ TabsList,+ TabsTrigger,+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import {useOctopusDeployConnectionGetScopeValues,useOctopusDeployConnectionListProjects,@@ -67,7 +75,7 @@ export const OctopusDeploySyncFields = () => {});return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.spaceId", "");@@ -78,53 +86,50 @@ export const OctopusDeploySyncFields = () => {}}/>- <Tabs defaultValue="general" className="mt-4">- <TabList className="border-b border-mineshaft-600 bg-mineshaft-800 p-0">- <Tab value="general">General</Tab>- <Tab value="advanced">Advanced</Tab>- </TabList>-- <TabPanel value="general">- <div className="space-y-4">+ <Tabs defaultValue="general">+ <TabsList className="mb-2">+ <TabsTrigger value="general">General</TabsTrigger>+ <TabsTrigger value="advanced">Advanced</TabsTrigger>+ </TabsList>+ <TabsContent value="general">+ <FieldGroup><Controllername="destinationConfig.spaceId"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Space"- helperText={- <Tooltip- className="max-w-md"- content="Select the Octopus Deploy space where your project is located."- >- <div>- <span>Don't see the space you're looking for?</span>{" "}- <FontAwesomeIcon icon={faCircleInfo} className="text-mineshaft-400" />- </div>+ <Field>+ <FieldLabel>+ Space+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent className="max-w-md">+ Select the Octopus Deploy space where your project is located.+ </TooltipContent></Tooltip>- }- >- <FilterableSelect- menuPlacement="top"- isLoading={isSpacesLoading && Boolean(connectionId)}- isDisabled={!connectionId}- value={spaces?.find((space) => space.id === value) ?? null}- onChange={(option) => {- const selectedSpace = option as SingleValue<TOctopusDeploySpace>;- onChange(selectedSpace?.id ?? null);- setValue("destinationConfig.spaceName", selectedSpace?.name ?? "");- setValue("destinationConfig.projectId", "");- setValue("destinationConfig.projectName", "");- setValue("destinationConfig.scopeValues", EMPTY_SCOPE_VALUES);- }}- options={spaces}- placeholder={spaces?.length ? "Select a space..." : "No spaces found..."}- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id}- />- </FormControl>+ </FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isSpacesLoading && Boolean(connectionId)}+ isDisabled={!connectionId}+ value={spaces?.find((space) => space.id === value) ?? null}+ onChange={(option) => {+ const selectedSpace = option as SingleValue<TOctopusDeploySpace>;+ onChange(selectedSpace?.id ?? null);+ setValue("destinationConfig.spaceName", selectedSpace?.name ?? "");+ setValue("destinationConfig.projectId", "");+ setValue("destinationConfig.projectName", "");+ setValue("destinationConfig.scopeValues", EMPTY_SCOPE_VALUES);+ }}+ options={spaces}+ placeholder={spaces?.length ? "Select a space..." : "No spaces found..."}+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>@@ -133,32 +138,32 @@ export const OctopusDeploySyncFields = () => {control={control}defaultValue={OctopusDeploySyncScope.Project}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Scope"- helperText="Select the scope for this sync configuration."- >- <Select- value={value || OctopusDeploySyncScope.Project}- onValueChange={(val) => {- onChange(val);- setValue("destinationConfig.projectId", "");- setValue("destinationConfig.projectName", "");- setValue("destinationConfig.scopeValues", EMPTY_SCOPE_VALUES);- }}- className="w-full border border-mineshaft-500 capitalize"- position="popper"- placeholder="Select a scope..."- dropdownContainerClassName="max-w-none"- >- {Object.values(OctopusDeploySyncScope).map((scopeValue) => (- <SelectItem className="capitalize" value={scopeValue} key={scopeValue}>- {scopeValue}- </SelectItem>- ))}- </Select>- </FormControl>+ <Field>+ <FieldLabel>Scope</FieldLabel>+ <FieldContent>+ <Select+ value={value || OctopusDeploySyncScope.Project}+ onValueChange={(val) => {+ onChange(val);+ setValue("destinationConfig.projectId", "");+ setValue("destinationConfig.projectName", "");+ setValue("destinationConfig.scopeValues", EMPTY_SCOPE_VALUES);+ }}+ >+ <SelectTrigger className="w-full capitalize" isError={Boolean(error)}>+ <SelectValue placeholder="Select a scope..." />+ </SelectTrigger>+ <SelectContent position="popper">+ {Object.values(OctopusDeploySyncScope).map((scopeValue) => (+ <SelectItem className="capitalize" value={scopeValue} key={scopeValue}>+ {scopeValue}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>@@ -167,87 +172,84 @@ export const OctopusDeploySyncFields = () => {name="destinationConfig.projectId"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Project"- helperText={- <Tooltip- className="max-w-md"- content="Ensure the project exists in the selected space."- >- <div>- <span>Don't see the project you're looking for?</span>{" "}- <FontAwesomeIcon icon={faCircleInfo} className="text-mineshaft-400" />- </div>+ <Field>+ <FieldLabel>+ Project+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent className="max-w-md">+ Ensure the project exists in the selected space.+ </TooltipContent></Tooltip>- }- >- <FilterableSelect- menuPlacement="top"- 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>;- onChange(selectedProject?.id ?? null);- setValue("destinationConfig.projectName", selectedProject?.name ?? "");- setValue("destinationConfig.scopeValues", EMPTY_SCOPE_VALUES);- }}- options={projects}- placeholder={- spaceId && projects?.length ? "Select a project..." : "No projects found..."- }- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id}- />- </FormControl>+ </FieldLabel>+ <FieldContent>+ <FilterableSelect+ 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>;+ onChange(selectedProject?.id ?? null);+ setValue("destinationConfig.projectName", selectedProject?.name ?? "");+ setValue("destinationConfig.scopeValues", EMPTY_SCOPE_VALUES);+ }}+ options={projects}+ placeholder={+ spaceId && projects?.length+ ? "Select a project..."+ : "No projects found..."+ }+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>)}- </div>- </TabPanel>+ </FieldGroup>+ </TabsContent>- <TabPanel value="advanced" className="grow">+ <TabsContent value="advanced" className="grow">{scope === OctopusDeploySyncScope.Project && projectId ? (- <div className="max-h-96 overflow-y-auto">+ <FieldGroup>{/* Environments */}<Controllername="destinationConfig.scopeValues.environments"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Environments"- isOptional- >- <FilterableSelect- isMulti- menuPlacement="bottom"- menuPosition="absolute"- isLoading={isScopeValuesLoading}- value={- scopeValuesData?.environments?.filter((opt) =>- (value || []).includes(opt.id)- ) || []- }- onChange={(options) => {- const selectedIds = (options as MultiValue<TScopeValueOption>).map(- (opt) => opt.id- );- onChange(selectedIds);- }}- options={scopeValuesData?.environments || []}- placeholder={- scopeValuesData?.environments?.length- ? "Select environments..."- : "No environments found..."- }- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id}- />- </FormControl>+ <Field>+ <FieldLabel>Environments</FieldLabel>+ <FieldContent>+ <FilterableSelect+ isMulti+ isLoading={isScopeValuesLoading}+ value={+ scopeValuesData?.environments?.filter((opt) =>+ (value || []).includes(opt.id)+ ) || []+ }+ onChange={(options) => {+ const selectedIds = (options as MultiValue<TScopeValueOption>).map(+ (opt) => opt.id+ );+ onChange(selectedIds);+ }}+ options={scopeValuesData?.environments || []}+ placeholder={+ scopeValuesData?.environments?.length+ ? "Select environments..."+ : "No environments found..."+ }+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>@@ -256,37 +258,34 @@ export const OctopusDeploySyncFields = () => {name="destinationConfig.scopeValues.roles"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Target Tags"- isOptional- >- <FilterableSelect- isMulti- menuPlacement="bottom"- menuPosition="absolute"- isLoading={isScopeValuesLoading}- value={- scopeValuesData?.roles?.filter((opt) => (value || []).includes(opt.id)) ||- []- }- onChange={(options) => {- const selectedIds = (options as MultiValue<TScopeValueOption>).map(- (opt) => opt.id- );- onChange(selectedIds);- }}- options={scopeValuesData?.roles || []}- placeholder={- scopeValuesData?.roles?.length- ? "Select target tags..."- : "No target tags found..."- }- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id}- />- </FormControl>+ <Field>+ <FieldLabel>Target Tags</FieldLabel>+ <FieldContent>+ <FilterableSelect+ isMulti+ isLoading={isScopeValuesLoading}+ value={+ scopeValuesData?.roles?.filter((opt) => (value || []).includes(opt.id)) ||+ []+ }+ onChange={(options) => {+ const selectedIds = (options as MultiValue<TScopeValueOption>).map(+ (opt) => opt.id+ );+ onChange(selectedIds);+ }}+ options={scopeValuesData?.roles || []}+ placeholder={+ scopeValuesData?.roles?.length+ ? "Select target tags..."+ : "No target tags found..."+ }+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>@@ -295,77 +294,72 @@ export const OctopusDeploySyncFields = () => {name="destinationConfig.scopeValues.machines"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Targets"- isOptional- >- <FilterableSelect- isMulti- menuPlacement="top"- menuPosition="absolute"- isLoading={isScopeValuesLoading}- value={- scopeValuesData?.machines?.filter((opt) =>- (value || []).includes(opt.id)- ) || []- }- onChange={(options) => {- const selectedIds = (options as MultiValue<TScopeValueOption>).map(- (opt) => opt.id- );- onChange(selectedIds);- }}- options={scopeValuesData?.machines || []}- placeholder={- scopeValuesData?.machines?.length- ? "Select targets..."- : "No targets found..."- }- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id}- />- </FormControl>+ <Field>+ <FieldLabel>Targets</FieldLabel>+ <FieldContent>+ <FilterableSelect+ isMulti+ isLoading={isScopeValuesLoading}+ value={+ scopeValuesData?.machines?.filter((opt) =>+ (value || []).includes(opt.id)+ ) || []+ }+ onChange={(options) => {+ const selectedIds = (options as MultiValue<TScopeValueOption>).map(+ (opt) => opt.id+ );+ onChange(selectedIds);+ }}+ options={scopeValuesData?.machines || []}+ placeholder={+ scopeValuesData?.machines?.length+ ? "Select targets..."+ : "No targets found..."+ }+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>+{/* Processes */}<Controllername="destinationConfig.scopeValues.processes"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Processes"- isOptional- >- <FilterableSelect- isMulti- menuPlacement="top"- menuPosition="absolute"- isLoading={isScopeValuesLoading}- value={- scopeValuesData?.processes?.filter((opt) =>- (value || []).includes(opt.id)- ) || []- }- onChange={(options) => {- const selectedIds = (options as MultiValue<TScopeValueOption>).map(- (opt) => opt.id- );- onChange(selectedIds);- }}- options={scopeValuesData?.processes || []}- placeholder={- scopeValuesData?.processes?.length- ? "Select processes..."- : "No processes found..."- }- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id}- />- </FormControl>+ <Field>+ <FieldLabel>Processes</FieldLabel>+ <FieldContent>+ <FilterableSelect+ isMulti+ isLoading={isScopeValuesLoading}+ value={+ scopeValuesData?.processes?.filter((opt) =>+ (value || []).includes(opt.id)+ ) || []+ }+ onChange={(options) => {+ const selectedIds = (options as MultiValue<TScopeValueOption>).map(+ (opt) => opt.id+ );+ onChange(selectedIds);+ }}+ options={scopeValuesData?.processes || []}+ placeholder={+ scopeValuesData?.processes?.length+ ? "Select processes..."+ : "No processes found..."+ }+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>@@ -374,37 +368,35 @@ export const OctopusDeploySyncFields = () => {name="destinationConfig.scopeValues.actions"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Deployment Steps"- isOptional- >- <FilterableSelect- isMulti- menuPlacement="top"- menuPosition="absolute"- isLoading={isScopeValuesLoading}- value={- scopeValuesData?.actions?.filter((opt) => (value || []).includes(opt.id)) ||- []- }- onChange={(options) => {- const selectedIds = (options as MultiValue<TScopeValueOption>).map(- (opt) => opt.id- );- onChange(selectedIds);- }}- options={scopeValuesData?.actions || []}- placeholder={- scopeValuesData?.actions?.length- ? "Select deployment steps..."- : "No deployment steps found..."- }- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id}- />- </FormControl>+ <Field>+ <FieldLabel>Deployment Steps</FieldLabel>+ <FieldContent>+ <FilterableSelect+ isMulti+ isLoading={isScopeValuesLoading}+ value={+ scopeValuesData?.actions?.filter((opt) =>+ (value || []).includes(opt.id)+ ) || []+ }+ onChange={(options) => {+ const selectedIds = (options as MultiValue<TScopeValueOption>).map(+ (opt) => opt.id+ );+ onChange(selectedIds);+ }}+ options={scopeValuesData?.actions || []}+ placeholder={+ scopeValuesData?.actions?.length+ ? "Select deployment steps..."+ : "No deployment steps found..."+ }+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>@@ -413,48 +405,45 @@ export const OctopusDeploySyncFields = () => {name="destinationConfig.scopeValues.channels"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Channels"- isOptional- >- <FilterableSelect- isMulti- menuPlacement="top"- menuPosition="absolute"- isLoading={isScopeValuesLoading}- value={- scopeValuesData?.channels?.filter((opt) =>- (value || []).includes(opt.id)- ) || []- }- onChange={(options) => {- const selectedIds = (options as MultiValue<TScopeValueOption>).map(- (opt) => opt.id- );- onChange(selectedIds);- }}- options={scopeValuesData?.channels || []}- placeholder={- scopeValuesData?.channels?.length- ? "Select channels..."- : "No channels found..."- }- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id}- />- </FormControl>+ <Field>+ <FieldLabel>Channels</FieldLabel>+ <FieldContent>+ <FilterableSelect+ isMulti+ isLoading={isScopeValuesLoading}+ value={+ scopeValuesData?.channels?.filter((opt) =>+ (value || []).includes(opt.id)+ ) || []+ }+ onChange={(options) => {+ const selectedIds = (options as MultiValue<TScopeValueOption>).map(+ (opt) => opt.id+ );+ onChange(selectedIds);+ }}+ options={scopeValuesData?.channels || []}+ placeholder={+ scopeValuesData?.channels?.length+ ? "Select channels..."+ : "No channels found..."+ }+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>- </div>+ </FieldGroup>) : (- <div className="py-8 text-center text-mineshaft-400">+ <div className="py-8 text-center text-muted">Please select a project in the Config tab to configure scope values.</div>)}- </TabPanel>+ </TabsContent></Tabs>- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/OnaSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/OnaSyncFields.tsxindex 56a61ab415..7fd298aa45 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/OnaSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/OnaSyncFields.tsx@@ -2,7 +2,14 @@ import { Controller, useFormContext, useWatch } from "react-hook-form";import { SingleValue } from "react-select";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";-import { FilterableSelect, FormControl } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldError,+ FieldGroup,+ FieldLabel,+ FilterableSelect+} 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";@@ -22,7 +29,7 @@ export const OnaSyncFields = () => {);return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.projectId", "");@@ -34,25 +41,28 @@ export const OnaSyncFields = () => {name="destinationConfig.projectId"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl isError={Boolean(error)} errorText={error?.message} label="Ona Project">- <FilterableSelect- menuPlacement="top"- isLoading={isProjectsLoading && Boolean(connectionId)}- isDisabled={!connectionId}- value={projects?.find((p) => p.id === value) ?? null}- onChange={(option) => {- const selected = option as SingleValue<TOnaProject>;- onChange(selected?.id ?? "");- setValue("destinationConfig.projectName", selected?.name ?? "");- }}- options={projects ?? []}- placeholder="Select a project..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id}- />- </FormControl>+ <Field>+ <FieldLabel>Ona Project</FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isProjectsLoading && Boolean(connectionId)}+ isDisabled={!connectionId}+ value={projects?.find((p) => p.id === value) ?? null}+ onChange={(option) => {+ const selected = option as SingleValue<TOnaProject>;+ onChange(selected?.id ?? "");+ setValue("destinationConfig.projectName", selected?.name ?? "");+ }}+ options={projects ?? []}+ placeholder="Select a project..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/OvhSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/OvhSyncFields.tsxindex 609cfcdd2c..d1acfadd5e 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/OvhSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/OvhSyncFields.tsx@@ -1,7 +1,18 @@import { Controller, useFormContext } from "react-hook-form";+import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";-import { FormControl, Input } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldError,+ FieldGroup,+ FieldLabel,+ Input,+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";import { TSecretSyncForm } from "../schemas";@@ -10,7 +21,7 @@ export const OvhSyncFields = () => {const { control, setValue } = useFormContext<TSecretSyncForm & { destination: SecretSync.OVH }>();return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.path", "");@@ -20,17 +31,31 @@ export const OvhSyncFields = () => {name="destinationConfig.path"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- tooltipClassName="max-w-sm"- tooltipText="The path in OVH OKMS where secrets will be stored as key/value pairs. If the path does not exist, it will be created."- isError={Boolean(error)}- errorText={error?.message}- label="Path"- >- <Input value={value} onChange={onChange} placeholder="app/production" />- </FormControl>+ <Field>+ <FieldLabel>+ Path+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent className="max-w-sm">+ The path in OVH OKMS where secrets will be stored as key/value pairs. If the path+ does not exist, it will be created.+ </TooltipContent>+ </Tooltip>+ </FieldLabel>+ <FieldContent>+ <Input+ value={value}+ onChange={onChange}+ placeholder="app/production"+ isError={Boolean(error)}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/RailwaySyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/RailwaySyncFields.tsxindex 6095f57631..efbab9fb45 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/RailwaySyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/RailwaySyncFields.tsx@@ -1,9 +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 { FilterableSelect, FormControl } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldDescription,+ FieldError,+ FieldGroup,+ FieldLabel,+ FilterableSelect,+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import {TRailwayProject,useRailwayConnectionListProjects@@ -36,7 +48,7 @@ export const RailwaySyncFields = () => {}, [projects, projectId]);return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.environmentId", "");@@ -51,27 +63,26 @@ export const RailwaySyncFields = () => {name="destinationConfig.projectId"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Select a project"- tooltipClassName="max-w-md"- >- <FilterableSelect- isLoading={isProjectsLoading && Boolean(connectionId)}- isDisabled={!connectionId}- value={projects.find((p) => p.id === value) ?? null}- onChange={(option) => {- const v = option as SingleValue<TRailwayProject>;- onChange(v?.id ?? null);- setValue("destinationConfig.projectName", v?.name ?? "");- }}- options={projects}- placeholder="Select a project..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id}- />- </FormControl>+ <Field>+ <FieldLabel>Select a project</FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isProjectsLoading && Boolean(connectionId)}+ isDisabled={!connectionId}+ value={projects.find((p) => p.id === value) ?? null}+ onChange={(option) => {+ const v = option as SingleValue<TRailwayProject>;+ onChange(v?.id ?? null);+ setValue("destinationConfig.projectName", v?.name ?? "");+ }}+ options={projects}+ placeholder="Select a project..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/><Controller@@ -79,27 +90,26 @@ export const RailwaySyncFields = () => {disabled={!connectionId || !projectId}control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Select an environment"- tooltipClassName="max-w-md"- >- <FilterableSelect- isLoading={isProjectsLoading && Boolean(connectionId)}- isDisabled={!connectionId}- value={environments.find((p) => p.id === value) ?? null}- onChange={(option) => {- const v = option as SingleValue<TRailwayProject>;- onChange(v?.id ?? null);- setValue("destinationConfig.environmentName", v?.name ?? "");- }}- options={environments}- placeholder="Select an environment..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id}- />- </FormControl>+ <Field>+ <FieldLabel>Select an environment</FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isProjectsLoading && Boolean(connectionId)}+ isDisabled={!connectionId}+ value={environments.find((p) => p.id === value) ?? null}+ onChange={(option) => {+ const v = option as SingleValue<TRailwayProject>;+ onChange(v?.id ?? null);+ setValue("destinationConfig.environmentName", v?.name ?? "");+ }}+ options={environments}+ placeholder="Select an environment..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>@@ -108,31 +118,41 @@ export const RailwaySyncFields = () => {disabled={!connectionId || !projectId}control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Select a service"- tooltipClassName="max-w-md"- tooltipText="By default secrets are created as shared variables in Railway."- helperText="Scope your secrets to a specific service within the environment."- >- <FilterableSelect- isLoading={isProjectsLoading && Boolean(connectionId)}- isDisabled={!connectionId}- value={services.find((p) => p.id === value) ?? null}- onChange={(option) => {- const v = option as SingleValue<TRailwayProject>;- onChange(v?.id ?? null);- setValue("destinationConfig.serviceName", v?.name ?? "");- }}- options={services}- placeholder="Select a service..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id}- />- </FormControl>+ <Field>+ <FieldLabel>+ Select a service+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent className="max-w-md">+ By default secrets are created as shared variables in Railway.+ </TooltipContent>+ </Tooltip>+ </FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isProjectsLoading && Boolean(connectionId)}+ isDisabled={!connectionId}+ value={services.find((p) => p.id === value) ?? null}+ onChange={(option) => {+ const v = option as SingleValue<TRailwayProject>;+ onChange(v?.id ?? null);+ setValue("destinationConfig.serviceName", v?.name ?? "");+ }}+ options={services}+ placeholder="Select a service..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id}+ />+ <FieldDescription>+ Scope your secrets to a specific service within the environment.+ </FieldDescription>+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/RenderSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/RenderSyncFields.tsxindex b88e0d6e62..4e80c9a797 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/RenderSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/RenderSyncFields.tsx@@ -1,8 +1,24 @@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 { FilterableSelect, FormControl, Select, SelectItem } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldError,+ FieldGroup,+ FieldLabel,+ FilterableSelect,+ Select,+ SelectContent,+ SelectItem,+ SelectTrigger,+ SelectValue,+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import { RENDER_SYNC_SCOPES } from "@app/helpers/secretSyncs";import {TRenderEnvironmentGroup,@@ -36,7 +52,7 @@ export const RenderSyncFields = () => {});return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.serviceId", "");@@ -50,46 +66,49 @@ export const RenderSyncFields = () => {control={control}defaultValue={RenderSyncScope.Service}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- errorText={error?.message}- isError={Boolean(error?.message)}- label="Scope"- tooltipClassName="max-w-lg py-3"- tooltipText={- <div className="flex flex-col gap-3">- <p>- Specify how Infisical should manage secrets from Render. The following options are- available:- </p>- <ul className="flex list-disc flex-col gap-3 pl-4">- {Object.values(RENDER_SYNC_SCOPES).map(({ name, description }) => {- return (- <li key={name}>- <p className="text-mineshaft-300">- <span className="font-medium text-bunker-200">{name}</span>: {description}- </p>- </li>- );- })}- </ul>- </div>- }- >- <Select- value={value}- onValueChange={(val) => onChange(val)}- className="w-full border border-mineshaft-500 capitalize"- position="popper"- placeholder="Select a scope..."- dropdownContainerClassName="max-w-none"- >- {Object.values(RenderSyncScope).map((scope) => (- <SelectItem className="capitalize" value={scope} key={scope}>- {scope.replace("-", " ")}- </SelectItem>- ))}- </Select>- </FormControl>+ <Field>+ <FieldLabel>+ Scope+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent className="max-w-lg">+ <div className="flex flex-col gap-3">+ <p>+ Specify how Infisical should manage secrets from Render. The following options+ are available:+ </p>+ <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>:{" "}+ {description}+ </p>+ </li>+ ))}+ </ul>+ </div>+ </TooltipContent>+ </Tooltip>+ </FieldLabel>+ <FieldContent>+ <Select value={value} onValueChange={(val) => onChange(val)}>+ <SelectTrigger className="w-full capitalize" isError={Boolean(error)}>+ <SelectValue placeholder="Select a scope..." />+ </SelectTrigger>+ <SelectContent position="popper">+ {Object.values(RenderSyncScope).map((scope) => (+ <SelectItem className="capitalize" value={scope} key={scope}>+ {scope.replace("-", " ")}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>{selectedScope === RenderSyncScope.Service && (@@ -97,28 +116,28 @@ export const RenderSyncFields = () => {name="destinationConfig.serviceId"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- errorText={error?.message}- isError={Boolean(error?.message)}- label="Service"- >- <FilterableSelect- 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 ?? ""- );- }}- options={services}- placeholder="Select a service..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id.toString()}- />- </FormControl>+ <Field>+ <FieldLabel>Service</FieldLabel>+ <FieldContent>+ <FilterableSelect+ 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 ?? ""+ );+ }}+ options={services}+ placeholder="Select a service..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id.toString()}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>)}@@ -128,31 +147,31 @@ export const RenderSyncFields = () => {name="destinationConfig.environmentGroupId"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- errorText={error?.message}- isError={Boolean(error?.message)}- label="Environment Group"- >- <FilterableSelect- 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 ?? ""- );- }}- options={groups}- placeholder="Select an environment group..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id.toString()}- />- </FormControl>+ <Field>+ <FieldLabel>Environment Group</FieldLabel>+ <FieldContent>+ <FilterableSelect+ 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 ?? ""+ );+ }}+ options={groups}+ placeholder="Select an environment group..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id.toString()}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>)}- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/SnowflakeSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/SnowflakeSyncFields.tsxindex 09b780248a..fc15fe5f4d 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/SnowflakeSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/SnowflakeSyncFields.tsx@@ -1,8 +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 { FilterableSelect, FormControl } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldError,+ FieldGroup,+ FieldLabel,+ FilterableSelect,+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import {TSnowflakeDatabase,TSnowflakeSchema,@@ -34,7 +45,7 @@ export const SnowflakeSyncFields = () => {);return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.database", "");@@ -46,27 +57,36 @@ export const SnowflakeSyncFields = () => {name="destinationConfig.database"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Database"- tooltipClassName="max-w-sm"- tooltipText="The Snowflake database that contains the target schema. The database must already exist."- >- <FilterableSelect- isLoading={isDatabasesPending && Boolean(connectionId)}- isDisabled={!connectionId}- value={databases.find((db) => db.name === value) ?? null}- onChange={(option) => {- setValue("destinationConfig.schema", "");- onChange((option as SingleValue<TSnowflakeDatabase>)?.name ?? "");- }}- options={databases}- placeholder="Select a database..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.name}- />- </FormControl>+ <Field>+ <FieldLabel>+ Database+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent className="max-w-sm">+ The Snowflake database that contains the target schema. The database must already+ exist.+ </TooltipContent>+ </Tooltip>+ </FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isDatabasesPending && Boolean(connectionId)}+ isDisabled={!connectionId}+ value={databases.find((db) => db.name === value) ?? null}+ onChange={(option) => {+ setValue("destinationConfig.schema", "");+ onChange((option as SingleValue<TSnowflakeDatabase>)?.name ?? "");+ }}+ options={databases}+ placeholder="Select a database..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.name}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>@@ -74,26 +94,37 @@ export const SnowflakeSyncFields = () => {name="destinationConfig.schema"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Schema"- tooltipClassName="max-w-sm"- tooltipText="The Snowflake schema (within the selected database) where secrets will be created. The schema must already exist."- >- <FilterableSelect- 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 ?? "")}- options={schemas}- placeholder="Select a schema..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.name}- />- </FormControl>+ <Field>+ <FieldLabel>+ Schema+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent className="max-w-sm">+ The Snowflake schema (within the selected database) where secrets will be created.+ The schema must already exist.+ </TooltipContent>+ </Tooltip>+ </FieldLabel>+ <FieldContent>+ <FilterableSelect+ 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 ?? "")+ }+ options={schemas}+ placeholder="Select a schema..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.name}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/SupabaseSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/SupabaseSyncFields.tsxindex 7d698c0023..488188163e 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/SupabaseSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/SupabaseSyncFields.tsx@@ -2,7 +2,14 @@ import { Controller, useFormContext, useWatch } from "react-hook-form";import { SingleValue } from "react-select";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";-import { FilterableSelect, FormControl } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldError,+ FieldGroup,+ FieldLabel,+ FilterableSelect+} from "@app/components/v3";import {TSupabaseProject,useSupabaseConnectionListProjects@@ -26,7 +33,7 @@ export const SupabaseSyncFields = () => {);return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.projectName", "");@@ -37,29 +44,28 @@ export const SupabaseSyncFields = () => {name="destinationConfig.projectId"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Select a project"- tooltipClassName="max-w-md"- >- <FilterableSelect- isLoading={isProjectsLoading && Boolean(connectionId)}- isDisabled={!connectionId}- value={projects.find((p) => p.id === value) ?? null}- onChange={(option) => {- const v = option as SingleValue<TSupabaseProject>;- onChange(v?.id ?? null);- setValue("destinationConfig.projectName", v?.name ?? "");- }}- options={projects}- placeholder="Select project..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id}- />- </FormControl>+ <Field>+ <FieldLabel>Select a project</FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isProjectsLoading && Boolean(connectionId)}+ isDisabled={!connectionId}+ value={projects.find((p) => p.id === value) ?? null}+ onChange={(option) => {+ const v = option as SingleValue<TSupabaseProject>;+ onChange(v?.id ?? null);+ setValue("destinationConfig.projectName", v?.name ?? "");+ }}+ options={projects}+ placeholder="Select project..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/TeamCitySyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/TeamCitySyncFields.tsxindex 4f27180899..2c7d56318f 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/TeamCitySyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/TeamCitySyncFields.tsx@@ -1,10 +1,20 @@import { Controller, useFormContext, useWatch } from "react-hook-form";import { SingleValue } from "react-select";-import { faCircleInfo } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";+import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";-import { FilterableSelect, FormControl, Tooltip } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldDescription,+ FieldError,+ FieldGroup,+ FieldLabel,+ FilterableSelect,+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import {TTeamCityProjectWithBuildTypes,useTeamCityConnectionListProjects@@ -27,14 +37,13 @@ export const TeamCitySyncFields = () => {});- // For Build Config dropdownconst selectedProjectId = useWatch({ name: "destinationConfig.project", control });const selectedProject = projects?.find((proj) => proj.id === selectedProjectId);const buildTypes = selectedProject?.buildTypes?.buildType || [];return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.project", "");@@ -46,37 +55,35 @@ export const TeamCitySyncFields = () => {name="destinationConfig.project"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Project"- helperText={- <Tooltip- className="max-w-md"- content="Ensure the project exists in the connection's TeamCity instance URL."- >- <div>- <span>Don't see the project you're looking for?</span>{" "}- <FontAwesomeIcon icon={faCircleInfo} className="text-mineshaft-400" />- </div>+ <Field>+ <FieldLabel>+ Project+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent className="max-w-md">+ Ensure the project exists in the connection's TeamCity instance URL.+ </TooltipContent></Tooltip>- }- >- <FilterableSelect- menuPlacement="top"- isLoading={isProjectsLoading && Boolean(connectionId)}- isDisabled={!connectionId}- value={projects?.find((proj) => proj.id === value) ?? null}- onChange={(option) => {- onChange((option as SingleValue<TTeamCityProjectWithBuildTypes>)?.id ?? null);- setValue("destinationConfig.buildConfig", "");- }}- options={projects}- placeholder="Select a project..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id}- />- </FormControl>+ </FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isProjectsLoading && Boolean(connectionId)}+ isDisabled={!connectionId}+ value={projects?.find((proj) => proj.id === value) ?? null}+ onChange={(option) => {+ onChange((option as SingleValue<TTeamCityProjectWithBuildTypes>)?.id ?? null);+ setValue("destinationConfig.buildConfig", "");+ }}+ options={projects}+ placeholder="Select a project..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>@@ -84,45 +91,42 @@ export const TeamCitySyncFields = () => {name="destinationConfig.buildConfig"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- isOptional- label="Build Configuration"- helperText={- <Tooltip- className="max-w-md"- content='Ensure the configuration exists in the selected project and that your Access Token has the "View build configuration settings" permission.'- >- <div>- <span>Don't see the configuration you're looking for?</span>{" "}- <FontAwesomeIcon icon={faCircleInfo} className="text-mineshaft-400" />- </div>+ <Field>+ <FieldLabel>+ Build Configuration (Optional)+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent className="max-w-md">+ Ensure the configuration exists in the selected project and that your Access Token+ has the "View build configuration settings" permission.+ </TooltipContent></Tooltip>- }- >- <FilterableSelect- menuPlacement="top"- 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 }>;- onChange(selectedOption?.id ?? "");- }}- options={buildTypes}- isClearable- placeholder="Select a build configuration..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id}- />- </FormControl>+ </FieldLabel>+ <FieldContent>+ <FilterableSelect+ 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 }>;+ onChange(selectedOption?.id ?? "");+ }}+ options={buildTypes}+ isClearable+ placeholder="Select a build configuration..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id}+ />+ <FieldDescription>+ Not selecting a Build Configuration will sync your secrets to the entire project.+ </FieldDescription>+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>-- <span className="text-sm text-bunker-300">- Not selecting a Build Configuration will sync your secrets to the entire project.- </span>- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/TerraformCloudSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/TerraformCloudSyncFields.tsxindex 70394cc768..b628a84de5 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/TerraformCloudSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/TerraformCloudSyncFields.tsx@@ -1,8 +1,24 @@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 { FilterableSelect, FormControl, Select, SelectItem } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldError,+ FieldGroup,+ FieldLabel,+ FilterableSelect,+ Select,+ SelectContent,+ SelectItem,+ SelectTrigger,+ SelectValue,+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import {TERRAFORM_CLOUD_SYNC_SCOPES,TerraformCloudSyncCategory,@@ -35,7 +51,7 @@ export const TerraformCloudSyncFields = () => {const workspaces = selectedOrg?.workspaces || [];return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.org", "");@@ -49,30 +65,32 @@ export const TerraformCloudSyncFields = () => {name="destinationConfig.org"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- errorText={error?.message}- isError={Boolean(error?.message)}- label="Organization"- >- <FilterableSelect- 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- );- setValue("destinationConfig.variableSetId", "");- setValue("destinationConfig.workspaceId", "");- setValue("destinationConfig.variableSetName", "");- setValue("destinationConfig.workspaceName", "");- }}- options={organizations}- placeholder="Select an organization..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id.toString()}- />- </FormControl>+ <Field>+ <FieldLabel>Organization</FieldLabel>+ <FieldContent>+ <FilterableSelect+ 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+ );+ setValue("destinationConfig.variableSetId", "");+ setValue("destinationConfig.workspaceId", "");+ setValue("destinationConfig.variableSetName", "");+ setValue("destinationConfig.workspaceName", "");+ }}+ options={organizations}+ placeholder="Select an organization..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id.toString()}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/><Controller@@ -80,49 +98,54 @@ export const TerraformCloudSyncFields = () => {control={control}defaultValue={TerraformCloudSyncCategory.Environment}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- errorText={error?.message}- isError={Boolean(error?.message)}- label="Category"- tooltipClassName="max-w-lg py-3"- tooltipText={- <div className="flex flex-col gap-3">- <ul className="flex list-disc flex-col gap-3 pl-4">- <li>- <p className="text-mineshaft-300">- <span className="font-medium text-bunker-200">- 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">- Terraform variables are used as input values in your configuration.- </span>- </p>- </li>- </ul>- </div>- }- >- <Select- value={value}- onValueChange={onChange}- className="w-full border border-mineshaft-500 capitalize"- position="popper"- defaultValue={TerraformCloudSyncCategory.Environment}- placeholder="Select category..."- dropdownContainerClassName="max-w-none"- >- {Object.entries(TerraformCloudSyncCategory).map(([envKey, envValue]) => (- <SelectItem className="capitalize" value={envValue} key={envValue}>- {envKey.replace("-", " ")}- </SelectItem>- ))}- </Select>- </FormControl>+ <Field>+ <FieldLabel>+ Category+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <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">+ 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">+ Terraform variables are used as input values in your configuration.+ </span>+ </p>+ </li>+ </ul>+ </TooltipContent>+ </Tooltip>+ </FieldLabel>+ <FieldContent>+ <Select+ value={value}+ onValueChange={onChange}+ defaultValue={TerraformCloudSyncCategory.Environment}+ >+ <SelectTrigger className="w-full capitalize" isError={Boolean(error)}>+ <SelectValue placeholder="Select category..." />+ </SelectTrigger>+ <SelectContent position="popper">+ {Object.entries(TerraformCloudSyncCategory).map(([envKey, envValue]) => (+ <SelectItem className="capitalize" value={envValue} key={envValue}>+ {envKey.replace("-", " ")}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/><Controller@@ -130,52 +153,58 @@ export const TerraformCloudSyncFields = () => {control={control}defaultValue={TerraformCloudSyncScope.VariableSet}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- errorText={error?.message}- isError={Boolean(error?.message)}- label="Scope"- tooltipClassName="max-w-lg py-3"- tooltipText={- <div className="flex flex-col gap-3">- <p>- Specify how Infisical should manage secrets from Terraform Cloud. The following- options are available:- </p>- <ul className="flex list-disc flex-col gap-3 pl-4">- {Object.values(TERRAFORM_CLOUD_SYNC_SCOPES).map(({ name, description }) => {- return (- <li key={name}>- <p className="text-mineshaft-300">- <span className="font-medium text-bunker-200">{name}</span>: {description}- </p>- </li>- );- })}- </ul>- </div>- }- >- <Select- value={value}- onValueChange={(val) => {- onChange(val);- setValue("destinationConfig.variableSetId", "");- setValue("destinationConfig.workspaceId", "");- setValue("destinationConfig.variableSetName", "");- setValue("destinationConfig.workspaceName", "");- }}- className="w-full border border-mineshaft-500 capitalize"- position="popper"- placeholder="Select a scope..."- dropdownContainerClassName="max-w-none"- >- {Object.values(TerraformCloudSyncScope).map((scope) => (- <SelectItem className="capitalize" value={scope} key={scope}>- {scope.replace("-", " ")}- </SelectItem>- ))}- </Select>- </FormControl>+ <Field>+ <FieldLabel>+ Scope+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent className="max-w-lg">+ <div className="flex flex-col gap-3">+ <p>+ Specify how Infisical should manage secrets from Terraform Cloud. The+ following options are available:+ </p>+ <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>:{" "}+ {description}+ </p>+ </li>+ ))}+ </ul>+ </div>+ </TooltipContent>+ </Tooltip>+ </FieldLabel>+ <FieldContent>+ <Select+ value={value}+ onValueChange={(val) => {+ onChange(val);+ setValue("destinationConfig.variableSetId", "");+ setValue("destinationConfig.workspaceId", "");+ setValue("destinationConfig.variableSetName", "");+ setValue("destinationConfig.workspaceName", "");+ }}+ >+ <SelectTrigger className="w-full capitalize" isError={Boolean(error)}>+ <SelectValue placeholder="Select a scope..." />+ </SelectTrigger>+ <SelectContent position="popper">+ {Object.values(TerraformCloudSyncScope).map((scope) => (+ <SelectItem className="capitalize" value={scope} key={scope}>+ {scope.replace("-", " ")}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>{currentScope === TerraformCloudSyncScope.VariableSet && (@@ -183,29 +212,32 @@ export const TerraformCloudSyncFields = () => {name="destinationConfig.variableSetId"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl isError={Boolean(error)} errorText={error?.message} label="Variable Set">- <FilterableSelect- menuPlacement="top"- 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>;- onChange(selectedOption?.id ?? null);+ <Field>+ <FieldLabel>Variable Set</FieldLabel>+ <FieldContent>+ <FilterableSelect+ 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>;+ onChange(selectedOption?.id ?? null);- if (selectedOption) {- setValue("destinationConfig.variableSetName", selectedOption.name);- } else {- setValue("destinationConfig.variableSetName", "");- }- }}- options={variableSets}- placeholder="Select a variable set..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id.toString()}- />- </FormControl>+ if (selectedOption) {+ setValue("destinationConfig.variableSetName", selectedOption.name);+ } else {+ setValue("destinationConfig.variableSetName", "");+ }+ }}+ options={variableSets}+ placeholder="Select a variable set..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id.toString()}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>)}@@ -214,31 +246,35 @@ export const TerraformCloudSyncFields = () => {name="destinationConfig.workspaceId"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl isError={Boolean(error)} errorText={error?.message} label="Workspace">- <FilterableSelect- menuPlacement="top"- 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>;- onChange(selectedOption?.id ?? null);+ <Field>+ <FieldLabel>Workspace</FieldLabel>+ <FieldContent>+ <FilterableSelect+ 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>;+ onChange(selectedOption?.id ?? null);- if (selectedOption) {- setValue("destinationConfig.workspaceName", selectedOption.name);- } else {- setValue("destinationConfig.workspaceName", "");- }- }}- options={workspaces}- placeholder="Select a workspace..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id.toString()}- />- </FormControl>+ if (selectedOption) {+ setValue("destinationConfig.workspaceName", selectedOption.name);+ } else {+ setValue("destinationConfig.workspaceName", "");+ }+ }}+ options={workspaces}+ placeholder="Select a workspace..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id.toString()}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>)}- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/TravisCISyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/TravisCISyncFields.tsxindex 1034ec23f8..515e4969c9 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/TravisCISyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/TravisCISyncFields.tsx@@ -2,7 +2,14 @@ import { Controller, useFormContext, useWatch } from "react-hook-form";import { SingleValue } from "react-select";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";-import { FilterableSelect, FormControl } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldError,+ FieldGroup,+ FieldLabel,+ FilterableSelect+} from "@app/components/v3";import {TTravisCIBranch,TTravisCIRepository,@@ -35,7 +42,7 @@ export const TravisCISyncFields = () => {);return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.repositoryId", "");@@ -47,56 +54,59 @@ export const TravisCISyncFields = () => {name="destinationConfig.repositoryId"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl isError={Boolean(error)} errorText={error?.message} label="Repository">- <FilterableSelect- menuPlacement="top"- isLoading={isRepositoriesPending && Boolean(connectionId)}- isDisabled={!connectionId}- value={repositories.find((repo) => repo.id === value) ?? null}- onChange={(option) => {- const repo = option as SingleValue<TTravisCIRepository>;- onChange(repo?.id ?? "");- setValue("destinationConfig.repositorySlug", repo?.slug ?? "");- setValue("destinationConfig.branch", undefined);- }}- options={repositories}- placeholder="Select a repository..."- getOptionLabel={(option) => option.slug}- getOptionValue={(option) => option.id}- />- </FormControl>+ <Field>+ <FieldLabel>Repository</FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isRepositoriesPending && Boolean(connectionId)}+ isDisabled={!connectionId}+ value={repositories.find((repo) => repo.id === value) ?? null}+ onChange={(option) => {+ const repo = option as SingleValue<TTravisCIRepository>;+ onChange(repo?.id ?? "");+ setValue("destinationConfig.repositorySlug", repo?.slug ?? "");+ setValue("destinationConfig.branch", undefined);+ }}+ options={repositories}+ placeholder="Select a repository..."+ getOptionLabel={(option) => option.slug}+ getOptionValue={(option) => option.id}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/><Controllername="destinationConfig.branch"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Branch"- isOptional- >- <FilterableSelect- menuPlacement="top"- isClearable- 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);- }}- options={branches}- placeholder="Select a branch..."- getOptionLabel={(option) =>- option.isDefault ? `${option.name} (default)` : option.name- }- getOptionValue={(option) => option.name}- />- </FormControl>+ <Field>+ <FieldLabel>Branch (Optional)</FieldLabel>+ <FieldContent>+ <FilterableSelect+ isClearable+ 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);+ }}+ options={branches}+ placeholder="Select a branch..."+ getOptionLabel={(option) =>+ option.isDefault ? `${option.name} (default)` : option.name+ }+ getOptionValue={(option) => option.name}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/VercelSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/VercelSyncFields.tsxindex 1c4ed581c8..f6e40b0127 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/VercelSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/VercelSyncFields.tsx@@ -1,12 +1,32 @@import { useMemo, useState } from "react";import { Controller, useFormContext, useWatch } from "react-hook-form";import { MultiValue, SingleValue } from "react-select";-import { faCircleInfo, faTriangleExclamation } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";+import { Info, TriangleAlert } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";-import { FilterableSelect, FormControl, Switch, Tooltip } from "@app/components/v2";-import { CreatableSelect } from "@app/components/v2/CreatableSelect";+import {+ Alert,+ AlertDescription,+ AlertTitle,+ CreatableSelect,+ Field,+ FieldContent,+ FieldDescription,+ FieldError,+ FieldGroup,+ FieldLabel,+ FilterableSelect,+ Label,+ Select,+ SelectContent,+ SelectItem,+ SelectTrigger,+ SelectValue,+ Switch,+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import { useDebounce } from "@app/hooks";import {TVercelConnectionOrganization,@@ -28,6 +48,9 @@ const standardVercelEnvironments = [const teamVercelEnvironments = [...standardVercelEnvironments] as const;+const formatScopeLabel = (scope: VercelSyncScope) =>+ scope.replace("-", " ").replace(/\b\w/g, (c) => c.toUpperCase());+export const VercelSyncFields = () => {const { control, watch, setValue } = useFormContext<TSecretSyncForm & { destination: SecretSync.Vercel }@@ -94,16 +117,11 @@ export const VercelSyncFields = () => {name: branch})) || [];- const scopeOptions = Object.values(VercelSyncScope).map((s) => ({- value: s,- label: s.replace("-", " ").replace(/\b\w/g, (c) => c.toUpperCase())- }));-const isPreviewEnvironment = currentEnv === "preview";const isTeamScope = scope === VercelSyncScope.Team;return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.app", "");@@ -121,37 +139,45 @@ export const VercelSyncFields = () => {name="destinationConfig.scope"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl isError={Boolean(error)} errorText={error?.message} label="Scope">- <FilterableSelect- isLoading={isTeamsLoading}- isDisabled={!connectionId}- value={scopeOptions.find((opt) => opt.value === value) ?? null}- onChange={(option) => {- const newScope =- (option as SingleValue<(typeof scopeOptions)[number]>)?.value ?? null;- onChange(newScope);-- if (newScope === VercelSyncScope.Team) {- setValue("destinationConfig.teamId", "");- setValue("destinationConfig.targetEnvironments", []);- setValue("destinationConfig.applyToAllCustomEnvironments", false);- setValue("destinationConfig.targetProjects", undefined);- setValue("destinationConfig.teamName", "");- } else {- setValue("destinationConfig.app", "");- setValue("destinationConfig.appName", "");- setValue("destinationConfig.env", "production");- setValue("destinationConfig.branch", "");- setValue("destinationConfig.teamId", "");- }- setValue("destinationConfig.sensitive", false);- }}- options={scopeOptions}- placeholder="Select a scope..."- getOptionLabel={(opt) => opt.label}- getOptionValue={(opt) => opt.value}- />- </FormControl>+ <Field>+ <FieldLabel>Scope</FieldLabel>+ <FieldContent>+ <Select+ value={value}+ onValueChange={(newScope) => {+ onChange(newScope);++ if (newScope === VercelSyncScope.Team) {+ setValue("destinationConfig.teamId", "");+ setValue("destinationConfig.targetEnvironments", []);+ setValue("destinationConfig.applyToAllCustomEnvironments", false);+ setValue("destinationConfig.targetProjects", undefined);+ setValue("destinationConfig.teamName", "");+ } else {+ setValue("destinationConfig.app", "");+ setValue("destinationConfig.appName", "");+ setValue("destinationConfig.env", "production");+ setValue("destinationConfig.branch", "");+ setValue("destinationConfig.teamId", "");+ }+ setValue("destinationConfig.sensitive", false);+ }}+ disabled={!connectionId}+ >+ <SelectTrigger className="w-full" isError={Boolean(error)}>+ <SelectValue placeholder="Select a scope..." />+ </SelectTrigger>+ <SelectContent position="popper">+ {Object.values(VercelSyncScope).map((s) => (+ <SelectItem value={s} key={s}>+ {formatScopeLabel(s)}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>@@ -161,21 +187,25 @@ export const VercelSyncFields = () => {name="destinationConfig.teamId"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl isError={Boolean(error)} errorText={error?.message} label="Team">- <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 || "");- }}- options={teams}- placeholder="Select a team..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id}- />- </FormControl>+ <Field>+ <FieldLabel>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 || "");+ }}+ options={teams}+ placeholder="Select a team..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>@@ -183,27 +213,27 @@ export const VercelSyncFields = () => {name="destinationConfig.targetEnvironments"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Target Environments"- >- <FilterableSelect- isMulti- value={teamVercelEnvironments.filter((env) => (value || []).includes(env.slug))}- onChange={(option) =>- onChange(- (option as MultiValue<(typeof teamVercelEnvironments)[number]>).map(- (o) => o.slug+ <Field>+ <FieldLabel>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+ ))- )- }- options={teamVercelEnvironments}- placeholder="Select target environments..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.slug}- />- </FormControl>+ }+ options={teamVercelEnvironments}+ placeholder="Select target environments..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.slug}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>@@ -211,26 +241,25 @@ export const VercelSyncFields = () => {name="destinationConfig.targetProjects"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isOptional- isError={Boolean(error)}- errorText={error?.message}- label="Target Projects"- >- <FilterableSelect- isMulti- value={availableApps.filter((app) => (value || []).includes(app.id))}- onChange={(option) =>- onChange(- (option as MultiValue<(typeof availableApps)[number]>).map((o) => o.id)- )- }- options={availableApps}- placeholder="Select target projects..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id}- />- </FormControl>+ <Field>+ <FieldLabel>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)+ )+ }+ options={availableApps}+ placeholder="Select target projects..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>@@ -238,30 +267,23 @@ export const VercelSyncFields = () => {name="destinationConfig.applyToAllCustomEnvironments"control={control}render={({ field: { value, onChange } }) => (- <FormControl>+ <Field orientation="horizontal">+ <FieldContent>+ <Label htmlFor="vercel-sync-all-custom-environments">+ Apply to All Custom Environments+ </Label>+ <FieldDescription>+ Shared environment variables will be applied to all custom environments in the+ Vercel team.+ </FieldDescription>+ </FieldContent><Switch- className="bg-mineshaft-400/50 shadow-inner data-[state=checked]:bg-green/80"id="vercel-sync-all-custom-environments"- thumbClassName="bg-mineshaft-800"- isChecked={Boolean(value)}+ variant="project"+ checked={Boolean(value)}onCheckedChange={onChange}- >- <p className="w-fit">- Apply to All Custom Environments{" "}- <Tooltip- className="max-w-md"- content={- <span>- When enabled, shared environment variables will be applied to all custom- environments in the Vercel team.- </span>- }- >- <FontAwesomeIcon icon={faCircleInfo} className="text-mineshaft-400" />- </Tooltip>- </p>- </Switch>- </FormControl>+ />+ </Field>)}/></>@@ -273,14 +295,14 @@ export const VercelSyncFields = () => {name="destinationConfig.app"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Vercel Project"- helperText={- <Tooltip- className="max-w-md"- content={+ <Field>+ <FieldLabel>+ Vercel Project+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent className="max-w-md"><div className="flex flex-col gap-2"><span>Ensure the project exists and the API token scope for this connection@@ -291,41 +313,37 @@ export const VercelSyncFields = () => {are shown, but you can search for more projects by name.</span></div>- }- >- <div>- <span>Don't see the project you're looking for?</span>{" "}- <FontAwesomeIcon icon={faCircleInfo} className="text-mineshaft-400" />- </div>+ </TooltipContent></Tooltip>- }- >- <FilterableSelect- menuPlacement="top"- noOptionsMessage={({ 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);- setValue("destinationConfig.branch", "");- setValue("destinationConfig.teamId", selected?.teamId || "");- setValue("destinationConfig.appName", selected?.name || "");- }}- onInputChange={(newValue) => setProjectSearch(newValue)}- filterOption={null}- options={availableApps}- placeholder="Search for a project..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.id.toString()}- groupBy="teamName"- />- </FormControl>+ </FieldLabel>+ <FieldContent>+ <FilterableSelect+ noOptionsMessage={({ 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);+ setValue("destinationConfig.branch", "");+ setValue("destinationConfig.teamId", selected?.teamId || "");+ setValue("destinationConfig.appName", selected?.name || "");+ }}+ onInputChange={(newValue) => setProjectSearch(newValue)}+ filterOption={null}+ options={availableApps}+ placeholder="Search for a project..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.id.toString()}+ groupBy="teamName"+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>@@ -333,39 +351,38 @@ export const VercelSyncFields = () => {name="destinationConfig.env"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Vercel Project Environment"- >- <FilterableSelect- menuPlacement="top"- isDisabled={!connectionId || !currentApp}- value={- value- ? {- key: environmentOptions.find((env) => env.key === value)?.key,- type: environmentOptions.find((env) => env.key === value)?.type,- name: environmentOptions.find((env) => env.key === value)?.name- }- : null- }- onChange={(option) => {- const envKey = (option as any)?.key ?? null;- onChange(envKey);+ <Field>+ <FieldLabel>Vercel Project Environment</FieldLabel>+ <FieldContent>+ <FilterableSelect+ isDisabled={!connectionId || !currentApp}+ value={+ value+ ? {+ key: environmentOptions.find((env) => env.key === value)?.key,+ type: environmentOptions.find((env) => env.key === value)?.type,+ name: environmentOptions.find((env) => env.key === value)?.name+ }+ : null+ }+ onChange={(option) => {+ const envKey = (option as any)?.key ?? null;+ onChange(envKey);- setValue("destinationConfig.branch", "");+ setValue("destinationConfig.branch", "");- if (envKey === VercelEnvironmentType.Development) {- setValue("destinationConfig.sensitive", false);- }- }}- options={environmentOptions}- placeholder="Select an environment..."- getOptionLabel={(option) => option.name || option.key || ""}- getOptionValue={(option) => option.key || ""}- />- </FormControl>+ if (envKey === VercelEnvironmentType.Development) {+ setValue("destinationConfig.sensitive", false);+ }+ }}+ options={environmentOptions}+ placeholder="Select an environment..."+ getOptionLabel={(option) => option.name || option.key || ""}+ getOptionValue={(option) => option.key || ""}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>@@ -374,46 +391,45 @@ export const VercelSyncFields = () => {name="destinationConfig.branch"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Vercel Preview Branch (Optional)"- >- <CreatableSelect- className="w-full"- placeholder="Select a branch..."- isLoading={isTeamsLoading && Boolean(connectionId) && Boolean(currentApp)}- isDisabled={!connectionId || !currentApp}- options={previewBranchOptions}- menuPlacement="top"- value={previewBranchOptions.find((branch) => branch.id === 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`- };- }}- 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- );- }}- />- </FormControl>+ <Field>+ <FieldLabel>Vercel Preview Branch (Optional)</FieldLabel>+ <FieldContent>+ <CreatableSelect+ 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}+ 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`+ };+ }}+ 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+ );+ }}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>)}@@ -427,56 +443,43 @@ export const VercelSyncFields = () => {const showTeamDevWarning = isTeamDevTargeted && Boolean(value);return (- <FormControl isError={Boolean(error?.message)} errorText={error?.message}>- <div className="flex w-fit items-center gap-2">- <Tooltip- className="max-w-md"- content="Marking secrets as sensitive in Vercel is not supported for development environments."- isDisabled={!isProjectDevTargeted}- >- <div className="w-fit">- <Switch- className="bg-mineshaft-400/50 shadow-inner data-[state=checked]:bg-green/80"- id="vercel-sync-sensitive"- thumbClassName="bg-mineshaft-800"- isChecked={Boolean(value) && !isProjectDevTargeted}- isDisabled={isProjectDevTargeted}- onCheckedChange={(isChecked) => {- if (isProjectDevTargeted) return;- onChange(isChecked);- }}- >- <p className="w-fit">- Mark Secrets as Sensitive in Vercel{" "}- <Tooltip- className="max-w-md"- content={- <span>- When enabled, secrets will be created in Vercel as Sensitive.- Sensitive environment variables cannot be read back via the Vercel API- after creation.- </span>- }- >- <FontAwesomeIcon icon={faCircleInfo} className="text-mineshaft-400" />- </Tooltip>- </p>- </Switch>- </div>- </Tooltip>- {showTeamDevWarning && (- <Tooltip- className="max-w-md"- content="Marking secrets as sensitive in Vercel is not supported for development environments. Sensitive secrets will only be applied to your other selected environments."- >- <FontAwesomeIcon icon={faTriangleExclamation} className="text-yellow" />- </Tooltip>- )}- </div>- </FormControl>+ <>+ <Field orientation="horizontal">+ <FieldContent>+ <Label htmlFor="vercel-sync-sensitive">Mark Secrets as Sensitive in Vercel</Label>+ <FieldDescription>+ When enabled, secrets will be created in Vercel as Sensitive. Sensitive+ environment variables cannot be read back via the Vercel API after creation.+ </FieldDescription>+ <FieldError errors={[error]} />+ </FieldContent>+ <Switch+ id="vercel-sync-sensitive"+ variant="project"+ checked={Boolean(value) && !isProjectDevTargeted}+ disabled={isProjectDevTargeted}+ onCheckedChange={(checked) => {+ if (isProjectDevTargeted) return;+ onChange(checked);+ }}+ />+ </Field>+ {(isProjectDevTargeted || showTeamDevWarning) && (+ <Alert variant="warning">+ <TriangleAlert />+ <AlertTitle>Sensitive not supported for Development</AlertTitle>+ <AlertDescription>+ Marking secrets as sensitive in Vercel is not supported for development+ environments.+ {showTeamDevWarning &&+ " Sensitive secrets will only be applied to your other selected environments."}+ </AlertDescription>+ </Alert>+ )}+ </>);}}/>- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/WindmillSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/WindmillSyncFields.tsxindex 8578fa63c6..ed00959d43 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/WindmillSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/WindmillSyncFields.tsx@@ -1,10 +1,20 @@import { Controller, useFormContext, useWatch } from "react-hook-form";import { SingleValue } from "react-select";-import { faCircleInfo } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";+import { Info } from "lucide-react";import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField";-import { FilterableSelect, FormControl, Input, Tooltip } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldError,+ FieldGroup,+ FieldLabel,+ FilterableSelect,+ Input,+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import {TWindmillWorkspace,useWindmillConnectionListWorkspaces@@ -28,7 +38,7 @@ export const WindmillSyncFields = () => {);return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.workspace", "");@@ -39,67 +49,74 @@ export const WindmillSyncFields = () => {name="destinationConfig.workspace"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- errorText={error?.message}- label="Workspace"- helperText={- <Tooltip- className="max-w-md"- content="Ensure the workspace exists in the connection's Windmill instance URL."- >- <div>- <span>Don't see the workspace you're looking for?</span>{" "}- <FontAwesomeIcon icon={faCircleInfo} className="text-mineshaft-400" />- </div>+ <Field>+ <FieldLabel>+ Workspace+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent className="max-w-md">+ Ensure the workspace exists in the connection's Windmill instance URL.+ </TooltipContent></Tooltip>- }- >- <FilterableSelect- menuPlacement="top"- isLoading={isWorkspacesLoading && Boolean(connectionId)}- isDisabled={!connectionId}- value={workspaces?.find((workspace) => workspace.name === value) ?? null}- onChange={(option) =>- onChange((option as SingleValue<TWindmillWorkspace>)?.name ?? null)- }- options={workspaces}- placeholder="Select a workspace..."- getOptionLabel={(option) => option.name}- getOptionValue={(option) => option.name}- />- </FormControl>+ </FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isWorkspacesLoading && Boolean(connectionId)}+ isDisabled={!connectionId}+ value={workspaces?.find((workspace) => workspace.name === value) ?? null}+ onChange={(option) =>+ onChange((option as SingleValue<TWindmillWorkspace>)?.name ?? null)+ }+ options={workspaces}+ placeholder="Select a workspace..."+ getOptionLabel={(option) => option.name}+ getOptionValue={(option) => option.name}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/><Controllername="destinationConfig.path"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- tooltipClassName="max-w-sm"- tooltipText={- <>- The workspace path where secrets should be synced to. Path must follow Windmill{" "}- <a- target="_blank"- 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">- owner path convention- </span>- .- </a>- </>- }- isError={Boolean(error)}- errorText={error?.message}- label="Path"- >- <Input value={value} onChange={onChange} placeholder="f/folder-name/" />- </FormControl>+ <Field>+ <FieldLabel>+ Path+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent className="max-w-sm">+ The workspace path where secrets should be synced to. Path must follow Windmill{" "}+ <a+ target="_blank"+ 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">+ owner path convention+ </span>+ .+ </a>+ </TooltipContent>+ </Tooltip>+ </FieldLabel>+ <FieldContent>+ <Input+ value={value}+ onChange={onChange}+ placeholder="f/folder-name/"+ isError={Boolean(error)}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/ZabbixSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/ZabbixSyncFields.tsxindex e001002842..cd23d70c9c 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/ZabbixSyncFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/ZabbixSyncFields.tsx@@ -1,8 +1,24 @@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 { FilterableSelect, FormControl, Select, SelectItem } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldError,+ FieldGroup,+ FieldLabel,+ FilterableSelect,+ Select,+ SelectContent,+ SelectItem,+ SelectTrigger,+ SelectValue,+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import {TZabbixHost,useZabbixConnectionListHosts,@@ -30,7 +46,7 @@ export const ZabbixSyncFields = () => {);return (- <>+ <FieldGroup><SecretSyncConnectionFieldonChange={() => {setValue("destinationConfig.scope", ZabbixSyncScope.Global);@@ -42,50 +58,56 @@ export const ZabbixSyncFields = () => {name="destinationConfig.scope"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- errorText={error?.message}- isError={Boolean(error?.message)}- label="Scope"- tooltipClassName="max-w-lg py-3"- tooltipText={- <div className="flex flex-col gap-3">- <p>- Specify how Infisical should manage secrets from Zabbix. The following options are- available:- </p>- <ul className="flex list-disc flex-col gap-3 pl-4">- {Object.values(ZABBIX_SYNC_SCOPES).map(({ name, description }) => {- return (- <li key={name}>- <p className="text-mineshaft-300">- <span className="font-medium text-bunker-200">{name}</span>: {description}- </p>- </li>- );- })}- </ul>- </div>- }- >- <Select- value={value}- onValueChange={(val) => {- onChange(val);- setValue("destinationConfig.hostId", "");- setValue("destinationConfig.hostName", "");- }}- className="w-full border border-mineshaft-500 capitalize"- position="popper"- placeholder="Select a scope..."- dropdownContainerClassName="max-w-none"- >- {Object.values(ZabbixSyncScope).map((scope) => (- <SelectItem className="capitalize" value={scope} key={scope}>- {scope.replace("-", " ")}- </SelectItem>- ))}- </Select>- </FormControl>+ <Field>+ <FieldLabel>+ Scope+ <Tooltip>+ <TooltipTrigger asChild>+ <Info />+ </TooltipTrigger>+ <TooltipContent className="max-w-lg">+ <div className="flex flex-col gap-3">+ <p>+ Specify how Infisical should manage secrets from Zabbix. The following options+ are available:+ </p>+ <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>:{" "}+ {description}+ </p>+ </li>+ ))}+ </ul>+ </div>+ </TooltipContent>+ </Tooltip>+ </FieldLabel>+ <FieldContent>+ <Select+ value={value}+ onValueChange={(val) => {+ onChange(val);+ setValue("destinationConfig.hostId", "");+ setValue("destinationConfig.hostName", "");+ }}+ >+ <SelectTrigger className="w-full capitalize" isError={Boolean(error)}>+ <SelectValue placeholder="Select a scope..." />+ </SelectTrigger>+ <SelectContent position="popper">+ {Object.values(ZabbixSyncScope).map((scope) => (+ <SelectItem className="capitalize" value={scope} key={scope}>+ {scope.replace("-", " ")}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>{currentScope === ZabbixSyncScope.Host && (@@ -93,28 +115,31 @@ export const ZabbixSyncFields = () => {name="destinationConfig.hostId"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl isError={Boolean(error)} errorText={error?.message} label="Host">- <FilterableSelect- menuPlacement="top"- isLoading={isHostsPending && Boolean(connectionId)}- isDisabled={!connectionId}- value={hosts.find((host) => host.hostId === value) ?? null}- onChange={(option) => {- const selectedOption = option as SingleValue<TZabbixHost>;- onChange(selectedOption?.hostId ?? null);+ <Field>+ <FieldLabel>Host</FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isHostsPending && Boolean(connectionId)}+ isDisabled={!connectionId}+ value={hosts.find((host) => host.hostId === value) ?? null}+ onChange={(option) => {+ const selectedOption = option as SingleValue<TZabbixHost>;+ onChange(selectedOption?.hostId ?? null);- if (selectedOption) {- setValue("destinationConfig.hostName", selectedOption.host);- } else {- setValue("destinationConfig.hostName", "");- }- }}- options={hosts}- placeholder="Select a host..."- getOptionLabel={(option) => option.host}- getOptionValue={(option) => option.hostId}- />- </FormControl>+ if (selectedOption) {+ setValue("destinationConfig.hostName", selectedOption.host);+ } else {+ setValue("destinationConfig.hostName", "");+ }+ }}+ options={hosts}+ placeholder="Select a host..."+ getOptionLabel={(option) => option.host}+ getOptionValue={(option) => option.hostId}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>)}@@ -123,25 +148,27 @@ export const ZabbixSyncFields = () => {name="destinationConfig.macroType"defaultValue={ZabbixMacroType.Secret}render={({ field: { onChange, value }, fieldState: { error } }) => (- <FormControl isError={Boolean(error)} errorText={error?.message} label="Macro Type">- <Select- value={String(value)}- onValueChange={(val) => onChange(parseInt(val, 10))}- className="w-full border border-mineshaft-500 capitalize"- position="popper"- placeholder="Select a macro type..."- dropdownContainerClassName="max-w-none"- >- <SelectItem value={String(ZabbixMacroType.Text)} key="text">- Text- </SelectItem>- <SelectItem value={String(ZabbixMacroType.Secret)} key="secret">- Secret- </SelectItem>- </Select>- </FormControl>+ <Field>+ <FieldLabel>Macro Type</FieldLabel>+ <FieldContent>+ <Select value={String(value)} onValueChange={(val) => onChange(parseInt(val, 10))}>+ <SelectTrigger className="w-full capitalize" isError={Boolean(error)}>+ <SelectValue placeholder="Select a macro type..." />+ </SelectTrigger>+ <SelectContent position="popper">+ <SelectItem value={String(ZabbixMacroType.Text)} key="text">+ Text+ </SelectItem>+ <SelectItem value={String(ZabbixMacroType.Secret)} key="secret">+ Secret+ </SelectItem>+ </SelectContent>+ </Select>+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/>- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/shared/AwsRegionSelect.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/shared/AwsRegionSelect.tsxindex 829d7c44f9..1ae23f5401 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/shared/AwsRegionSelect.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/shared/AwsRegionSelect.tsx@@ -1,9 +1,7 @@import { components, OptionProps, SingleValue } from "react-select";-import { faCheckCircle } from "@fortawesome/free-regular-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";+import { CheckIcon } from "lucide-react";-import { FilterableSelect } from "@app/components/v2";-import { Badge } from "@app/components/v3";+import { Badge, FilterableSelect } from "@app/components/v3";import { AWS_REGIONS } from "@app/helpers/appConnections";const Option = ({ isSelected, children, ...props }: OptionProps<(typeof AWS_REGIONS)[number]>) => {@@ -14,9 +12,7 @@ const Option = ({ isSelected, children, ...props }: OptionProps<(typeof AWS_REGI<Badge variant="neutral" className="mr-auto ml-1">{props.data.slug}</Badge>- {isSelected && (- <FontAwesomeIcon className="ml-2 text-primary" icon={faCheckCircle} size="sm" />- )}+ {isSelected && <CheckIcon className="ml-2 size-4 text-primary" />}</div></components.Option>);diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDetailsFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDetailsFields.tsxindex 0631a160e9..e5ad2b498c 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncDetailsFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDetailsFields.tsx@@ -1,6 +1,13 @@import { Controller, useFormContext } from "react-hook-form";-import { FormControl, Input, TextArea } from "@app/components/v2";+import {+ Field,+ FieldDescription,+ FieldError,+ FieldLabel,+ Input,+ TextArea+} from "@app/components/v3";import { TSecretSyncForm } from "./schemas";@@ -9,42 +16,45 @@ export const SecretSyncDetailsFields = () => {return (<>- <p className="mb-4 text-sm text-bunker-300">- Provide a name and description for this Secret Sync.- </p><Controller- render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- helperText="Must be slug-friendly"- isError={Boolean(error)}- errorText={error?.message}- label="Name"- >- <Input value={value} onChange={onChange} placeholder="my-secret-sync" />- </FormControl>- )}control={control}name="name"+ render={({ field: { value, onChange }, fieldState: { error } }) => (+ <Field className="mb-4">+ <FieldLabel htmlFor="sync-name">Name</FieldLabel>+ <Input+ id="sync-name"+ value={value ?? ""}+ onChange={onChange}+ placeholder="my-secret-sync"+ isError={Boolean(error)}+ autoFocus+ />+ {!error && <FieldDescription>Must be slug-friendly.</FieldDescription>}+ <FieldError errors={[error]} />+ </Field>+ )}/><Controller+ control={control}+ name="description"render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error)}- isOptional- errorText={error?.message}- label="Description"- >+ <Field className="mb-4">+ <FieldLabel htmlFor="sync-description">+ Description <span className="text-muted">(optional)</span>+ </FieldLabel><TextArea- value={value}+ id="sync-description"+ value={value ?? ""}onChange={onChange}placeholder="Describe the purpose of this sync..."- className="resize-none!"+ isError={Boolean(error)}+ className="resize-none"rows={4}/>- </FormControl>+ <FieldError errors={[error]} />+ </Field>)}- control={control}- name="description"/></>);diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncInitialSyncBehaviorFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncInitialSyncBehaviorFields.tsxnew file mode 100644index 0000000000..c0c9f22b4a--- /dev/null+++ b/frontend/src/components/secret-syncs/forms/SecretSyncInitialSyncBehaviorFields.tsx@@ -0,0 +1,422 @@+import { useEffect } from "react";+import { Controller, useFormContext } from "react-hook-form";+import { ArrowDown, TriangleAlert } from "lucide-react";++import {+ Alert,+ AlertDescription,+ AlertTitle,+ Field,+ FieldContent,+ FieldDescription,+ FieldError,+ FieldLabel,+ FieldTitle,+ RadioGroup,+ RadioGroupItem+} from "@app/components/v3";+import { cn } from "@app/components/v3/utils";+import { SECRET_SYNC_MAP } from "@app/helpers/secretSyncs";+import {+ SecretSync,+ SecretSyncInitialSyncBehavior,+ useSecretSyncOption+} from "@app/hooks/api/secretSyncs";++import { TSecretSyncForm } from "./schemas";++type GraphicVariant = "overwrite" | "prioritize-infisical" | "prioritize-destination";++const getGraphicVariant = (key: string): GraphicVariant => {+ if (key === SecretSyncInitialSyncBehavior.OverwriteDestination) return "overwrite";+ if (key === SecretSyncInitialSyncBehavior.ImportPrioritizeSource) return "prioritize-infisical";+ return "prioritize-destination";+};++const getShortDestinationName = (name: string) => name.split(" ")[0];++const getBehaviorCopy = (+ key: SecretSyncInitialSyncBehavior,+ destinationName: string+): { title: string; description: string } => {+ const shortName = getShortDestinationName(destinationName);+ switch (key) {+ case SecretSyncInitialSyncBehavior.OverwriteDestination:+ return {+ title: `Overwrite ${destinationName}`,+ description: `On the initial sync, Infisical will write its secrets to ${destinationName}. No secrets will be imported from ${shortName}. Depending on your configuration this can lead to removal of secrets from ${shortName}.`+ };+ case SecretSyncInitialSyncBehavior.ImportPrioritizeSource:+ return {+ title: `Import from ${shortName} — prioritize Infisical`,+ description: `Prior to the initial sync, Infisical will import secrets from ${destinationName}. If an imported secret already exists in Infisical, the imported secret value is ignored, preserving the Infisical value.`+ };+ case SecretSyncInitialSyncBehavior.ImportPrioritizeDestination:+ default:+ return {+ title: `Import from ${shortName} — prioritize ${shortName}`,+ description: `Prior to the initial sync, Infisical will import secrets from ${destinationName}. If an imported secret already exists in Infisical, the imported secret value will overwrite the existing value in Infisical.`+ };+ }+};+type SecretFate = "kept" | "added" | "removed" | "updated" | "imported";++type ReconciliationRow = { name: string; fate?: SecretFate };++const fateConfig: Record<+ Exclude<SecretFate, "kept">,+ { label: string; badgeClass: string; wrapperClass: string }+> = {+ added: {+ label: "added",+ badgeClass: "text-success",+ wrapperClass: "border-success/50 bg-success/5"+ },+ updated: {+ label: "updated",+ badgeClass: "text-warning",+ wrapperClass: "border-warning/40 bg-warning/5"+ },+ imported: {+ label: "imported",+ badgeClass: "text-info",+ wrapperClass: "border-info/50 bg-info/5"+ },+ removed: {+ label: "removed",+ badgeClass: "text-danger",+ wrapperClass: "border-danger/40 bg-danger/5"+ }+};++const SecretRow = ({ name, fate }: ReconciliationRow) => {+ const config = fate && fate !== "kept" ? fateConfig[fate] : null;+ const isRemoved = fate === "removed";+ return (+ <div+ className={cn(+ "flex items-center justify-between gap-2 rounded border px-2 py-1 text-[10px]",+ config ? config.wrapperClass : "border-border bg-container"+ )}+ >+ <span+ className={cn(+ "truncate font-mono text-foreground/80",+ isRemoved && "text-danger/70 line-through"+ )}+ >+ {name}+ </span>+ {config && (+ <span className={cn("shrink-0 text-[9px] tracking-wider uppercase", config.badgeClass)}>+ {config.label}+ </span>+ )}+ </div>+ );+};++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" />+ unchanged+ </span>+ <span className="flex items-center gap-1">+ <span className="inline-block h-2 w-3 rounded-[2px] border border-warning/40 bg-warning/5" />+ value updated+ </span>+ <span className="flex items-center gap-1">+ <span className="inline-block h-2 w-3 rounded-[2px] border border-success/50 bg-success/5" />+ added+ </span>+ <span className="flex items-center gap-1">+ <span className="inline-block h-2 w-3 rounded-[2px] border border-info/50 bg-info/5" />+ imported+ </span>+ <span className="flex items-center gap-1">+ <span className="inline-block h-2 w-3 rounded-[2px] border border-danger/40 bg-danger/5" />+ removed+ </span>+ </div>+);++const BEFORE_INFISICAL: ReconciliationRow[] = [{ name: "API_KEY" }, { name: "DB_URL" }];+const BEFORE_DESTINATION: ReconciliationRow[] = [{ name: "API_KEY" }, { name: "LEGACY_TOKEN" }];++const getAfterRows = (+ variant: GraphicVariant+): { infisical: ReconciliationRow[]; destination: ReconciliationRow[] } => {+ switch (variant) {+ case "overwrite":+ return {+ infisical: [{ name: "API_KEY" }, { name: "DB_URL" }],+ destination: [+ { name: "API_KEY", fate: "updated" },+ { name: "DB_URL", fate: "added" },+ { name: "LEGACY_TOKEN", fate: "removed" }+ ]+ };+ case "prioritize-infisical":+ return {+ infisical: [+ { name: "API_KEY" },+ { name: "DB_URL" },+ { name: "LEGACY_TOKEN", fate: "imported" }+ ],+ destination: [+ { name: "API_KEY", fate: "updated" },+ { name: "DB_URL", fate: "added" },+ { name: "LEGACY_TOKEN" }+ ]+ };+ case "prioritize-destination":+ default:+ return {+ infisical: [+ { name: "API_KEY", fate: "updated" },+ { name: "DB_URL" },+ { name: "LEGACY_TOKEN", fate: "imported" }+ ],+ destination: [+ { name: "API_KEY" },+ { name: "DB_URL", fate: "added" },+ { name: "LEGACY_TOKEN" }+ ]+ };+ }+};++const ReconciliationSection = ({+ title,+ subtitle,+ destinationName,+ infisicalRows,+ destinationRows+}: {+ title: string;+ subtitle: string;+ destinationName: string;+ infisicalRows: ReconciliationRow[];+ destinationRows: ReconciliationRow[];+}) => (+ <div className="rounded-md border border-border bg-mineshaft-800/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>+ </div>+ <div className="grid grid-cols-2 items-start gap-3">+ <div className="flex min-w-0 flex-col gap-1.5">+ <p className="truncate text-[10px] font-medium tracking-wider text-muted uppercase">+ Infisical+ </p>+ <div className="flex flex-col gap-1">+ {infisicalRows.map((row) => (+ <SecretRow key={row.name} {...row} />+ ))}+ </div>+ </div>+ <div className="flex min-w-0 flex-col gap-1.5">+ <p className="truncate text-[10px] font-medium tracking-wider text-muted uppercase">+ {destinationName}+ </p>+ <div className="flex flex-col gap-1">+ {destinationRows.map((row) => (+ <SecretRow key={row.name} {...row} />+ ))}+ </div>+ </div>+ </div>+ </div>+);++const ReconciliationDiagram = ({+ variant,+ destinationName+}: {+ variant: GraphicVariant;+ destinationName: string;+}) => {+ const after = getAfterRows(variant);++ return (+ <div className="mt-2 flex flex-col gap-2" aria-hidden="true">+ <ReconciliationSection+ title="Before"+ subtitle="The secrets currently on each side, before the first sync runs"+ destinationName={destinationName}+ infisicalRows={BEFORE_INFISICAL}+ destinationRows={BEFORE_DESTINATION}+ />+ <div className="flex items-center gap-3 px-1">+ <div className="h-px flex-1 bg-border" />+ <div className="flex items-center gap-1.5 text-[10px] font-medium tracking-wider text-muted uppercase">+ <ArrowDown className="size-3" strokeWidth={2.5} />+ First sync runs+ </div>+ <div className="h-px flex-1 bg-border" />+ </div>+ <ReconciliationSection+ title="After"+ subtitle="How each side looks once the first sync completes"+ destinationName={destinationName}+ infisicalRows={after.infisical}+ destinationRows={after.destination}+ />+ <div className="mt-1 px-1">+ <ReconciliationLegend />+ </div>+ </div>+ );+};++const BEHAVIOR_ORDER: SecretSyncInitialSyncBehavior[] = [+ SecretSyncInitialSyncBehavior.OverwriteDestination,+ SecretSyncInitialSyncBehavior.ImportPrioritizeSource,+ SecretSyncInitialSyncBehavior.ImportPrioritizeDestination+];++export const InitialSyncAlerts = () => {+ const { watch } = useFormContext<TSecretSyncForm>();+ const destination = watch("destination");+ const destinationName = SECRET_SYNC_MAP[destination].name;+ const vercelSensitive =+ destination === SecretSync.Vercel+ ? Boolean(watch("destinationConfig.sensitive" as never))+ : false;+ const initialSyncBehavior = watch("syncOptions.initialSyncBehavior");+ const disableSecretDeletion = watch("syncOptions.disableSecretDeletion");+ const keySchema = watch("syncOptions.keySchema");++ return (+ !vercelSensitive &&+ initialSyncBehavior === SecretSyncInitialSyncBehavior.OverwriteDestination &&+ !disableSecretDeletion &&+ !keySchema && (+ <Alert variant="warning">+ <TriangleAlert />+ <AlertTitle>Secrets will be deleted</AlertTitle>+ <AlertDescription>+ Anything in {destinationName} not in Infisical will be removed. To keep them, import+ instead, add a key schema, or disable secret deletion.+ </AlertDescription>+ </Alert>+ )+ );+};++export const SecretSyncInitialSyncBehaviorFields = () => {+ const { control, watch, setValue } = useFormContext<TSecretSyncForm>();++ const destination = watch("destination");+ const destinationName = SECRET_SYNC_MAP[destination].name;+ const { syncOption } = useSecretSyncOption(destination);++ const vercelSensitive =+ destination === SecretSync.Vercel+ ? Boolean(watch("destinationConfig.sensitive" as never))+ : false;++ const currentInitialBehavior = watch("syncOptions.initialSyncBehavior");+ const disableSecretDeletion = watch("syncOptions.disableSecretDeletion");+ const keySchema = watch("syncOptions.keySchema");++ // Vercel "sensitive" secrets cannot be read back, so importing destination secrets is impossible.+ // Force the initial sync behavior to OverwriteDestination whenever sensitive is enabled.+ useEffect(() => {+ if (+ vercelSensitive &&+ currentInitialBehavior !== SecretSyncInitialSyncBehavior.OverwriteDestination+ ) {+ setValue(+ "syncOptions.initialSyncBehavior",+ SecretSyncInitialSyncBehavior.OverwriteDestination+ );+ }+ }, [vercelSensitive, currentInitialBehavior, setValue]);++ const importAvailable = Boolean(syncOption?.canImportSecrets) && !vercelSensitive;+ const behaviorKeys = importAvailable+ ? BEHAVIOR_ORDER+ : [SecretSyncInitialSyncBehavior.OverwriteDestination];++ return (+ <>+ {!vercelSensitive && !syncOption?.canImportSecrets && (+ <Alert className="mb-3" variant="warning">+ <TriangleAlert />+ <AlertTitle>Importing secrets is not supported</AlertTitle>+ <AlertDescription>+ {destinationName} only supports overwrite.+ {!disableSecretDeletion &&+ !keySchema &&+ (syncOption?.supportsKeySchema !== false ||+ syncOption?.supportsDisableSecretDeletion !== false) &&+ " Secrets not in Infisical will be removed — add a key schema or disable secret deletion to keep them."}+ </AlertDescription>+ </Alert>+ )}+ {vercelSensitive && (+ <Alert className="mb-3" variant="warning">+ <TriangleAlert />+ <AlertTitle>Overwrite only</AlertTitle>+ <AlertDescription>+ Vercel can't read sensitive secrets back, so Infisical must overwrite the+ destination.+ </AlertDescription>+ </Alert>+ )}+ {destination === SecretSync.Vercel &&+ !vercelSensitive &&+ currentInitialBehavior !== SecretSyncInitialSyncBehavior.OverwriteDestination && (+ <Alert className="mb-3" variant="warning">+ <TriangleAlert />+ <AlertTitle>Limited import for team-scoped syncs</AlertTitle>+ <AlertDescription>+ Only Vercel shared environment variables whose scope exactly matches this sync's+ configuration (target environments, target projects, and Apply to all Custom+ Environments) will be imported. Variables covering a broader scope, or split across+ separate records per environment, will not be imported on the initial sync.+ </AlertDescription>+ </Alert>+ )}+ <Controller+ control={control}+ name="syncOptions.initialSyncBehavior"+ render={({ field: { value, onChange }, fieldState: { error } }) => (+ <Field>+ <RadioGroup value={value} onValueChange={onChange} className="gap-3">+ {behaviorKeys.map((key) => {+ const { title, description } = getBehaviorCopy(key, destinationName);+ const id = `initial-sync-${key}`;+ return (+ <FieldLabel key={key} htmlFor={id} variant="project">+ <Field orientation="horizontal">+ <FieldContent>+ <FieldTitle>{title}</FieldTitle>+ <FieldDescription className="text-wrap!">{description}</FieldDescription>+ </FieldContent>+ <RadioGroupItem value={key} id={id} isError={Boolean(error)} />+ </Field>+ </FieldLabel>+ );+ })}+ </RadioGroup>+ {value && (+ <div className="mt-4">+ <p className="mb-2 text-[11px] font-medium tracking-wider text-muted uppercase">+ Example+ </p>+ <ReconciliationDiagram+ variant={getGraphicVariant(value)}+ destinationName={destinationName}+ />+ </div>+ )}+ <FieldError errors={[error]} />+ </Field>+ )}+ />+ </>+ );+};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/AwsParameterStoreSyncOptionsFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/AwsParameterStoreSyncOptionsFields.tsxindex f6ff235520..ab2ec92773 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/AwsParameterStoreSyncOptionsFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/AwsParameterStoreSyncOptionsFields.tsx@@ -1,19 +1,28 @@-import { Fragment } from "react";-import { Controller, useFieldArray, useFormContext, useWatch } from "react-hook-form";+import { useEffect, useState } from "react";+import { Controller, useFieldArray, useFormContext, useFormState, useWatch } from "react-hook-form";import { SingleValue } from "react-select";-import { faPlus, faQuestionCircle, faTrash } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";+import { CircleHelp, Plus, Trash2 } from "lucide-react";import {+ Accordion,+ AccordionContent,+ AccordionItem,+ AccordionTrigger,Button,+ Field,+ FieldContent,+ FieldDescription,+ FieldError,+ FieldLabel,FilterableSelect,- FormControl,- FormLabel,IconButton,Input,+ Label,Switch,- Tooltip-} from "@app/components/v2";+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import {TAwsConnectionKmsKey,useListAwsConnectionKmsKeys@@ -22,7 +31,7 @@ import { SecretSync } from "@app/hooks/api/secretSyncs";import { TSecretSyncForm } from "../schemas";-const AwsTagsSection = () => {+const AwsTagsEditor = () => {const { control } = useFormContext<TSecretSyncForm & { destination: SecretSync.AWSParameterStore }>();@@ -32,74 +41,63 @@ const AwsTagsSection = () => {name: "syncOptions.tags"});+ const canRemove = tagFields.fields.length > 1;+return (- <div className="mt-2 mb-4 flex flex-col pl-2">- <div className="grid max-h-[20vh] grid-cols-12 items-end gap-2 overflow-y-auto">+ <div className="mt-3 flex flex-col gap-3">+ <div className="flex flex-col gap-2">{tagFields.fields.map(({ id: tagFieldId }, i) => (- <Fragment key={tagFieldId}>+ <div key={tagFieldId} className="grid grid-cols-12 items-end gap-2"><div className="col-span-5">- {i === 0 && <span className="text-xs text-mineshaft-400">Key</span>}+ {i === 0 && <p className="mb-1 text-xs text-muted">Key</p>}<Controllercontrol={control}name={`syncOptions.tags.${i}.key`}render={({ field, fieldState: { error } }) => (- <FormControl- isError={Boolean(error?.message)}- errorText={error?.message}- className="mb-0"- >- <Input className="text-xs" {...field} />- </FormControl>+ <Input {...field} isError={Boolean(error)} className="h-8" />)}/></div><div className="col-span-6">- {i === 0 && (- <FormLabel label="Value" className="text-xs text-mineshaft-400" isOptional />- )}+ {i === 0 && <p className="mb-1 text-xs text-muted">Value (optional)</p>}<Controllercontrol={control}name={`syncOptions.tags.${i}.value`}render={({ field, fieldState: { error } }) => (- <FormControl- isError={Boolean(error?.message)}- errorText={error?.message}- className="mb-0"- >- <Input className="text-xs" {...field} />- </FormControl>+ <Input {...field} isError={Boolean(error)} className="h-8" />)}/></div>- <Tooltip content="Remove tag" position="right">+ <div className="col-span-1 flex justify-end"><IconButton- variant="plain"- ariaLabel="Remove tag"- className="col-span-1 mb-1.5"- colorSchema="danger"- size="xs"+ variant="ghost-muted"+ aria-label="Remove tag"+ size="sm"+ isDisabled={!canRemove}onClick={() => tagFields.remove(i)}>- <FontAwesomeIcon icon={faTrash} />+ <Trash2 /></IconButton>- </Tooltip>- </Fragment>+ </div>+ </div>))}</div>- <div className="mt-2 flex">- <Button- leftIcon={<FontAwesomeIcon icon={faPlus} />}- size="xs"- variant="outline_bg"- onClick={() => tagFields.append({ key: "", value: "" })}- >- Add Tag- </Button>- </div>+ <Button+ variant="outline"+ size="xs"+ type="button"+ className="w-fit"+ onClick={() => tagFields.append({ key: "", value: "" })}+ >+ <Plus />+ Add tag+ </Button></div>);};+const ITEM_VALUE = "aws-parameter-store-advanced";+export const AwsParameterStoreSyncOptionsFields = () => {const { control, watch, setValue } = useFormContext<TSecretSyncForm & { destination: SecretSync.AWSParameterStore }@@ -108,6 +106,35 @@ export const AwsParameterStoreSyncOptionsFields = () => {const region = watch("destinationConfig.region");const connectionId = useWatch({ name: "connection.id", control });const watchedTags = watch("syncOptions.tags");+ const watchedKeyId = watch("syncOptions.keyId");+ const watchedSyncMetadataAsTags = watch("syncOptions.syncSecretMetadataAsTags");++ const hasConfiguredOption =+ Boolean(watchedKeyId) || Array.isArray(watchedTags) || Boolean(watchedSyncMetadataAsTags);++ const { errors, submitCount } = useFormState({ control });+ const syncOptionsErrors = errors.syncOptions as Record<string, unknown> | undefined;+ const hasAccordionError = Boolean(+ syncOptionsErrors?.keyId ||+ syncOptionsErrors?.tags ||+ syncOptionsErrors?.syncSecretMetadataAsTags+ );++ const [openItem, setOpenItem] = useState<string>(+ hasConfiguredOption || hasAccordionError ? ITEM_VALUE : ""+ );++ useEffect(() => {+ if (hasAccordionError) setOpenItem(ITEM_VALUE);+ }, [hasAccordionError, submitCount]);++ const summaryParts = [+ watchedKeyId ? "Custom KMS key" : null,+ watchedSyncMetadataAsTags ? "Sync metadata as tags" : null,+ Array.isArray(watchedTags) ? "Resource tags" : null+ ].filter(Boolean);++ const summary = summaryParts.length ? summaryParts.join(" · ") : "All defaults";const { data: kmsKeys = [], isPending: isKmsKeysPending } = useListAwsConnectionKmsKeys({@@ -119,129 +146,135 @@ export const AwsParameterStoreSyncOptionsFields = () => {);return (- <>- <Controller- name="syncOptions.keyId"- control={control}- render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- tooltipText="The AWS KMS key to encrypt parameters with"- isError={Boolean(error)}- errorText={error?.message}- label="KMS Key"- >- <FilterableSelect- isLoading={isKmsKeysPending && Boolean(connectionId && region)}- isDisabled={!connectionId}- value={kmsKeys.find((org) => org.alias === value) ?? null}- onChange={(option) =>- onChange((option as SingleValue<TAwsConnectionKmsKey>)?.alias ?? null)- }- // 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>- )- }- options={kmsKeys}- placeholder="Leave blank to use default KMS key"- getOptionLabel={(option) =>- option.alias === "alias/aws/ssm" ? `${option.alias} (Default)` : option.alias- }- getOptionValue={(option) => option.alias}- />- </FormControl>- )}- />- <Switch- className="bg-mineshaft-400/50 shadow-inner data-[state=checked]:bg-green/80"- id="overwrite-tags"- thumbClassName="bg-mineshaft-800"- isChecked={Array.isArray(watchedTags)}- onCheckedChange={(isChecked) => {- if (isChecked) {- setValue("syncOptions.tags", []);- } else {- setValue("syncOptions.tags", undefined);- }- }}- >- <p className="w-fit">- Configure Resource Tags{" "}- <Tooltip- className="max-w-md"- content={- <p>- If enabled, AWS resource tags will be overwritten using static values defined below.- </p>- }- >- <FontAwesomeIcon icon={faQuestionCircle} size="sm" className="ml-1" />- </Tooltip>- </p>- </Switch>-- {Array.isArray(watchedTags) && <AwsTagsSection />}-- <Controller- name="syncOptions.syncSecretMetadataAsTags"- control={control}- render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- className="mt-4"- isError={Boolean(error?.message)}- errorText={error?.message}- >- <Switch- className="bg-mineshaft-400/50 shadow-inner data-[state=checked]:bg-green/80"- id="overwrite-existing-secrets"- thumbClassName="bg-mineshaft-800"- isChecked={value}- onCheckedChange={onChange}- >- <p className="w-[18rem]">- Sync Secret Metadata as Resource Tags{" "}- <Tooltip- className="max-w-md"- content={- <>- <p>- If enabled, metadata attached to secrets will be added as resource tags to- parameters synced by Infisical.- </p>- <p className="mt-4">- Manually configured tags from the field above will take precedence over- secret metadata when tag keys conflict.- </p>- </>+ <Accordion+ type="single"+ collapsible+ variant="ghost"+ value={openItem}+ onValueChange={setOpenItem}+ >+ <AccordionItem value={ITEM_VALUE}>+ <AccordionTrigger>+ <div className="flex w-0 flex-1 items-center justify-between gap-3">+ <span className="text-sm font-medium text-foreground">Advanced options</span>+ <span className="truncate text-xs text-muted">{summary}</span>+ </div>+ </AccordionTrigger>+ <AccordionContent className="flex flex-col">+ <Controller+ name="syncOptions.keyId"+ control={control}+ render={({ field: { value, onChange }, fieldState: { error } }) => (+ <Field className="mb-4">+ <FieldLabel className="flex items-center gap-1.5">+ KMS Key+ <Tooltip>+ <TooltipTrigger asChild>+ <CircleHelp className="size-3 cursor-help text-muted" />+ </TooltipTrigger>+ <TooltipContent>The AWS KMS key to encrypt parameters with.</TooltipContent>+ </Tooltip>+ </FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isKmsKeysPending && Boolean(connectionId && region)}+ isDisabled={!connectionId}+ value={kmsKeys.find((org) => org.alias === value) ?? null}+ onChange={(option) =>+ onChange((option as SingleValue<TAwsConnectionKmsKey>)?.alias ?? null)+ }+ 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>+ )+ }+ options={kmsKeys}+ placeholder="Leave blank to use default KMS key"+ getOptionLabel={(option) =>+ option.alias === "alias/aws/ssm" ? `${option.alias} (Default)` : option.alias+ }+ getOptionValue={(option) => option.alias}+ />+ </FieldContent>+ <FieldError errors={[error]} />+ </Field>+ )}+ />++ <Controller+ name="syncOptions.syncSecretMetadataAsTags"+ control={control}+ render={({ field: { value, onChange }, fieldState: { error } }) => (+ <Field className="mb-4">+ <Field orientation="horizontal">+ <FieldContent>+ <Label htmlFor="sync-secret-metadata-tags">+ Sync secret metadata as resource tags+ </Label>+ <FieldDescription>+ Metadata attached to secrets is added as resource tags on parameters synced by+ Infisical. Manually configured tags take precedence when keys conflict.+ </FieldDescription>+ </FieldContent>+ <Switch+ id="sync-secret-metadata-tags"+ variant="project"+ checked={value}+ onCheckedChange={onChange}+ />+ </Field>+ <FieldError errors={[error]} />+ </Field>+ )}+ />++ <Field className="mb-4">+ <Field orientation="horizontal">+ <FieldContent>+ <Label htmlFor="configure-resource-tags">Configure resource tags</Label>+ <FieldDescription>+ Static tags applied to every synced parameter. Overwrites AWS resource tags on+ synced parameters with the values defined below.+ </FieldDescription>+ </FieldContent>+ <Switch+ id="configure-resource-tags"+ variant="project"+ checked={Array.isArray(watchedTags)}+ onCheckedChange={(isChecked) => {+ if (isChecked) {+ setValue("syncOptions.tags", [{ key: "", value: "" }]);+ } else {+ setValue("syncOptions.tags", undefined);}- >- <FontAwesomeIcon icon={faQuestionCircle} size="sm" className="ml-1" />- </Tooltip>- </p>- </Switch>- </FormControl>- )}- />- </>+ }}+ />+ </Field>+ {Array.isArray(watchedTags) && <AwsTagsEditor />}+ </Field>+ </AccordionContent>+ </AccordionItem>+ </Accordion>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/AwsSecretsManagerSyncOptionsFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/AwsSecretsManagerSyncOptionsFields.tsxindex 66212c0972..64b68dd33c 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/AwsSecretsManagerSyncOptionsFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/AwsSecretsManagerSyncOptionsFields.tsx@@ -1,19 +1,28 @@-import { Fragment } from "react";-import { Controller, useFieldArray, useFormContext, useWatch } from "react-hook-form";+import { useEffect, useState } from "react";+import { Controller, useFieldArray, useFormContext, useFormState, useWatch } from "react-hook-form";import { SingleValue } from "react-select";-import { faPlus, faQuestionCircle, faTrash } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";+import { CircleHelp, Plus, Trash2 } from "lucide-react";import {+ Accordion,+ AccordionContent,+ AccordionItem,+ AccordionTrigger,Button,+ Field,+ FieldContent,+ FieldDescription,+ FieldError,+ FieldLabel,FilterableSelect,- FormControl,- FormLabel,IconButton,Input,+ Label,Switch,- Tooltip-} from "@app/components/v2";+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import {TAwsConnectionKmsKey,useListAwsConnectionKmsKeys@@ -23,7 +32,7 @@ import { AwsSecretsManagerSyncMappingBehavior } from "@app/hooks/api/secretSyncsimport { TSecretSyncForm } from "../schemas";-const AwsTagsSection = () => {+const AwsTagsEditor = () => {const { control } = useFormContext<TSecretSyncForm & { destination: SecretSync.AWSSecretsManager }>();@@ -33,74 +42,63 @@ const AwsTagsSection = () => {name: "syncOptions.tags"});+ const canRemove = tagFields.fields.length > 1;+return (- <div className="mt-2 mb-4 flex flex-col pl-2">- <div className="grid max-h-[20vh] grid-cols-12 items-end gap-2 overflow-y-auto">+ <div className="mt-3 flex flex-col gap-3">+ <div className="flex flex-col gap-2">{tagFields.fields.map(({ id: tagFieldId }, i) => (- <Fragment key={tagFieldId}>+ <div key={tagFieldId} className="grid grid-cols-12 items-end gap-2"><div className="col-span-5">- {i === 0 && <span className="text-xs text-mineshaft-400">Key</span>}+ {i === 0 && <p className="mb-1 text-xs text-muted">Key</p>}<Controllercontrol={control}name={`syncOptions.tags.${i}.key`}render={({ field, fieldState: { error } }) => (- <FormControl- isError={Boolean(error?.message)}- errorText={error?.message}- className="mb-0"- >- <Input className="text-xs" {...field} />- </FormControl>+ <Input {...field} isError={Boolean(error)} className="h-8" />)}/></div><div className="col-span-6">- {i === 0 && (- <FormLabel label="Value" className="text-xs text-mineshaft-400" isOptional />- )}+ {i === 0 && <p className="mb-1 text-xs text-muted">Value (optional)</p>}<Controllercontrol={control}name={`syncOptions.tags.${i}.value`}render={({ field, fieldState: { error } }) => (- <FormControl- isError={Boolean(error?.message)}- errorText={error?.message}- className="mb-0"- >- <Input className="text-xs" {...field} />- </FormControl>+ <Input {...field} isError={Boolean(error)} className="h-8" />)}/></div>- <Tooltip content="Remove tag" position="right">+ <div className="col-span-1 flex justify-end"><IconButton- variant="plain"- ariaLabel="Remove tag"- className="col-span-1 mb-1.5"- colorSchema="danger"- size="xs"+ variant="ghost-muted"+ aria-label="Remove tag"+ size="sm"+ isDisabled={!canRemove}onClick={() => tagFields.remove(i)}>- <FontAwesomeIcon icon={faTrash} />+ <Trash2 /></IconButton>- </Tooltip>- </Fragment>+ </div>+ </div>))}</div>- <div className="mt-2 flex">- <Button- leftIcon={<FontAwesomeIcon icon={faPlus} />}- size="xs"- variant="outline_bg"- onClick={() => tagFields.append({ key: "", value: "" })}- >- Add Tag- </Button>- </div>+ <Button+ variant="outline"+ size="xs"+ type="button"+ className="w-fit"+ onClick={() => tagFields.append({ key: "", value: "" })}+ >+ <Plus />+ Add tag+ </Button></div>);};+const ITEM_VALUE = "aws-secrets-manager-advanced";+export const AwsSecretsManagerSyncOptionsFields = () => {const { control, watch, setValue } = useFormContext<TSecretSyncForm & { destination: SecretSync.AWSSecretsManager }@@ -110,6 +108,38 @@ export const AwsSecretsManagerSyncOptionsFields = () => {const connectionId = useWatch({ name: "connection.id", control });const mappingBehavior = watch("destinationConfig.mappingBehavior");const watchedTags = watch("syncOptions.tags");+ const watchedKeyId = watch("syncOptions.keyId");+ const watchedSyncMetadataAsTags = watch("syncOptions.syncSecretMetadataAsTags");++ const isOneToOne = mappingBehavior === AwsSecretsManagerSyncMappingBehavior.OneToOne;+ const metadataAsTagsActive = isOneToOne && Boolean(watchedSyncMetadataAsTags);++ const hasConfiguredOption =+ Boolean(watchedKeyId) || Array.isArray(watchedTags) || metadataAsTagsActive;++ const { errors, submitCount } = useFormState({ control });+ const syncOptionsErrors = errors.syncOptions as Record<string, unknown> | undefined;+ const hasAccordionError = Boolean(+ syncOptionsErrors?.keyId ||+ syncOptionsErrors?.tags ||+ syncOptionsErrors?.syncSecretMetadataAsTags+ );++ const [openItem, setOpenItem] = useState<string>(+ hasConfiguredOption || hasAccordionError ? ITEM_VALUE : ""+ );++ useEffect(() => {+ if (hasAccordionError) setOpenItem(ITEM_VALUE);+ }, [hasAccordionError, submitCount]);++ const summaryParts = [+ watchedKeyId ? "Custom KMS key" : null,+ metadataAsTagsActive ? "Sync metadata as tags" : null,+ Array.isArray(watchedTags) ? "Resource tags" : null+ ].filter(Boolean);++ const summary = summaryParts.length ? summaryParts.join(" · ") : "All defaults";const { data: kmsKeys = [], isPending: isKmsKeysPending } = useListAwsConnectionKmsKeys({@@ -121,134 +151,139 @@ export const AwsSecretsManagerSyncOptionsFields = () => {);return (- <>- <Controller- name="syncOptions.keyId"- control={control}- render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- tooltipText="The AWS KMS key to encrypt secrets with"- isError={Boolean(error)}- errorText={error?.message}- label="KMS Key"- >- <FilterableSelect- isLoading={isKmsKeysPending && Boolean(connectionId && region)}- isDisabled={!connectionId}- value={kmsKeys.find((org) => org.alias === value) ?? null}- onChange={(option) =>- onChange((option as SingleValue<TAwsConnectionKmsKey>)?.alias ?? null)- }- // 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>- )- }- options={kmsKeys}- placeholder="Leave blank to use default KMS key"- getOptionLabel={(option) =>- option.alias === "alias/aws/secretsmanager"- ? `${option.alias} (Default)`- : option.alias- }- getOptionValue={(option) => option.alias}- />- </FormControl>- )}- />-- <Switch- className="bg-mineshaft-400/50 shadow-inner data-[state=checked]:bg-green/80"- id="overwrite-tags"- thumbClassName="bg-mineshaft-800"- isChecked={Array.isArray(watchedTags)}- onCheckedChange={(isChecked) => {- if (isChecked) {- setValue("syncOptions.tags", []);- } else {- setValue("syncOptions.tags", undefined);- }- }}- >- <p className="w-fit">- Configure Secret Tags{" "}- <Tooltip- className="max-w-md"- content={- <p>- If enabled, AWS secret tags will be overwritten using static values defined below.- </p>- }- >- <FontAwesomeIcon icon={faQuestionCircle} size="sm" className="ml-1" />- </Tooltip>- </p>- </Switch>-- {Array.isArray(watchedTags) && <AwsTagsSection />}-- {mappingBehavior === AwsSecretsManagerSyncMappingBehavior.OneToOne && (- <Controller- name="syncOptions.syncSecretMetadataAsTags"- control={control}- render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- isError={Boolean(error?.message)}- errorText={error?.message}- className="mt-4"- >- <Switch- className="bg-mineshaft-400/50 shadow-inner data-[state=checked]:bg-green/80"- id="sync-metadata-as-tags"- thumbClassName="bg-mineshaft-800"- isChecked={value}- onCheckedChange={onChange}- >- <p className="w-56">- Sync Secret Metadata as Tags{" "}- <Tooltip- className="max-w-md"- content={- <>+ <Accordion+ type="single"+ collapsible+ variant="ghost"+ value={openItem}+ onValueChange={setOpenItem}+ >+ <AccordionItem value={ITEM_VALUE}>+ <AccordionTrigger>+ <div className="flex w-0 flex-1 items-center justify-between gap-3">+ <span className="text-sm font-medium text-foreground">Advanced options</span>+ <span className="truncate text-xs text-muted">{summary}</span>+ </div>+ </AccordionTrigger>+ <AccordionContent className="flex flex-col">+ <Controller+ name="syncOptions.keyId"+ control={control}+ render={({ field: { value, onChange }, fieldState: { error } }) => (+ <Field className="mb-4">+ <FieldLabel className="flex items-center gap-1.5">+ KMS Key+ <Tooltip>+ <TooltipTrigger asChild>+ <CircleHelp className="size-3 cursor-help text-muted" />+ </TooltipTrigger>+ <TooltipContent>The AWS KMS key to encrypt secrets with.</TooltipContent>+ </Tooltip>+ </FieldLabel>+ <FieldContent>+ <FilterableSelect+ isLoading={isKmsKeysPending && Boolean(connectionId && region)}+ isDisabled={!connectionId}+ value={kmsKeys.find((org) => org.alias === value) ?? null}+ onChange={(option) =>+ onChange((option as SingleValue<TAwsConnectionKmsKey>)?.alias ?? null)+ }+ isError={Boolean(error)}+ // eslint-disable-next-line react/no-unstable-nested-components+ noOptionsMessage={({ inputValue }) =>+ inputValue ? undefined : (<p>- If enabled, metadata attached to secrets will be added as tags to secrets- synced by Infisical.+ 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>- <p className="mt-4">- Manually configured tags from the field above will take precedence over- secret metadata when tag keys conflict.- </p>- </>+ )}- >- <FontAwesomeIcon icon={faQuestionCircle} size="sm" className="ml-1" />- </Tooltip>- </p>- </Switch>- </FormControl>+ options={kmsKeys}+ placeholder="Leave blank to use default KMS key"+ getOptionLabel={(option) =>+ option.alias === "alias/aws/secretsmanager"+ ? `${option.alias} (Default)`+ : option.alias+ }+ getOptionValue={(option) => option.alias}+ />+ </FieldContent>+ <FieldError errors={[error]} />+ </Field>+ )}+ />++ {isOneToOne && (+ <Controller+ name="syncOptions.syncSecretMetadataAsTags"+ control={control}+ render={({ field: { value, onChange }, fieldState: { error } }) => (+ <Field className="mb-4">+ <Field orientation="horizontal">+ <FieldContent>+ <Label htmlFor="sync-secret-metadata-tags">+ Sync secret metadata as resource tags+ </Label>+ <FieldDescription>+ Metadata attached to secrets is added as resource tags on secrets synced by+ Infisical. Manually configured tags take precedence when keys conflict.+ </FieldDescription>+ </FieldContent>+ <Switch+ id="sync-secret-metadata-tags"+ variant="project"+ checked={value}+ onCheckedChange={onChange}+ />+ </Field>+ <FieldError errors={[error]} />+ </Field>+ )}+ />)}- />- )}- </>++ <Field className="mb-4">+ <Field orientation="horizontal">+ <FieldContent>+ <Label htmlFor="configure-resource-tags">Configure resource tags</Label>+ <FieldDescription>+ Static tags applied to every synced secret. Overwrites AWS resource tags on synced+ secrets with the values defined below.+ </FieldDescription>+ </FieldContent>+ <Switch+ id="configure-resource-tags"+ variant="project"+ checked={Array.isArray(watchedTags)}+ onCheckedChange={(isChecked) => {+ if (isChecked) {+ setValue("syncOptions.tags", [{ key: "", value: "" }]);+ } else {+ setValue("syncOptions.tags", undefined);+ }+ }}+ />+ </Field>+ {Array.isArray(watchedTags) && <AwsTagsEditor />}+ </Field>+ </AccordionContent>+ </AccordionItem>+ </Accordion>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/AzureKeyVaultSyncOptionsFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/AzureKeyVaultSyncOptionsFields.tsxindex 8e46bcd799..202cf90f6e 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/AzureKeyVaultSyncOptionsFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/AzureKeyVaultSyncOptionsFields.tsx@@ -1,8 +1,13 @@import { Controller, useFormContext } from "react-hook-form";-import { faQuestionCircle } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";-import { FormControl, Switch, Tooltip } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldDescription,+ FieldError,+ Label,+ Switch+} from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";import { TSecretSyncForm } from "../schemas";@@ -15,36 +20,25 @@ export const AzureKeyVaultSyncOptionsFields = () => {control={control}name="syncOptions.disableCertificateImport"render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl isError={Boolean(error)} errorText={error?.message}>- <Switch- className="bg-mineshaft-400/80 shadow-inner data-[state=checked]:bg-green/80"- id="disable-certificate-import"- thumbClassName="bg-mineshaft-800"- onCheckedChange={onChange}- isChecked={value}- >- <p className="w-52">- Disable Certificate Import{" "}- <Tooltip- className="max-w-md"- content={- <>- <p>- When enabled, Infisical will <span className="font-medium">not</span> import- certificate objects from Azure Key Vault when syncing secrets.- </p>- <p className="mt-4">- Enable this option if you want to keep your secrets project free of- certificate objects that Azure Key Vault exposes through the secrets API.- </p>- </>- }- >- <FontAwesomeIcon icon={faQuestionCircle} size="sm" className="ml-1" />- </Tooltip>- </p>- </Switch>- </FormControl>+ <Field className="mb-4">+ <Field orientation="horizontal">+ <FieldContent>+ <Label htmlFor="disable-certificate-import">Disable certificate import</Label>+ <FieldDescription>+ When enabled, Infisical will not import certificate objects from Azure Key Vault+ when syncing secrets. Use this to keep your secrets project free of certificate+ objects that Azure Key Vault exposes through the secrets API.+ </FieldDescription>+ </FieldContent>+ <Switch+ id="disable-certificate-import"+ variant="project"+ checked={value}+ onCheckedChange={onChange}+ />+ </Field>+ <FieldError errors={[error]} />+ </Field>)}/>);diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/FlyioSyncOptionsFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/FlyioSyncOptionsFields.tsxindex a289ba0e8d..6837080a77 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/FlyioSyncOptionsFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/FlyioSyncOptionsFields.tsx@@ -1,8 +1,13 @@import { Controller, useFormContext } from "react-hook-form";-import { faQuestionCircle } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";-import { FormControl, Switch, Tooltip } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldDescription,+ FieldError,+ Label,+ Switch+} from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";import { TSecretSyncForm } from "../schemas";@@ -15,36 +20,26 @@ export const FlyioSyncOptionsFields = () => {name="syncOptions.autoRedeploy"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl className="mt-4" isError={Boolean(error?.message)} errorText={error?.message}>- <Switch- className="bg-mineshaft-400/50 shadow-inner data-[state=checked]:bg-green/80"- id="auto-redeploy-flyio"- thumbClassName="bg-mineshaft-800"- isChecked={value}- onCheckedChange={onChange}- >- Auto Redeploy On Secret Change- <Tooltip- className="max-w-md"- content={- <div className="space-y-2">- <p>- If enabled, Infisical will trigger a restart of all app machines after syncing- or removing secrets so they pick up the new values immediately.- </p>- <p>- Fly.io does not expose a way to mark secrets as "deployed", so the- Fly.io dashboard may show secrets as <strong>Staged</strong> even though they- are already applied. To confirm deployment, check that your machines restarted- after the sync (e.g. in the Fly.io Machines view or app logs).- </p>- </div>- }- >- <FontAwesomeIcon icon={faQuestionCircle} size="sm" className="ml-1" />- </Tooltip>- </Switch>- </FormControl>+ <Field className="mb-4">+ <Field orientation="horizontal">+ <FieldContent>+ <Label htmlFor="flyio-auto-redeploy">Auto-redeploy on secret change</Label>+ <FieldDescription>+ Infisical restarts all app machines after syncing or removing secrets so they pick+ up new values immediately. Fly.io does not expose a way to mark secrets as deployed,+ so the dashboard may still show them as Staged — confirm deployment via the Fly.io+ Machines view or app logs.+ </FieldDescription>+ </FieldContent>+ <Switch+ id="flyio-auto-redeploy"+ variant="project"+ checked={value}+ onCheckedChange={onChange}+ />+ </Field>+ <FieldError errors={[error]} />+ </Field>)}/>);diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/RenderSyncOptionsFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/RenderSyncOptionsFields.tsxindex 6d4173bd09..a915f5f50a 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/RenderSyncOptionsFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/RenderSyncOptionsFields.tsx@@ -1,8 +1,13 @@import { Controller, useFormContext } from "react-hook-form";-import { faQuestionCircle } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";-import { FormControl, Switch, Tooltip } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldDescription,+ FieldError,+ Label,+ Switch+} from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";import { TSecretSyncForm } from "../schemas";@@ -15,25 +20,23 @@ export const RenderSyncOptionsFields = () => {name="syncOptions.autoRedeployServices"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl className="mt-4" isError={Boolean(error?.message)} errorText={error?.message}>- <Switch- className="bg-mineshaft-400/50 shadow-inner data-[state=checked]:bg-green/80"- id="auto-redeploy-services"- thumbClassName="bg-mineshaft-800"- isChecked={value}- onCheckedChange={onChange}- >- Auto Redeploy Services On Sync- <Tooltip- className="max-w-md"- content={- <p>If enabled, services will be automatically redeployed upon secret changes.</p>- }- >- <FontAwesomeIcon icon={faQuestionCircle} size="sm" className="ml-1" />- </Tooltip>- </Switch>- </FormControl>+ <Field className="mb-4">+ <Field orientation="horizontal">+ <FieldContent>+ <Label htmlFor="render-auto-redeploy-services">Auto-redeploy services on sync</Label>+ <FieldDescription>+ Services are automatically redeployed when secrets change.+ </FieldDescription>+ </FieldContent>+ <Switch+ id="render-auto-redeploy-services"+ variant="project"+ checked={value}+ onCheckedChange={onChange}+ />+ </Field>+ <FieldError errors={[error]} />+ </Field>)}/>);diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/SecretSyncKeySchemaField.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/SecretSyncKeySchemaField.tsxnew file mode 100644index 0000000000..9bfad61e25--- /dev/null+++ b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/SecretSyncKeySchemaField.tsx@@ -0,0 +1,144 @@+import { useEffect, useState } from "react";+import { Controller, useFormContext, useFormState } from "react-hook-form";+import { ArrowRight } from "lucide-react";++import {+ Field,+ FieldContent,+ FieldDescription,+ FieldError,+ FieldLabel,+ Input,+ Label,+ Switch+} from "@app/components/v3";+import { SECRET_SYNC_MAP } from "@app/helpers/secretSyncs";++import { TSecretSyncForm } from "../schemas";++const SAMPLE_SECRET_KEY = "API_KEY";+const SAMPLE_ENVIRONMENT = "prod";++const applyKeySchema = (schema: string | undefined) => {+ if (!schema) return SAMPLE_SECRET_KEY;+ return schema+ .replaceAll("{{secretKey}}", SAMPLE_SECRET_KEY)+ .replaceAll("{{environment}}", SAMPLE_ENVIRONMENT);+};++type PreviewProps = {+ schema: string | undefined;+ destinationName: string;+};++const KeySchemaPreview = ({ schema, destinationName }: PreviewProps) => {+ const transformed = applyKeySchema(schema);++ return (+ <div className="grid grid-cols-[1fr_auto_1fr] items-end gap-3" aria-hidden="true">+ <div className="flex min-w-0 flex-col gap-1">+ <p className="text-[10px] font-medium tracking-wider text-muted uppercase">Infisical</p>+ <div className="flex items-center justify-between gap-2 rounded border border-border bg-container px-2 py-1 text-[10px]">+ <span className="truncate font-mono text-foreground/80">{SAMPLE_SECRET_KEY}</span>+ </div>+ </div>+ <div className="flex items-center pb-1.5">+ <ArrowRight className="size-3 text-muted" strokeWidth={2.5} />+ </div>+ <div className="flex min-w-0 flex-col gap-1">+ <p className="truncate text-[10px] font-medium tracking-wider text-muted uppercase">+ {destinationName}+ </p>+ <div className="flex items-center justify-between gap-2 rounded border border-border bg-container px-2 py-1 text-[10px]">+ <span className="truncate font-mono text-foreground/80">+ {transformed || SAMPLE_SECRET_KEY}+ </span>+ </div>+ </div>+ </div>+ );+};++export const SecretSyncKeySchemaField = () => {+ const { control, watch, setValue } = useFormContext<TSecretSyncForm>();+ const destination = watch("destination");+ const destinationName = SECRET_SYNC_MAP[destination].name;+ const currentValue = watch("syncOptions.keySchema");++ const { errors, submitCount } = useFormState({ control });+ const hasSchemaError = Boolean(+ (errors.syncOptions as { keySchema?: unknown } | undefined)?.keySchema+ );++ const [isEnabled, setIsEnabled] = useState<boolean>(Boolean(currentValue) || hasSchemaError);++ useEffect(() => {+ if (hasSchemaError) setIsEnabled(true);+ }, [hasSchemaError, submitCount]);++ return (+ <div className="mb-4">+ <Field orientation="horizontal">+ <FieldContent>+ <Label htmlFor="customize-key-names">Customize key names</Label>+ <FieldDescription>+ By default, keys keep their Infisical names when written to {destinationName}. Enable to+ rewrite each key with a template.+ </FieldDescription>+ </FieldContent>+ <Switch+ id="customize-key-names"+ variant="project"+ checked={isEnabled}+ onCheckedChange={(checked) => {+ setIsEnabled(checked);+ if (!checked) {+ setValue("syncOptions.keySchema", undefined, { shouldValidate: true });+ }+ }}+ />+ </Field>+ {isEnabled && (+ <Controller+ control={control}+ name="syncOptions.keySchema"+ render={({ field: { value, onChange }, fieldState: { error } }) => (+ <Field className="mt-4">+ <FieldLabel htmlFor="sync-key-schema">Key schema</FieldLabel>+ <Input+ id="sync-key-schema"+ value={value ?? ""}+ onChange={onChange}+ placeholder="INFISICAL_{{secretKey}}"+ isError={Boolean(error)}+ />+ <FieldError errors={[error]} />+ {!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">+ {"{{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">+ {"{{environment}}"}+ </code>+ .{" "}+ <a+ href="https://infisical.com/docs/integrations/secret-syncs/overview#key-schemas"+ target="_blank"+ rel="noopener noreferrer"+ >+ Learn more+ </a>+ .+ </FieldDescription>+ )}+ <KeySchemaPreview schema={value} destinationName={destinationName} />+ </Field>+ )}+ />+ )}+ </div>+ );+};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/SecretSyncOptionsFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/SecretSyncOptionsFields.tsxindex a246ee9bd5..c1f82a197f 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/SecretSyncOptionsFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncOptionsFields/SecretSyncOptionsFields.tsx@@ -1,13 +1,24 @@import { ReactNode, useEffect } from "react";import { Controller, useFormContext } from "react-hook-form";-import {- faCircleInfo,- faQuestionCircle,- faTriangleExclamation-} from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";+import { CircleHelp } from "lucide-react";-import { FormControl, Input, Select, SelectItem, Switch, Tooltip } from "@app/components/v2";+import {+ Field,+ FieldContent,+ FieldDescription,+ FieldError,+ FieldLabel,+ Label,+ Select,+ SelectContent,+ SelectItem,+ SelectTrigger,+ SelectValue,+ Switch,+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import { SECRET_SYNC_INITIAL_SYNC_BEHAVIOR_MAP, SECRET_SYNC_MAP } from "@app/helpers/secretSyncs";import {SecretSync,@@ -16,17 +27,20 @@ import {} from "@app/hooks/api/secretSyncs";import { TSecretSyncForm } from "../schemas";+import { InitialSyncAlerts } from "../SecretSyncInitialSyncBehaviorFields";import { AwsParameterStoreSyncOptionsFields } from "./AwsParameterStoreSyncOptionsFields";import { AwsSecretsManagerSyncOptionsFields } from "./AwsSecretsManagerSyncOptionsFields";import { AzureKeyVaultSyncOptionsFields } from "./AzureKeyVaultSyncOptionsFields";import { FlyioSyncOptionsFields } from "./FlyioSyncOptionsFields";import { RenderSyncOptionsFields } from "./RenderSyncOptionsFields";+import { SecretSyncKeySchemaField } from "./SecretSyncKeySchemaField";type Props = {hideInitialSync?: boolean;+ children?: ReactNode;};-export const SecretSyncOptionsFields = ({ hideInitialSync }: Props) => {+export const SecretSyncOptionsFields = ({ hideInitialSync, children }: Props) => {const { control, watch, setValue } = useFormContext<TSecretSyncForm>();const destination = watch("destination");@@ -54,8 +68,9 @@ export const SecretSyncOptionsFields = ({ hideInitialSync }: Props) => {}}, [vercelSensitive, currentSyncOption.initialSyncBehavior, setValue]);+ const importAvailable = Boolean(syncOption?.canImportSecrets) && !vercelSensitive;const initialSyncBehaviorEntries = Object.entries(SECRET_SYNC_INITIAL_SYNC_BEHAVIOR_MAP).filter(- ([key]) => !vercelSensitive || key === SecretSyncInitialSyncBehavior.OverwriteDestination+ ([key]) => importAvailable || key === SecretSyncInitialSyncBehavior.OverwriteDestination);let AdditionalSyncOptionsFieldsComponent: ReactNode;@@ -121,218 +136,99 @@ export const SecretSyncOptionsFields = ({ hideInitialSync }: Props) => {return (<>- <p className="mb-4 text-sm text-bunker-300">Configure how secrets should be synced.</p>{!hideInitialSync && (<><Controllername="syncOptions.initialSyncBehavior"control={control}render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- tooltipClassName="max-w-lg py-3"- tooltipText={- syncOption?.canImportSecrets ? (- <div className="flex flex-col gap-3">- <p>- Specify how Infisical should resolve the initial sync to {destinationName}.- The following options are available:- </p>- <ul className="flex list-disc flex-col gap-3 pl-4">- {Object.values(SECRET_SYNC_INITIAL_SYNC_BEHAVIOR_MAP).map((details) => {- const { name, description } = details(destinationName);-- return (- <li key={name}>- <p className="text-mineshaft-300">- <span className="font-medium text-bunker-200">{name}</span>:{" "}- {description}- </p>- </li>- );- })}- </ul>- </div>- ) : undefined- }- errorText={error?.message}- isError={Boolean(error?.message)}- label="Initial Sync Behavior"- >- <Select- isDisabled={!syncOption?.canImportSecrets || vercelSensitive}- value={value}- onValueChange={(val) => onChange(val)}- className="w-full border border-mineshaft-500"- position="popper"- placeholder="Select an option..."- dropdownContainerClassName="max-w-none"- >- {initialSyncBehaviorEntries.map(([key, details]) => {- const { name } = details(destinationName);-- return (- <SelectItem value={key} key={key}>- {name}- </SelectItem>- );- })}+ <Field className="mb-4">+ <FieldLabel htmlFor="initial-sync-behavior" className="flex items-center gap-1.5">+ Initial sync behavior+ {syncOption?.canImportSecrets && (+ <Tooltip>+ <TooltipTrigger asChild>+ <CircleHelp className="size-3 cursor-help text-muted" />+ </TooltipTrigger>+ <TooltipContent className="max-w-lg">+ <div className="flex flex-col gap-3">+ <p>+ Specify how Infisical should resolve the initial sync to{" "}+ {destinationName}. The following options are available:+ </p>+ <ul className="flex list-disc flex-col gap-3 pl-4">+ {Object.values(SECRET_SYNC_INITIAL_SYNC_BEHAVIOR_MAP).map((details) => {+ const { name, description } = details(destinationName);+ return (+ <li key={name}>+ <p>+ <span className="font-medium">{name}</span>: {description}+ </p>+ </li>+ );+ })}+ </ul>+ </div>+ </TooltipContent>+ </Tooltip>+ )}+ </FieldLabel>+ <Select value={value} onValueChange={(val) => onChange(val)}>+ <SelectTrigger+ id="initial-sync-behavior"+ isError={Boolean(error)}+ className="w-full"+ >+ <SelectValue placeholder="Select an option..." />+ </SelectTrigger>+ <SelectContent>+ {initialSyncBehaviorEntries.map(([key, details]) => {+ const { name } = details(destinationName);+ return (+ <SelectItem value={key} key={key}>+ {name}+ </SelectItem>+ );+ })}+ </SelectContent></Select>- </FormControl>+ <FieldError errors={[error]} />+ </Field>)}/>- {vercelSensitive && (- <p className="-mt-2.5 mb-2.5 text-xs text-yellow">- <FontAwesomeIcon className="mr-1" size="xs" icon={faTriangleExclamation} />- When secrets are marked as sensitive, Vercel does not allow them to be read back, so- only Overwrite Destination Secrets is supported.- </p>- )}- {destination === SecretSync.Vercel &&- !vercelSensitive &&- currentSyncOption.initialSyncBehavior !==- SecretSyncInitialSyncBehavior.OverwriteDestination && (- <p className="-mt-2.5 mb-2.5 text-xs text-yellow">- <FontAwesomeIcon className="mr-1" size="xs" icon={faTriangleExclamation} />- For team-scoped syncs, only Vercel shared environment variables whose scope exactly- matches this sync's configuration (target environments, target projects, and- Apply to all Custom Environments) will be imported. Variables covering a broader- scope, or split across separate records per environment, will not be imported on the- initial sync.- </p>- )}- {!vercelSensitive && !syncOption?.canImportSecrets && (- <p className="-mt-2.5 mb-2.5 text-xs text-yellow">- <FontAwesomeIcon className="mr-1" size="xs" icon={faTriangleExclamation} />- {destinationName} only supports overwriting destination secrets.{" "}- {!currentSyncOption.disableSecretDeletion &&- (syncOption?.supportsKeySchema !== false ||- syncOption?.supportsDisableSecretDeletion !== false) &&- `Secrets not present in Infisical will be removed from the destination. Consider adding a key schema or disabling secret deletion if you do not want existing secrets to be removed from ${destinationName}.`}- </p>- )}- {!vercelSensitive &&- syncOption?.canImportSecrets &&- currentSyncOption.initialSyncBehavior ===- SecretSyncInitialSyncBehavior.OverwriteDestination &&- !currentSyncOption.disableSecretDeletion && (- <p className="-mt-2.5 mb-2.5 text-xs text-yellow">- <FontAwesomeIcon className="mr-1" size="xs" icon={faTriangleExclamation} />- Secrets not present in Infisical will be removed from the destination. If you have- secrets in {destinationName} that you do not want deleted, consider setting initial- sync behavior to import destination secrets. Alternatively, configure a key schema- or disable secret deletion below to have Infisical ignore these secrets.- </p>- )}+ <InitialSyncAlerts /></>)}- {syncOption?.supportsKeySchema !== false && (- <Controller- render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl- tooltipClassName="max-w-md"- tooltipText={- <div className="flex flex-col gap-3">- <span>- When a secret is synced, values will be injected into the key schema before it- reaches the destination. This is useful for organization.- </span>-- <div className="flex flex-col">- <span>Available keys:</span>- <ul className="list-disc pl-4 text-sm">- <li>- <code>{"{{secretKey}}"}</code> - The key of the secret- </li>- <li>- <code>{"{{environment}}"}</code> - The environment which the secret is in- (e.g. dev, staging, prod)- </li>- </ul>- </div>- </div>- }- isError={Boolean(error)}- isOptional- errorText={error?.message}- label="Key Schema"- helperText={- <Tooltip- className="max-w-md"- content={- <span>- We highly recommend configuring a{" "}- <a- href="https://infisical.com/docs/integrations/secret-syncs/overview#key-schemas"- target="_blank"- rel="noopener noreferrer"- className="underline"- >- key schema- </a>{" "}- to ensure that Infisical only manages secrets in {destinationName} that match- the key pattern.- <br />- <br />- Destination secrets that do not match the schema will not be deleted or- updated.- </span>- }- >- <div className="text-info">- <span>Infisical strongly advises configuring a key schema</span>{" "}- <FontAwesomeIcon icon={faCircleInfo} />- </div>- </Tooltip>- }- >- <Input value={value} onChange={onChange} placeholder="INFISICAL_{{secretKey}}" />- </FormControl>- )}- control={control}- name="syncOptions.keySchema"- />- )}- {AdditionalSyncOptionsFieldsComponent}{syncOption?.supportsDisableSecretDeletion !== false && (<Controllercontrol={control}name="syncOptions.disableSecretDeletion"- render={({ field: { value, onChange }, fieldState: { error } }) => {- return (- <FormControl isError={Boolean(error)} errorText={error?.message}>+ render={({ field: { value, onChange }, fieldState: { error } }) => (+ <Field className="mb-4">+ <Field orientation="horizontal">+ <FieldContent>+ <Label htmlFor="disable-secret-deletion">Disable secret deletion</Label>+ <FieldDescription>+ When enabled, Infisical will not remove secrets from {destinationName} during a+ sync. Use this if you intend to manage some secrets manually outside of+ Infisical.+ </FieldDescription>+ </FieldContent><Switch- className="bg-mineshaft-400/80 shadow-inner data-[state=checked]:bg-green/80"- id="auto-sync-enabled"- thumbClassName="bg-mineshaft-800"+ id="disable-secret-deletion"+ variant="project"+ checked={value}onCheckedChange={onChange}- isChecked={value}- >- <p className="w-52">- Disable Secret Deletion{" "}- <Tooltip- className="max-w-md"- content={- <>- <p>- When enabled, Infisical will <span className="font-medium">not</span>{" "}- remove secrets from the destination during a sync.- </p>- <p className="mt-4">- Enable this option if you intend to manage some secrets manually outside- of Infisical.- </p>- </>- }- >- <FontAwesomeIcon icon={faQuestionCircle} size="sm" className="ml-1" />- </Tooltip>- </p>- </Switch>- </FormControl>- );- }}+ />+ </Field>+ <FieldError errors={[error]} />+ </Field>+ )}/>)}+ {syncOption?.supportsKeySchema !== false && <SecretSyncKeySchemaField />}+ {children}+ {AdditionalSyncOptionsFieldsComponent}</>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/AwsParameterStoreSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/AwsParameterStoreSyncReviewFields.tsxindex a707527032..0ebd376927 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/AwsParameterStoreSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/AwsParameterStoreSyncReviewFields.tsx@@ -1,10 +1,9 @@import { useFormContext } from "react-hook-form";import { EyeIcon } from "lucide-react";-import { GenericFieldLabel } from "@app/components/secret-syncs";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";import { Table, TBody, Td, Th, THead, Tooltip, Tr } from "@app/components/v2";-import { Badge } from "@app/components/v3";+import { Badge, Detail, DetailLabel, DetailValue } from "@app/components/v3";import { AWS_REGIONS } from "@app/helpers/appConnections";import { SecretSync } from "@app/hooks/api/secretSyncs";@@ -17,42 +16,53 @@ export const AwsParameterStoreSyncOptionsReviewFields = () => {return (<>- {keyId && <GenericFieldLabel label="KMS Key">{keyId}</GenericFieldLabel>}+ {keyId && (+ <Detail>+ <DetailLabel>KMS Key</DetailLabel>+ <DetailValue>{keyId}</DetailValue>+ </Detail>+ )}{tags && tags.length > 0 && (- <GenericFieldLabel label="Resource Tags">- <Tooltip- side="right"- className="max-w-xl p-1"- content={- <Table>- <THead>- <Th className="p-2 whitespace-nowrap">Key</Th>- <Th className="p-2">Value</Th>- </THead>- <TBody>- {tags.map((tag) => (- <Tr key={tag.key}>- <Td className="p-2">{tag.key}</Td>- <Td className="p-2">{tag.value}</Td>- </Tr>- ))}- </TBody>- </Table>- }- >- <div className="w-min">- <Badge variant="neutral">- <EyeIcon />- {tags.length} Tag{tags.length > 1 ? "s" : ""}- </Badge>- </div>- </Tooltip>- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Resource Tags</DetailLabel>+ <DetailValue>+ <Tooltip+ side="right"+ className="max-w-xl p-1"+ content={+ <Table>+ <THead>+ <Th className="p-2 whitespace-nowrap">Key</Th>+ <Th className="p-2">Value</Th>+ </THead>+ <TBody>+ {tags.map((tag) => (+ <Tr key={tag.key}>+ <Td className="p-2">{tag.key}</Td>+ <Td className="p-2">{tag.value}</Td>+ </Tr>+ ))}+ </TBody>+ </Table>+ }+ >+ <div className="w-min">+ <Badge variant="neutral">+ <EyeIcon />+ {tags.length} Tag{tags.length > 1 ? "s" : ""}+ </Badge>+ </div>+ </Tooltip>+ </DetailValue>+ </Detail>)}{syncSecretMetadataAsTags && (- <GenericFieldLabel label="Sync Secret Metadata as Resource Tags">- <Badge variant="success">Enabled</Badge>- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Sync Secret Metadata as Resource Tags</DetailLabel>+ <DetailValue>+ <Badge variant="success">Enabled</Badge>+ </DetailValue>+ </Detail>)}</>);@@ -69,13 +79,17 @@ export const AwsParameterStoreDestinationReviewFields = () => {return (<>- <GenericFieldLabel label="Region">- {awsRegion?.name}- <Badge className="ml-1" variant="success">- {awsRegion?.slug}{" "}- </Badge>- </GenericFieldLabel>- <GenericFieldLabel label="Path">{path}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Region</DetailLabel>+ <DetailValue className="flex items-center gap-1">+ {awsRegion?.name}+ <Badge variant="success">{awsRegion?.slug}</Badge>+ </DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Path</DetailLabel>+ <DetailValue>{path}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/AwsSecretsManagerSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/AwsSecretsManagerSyncReviewFields.tsxindex d37cae3f11..8454e6d55a 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/AwsSecretsManagerSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/AwsSecretsManagerSyncReviewFields.tsx@@ -1,10 +1,9 @@import { useFormContext } from "react-hook-form";import { EyeIcon } from "lucide-react";-import { GenericFieldLabel } from "@app/components/secret-syncs";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";import { Table, TBody, Td, Th, THead, Tooltip, Tr } from "@app/components/v2";-import { Badge } from "@app/components/v3";+import { Badge, Detail, DetailLabel, DetailValue } from "@app/components/v3";import { AWS_REGIONS } from "@app/helpers/appConnections";import { SecretSync } from "@app/hooks/api/secretSyncs";import { AwsSecretsManagerSyncMappingBehavior } from "@app/hooks/api/secretSyncs/types/aws-secrets-manager-sync";@@ -24,17 +23,22 @@ export const AwsSecretsManagerSyncReviewFields = () => {return (<>- <GenericFieldLabel label="Region">- {awsRegion?.name}- <Badge className="ml-1" variant="info">- {awsRegion?.slug}{" "}- </Badge>- </GenericFieldLabel>- <GenericFieldLabel className="capitalize" label="Mapping Behavior">- {mappingBehavior}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Region</DetailLabel>+ <DetailValue className="flex items-center gap-1">+ {awsRegion?.name}+ <Badge variant="success">{awsRegion?.slug}</Badge>+ </DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Mapping Behavior</DetailLabel>+ <DetailValue className="capitalize">{mappingBehavior}</DetailValue>+ </Detail>{mappingBehavior === AwsSecretsManagerSyncMappingBehavior.ManyToOne && (- <GenericFieldLabel label="Secret Name">{secretName}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Secret Name</DetailLabel>+ <DetailValue>{secretName}</DetailValue>+ </Detail>)}</>);@@ -49,42 +53,53 @@ export const AwsSecretsManagerSyncOptionsReviewFields = () => {return (<>- {keyId && <GenericFieldLabel label="KMS Key">{keyId}</GenericFieldLabel>}+ {keyId && (+ <Detail>+ <DetailLabel>KMS Key</DetailLabel>+ <DetailValue>{keyId}</DetailValue>+ </Detail>+ )}{tags && tags.length > 0 && (- <GenericFieldLabel label="Tags">- <Tooltip- side="right"- className="max-w-xl p-1"- content={- <Table>- <THead>- <Th className="p-2 whitespace-nowrap">Key</Th>- <Th className="p-2">Value</Th>- </THead>- <TBody>- {tags.map((tag) => (- <Tr key={tag.key}>- <Td className="p-2">{tag.key}</Td>- <Td className="p-2">{tag.value}</Td>- </Tr>- ))}- </TBody>- </Table>- }- >- <div className="w-min">- <Badge variant="neutral">- <EyeIcon />- {tags.length} Tag{tags.length > 1 ? "s" : ""}- </Badge>- </div>- </Tooltip>- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Tags</DetailLabel>+ <DetailValue>+ <Tooltip+ side="right"+ className="max-w-xl p-1"+ content={+ <Table>+ <THead>+ <Th className="p-2 whitespace-nowrap">Key</Th>+ <Th className="p-2">Value</Th>+ </THead>+ <TBody>+ {tags.map((tag) => (+ <Tr key={tag.key}>+ <Td className="p-2">{tag.key}</Td>+ <Td className="p-2">{tag.value}</Td>+ </Tr>+ ))}+ </TBody>+ </Table>+ }+ >+ <div className="w-min">+ <Badge variant="neutral">+ <EyeIcon />+ {tags.length} Tag{tags.length > 1 ? "s" : ""}+ </Badge>+ </div>+ </Tooltip>+ </DetailValue>+ </Detail>)}{syncSecretMetadataAsTags && (- <GenericFieldLabel label="Sync Secret Metadata as Resource Tags">- <Badge variant="success">Enabled</Badge>- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Sync Secret Metadata as Resource Tags</DetailLabel>+ <DetailValue>+ <Badge variant="success">Enabled</Badge>+ </DetailValue>+ </Detail>)}</>);diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/AzureAppConfigurationSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/AzureAppConfigurationSyncReviewFields.tsxindex cb675be264..3a1aa94ad7 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/AzureAppConfigurationSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/AzureAppConfigurationSyncReviewFields.tsx@@ -1,7 +1,7 @@import { useFormContext } from "react-hook-form";-import { GenericFieldLabel } from "@app/components/secret-syncs";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";export const AzureAppConfigurationSyncReviewFields = () => {@@ -13,8 +13,14 @@ export const AzureAppConfigurationSyncReviewFields = () => {return (<>- <GenericFieldLabel label="Configuration URL">{vaultBaseUrl}</GenericFieldLabel>- <GenericFieldLabel label="Label">{label}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Configuration URL</DetailLabel>+ <DetailValue>{vaultBaseUrl}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Label</DetailLabel>+ <DetailValue>{label}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/AzureDevOpsSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/AzureDevOpsSyncReviewFields.tsxindex 67039f77f4..f3db82618d 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/AzureDevOpsSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/AzureDevOpsSyncReviewFields.tsx@@ -1,7 +1,7 @@import { useFormContext } from "react-hook-form";-import { GenericFieldLabel } from "@app/components/secret-syncs";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";export const AzureDevOpsSyncReviewFields = () => {@@ -12,9 +12,15 @@ export const AzureDevOpsSyncReviewFields = () => {return (<>{devopsProjectName && (- <GenericFieldLabel label="Project">{devopsProjectName}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Project</DetailLabel>+ <DetailValue>{devopsProjectName}</DetailValue>+ </Detail>)}- <GenericFieldLabel label="Project ID">{devopsProjectId}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Project ID</DetailLabel>+ <DetailValue>{devopsProjectId}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/AzureEntraIdScimSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/AzureEntraIdScimSyncReviewFields.tsxindex 15e39d2c92..9596db2ec7 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/AzureEntraIdScimSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/AzureEntraIdScimSyncReviewFields.tsx@@ -1,7 +1,7 @@import { useFormContext } from "react-hook-form";-import { GenericFieldLabel } from "@app/components/secret-syncs";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";export const AzureEntraIdScimSyncReviewFields = () => {@@ -17,10 +17,18 @@ export const AzureEntraIdScimSyncReviewFields = () => {return (<>- <GenericFieldLabel label="Service Principal">- {servicePrincipalDisplayName || servicePrincipalId}- </GenericFieldLabel>- <GenericFieldLabel label="Secret">{secretKey || "-"}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Service Principal</DetailLabel>+ <DetailValue>{servicePrincipalDisplayName || servicePrincipalId}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Secret</DetailLabel>+ {secretKey ? (+ <DetailValue>{secretKey}</DetailValue>+ ) : (+ <DetailValue className="text-muted">—</DetailValue>+ )}+ </Detail></>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/AzureKeyVaultSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/AzureKeyVaultSyncReviewFields.tsxindex 26b30f2c09..cca0ee31c1 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/AzureKeyVaultSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/AzureKeyVaultSyncReviewFields.tsx@@ -1,12 +1,17 @@import { useFormContext } from "react-hook-form";-import { GenericFieldLabel } from "@app/components/secret-syncs";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";export const AzureKeyVaultSyncReviewFields = () => {const { watch } = useFormContext<TSecretSyncForm & { destination: SecretSync.AzureKeyVault }>();const vaultBaseUrl = watch("destinationConfig.vaultBaseUrl");- return <GenericFieldLabel label="Vault URL">{vaultBaseUrl}</GenericFieldLabel>;+ return (+ <Detail>+ <DetailLabel>Vault URL</DetailLabel>+ <DetailValue>{vaultBaseUrl}</DetailValue>+ </Detail>+ );};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/BitbucketSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/BitbucketSyncReviewFields.tsxindex 93630f2252..fbf40e8d46 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/BitbucketSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/BitbucketSyncReviewFields.tsx@@ -1,7 +1,7 @@import { useFormContext } from "react-hook-form";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";-import { GenericFieldLabel } from "@app/components/v2";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";export const BitbucketSyncReviewFields = () => {@@ -12,9 +12,18 @@ export const BitbucketSyncReviewFields = () => {return (<>- <GenericFieldLabel label="Repository">{repository}</GenericFieldLabel>- <GenericFieldLabel label="Environment">{environment}</GenericFieldLabel>- <GenericFieldLabel label="Workspace">{workspace}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Repository</DetailLabel>+ <DetailValue>{repository}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Environment</DetailLabel>+ <DetailValue>{environment}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Workspace</DetailLabel>+ <DetailValue>{workspace}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/CamundaSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/CamundaSyncReviewFields.tsxindex 483aa67fb2..5f3fa06060 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/CamundaSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/CamundaSyncReviewFields.tsx@@ -1,7 +1,7 @@import { useFormContext } from "react-hook-form";-import { GenericFieldLabel } from "@app/components/secret-syncs";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";export const CamundaSyncReviewFields = () => {@@ -11,10 +11,16 @@ export const CamundaSyncReviewFields = () => {const clusterUUID = watch("destinationConfig.clusterUUID");return (<>- <GenericFieldLabel label="Secret Scope">{scope}</GenericFieldLabel>- <GenericFieldLabel label="Cluster">- {clusterName} (id:{clusterUUID})- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Secret Scope</DetailLabel>+ <DetailValue>{scope}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Cluster</DetailLabel>+ <DetailValue>+ {clusterName} (id:{clusterUUID})+ </DetailValue>+ </Detail></>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/ChecklySyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/ChecklySyncReviewFields.tsxindex 0f86a0c063..10f5ecd59c 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/ChecklySyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/ChecklySyncReviewFields.tsx@@ -1,7 +1,7 @@import { useFormContext } from "react-hook-form";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";-import { GenericFieldLabel } from "@app/components/v2";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";export const ChecklySyncReviewFields = () => {@@ -10,11 +10,15 @@ export const ChecklySyncReviewFields = () => {return (<>- <GenericFieldLabel label="Account">- {config.accountName ?? config.accountId}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Account</DetailLabel>+ <DetailValue>{config.accountName ?? config.accountId}</DetailValue>+ </Detail>{config.groupId && (- <GenericFieldLabel label="Group">{config.groupName ?? config.groupId}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Group</DetailLabel>+ <DetailValue>{config.groupName ?? config.groupId}</DetailValue>+ </Detail>)}</>);diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/ChefSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/ChefSyncReviewFields.tsxindex 95f5310a2d..ded569b506 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/ChefSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/ChefSyncReviewFields.tsx@@ -1,7 +1,7 @@import { useFormContext } from "react-hook-form";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";-import { GenericFieldLabel } from "@app/components/v2";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";export const ChefSyncReviewFields = () => {@@ -11,8 +11,14 @@ export const ChefSyncReviewFields = () => {return (<>- <GenericFieldLabel label="Data Bag">{dataBagName}</GenericFieldLabel>- <GenericFieldLabel label="Data Bag Item">{dataBagItemName}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Data Bag</DetailLabel>+ <DetailValue>{dataBagName}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Data Bag Item</DetailLabel>+ <DetailValue>{dataBagItemName}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/CircleCISyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/CircleCISyncReviewFields.tsxindex 6649b5588a..c928748744 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/CircleCISyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/CircleCISyncReviewFields.tsx@@ -1,7 +1,7 @@import { useFormContext } from "react-hook-form";-import { GenericFieldLabel } from "@app/components/secret-syncs";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";export const CircleCISyncReviewFields = () => {@@ -11,8 +11,14 @@ export const CircleCISyncReviewFields = () => {return (<>- <GenericFieldLabel label="Organization">{orgName}</GenericFieldLabel>- <GenericFieldLabel label="Project">{projectName}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Organization</DetailLabel>+ <DetailValue>{orgName}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Project</DetailLabel>+ <DetailValue>{projectName}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/CloudflarePagesReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/CloudflarePagesReviewFields.tsxindex ab18be5dad..bb7290dccc 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/CloudflarePagesReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/CloudflarePagesReviewFields.tsx@@ -1,7 +1,7 @@import { useFormContext } from "react-hook-form";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";-import { GenericFieldLabel } from "@app/components/v2";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";export const CloudflarePagesSyncReviewFields = () => {@@ -11,8 +11,14 @@ export const CloudflarePagesSyncReviewFields = () => {return (<>- <GenericFieldLabel label="Project">{projectName}</GenericFieldLabel>- <GenericFieldLabel label="Environment">{environment}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Project</DetailLabel>+ <DetailValue>{projectName}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Environment</DetailLabel>+ <DetailValue>{environment}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/CloudflareWorkersReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/CloudflareWorkersReviewFields.tsxindex 6fe0f1f6ac..181c1e75ff 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/CloudflareWorkersReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/CloudflareWorkersReviewFields.tsx@@ -1,7 +1,7 @@import { useFormContext } from "react-hook-form";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";-import { GenericFieldLabel } from "@app/components/v2";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";export const CloudflareWorkersSyncReviewFields = () => {@@ -10,5 +10,10 @@ export const CloudflareWorkersSyncReviewFields = () => {>();const scriptId = watch("destinationConfig.scriptId");- return <GenericFieldLabel label="Script">{scriptId}</GenericFieldLabel>;+ return (+ <Detail>+ <DetailLabel>Script</DetailLabel>+ <DetailValue>{scriptId}</DetailValue>+ </Detail>+ );};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/DatabricksSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/DatabricksSyncReviewFields.tsxindex 130ff6de30..91c5543967 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/DatabricksSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/DatabricksSyncReviewFields.tsx@@ -1,12 +1,17 @@import { useFormContext } from "react-hook-form";-import { GenericFieldLabel } from "@app/components/secret-syncs";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";export const DatabricksSyncReviewFields = () => {const { watch } = useFormContext<TSecretSyncForm & { destination: SecretSync.Databricks }>();const scope = watch("destinationConfig.scope");- return <GenericFieldLabel label="Secret Scope">{scope}</GenericFieldLabel>;+ return (+ <Detail>+ <DetailLabel>Secret Scope</DetailLabel>+ <DetailValue>{scope}</DetailValue>+ </Detail>+ );};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/DevinSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/DevinSyncReviewFields.tsxindex 25652e306e..73bf6e79b6 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/DevinSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/DevinSyncReviewFields.tsx@@ -1,12 +1,17 @@import { useFormContext } from "react-hook-form";-import { GenericFieldLabel } from "@app/components/secret-syncs";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";export const DevinSyncReviewFields = () => {const { watch } = useFormContext<TSecretSyncForm & { destination: SecretSync.Devin }>();const orgId = watch("destinationConfig.orgId");- return <GenericFieldLabel label="Organization ID">{orgId}</GenericFieldLabel>;+ return (+ <Detail>+ <DetailLabel>Organization ID</DetailLabel>+ <DetailValue>{orgId}</DetailValue>+ </Detail>+ );};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/DigitalOceanAppPlatformSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/DigitalOceanAppPlatformSyncReviewFields.tsxindex e99d7c6235..084c6bcfbe 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/DigitalOceanAppPlatformSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/DigitalOceanAppPlatformSyncReviewFields.tsx@@ -1,7 +1,7 @@import { useFormContext } from "react-hook-form";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";-import { GenericFieldLabel } from "@app/components/v2";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";export const DigitalOceanAppPlatformSyncReviewFields = () => {@@ -10,5 +10,10 @@ export const DigitalOceanAppPlatformSyncReviewFields = () => {>();const appName = watch("destinationConfig.appName");- return <GenericFieldLabel label="App">{appName}</GenericFieldLabel>;+ return (+ <Detail>+ <DetailLabel>App</DetailLabel>+ <DetailValue>{appName}</DetailValue>+ </Detail>+ );};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/ExternalInfisicalSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/ExternalInfisicalSyncReviewFields.tsxindex df14667ace..058de465e5 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/ExternalInfisicalSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/ExternalInfisicalSyncReviewFields.tsx@@ -1,7 +1,7 @@import { useFormContext } from "react-hook-form";-import { GenericFieldLabel } from "@app/components/secret-syncs";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";export const ExternalInfisicalSyncReviewFields = () => {@@ -12,9 +12,18 @@ export const ExternalInfisicalSyncReviewFields = () => {return (<>- <GenericFieldLabel label="Project ID">{config.projectId}</GenericFieldLabel>- <GenericFieldLabel label="Environment">{config.environment}</GenericFieldLabel>- <GenericFieldLabel label="Secret Path">{config.secretPath}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Project ID</DetailLabel>+ <DetailValue>{config.projectId}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Environment</DetailLabel>+ <DetailValue>{config.environment}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Secret Path</DetailLabel>+ <DetailValue>{config.secretPath}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/FlyioSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/FlyioSyncReviewFields.tsxindex dff711e81f..b0683f30ef 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/FlyioSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/FlyioSyncReviewFields.tsx@@ -1,8 +1,7 @@import { useFormContext, useWatch } from "react-hook-form";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";-import { GenericFieldLabel } from "@app/components/v2";-import { Badge } from "@app/components/v3";+import { Badge, Detail, DetailLabel, DetailValue } from "@app/components/v3";import { useFlyioConnectionListApps } from "@app/hooks/api/appConnections/flyio";import { SecretSync } from "@app/hooks/api/secretSyncs";@@ -12,17 +11,14 @@ export const FlyioSyncOptionsReviewFields = () => {const [{ autoRedeploy }] = watch(["syncOptions"]);return (- <div>- {autoRedeploy ? (- <GenericFieldLabel label="Auto Redeploy">- <Badge variant="success">Enabled</Badge>- </GenericFieldLabel>- ) : (- <GenericFieldLabel label="Auto Redeploy">- <Badge variant="danger">Disabled</Badge>- </GenericFieldLabel>- )}- </div>+ <Detail>+ <DetailLabel>Auto Redeploy</DetailLabel>+ <DetailValue>+ <Badge variant={autoRedeploy ? "success" : "danger"}>+ {autoRedeploy ? "Enabled" : "Disabled"}+ </Badge>+ </DetailValue>+ </Detail>);};@@ -35,5 +31,10 @@ export const FlyioSyncReviewFields = () => {});const displayName = apps?.find((a) => a.id === appId)?.name ?? appId;- return <GenericFieldLabel label="App">{displayName}</GenericFieldLabel>;+ return (+ <Detail>+ <DetailLabel>App</DetailLabel>+ <DetailValue>{displayName}</DetailValue>+ </Detail>+ );};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/GcpSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/GcpSyncReviewFields.tsxindex bebb1ffe4b..f0efef3353 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/GcpSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/GcpSyncReviewFields.tsx@@ -1,7 +1,7 @@import { useFormContext } from "react-hook-form";-import { GenericFieldLabel } from "@app/components/secret-syncs";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";import { GcpSyncScope } from "@app/hooks/api/secretSyncs/types/gcp-sync";@@ -13,12 +13,19 @@ export const GcpSyncReviewFields = () => {return (<>- <GenericFieldLabel label="Project ID">{destinationConfig.projectId}</GenericFieldLabel>- <GenericFieldLabel label="Scope" className="capitalize">- {destinationConfig.scope}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Project ID</DetailLabel>+ <DetailValue>{destinationConfig.projectId}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Scope</DetailLabel>+ <DetailValue className="capitalize">{destinationConfig.scope}</DetailValue>+ </Detail>{destinationConfig.scope === GcpSyncScope.Region && (- <GenericFieldLabel label="Region">{destinationConfig.locationId}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Region</DetailLabel>+ <DetailValue>{destinationConfig.locationId}</DetailValue>+ </Detail>)}</>);diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/GitHubSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/GitHubSyncReviewFields.tsxindex 34207e67f8..8454170ed0 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/GitHubSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/GitHubSyncReviewFields.tsx@@ -1,8 +1,8 @@import { ReactNode } from "react";import { useFormContext } from "react-hook-form";-import { GenericFieldLabel } from "@app/components/secret-syncs";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";import { GitHubSyncScope, TGitHubSync } from "@app/hooks/api/secretSyncs/types/github-sync";@@ -16,30 +16,41 @@ export const GitHubSyncReviewFields = () => {switch (config.scope) {case GitHubSyncScope.Repository:ScopeComponents = (- <GenericFieldLabel label="Repository">- {config.owner}/{config.repo}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Repository</DetailLabel>+ <DetailValue>+ {config.owner}/{config.repo}+ </DetailValue>+ </Detail>);break;case GitHubSyncScope.Organization:ScopeComponents = (<>- <GenericFieldLabel label="Organization">{config.org}</GenericFieldLabel>- <GenericFieldLabel className="capitalize" label="Visibility">- {config.visibility}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Organization</DetailLabel>+ <DetailValue>{config.org}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Visibility</DetailLabel>+ <DetailValue className="capitalize">{config.visibility}</DetailValue>+ </Detail></>);break;case GitHubSyncScope.RepositoryEnvironment:ScopeComponents = (<>- <GenericFieldLabel label="Repository">- {config.owner}/{config.repo}- </GenericFieldLabel>- <GenericFieldLabel className="capitalize" label="Environment">- {config.env}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Repository</DetailLabel>+ <DetailValue>+ {config.owner}/{config.repo}+ </DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Environment</DetailLabel>+ <DetailValue className="capitalize">{config.env}</DetailValue>+ </Detail></>);@@ -52,9 +63,10 @@ export const GitHubSyncReviewFields = () => {return (<>- <GenericFieldLabel className="capitalize" label="Scope">- {config.scope.replace("-", " ")}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Scope</DetailLabel>+ <DetailValue className="capitalize">{config.scope.replace("-", " ")}</DetailValue>+ </Detail>{ScopeComponents}</>);diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/GitLabSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/GitLabSyncReviewFields.tsxindex bf2de6c2fb..3a4672f0aa 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/GitLabSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/GitLabSyncReviewFields.tsx@@ -1,7 +1,7 @@import { useFormContext } from "react-hook-form";-import { GenericFieldLabel } from "@app/components/secret-syncs";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";import { GitLabSyncScope } from "@app/hooks/api/secretSyncs/types/gitlab-sync";@@ -17,21 +17,40 @@ export const GitLabSyncReviewFields = () => {return (<>- <GenericFieldLabel label="Scope">{scope}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Scope</DetailLabel>+ <DetailValue>{scope}</DetailValue>+ </Detail>{scope === GitLabSyncScope.Project && (- <GenericFieldLabel label="Project Name">{projectName}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Project Name</DetailLabel>+ <DetailValue>{projectName}</DetailValue>+ </Detail>)}{scope === GitLabSyncScope.Group && (- <GenericFieldLabel label="Group Name">{groupName}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Group Name</DetailLabel>+ <DetailValue>{groupName}</DetailValue>+ </Detail>)}{targetEnvironment && (- <GenericFieldLabel label="Environment">{targetEnvironment}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Environment</DetailLabel>+ <DetailValue>{targetEnvironment}</DetailValue>+ </Detail>)}- <GenericFieldLabel label="Protect Secrets">- {shouldProtectSecrets ? "Yes" : "No"}- </GenericFieldLabel>- <GenericFieldLabel label="Mask Secrets">{shouldMaskSecrets ? "Yes" : "No"}</GenericFieldLabel>- <GenericFieldLabel label="Hide Secrets">{shouldHideSecrets ? "Yes" : "No"}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Protect Secrets</DetailLabel>+ <DetailValue>{shouldProtectSecrets ? "Yes" : "No"}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Mask Secrets</DetailLabel>+ <DetailValue>{shouldMaskSecrets ? "Yes" : "No"}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Hide Secrets</DetailLabel>+ <DetailValue>{shouldHideSecrets ? "Yes" : "No"}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/HCVaultSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/HCVaultSyncReviewFields.tsxindex 2e1abac218..7b7584024b 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/HCVaultSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/HCVaultSyncReviewFields.tsx@@ -1,7 +1,7 @@import { useFormContext } from "react-hook-form";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";-import { GenericFieldLabel } from "@app/components/v2";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";export const HCVaultSyncReviewFields = () => {@@ -11,8 +11,14 @@ export const HCVaultSyncReviewFields = () => {return (<>- <GenericFieldLabel label="Secrets Engine Mount">{mount}</GenericFieldLabel>- <GenericFieldLabel label="Path">{path}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Secrets Engine Mount</DetailLabel>+ <DetailValue>{mount}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Path</DetailLabel>+ <DetailValue>{path}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/HerokuSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/HerokuSyncReviewFields.tsxindex 2fa55932a2..63622b0032 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/HerokuSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/HerokuSyncReviewFields.tsx@@ -1,7 +1,7 @@import { useFormContext } from "react-hook-form";-import { GenericFieldLabel } from "@app/components/secret-syncs";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";export const HerokuSyncReviewFields = () => {@@ -11,8 +11,14 @@ export const HerokuSyncReviewFields = () => {return (<>- <GenericFieldLabel label="App">{appName}</GenericFieldLabel>- <GenericFieldLabel label="App ID">{appId}</GenericFieldLabel>+ <Detail>+ <DetailLabel>App</DetailLabel>+ <DetailValue>{appName}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>App ID</DetailLabel>+ <DetailValue>{appId}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/HumanitecSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/HumanitecSyncReviewFields.tsxindex fcb8f35fff..1953d7be60 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/HumanitecSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/HumanitecSyncReviewFields.tsx@@ -1,7 +1,7 @@import { useFormContext } from "react-hook-form";-import { GenericFieldLabel } from "@app/components/secret-syncs";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";import { HumanitecSyncScope } from "@app/hooks/api/secretSyncs/types/humanitec-sync";@@ -14,10 +14,19 @@ export const HumanitecSyncReviewFields = () => {return (<>- <GenericFieldLabel label="Organization">{orgId}</GenericFieldLabel>- <GenericFieldLabel label="Application">{appId}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Organization</DetailLabel>+ <DetailValue>{orgId}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Application</DetailLabel>+ <DetailValue>{appId}</DetailValue>+ </Detail>{scope === HumanitecSyncScope.Environment && (- <GenericFieldLabel label="Environment">{envId}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Environment</DetailLabel>+ <DetailValue>{envId}</DetailValue>+ </Detail>)}</>);diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/LaravelForgeSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/LaravelForgeSyncReviewFields.tsxindex a359359f52..423f71b9b3 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/LaravelForgeSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/LaravelForgeSyncReviewFields.tsx@@ -1,7 +1,7 @@import { useFormContext } from "react-hook-form";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";-import { GenericFieldLabel } from "@app/components/v2";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";export const LaravelForgeSyncReviewFields = () => {@@ -13,11 +13,31 @@ export const LaravelForgeSyncReviewFields = () => {const siteName = watch("destinationConfig.siteName");const siteId = watch("destinationConfig.siteId");+ const server = serverName || serverId;+ const site = siteName || siteId;+return (<>- <GenericFieldLabel label="Account">{orgName || orgSlug}</GenericFieldLabel>- <GenericFieldLabel label="Server">{serverName || serverId || "None"}</GenericFieldLabel>- <GenericFieldLabel label="Site">{siteName || siteId || "None"}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Account</DetailLabel>+ <DetailValue>{orgName || orgSlug}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Server</DetailLabel>+ {server ? (+ <DetailValue>{server}</DetailValue>+ ) : (+ <DetailValue className="text-muted">—</DetailValue>+ )}+ </Detail>+ <Detail>+ <DetailLabel>Site</DetailLabel>+ {site ? (+ <DetailValue>{site}</DetailValue>+ ) : (+ <DetailValue className="text-muted">—</DetailValue>+ )}+ </Detail></>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/NetlifySyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/NetlifySyncReviewFields.tsxindex 5898de7c32..9130e8da99 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/NetlifySyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/NetlifySyncReviewFields.tsx@@ -1,7 +1,7 @@import { useFormContext } from "react-hook-form";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";-import { GenericFieldLabel } from "@app/components/v2";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";export const NetlifySyncReviewFields = () => {@@ -12,11 +12,30 @@ export const NetlifySyncReviewFields = () => {const siteId = watch("destinationConfig.siteId");const context = watch("destinationConfig.context");+ const site = siteName || siteId;+return (<>- <GenericFieldLabel label="Account">{accountName || accountId}</GenericFieldLabel>- <GenericFieldLabel label="Site">{siteName || siteId || "None"}</GenericFieldLabel>- <GenericFieldLabel label="Context">{context || "None"}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Account</DetailLabel>+ <DetailValue>{accountName || accountId}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Site</DetailLabel>+ {site ? (+ <DetailValue>{site}</DetailValue>+ ) : (+ <DetailValue className="text-muted">—</DetailValue>+ )}+ </Detail>+ <Detail>+ <DetailLabel>Context</DetailLabel>+ {context ? (+ <DetailValue>{context}</DetailValue>+ ) : (+ <DetailValue className="text-muted">—</DetailValue>+ )}+ </Detail></>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/NorthflankSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/NorthflankSyncReviewFields.tsxindex a37597722a..64640fab7f 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/NorthflankSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/NorthflankSyncReviewFields.tsx@@ -1,7 +1,7 @@import { useFormContext } from "react-hook-form";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";-import { GenericFieldLabel } from "@app/components/v2";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";export const NorthflankSyncReviewFields = () => {@@ -13,8 +13,14 @@ export const NorthflankSyncReviewFields = () => {return (<>- <GenericFieldLabel label="Project">{projectName || projectId}</GenericFieldLabel>- <GenericFieldLabel label="Secret Group">{secretGroupName || secretGroupId}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Project</DetailLabel>+ <DetailValue>{projectName || projectId}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Secret Group</DetailLabel>+ <DetailValue>{secretGroupName || secretGroupId}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/OCIVaultSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/OCIVaultSyncReviewFields.tsxindex 16166c88ce..71e77e22cc 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/OCIVaultSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/OCIVaultSyncReviewFields.tsx@@ -1,7 +1,7 @@import { useFormContext } from "react-hook-form";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";-import { GenericFieldLabel } from "@app/components/v2";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";export const OCIVaultSyncReviewFields = () => {@@ -12,15 +12,18 @@ export const OCIVaultSyncReviewFields = () => {return (<>- <GenericFieldLabel label="Compartment OCID" truncate>- {compartmentOcid}- </GenericFieldLabel>- <GenericFieldLabel label="Vault OCID" truncate>- {vaultOcid}- </GenericFieldLabel>- <GenericFieldLabel label="Key OCID" truncate>- {keyOcid}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Compartment OCID</DetailLabel>+ <DetailValue className="truncate">{compartmentOcid}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Vault OCID</DetailLabel>+ <DetailValue className="truncate">{vaultOcid}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Key OCID</DetailLabel>+ <DetailValue className="truncate">{keyOcid}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/OctopusDeploySyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/OctopusDeploySyncReviewFields.tsxindex a7dae3ceb7..19ecdda066 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/OctopusDeploySyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/OctopusDeploySyncReviewFields.tsx@@ -1,7 +1,7 @@import { useFormContext } from "react-hook-form";-import { GenericFieldLabel } from "@app/components/secret-syncs";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { useOctopusDeployConnectionGetScopeValues } from "@app/hooks/api/appConnections/octopus-deploy";import { SecretSync } from "@app/hooks/api/secretSyncs";import { OctopusDeploySyncScope } from "@app/hooks/api/secretSyncs/types/octopus-deploy-sync";@@ -32,60 +32,85 @@ export const OctopusDeploySyncReviewFields = () => {return (<>- <GenericFieldLabel label="Space">{spaceName || spaceId}</GenericFieldLabel>- <GenericFieldLabel label="Scope" className="capitalize">- {scope}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Space</DetailLabel>+ <DetailValue>{spaceName || spaceId}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Scope</DetailLabel>+ <DetailValue className="capitalize">{scope}</DetailValue>+ </Detail>{scope === OctopusDeploySyncScope.Project && (- <GenericFieldLabel label="Project">{projectName || projectId}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Project</DetailLabel>+ <DetailValue>{projectName || projectId}</DetailValue>+ </Detail>)}{environments.length > 0 && (- <GenericFieldLabel label="Environments">- {scopeValuesData?.environments- .filter((env) => environments.includes(env.id))- .map((env) => env.name)- .join(", ") ?? environments.join(", ")}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Environments</DetailLabel>+ <DetailValue>+ {scopeValuesData?.environments+ .filter((env) => environments.includes(env.id))+ .map((env) => env.name)+ .join(", ") ?? environments.join(", ")}+ </DetailValue>+ </Detail>)}{roles.length > 0 && (- <GenericFieldLabel label="Target Tags">- {scopeValuesData?.roles- .filter((role) => roles.includes(role.id))- .map((role) => role.name)- .join(", ") ?? roles.join(", ")}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Target Tags</DetailLabel>+ <DetailValue>+ {scopeValuesData?.roles+ .filter((role) => roles.includes(role.id))+ .map((role) => role.name)+ .join(", ") ?? roles.join(", ")}+ </DetailValue>+ </Detail>)}{machines.length > 0 && (- <GenericFieldLabel label="Targets">- {scopeValuesData?.machines- .filter((machine) => machines.includes(machine.id))- .map((machine) => machine.name)- .join(", ") ?? machines.join(", ")}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Targets</DetailLabel>+ <DetailValue>+ {scopeValuesData?.machines+ .filter((machine) => machines.includes(machine.id))+ .map((machine) => machine.name)+ .join(", ") ?? machines.join(", ")}+ </DetailValue>+ </Detail>)}{processes.length > 0 && (- <GenericFieldLabel label="Processes">- {scopeValuesData?.processes- .filter((process) => processes.includes(process.id))- .map((process) => process.name)- .join(", ") ?? processes.join(", ")}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Processes</DetailLabel>+ <DetailValue>+ {scopeValuesData?.processes+ .filter((process) => processes.includes(process.id))+ .map((process) => process.name)+ .join(", ") ?? processes.join(", ")}+ </DetailValue>+ </Detail>)}{actions.length > 0 && (- <GenericFieldLabel label="Deployment Steps">- {scopeValuesData?.actions- .filter((action) => actions.includes(action.id))- .map((action) => action.name)- .join(", ") ?? actions.join(", ")}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Deployment Steps</DetailLabel>+ <DetailValue>+ {scopeValuesData?.actions+ .filter((action) => actions.includes(action.id))+ .map((action) => action.name)+ .join(", ") ?? actions.join(", ")}+ </DetailValue>+ </Detail>)}{channels.length > 0 && (- <GenericFieldLabel label="Channels">- {scopeValuesData?.channels- .filter((channel) => channels.includes(channel.id))- .map((channel) => channel.name)- .join(", ") ?? channels.join(", ")}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Channels</DetailLabel>+ <DetailValue>+ {scopeValuesData?.channels+ .filter((channel) => channels.includes(channel.id))+ .map((channel) => channel.name)+ .join(", ") ?? channels.join(", ")}+ </DetailValue>+ </Detail>)}</>);diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/OnaSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/OnaSyncReviewFields.tsxindex 3d2896b9d8..2c2702a416 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/OnaSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/OnaSyncReviewFields.tsx@@ -1,7 +1,7 @@import { useFormContext } from "react-hook-form";-import { GenericFieldLabel } from "@app/components/secret-syncs";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";export const OnaSyncReviewFields = () => {@@ -9,8 +9,9 @@ export const OnaSyncReviewFields = () => {const destinationConfig = watch("destinationConfig");return (- <GenericFieldLabel label="Ona Project">- {destinationConfig.projectName || destinationConfig.projectId}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Ona Project</DetailLabel>+ <DetailValue>{destinationConfig.projectName || destinationConfig.projectId}</DetailValue>+ </Detail>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/OnePassSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/OnePassSyncReviewFields.tsxindex e311fc5ec3..dc0a218500 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/OnePassSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/OnePassSyncReviewFields.tsx@@ -1,7 +1,7 @@import { useFormContext } from "react-hook-form";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";-import { GenericFieldLabel } from "@app/components/v2";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";export const OnePassSyncReviewFields = () => {@@ -13,8 +13,14 @@ export const OnePassSyncReviewFields = () => {return (<>- <GenericFieldLabel label="Vault ID">{vaultId}</GenericFieldLabel>- <GenericFieldLabel label="Value Key">{valueLabel || "value"}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Vault ID</DetailLabel>+ <DetailValue>{vaultId}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Value Key</DetailLabel>+ <DetailValue>{valueLabel || "value"}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/OvhSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/OvhSyncReviewFields.tsxindex 660bbc797f..896407bf6b 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/OvhSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/OvhSyncReviewFields.tsx@@ -1,12 +1,17 @@import { useFormContext } from "react-hook-form";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";-import { GenericFieldLabel } from "@app/components/v2";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";export const OvhSyncReviewFields = () => {const { watch } = useFormContext<TSecretSyncForm & { destination: SecretSync.OVH }>();const path = watch("destinationConfig.path");- return <GenericFieldLabel label="Path">{path}</GenericFieldLabel>;+ return (+ <Detail>+ <DetailLabel>Path</DetailLabel>+ <DetailValue>{path}</DetailValue>+ </Detail>+ );};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/RailwaySyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/RailwaySyncReviewFields.tsxindex 717ad9ae7b..9ec3473e44 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/RailwaySyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/RailwaySyncReviewFields.tsx@@ -1,7 +1,7 @@import { useFormContext } from "react-hook-form";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";-import { GenericFieldLabel } from "@app/components/v2";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { useRailwayConnectionListProjects } from "@app/hooks/api/appConnections/railway";import { SecretSync } from "@app/hooks/api/secretSyncs";@@ -20,10 +20,14 @@ export const RailwaySyncReviewFields = () => {return (<>- <GenericFieldLabel label="Project">{project?.name ?? projectId}</GenericFieldLabel>- <GenericFieldLabel label="Environment">- {environment?.name ?? environmentId}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Project</DetailLabel>+ <DetailValue>{project?.name ?? projectId}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Environment</DetailLabel>+ <DetailValue>{environment?.name ?? environmentId}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/RenderSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/RenderSyncReviewFields.tsxindex 313d7eb3d8..701c74ed11 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/RenderSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/RenderSyncReviewFields.tsx@@ -1,8 +1,7 @@import { useFormContext } from "react-hook-form";-import { GenericFieldLabel } from "@app/components/secret-syncs";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";-import { Badge } from "@app/components/v3";+import { Badge, Detail, DetailLabel, DetailValue } from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";import { RenderSyncScope } from "@app/hooks/api/secretSyncs/types/render-sync";@@ -12,17 +11,14 @@ export const RenderSyncOptionsReviewFields = () => {const [{ autoRedeployServices }] = watch(["syncOptions"]);return (- <div>- {autoRedeployServices ? (- <GenericFieldLabel label="Auto Redeploy Services">- <Badge variant="success">Enabled</Badge>- </GenericFieldLabel>- ) : (- <GenericFieldLabel label="Auto Redeploy Services">- <Badge variant="danger">Disabled</Badge>- </GenericFieldLabel>- )}- </div>+ <Detail>+ <DetailLabel>Auto Redeploy Services</DetailLabel>+ <DetailValue>+ <Badge variant={autoRedeployServices ? "success" : "danger"}>+ {autoRedeployServices ? "Enabled" : "Disabled"}+ </Badge>+ </DetailValue>+ </Detail>);};@@ -32,15 +28,20 @@ export const RenderSyncReviewFields = () => {return (<>- <GenericFieldLabel label="Scope">{config.scope}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Scope</DetailLabel>+ <DetailValue>{config.scope}</DetailValue>+ </Detail>{config.scope === RenderSyncScope.Service ? (- <GenericFieldLabel label="Service">- {config.serviceName ?? config.serviceId}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Service</DetailLabel>+ <DetailValue>{config.serviceName ?? config.serviceId}</DetailValue>+ </Detail>) : (- <GenericFieldLabel label="Service">- {config.environmentGroupName ?? config.environmentGroupId}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Service</DetailLabel>+ <DetailValue>{config.environmentGroupName ?? config.environmentGroupId}</DetailValue>+ </Detail>)}</>);diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/SecretSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/SecretSyncReviewFields.tsxindex 86cb828cca..4c5ccf687f 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/SecretSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/SecretSyncReviewFields.tsx@@ -1,11 +1,19 @@import { ReactNode } from "react";import { useFormContext } from "react-hook-form";-import { faWarning } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";+import { TriangleAlert } from "lucide-react";-import { GenericFieldLabel } from "@app/components/secret-syncs";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";-import { Badge } from "@app/components/v3";+import {+ Alert,+ AlertDescription,+ AlertTitle,+ Badge,+ Detail,+ DetailGroup,+ DetailGroupHeader,+ DetailLabel,+ DetailValue+} from "@app/components/v3";import { useOrganization, useProject } from "@app/context";import { SECRET_SYNC_INITIAL_SYNC_BEHAVIOR_MAP, SECRET_SYNC_MAP } from "@app/helpers/secretSyncs";import { SecretSync, useDuplicateDestinationCheck } from "@app/hooks/api/secretSyncs";@@ -223,110 +231,116 @@ export const SecretSyncReviewFields = () => {}return (- <div className="mb-4 flex flex-col gap-6">- <div className="flex flex-col gap-3">- <div className="w-full border-b border-mineshaft-600">- <span className="text-sm text-mineshaft-300">Source</span>- </div>- <div className="flex flex-wrap gap-x-8 gap-y-2">- <GenericFieldLabel label="Environment">{environment.name}</GenericFieldLabel>- <GenericFieldLabel label="Secret Path">{secretPath}</GenericFieldLabel>- </div>- </div>- <div className="flex flex-col gap-3">- <div className="flex w-full items-center gap-2 border-b border-mineshaft-600">- <span className="text-sm text-mineshaft-300">Destination</span>- {isChecking && <span className="text-xs text-mineshaft-400">Checking...</span>}+ <div className="mb-4 flex flex-col gap-y-8">+ <DetailGroup>+ <DetailGroupHeader className="border-b border-border pb-2">Source</DetailGroupHeader>+ <div className="flex flex-wrap gap-x-8 gap-y-4">+ <Detail>+ <DetailLabel>Environment</DetailLabel>+ <DetailValue>{environment.name}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Secret Path</DetailLabel>+ <DetailValue>{secretPath}</DetailValue>+ </Detail></div>+ </DetailGroup>++ <DetailGroup>+ <DetailGroupHeader className="border-b border-border pb-2">+ Destination+ {isChecking && <span className="ml-2 text-xs font-normal text-muted">Checking...</span>}+ </DetailGroupHeader>+{hasDuplicate && (- <div- className={`mb-2 flex items-start rounded-md border px-3 py-2 ${- currentOrg?.blockDuplicateSecretSyncDestinations- ? "border-red-600 bg-red-900/20"- : "border-yellow-600 bg-yellow-900/20"- }`}- >- <div- className={`flex text-sm ${- currentOrg?.blockDuplicateSecretSyncDestinations- ? "text-red-100"- : "text-yellow-100"- }`}- >- <FontAwesomeIcon- icon={faWarning}- className={`mt-1 mr-2 ${- currentOrg?.blockDuplicateSecretSyncDestinations- ? "text-red-600"- : "text-yellow-600"- }`}- />- <div>+ <Alert variant={currentOrg?.blockDuplicateSecretSyncDestinations ? "danger" : "warning"}>+ <TriangleAlert />+ <AlertTitle>+ {currentOrg?.blockDuplicateSecretSyncDestinations+ ? "Duplicate destination blocked"+ : "Duplicate destination detected"}+ </AlertTitle>+ <AlertDescription>+ <p>+ {currentOrg?.blockDuplicateSecretSyncDestinations+ ? "Another secret sync in your organization is already configured with the same destination. Your organization does not allow duplicate destination configurations."+ : "Another secret sync in your organization is already configured with the same destination. This may lead to conflicts or unexpected behavior."}+ </p>+ {duplicateProjectId && (<p>- {currentOrg?.blockDuplicateSecretSyncDestinations- ? "Another secret sync in your organization is already configured with the same destination. Your organization does not allow duplicate destination configurations."- : "Another secret sync in your organization is already configured with the same destination. This may lead to conflicts or unexpected behavior."}+ Duplicate found in project ID:{" "}+ <code className="rounded-sm bg-foreground/10 px-1 py-0.5 font-mono">+ {duplicateProjectId}+ </code></p>- {duplicateProjectId && (- <p- className={`mt-1 text-xs ${- currentOrg?.blockDuplicateSecretSyncDestinations- ? "text-red-200"- : "text-yellow-200"- }`}- >- Duplicate found in project ID:{" "}- <code- className={`rounded-sm px-1 py-0.5 ${- currentOrg?.blockDuplicateSecretSyncDestinations- ? "bg-red-800/50"- : "bg-yellow-800/50"- }`}- >- {duplicateProjectId}- </code>- </p>- )}- </div>- </div>- </div>+ )}+ </AlertDescription>+ </Alert>)}- <div className="flex flex-wrap gap-x-8 gap-y-2">- <GenericFieldLabel label="Connection">{connection.name}</GenericFieldLabel>+ <div className="flex flex-wrap gap-x-8 gap-y-4">+ <Detail>+ <DetailLabel>Connection</DetailLabel>+ <DetailValue>{connection.name}</DetailValue>+ </Detail>{DestinationFieldsComponent}</div>- </div>- <div className="flex flex-col gap-3">- <div className="w-full border-b border-mineshaft-600">- <span className="text-sm text-mineshaft-300">Sync Options</span>- </div>- <div className="flex flex-wrap gap-x-8 gap-y-2">- <GenericFieldLabel label="Auto-Sync">- <Badge variant={isAutoSyncEnabled ? "success" : "neutral"}>- {isAutoSyncEnabled ? "Enabled" : "Disabled"}- </Badge>- </GenericFieldLabel>- <GenericFieldLabel label="Initial Sync Behavior">- {SECRET_SYNC_INITIAL_SYNC_BEHAVIOR_MAP[initialSyncBehavior](destinationName).name}- </GenericFieldLabel>- <GenericFieldLabel label="Key Schema">{keySchema}</GenericFieldLabel>+ </DetailGroup>++ <DetailGroup>+ <DetailGroupHeader className="border-b border-border pb-2">Sync Options</DetailGroupHeader>++ <div className="flex flex-wrap gap-x-8 gap-y-4">+ <Detail>+ <DetailLabel>Auto-Sync</DetailLabel>+ <DetailValue>+ <Badge variant={isAutoSyncEnabled ? "success" : "neutral"}>+ {isAutoSyncEnabled ? "Enabled" : "Disabled"}+ </Badge>+ </DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Initial Sync Behavior</DetailLabel>+ <DetailValue>+ {SECRET_SYNC_INITIAL_SYNC_BEHAVIOR_MAP[initialSyncBehavior](destinationName).name}+ </DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Key Schema</DetailLabel>+ {keySchema ? (+ <DetailValue>{keySchema}</DetailValue>+ ) : (+ <DetailValue className="text-muted italic">None</DetailValue>+ )}+ </Detail>{AdditionalSyncOptionsFieldsComponent}{disableSecretDeletion && (- <GenericFieldLabel label="Secret Deletion">- <Badge variant="warning">Disabled</Badge>- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Secret Deletion</DetailLabel>+ <DetailValue>+ <Badge variant="warning">Disabled</Badge>+ </DetailValue>+ </Detail>)}</div>- </div>- <div className="flex flex-col gap-3">- <div className="w-full border-b border-mineshaft-600">- <span className="text-sm text-mineshaft-300">Details</span>- </div>- <div className="flex flex-wrap gap-x-8 gap-y-2">- <GenericFieldLabel label="Name">{name}</GenericFieldLabel>- <GenericFieldLabel label="Description">{description}</GenericFieldLabel>+ </DetailGroup>++ <DetailGroup>+ <DetailGroupHeader className="border-b border-border pb-2">Details</DetailGroupHeader>+ <div className="flex flex-wrap gap-x-8 gap-y-4">+ <Detail>+ <DetailLabel>Name</DetailLabel>+ <DetailValue>{name}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Description</DetailLabel>+ {description ? (+ <DetailValue>{description}</DetailValue>+ ) : (+ <DetailValue className="text-muted italic">None</DetailValue>+ )}+ </Detail></div>- </div>+ </DetailGroup></div>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/SnowflakeSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/SnowflakeSyncReviewFields.tsxindex 6aca83d509..bd872856cd 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/SnowflakeSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/SnowflakeSyncReviewFields.tsx@@ -1,7 +1,7 @@import { useFormContext } from "react-hook-form";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";-import { GenericFieldLabel } from "@app/components/v2";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";export const SnowflakeSyncReviewFields = () => {@@ -11,8 +11,14 @@ export const SnowflakeSyncReviewFields = () => {return (<>- <GenericFieldLabel label="Database">{database}</GenericFieldLabel>- <GenericFieldLabel label="Schema">{schema}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Database</DetailLabel>+ <DetailValue>{database}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Schema</DetailLabel>+ <DetailValue>{schema}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/SupabaseSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/SupabaseSyncReviewFields.tsxindex 332359743f..72acadf656 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/SupabaseSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/SupabaseSyncReviewFields.tsx@@ -1,12 +1,17 @@import { useFormContext } from "react-hook-form";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";-import { GenericFieldLabel } from "@app/components/v2";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";export const SupabaseSyncReviewFields = () => {const { watch } = useFormContext<TSecretSyncForm & { destination: SecretSync.Supabase }>();const projectName = watch("destinationConfig.projectName");- return <GenericFieldLabel label="Project">{projectName}</GenericFieldLabel>;+ return (+ <Detail>+ <DetailLabel>Project</DetailLabel>+ <DetailValue>{projectName}</DetailValue>+ </Detail>+ );};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/TeamCitySyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/TeamCitySyncReviewFields.tsxindex 277ebe1b42..b8d6d9b4d6 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/TeamCitySyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/TeamCitySyncReviewFields.tsx@@ -1,7 +1,7 @@import { useFormContext } from "react-hook-form";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";-import { GenericFieldLabel } from "@app/components/v2";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";export const TeamCitySyncReviewFields = () => {@@ -11,8 +11,14 @@ export const TeamCitySyncReviewFields = () => {return (<>- <GenericFieldLabel label="Project">{project}</GenericFieldLabel>- <GenericFieldLabel label="Build Configuration">{buildConfig}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Project</DetailLabel>+ <DetailValue>{project}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Build Configuration</DetailLabel>+ <DetailValue>{buildConfig}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/TerraformCloudSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/TerraformCloudSyncReviewFields.tsxindex 614e3e1807..ed2afc820b 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/TerraformCloudSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/TerraformCloudSyncReviewFields.tsx@@ -1,7 +1,7 @@import { useFormContext } from "react-hook-form";-import { GenericFieldLabel } from "@app/components/secret-syncs";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { TerraformCloudSyncScope } from "@app/hooks/api/appConnections/terraform-cloud";import { SecretSync } from "@app/hooks/api/secretSyncs";@@ -15,14 +15,26 @@ export const TerraformCloudSyncReviewFields = () => {return (<>- <GenericFieldLabel label="Organization">{orgId}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Organization</DetailLabel>+ <DetailValue>{orgId}</DetailValue>+ </Detail>{scope === TerraformCloudSyncScope.VariableSet && (- <GenericFieldLabel label="Variable Set">{variableSetName}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Variable Set</DetailLabel>+ <DetailValue>{variableSetName}</DetailValue>+ </Detail>)}{scope === TerraformCloudSyncScope.Workspace && (- <GenericFieldLabel label="Workspace">{workspaceName}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Workspace</DetailLabel>+ <DetailValue>{workspaceName}</DetailValue>+ </Detail>)}- <GenericFieldLabel label="Category">{category}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Category</DetailLabel>+ <DetailValue>{category}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/TravisCISyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/TravisCISyncReviewFields.tsxindex a5988f5edc..6d365e2d98 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/TravisCISyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/TravisCISyncReviewFields.tsx@@ -1,7 +1,7 @@import { useFormContext } from "react-hook-form";-import { GenericFieldLabel } from "@app/components/secret-syncs";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";export const TravisCISyncReviewFields = () => {@@ -11,8 +11,16 @@ export const TravisCISyncReviewFields = () => {return (<>- <GenericFieldLabel label="Repository">{config.repositorySlug}</GenericFieldLabel>- {config.branch && <GenericFieldLabel label="Branch">{config.branch}</GenericFieldLabel>}+ <Detail>+ <DetailLabel>Repository</DetailLabel>+ <DetailValue>{config.repositorySlug}</DetailValue>+ </Detail>+ {config.branch && (+ <Detail>+ <DetailLabel>Branch</DetailLabel>+ <DetailValue>{config.branch}</DetailValue>+ </Detail>+ )}</>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/VercelSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/VercelSyncReviewFields.tsxindex 306ccb221a..1891fa1204 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/VercelSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/VercelSyncReviewFields.tsx@@ -3,7 +3,7 @@ import { useMemo } from "react";import { useFormContext } from "react-hook-form";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";-import { GenericFieldLabel } from "@app/components/v2";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { useVercelConnectionListOrganizations } from "@app/hooks/api/appConnections/vercel";import { SecretSync } from "@app/hooks/api/secretSyncs";import {@@ -46,32 +46,65 @@ export const VercelSyncReviewFields = () => {<>{scope === VercelSyncScope.Team ? (<>- <GenericFieldLabel label="Scope">Team</GenericFieldLabel>- <GenericFieldLabel label="Vercel Team">{selectedTeam?.name}</GenericFieldLabel>- <GenericFieldLabel label="Target Environments">- {targetEnvironments?.length- ? targetEnvironments+ <Detail>+ <DetailLabel>Scope</DetailLabel>+ <DetailValue>Team</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Vercel Team</DetailLabel>+ <DetailValue>{selectedTeam?.name}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Target Environments</DetailLabel>+ {targetEnvironments?.length ? (+ <DetailValue>+ {targetEnvironments.map((env: string) => env.charAt(0).toUpperCase() + env.slice(1))- .join(", ")- : "None"}- </GenericFieldLabel>- <GenericFieldLabel label="All Custom Environments">- {applyToAllCustomEnvironments ? "Yes" : "No"}- </GenericFieldLabel>- <GenericFieldLabel label="Target Projects">- {selectedProjects?.map((project) => project?.name).join(", ")}- </GenericFieldLabel>- <GenericFieldLabel label="Sensitive">{sensitive ? "Yes" : "No"}</GenericFieldLabel>+ .join(", ")}+ </DetailValue>+ ) : (+ <DetailValue className="text-muted">—</DetailValue>+ )}+ </Detail>+ <Detail>+ <DetailLabel>All Custom Environments</DetailLabel>+ <DetailValue>{applyToAllCustomEnvironments ? "Yes" : "No"}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Target Projects</DetailLabel>+ <DetailValue>+ {selectedProjects?.map((project) => project?.name).join(", ")}+ </DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Sensitive</DetailLabel>+ <DetailValue>{sensitive ? "Yes" : "No"}</DetailValue>+ </Detail></>) : (<>- <GenericFieldLabel label="Scope">Project</GenericFieldLabel>- <GenericFieldLabel label="Vercel Project">{appName}</GenericFieldLabel>- <GenericFieldLabel label="Environment">{envId}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Scope</DetailLabel>+ <DetailValue>Project</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Vercel Project</DetailLabel>+ <DetailValue>{appName}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Environment</DetailLabel>+ <DetailValue>{envId}</DetailValue>+ </Detail>{envId === VercelEnvironmentType.Preview && branchId && (- <GenericFieldLabel label="Preview Branch">{branchId}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Preview Branch</DetailLabel>+ <DetailValue>{branchId}</DetailValue>+ </Detail>)}- <GenericFieldLabel label="Sensitive">{sensitive ? "Yes" : "No"}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Sensitive</DetailLabel>+ <DetailValue>{sensitive ? "Yes" : "No"}</DetailValue>+ </Detail></>)}</>diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/WindmillSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/WindmillSyncReviewFields.tsxindex 4d7f9e3d1c..378cd8625b 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/WindmillSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/WindmillSyncReviewFields.tsx@@ -1,7 +1,7 @@import { useFormContext } from "react-hook-form";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";-import { GenericFieldLabel } from "@app/components/v2";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { SecretSync } from "@app/hooks/api/secretSyncs";export const WindmillSyncReviewFields = () => {@@ -11,8 +11,14 @@ export const WindmillSyncReviewFields = () => {return (<>- <GenericFieldLabel label="Workspace">{workspace}</GenericFieldLabel>- <GenericFieldLabel label="Path">{path}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Workspace</DetailLabel>+ <DetailValue>{workspace}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Path</DetailLabel>+ <DetailValue>{path}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/ZabbixSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/ZabbixSyncReviewFields.tsxindex c58e353827..3729b31b81 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/ZabbixSyncReviewFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/ZabbixSyncReviewFields.tsx@@ -1,7 +1,7 @@import { useFormContext } from "react-hook-form";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";-import { GenericFieldLabel } from "@app/components/v2";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { ZabbixSyncScope } from "@app/hooks/api/appConnections/zabbix";import { SecretSync } from "@app/hooks/api/secretSyncs";@@ -16,16 +16,26 @@ export const ZabbixSyncReviewFields = () => {return (<>- <GenericFieldLabel label="Scope">{scope}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Scope</DetailLabel>+ <DetailValue>{scope}</DetailValue>+ </Detail>{scope === ZabbixSyncScope.Host && (<>- <GenericFieldLabel label="Host ID">{hostId}</GenericFieldLabel>- <GenericFieldLabel label="Host Name">{hostName}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Host ID</DetailLabel>+ <DetailValue>{hostId}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Host Name</DetailLabel>+ <DetailValue>{hostName}</DetailValue>+ </Detail></>)}- <GenericFieldLabel label="Macro Type">- {isTextMacro(macroType) ? "Text" : "Secret"}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Macro Type</DetailLabel>+ <DetailValue>{isTextMacro(macroType) ? "Text" : "Secret"}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncSourceFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncSourceFields.tsxindex a408830548..3fdc1593e4 100644--- a/frontend/src/components/secret-syncs/forms/SecretSyncSourceFields.tsx+++ b/frontend/src/components/secret-syncs/forms/SecretSyncSourceFields.tsx@@ -2,8 +2,15 @@ import { useEffect } from "react";import { Controller, useFormContext, useWatch } from "react-hook-form";import { subject } from "@casl/ability";-import { FilterableSelect, FormControl } from "@app/components/v2";-import { SecretPathInput } from "@app/components/v2/SecretPathInput";+import {+ Field,+ FieldContent,+ FieldError,+ FieldGroup,+ FieldLabel,+ FilterableSelect,+ SecretPathInput+} from "@app/components/v3";import { useProject, useProjectPermission } from "@app/context";import {ProjectPermissionSecretSyncActions,@@ -24,15 +31,18 @@ const DefaultSecretSyncSourceFields = () => {const selectedSecretPath = watch("secretPath");useEffect(() => {- const hasAccessToSource =- selectedEnvironment &&- permission.can(- ProjectPermissionSecretSyncActions.Create,- subject(ProjectPermissionSub.SecretSyncs, {- environment: selectedEnvironment.slug,- secretPath: selectedSecretPath- })- );+ if (!selectedEnvironment) {+ clearErrors("secretPath");+ return;+ }++ const hasAccessToSource = permission.can(+ ProjectPermissionSecretSyncActions.Create,+ subject(ProjectPermissionSub.SecretSyncs, {+ environment: selectedEnvironment.slug,+ secretPath: selectedSecretPath+ })+ );if (!hasAccessToSource) {setError("secretPath", {@@ -44,43 +54,49 @@ const DefaultSecretSyncSourceFields = () => {}, [selectedEnvironment, selectedSecretPath]);return (- <>- <p className="mb-4 text-sm text-bunker-300">- Specify the environment and path where you would like to sync secrets from.- </p>-+ <FieldGroup><ControllerdefaultValue={currentProject.environments[0]}control={control}name="environment"render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl label="Environment" isError={Boolean(error)} errorText={error?.message}>- <FilterableSelect- value={value}- onChange={onChange}- options={currentProject.environments}- placeholder="Select environment..."- getOptionLabel={(option) => option?.name}- getOptionValue={(option) => option?.id}- />- </FormControl>+ <Field>+ <FieldLabel>Environment</FieldLabel>+ <FieldContent>+ <FilterableSelect+ value={value}+ onChange={onChange}+ options={currentProject.environments}+ placeholder="Select environment..."+ getOptionLabel={(option) => option?.name}+ getOptionValue={(option) => option?.id}+ isError={Boolean(error)}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>)}/><ControllerdefaultValue="/"- render={({ field: { value, onChange }, fieldState: { error } }) => (- <FormControl isError={Boolean(error)} errorText={error?.message} label="Secret Path">- <SecretPathInput- environment={selectedEnvironment?.slug}- value={value}- onChange={onChange}- />- </FormControl>- )}control={control}name="secretPath"+ render={({ field: { value, onChange }, fieldState: { error } }) => (+ <Field>+ <FieldLabel>Secret Path</FieldLabel>+ <FieldContent>+ <SecretPathInput+ environment={selectedEnvironment?.slug}+ value={value}+ onChange={onChange}+ isError={Boolean(error)}+ />+ <FieldError errors={[error]} />+ </FieldContent>+ </Field>+ )}/>- </>+ </FieldGroup>);};diff --git a/frontend/src/components/secret-syncs/types/index.ts b/frontend/src/components/secret-syncs/types/index.tsdeleted file mode 100644index e016180b3e..0000000000--- a/frontend/src/components/secret-syncs/types/index.ts+++ /dev/null@@ -1,6 +0,0 @@-export enum SecretSyncEditFields {- Details = "details",- Options = "options",- Source = "source",- Destination = "destination"-}diff --git a/frontend/src/components/v2/GenericFieldLabel/GenericFieldLabel.tsx b/frontend/src/components/v2/GenericFieldLabel/GenericFieldLabel.tsxindex 016017a623..031a203c0f 100644--- a/frontend/src/components/v2/GenericFieldLabel/GenericFieldLabel.tsx+++ b/frontend/src/components/v2/GenericFieldLabel/GenericFieldLabel.tsx@@ -27,7 +27,7 @@ export const GenericFieldLabel = ({<p className={twMerge("text-xs font-medium text-mineshaft-400", labelClassName)}>{label}</p></div>{children ? (- <p className={twMerge("text-sm text-mineshaft-100", truncate ? "truncate" : "break-all")}>+ <p className={twMerge("text-sm text-mineshaft-100", truncate ? "truncate" : "break-words")}>{children}</p>) : (diff --git a/frontend/src/components/v3/generic/AlertDialog/AlertDialog.tsx b/frontend/src/components/v3/generic/AlertDialog/AlertDialog.tsxindex d7118500db..ab1a57d99d 100644--- a/frontend/src/components/v3/generic/AlertDialog/AlertDialog.tsx+++ b/frontend/src/components/v3/generic/AlertDialog/AlertDialog.tsx@@ -64,7 +64,7 @@ function AlertDialogHeader({ className, ...props }: React.ComponentProps<"div">)<divdata-slot="alert-dialog-header"className={cn(- "grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",+ "grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-cols-[auto_1fr] sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",className)}{...props}diff --git a/frontend/src/components/v3/generic/Card/Card.tsx b/frontend/src/components/v3/generic/Card/Card.tsxindex 408ad1b864..729263ff2f 100644--- a/frontend/src/components/v3/generic/Card/Card.tsx+++ b/frontend/src/components/v3/generic/Card/Card.tsx@@ -25,6 +25,7 @@ function CardHeader({ className, ...props }: React.ComponentProps<"div">) {"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-center gap-1","border-border [.border-b]:pb-4","has-data-[slot=card-action]:@xs:grid-cols-[1fr_auto]",+ "has-data-[slot=icon-button]:grid-cols-[1fr_auto]",className)}{...props}@@ -58,6 +59,7 @@ function CardAction({ className, ...props }: React.ComponentProps<"div">) {className={cn("justify-self-start","@xs:col-start-2 @xs:row-span-2 @xs:row-start-1 @xs:self-start @xs:justify-self-end",+ "has-data-[slot=icon-button]:col-start-2 has-data-[slot=icon-button]:row-span-2 has-data-[slot=icon-button]:row-start-1 has-data-[slot=icon-button]:self-start has-data-[slot=icon-button]:justify-self-end",className)}{...props}diff --git a/frontend/src/components/v3/generic/Detail/Detail.tsx b/frontend/src/components/v3/generic/Detail/Detail.tsxindex c1e2d0d89b..39617ff7cc 100644--- a/frontend/src/components/v3/generic/Detail/Detail.tsx+++ b/frontend/src/components/v3/generic/Detail/Detail.tsx@@ -14,7 +14,7 @@ function DetailValue({ className, ...props }: React.ComponentProps<"div">) {return (<divdata-slot="detail-value"- className={cn("text-sm break-all text-foreground", className)}+ className={cn("text-sm wrap-anywhere text-foreground", className)}{...props}/>);diff --git a/frontend/src/components/v3/generic/Field/Field.tsx b/frontend/src/components/v3/generic/Field/Field.tsxindex 73869b9d44..cb13f870ad 100644--- a/frontend/src/components/v3/generic/Field/Field.tsx+++ b/frontend/src/components/v3/generic/Field/Field.tsx@@ -95,7 +95,10 @@ const fieldLabelVariants = cva("group/field-label peer/field-label flex w-fit items-center gap-1.5 border-border text-xs leading-snug text-accent transition-colors duration-75 group-data-[disabled=true]/field:opacity-50","has-[>[data-slot=field]]:cursor-pointer has-[>[data-slot=field]]:rounded-md","has-[>[data-slot=field]]:border has-[>[data-slot=field]]:bg-transparent has-[>[data-slot=field]]:hover:bg-container-hover [&>*]:data-[slot=field]:p-2.5 [&>svg]:size-3",- "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col"+ "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",+ "has-[[data-slot=radio-group-item]:disabled,[data-slot=checkbox]:disabled]:opacity-50",+ "has-[[data-slot=radio-group-item]:disabled,[data-slot=checkbox]:disabled]:cursor-not-allowed",+ "has-[[data-slot=radio-group-item]:disabled,[data-slot=checkbox]:disabled]:hover:bg-transparent"),{variants: {diff --git a/frontend/src/components/v3/generic/IconButton/IconButton.tsx b/frontend/src/components/v3/generic/IconButton/IconButton.tsxindex e111ddde97..579e0fceb6 100644--- a/frontend/src/components/v3/generic/IconButton/IconButton.tsx+++ b/frontend/src/components/v3/generic/IconButton/IconButton.tsx@@ -115,7 +115,7 @@ const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(return (<Compref={ref}- data-slot="button"+ data-slot="icon-button"type={type}className={cn(iconButtonVariants({ variant, size, isPending }), className)}disabled={isPending || disabled || isDisabled}diff --git a/frontend/src/components/v3/generic/Stepper/Stepper.tsx b/frontend/src/components/v3/generic/Stepper/Stepper.tsxindex 9cf2dd926b..725451f402 100644--- a/frontend/src/components/v3/generic/Stepper/Stepper.tsx+++ b/frontend/src/components/v3/generic/Stepper/Stepper.tsx@@ -13,6 +13,7 @@ interface StepperContextValue {activeStep: number;orientation: Orientation;onStepChange?: (index: number) => void;+ nonLinear?: boolean;}const StepperContext = React.createContext<StepperContextValue | null>(null);@@ -29,18 +30,20 @@ interface StepperProps extends React.ComponentProps<"div"> {activeStep: number;orientation?: Orientation;onStepChange?: (index: number) => void;+ nonLinear?: boolean;}function Stepper({activeStep,orientation = "vertical",onStepChange,+ nonLinear,className,...props}: StepperProps) {const value = React.useMemo(- () => ({ activeStep, orientation, onStepChange }),- [activeStep, orientation, onStepChange]+ () => ({ activeStep, orientation, onStepChange, nonLinear }),+ [activeStep, orientation, onStepChange, nonLinear]);return (<StepperContext.Provider value={value}>@@ -135,7 +138,7 @@ function StepperStep({className,...props}: StepperStepProps) {- const { activeStep, orientation, onStepChange } = useStepperContext();+ const { activeStep, orientation, onStepChange, nonLinear } = useStepperContext();let computedStatus: StepStatus;if (statusOverride === "error") computedStatus = "error";@@ -146,7 +149,9 @@ function StepperStep({const isClickable =!disabled &&Boolean(onStepChange) &&- (computedStatus === "complete" || computedStatus === "error");+ (nonLinear+ ? computedStatus !== "current"+ : computedStatus === "complete" || computedStatus === "error");let indicatorContent: React.ReactNode = index + 1;if (computedStatus === "complete") indicatorContent = <Check strokeWidth={3} />;@@ -183,6 +188,20 @@ function StepperStep({}: {};+ const indicatorWrapped = isClickable ? (+ <button+ type="button"+ onClick={handleClick}+ disabled={disabled}+ aria-label={typeof title === "string" ? `Go to step: ${title}` : `Go to step ${index + 1}`}+ className="cursor-pointer rounded-full outline-none focus-visible:ring-2 focus-visible:ring-ring/60"+ >+ {indicator}+ </button>+ ) : (+ indicator+ );+return (<lidata-slot="stepper-step"@@ -192,7 +211,7 @@ function StepperStep({{...props}><div className="flex flex-col items-center">- {indicator}+ {indicatorWrapped}{!isLast ? (<spanaria-hidden="true"diff --git a/frontend/src/components/v3/platform/SecretPathInput/SecretPathInput.tsx b/frontend/src/components/v3/platform/SecretPathInput/SecretPathInput.tsxnew file mode 100644index 0000000000..b6567aee94--- /dev/null+++ b/frontend/src/components/v3/platform/SecretPathInput/SecretPathInput.tsx@@ -0,0 +1,176 @@+import { InputHTMLAttributes, useEffect, useState } from "react";+import { Folder } from "lucide-react";++import { useProject } from "@app/context";+import { useDebounce } from "@app/hooks";+import { useGetFoldersByEnv } from "@app/hooks/api";++import { Input } from "../../generic/Input";+import { Popover, PopoverContent, PopoverTrigger } from "../../generic/Popover";+import { cn } from "../../utils";++type BaseProps = Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "onChange"> & {+ value?: string | null;+ environment?: string;+ containerClassName?: string;+ isError?: boolean;+ onChange?: (arg: string) => void;+ folderNames?: string[];+ projectId: string;+};++type Props = Omit<BaseProps, "projectId"> & { projectId?: string };++const SecretPathInputBase = ({+ containerClassName,+ onChange,+ environment,+ projectId,+ value: propValue,+ folderNames: folderNamesProp,+ isError,+ ...props+}: BaseProps) => {+ const [inputValue, setInputValue] = useState(propValue ?? "");+ const [secretPath, setSecretPath] = useState("/");+ const [suggestions, setSuggestions] = useState<string[]>([]);+ const [isInputFocused, setIsInputFocus] = useState(false);+ const [highlightedIndex, setHighlightedIndex] = useState(-1);+ const [debouncedInputValue] = useDebounce(inputValue, 200);+ const { folderNames: folders } = useGetFoldersByEnv({+ path: secretPath,+ environments: [environment || ""],+ projectId+ });++ useEffect(() => {+ setInputValue(propValue ?? "/");+ }, [propValue]);++ useEffect(() => {+ if (+ (debouncedInputValue.length > 0 &&+ debouncedInputValue[debouncedInputValue.length - 1] === "/") ||+ debouncedInputValue.length === 0+ ) {+ setSecretPath(debouncedInputValue);+ }+ }, [debouncedInputValue]);++ useEffect(() => {+ const activeFolders = folderNamesProp ?? folders;+ const searchFragment = debouncedInputValue.split("/").pop() || "";+ const filteredSuggestions = activeFolders+ .filter((entry) => entry.toUpperCase().startsWith(searchFragment.toUpperCase()))+ .sort((a, b) => a.toLowerCase().localeCompare(b.toLowerCase()));++ setSuggestions(filteredSuggestions);+ }, [debouncedInputValue, folders, folderNamesProp]);++ const handleSuggestionSelect = (selectedIndex: number) => {+ if (!suggestions[selectedIndex]) return;++ const validPaths = inputValue.split("/");+ validPaths.pop();++ const newValue = `${validPaths.join("/")}/${suggestions[selectedIndex]}/`;+ onChange?.(newValue);+ setInputValue(newValue);+ setSecretPath(newValue);+ setHighlightedIndex(-1);+ setSuggestions([]);+ };++ const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {+ const mod = (n: number, m: number) => ((n % m) + m) % m;+ if (e.key === "ArrowDown") {+ setHighlightedIndex((prev) => mod(prev + 1, suggestions.length));+ } else if (e.key === "ArrowUp") {+ setHighlightedIndex((prev) => mod(prev - 1, suggestions.length));+ } else if (e.key === "Enter" && highlightedIndex >= 0) {+ handleSuggestionSelect(highlightedIndex);+ }+ if (["ArrowDown", "ArrowUp", "Enter"].includes(e.key)) {+ e.preventDefault();+ }+ };++ const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {+ onChange?.(e.target.value);+ setInputValue(e.target.value);+ };++ return (+ <Popover+ open={suggestions.length > 0 && isInputFocused}+ onOpenChange={() => setHighlightedIndex(-1)}+ >+ <PopoverTrigger asChild>+ <Input+ {...props}+ type="text"+ autoComplete="off"+ isError={isError}+ onKeyDown={handleKeyDown}+ onFocus={() => setIsInputFocus(true)}+ onBlur={() => setIsInputFocus(false)}+ value={inputValue}+ onChange={handleInputChange}+ className={containerClassName}+ />+ </PopoverTrigger>+ <PopoverContent+ align="start"+ sideOffset={4}+ onOpenAutoFocus={(e) => e.preventDefault()}+ className="p-1"+ style={{+ width: "var(--radix-popover-trigger-width)",+ maxHeight: "var(--radix-popover-content-available-height)"+ }}+ >+ <div className="max-h-[25vh] thin-scrollbar overflow-y-auto">+ {suggestions.map((suggestion, i) => (+ <button+ type="button"+ key={`secret-path-suggestion-${i + 1}`}+ onMouseDown={(e) => {+ e.preventDefault();+ setHighlightedIndex(i);+ handleSuggestionSelect(i);+ }}+ className={cn(+ "flex w-full items-center gap-2 rounded-sm px-2 py-1 text-left text-sm text-foreground transition-colors hover:bg-foreground/10",+ highlightedIndex === i && "bg-foreground/10"+ )}+ >+ <Folder className="size-3.5 text-warning" />+ <span className="truncate">{suggestion}</span>+ </button>+ ))}+ </div>+ </PopoverContent>+ </Popover>+ );+};++const SecretPathInputWithProjectContext = ({+ environment,+ ...props+}: Omit<BaseProps, "projectId">) => {+ const { currentProject } = useProject();+ return (+ <SecretPathInputBase+ projectId={currentProject?.id || ""}+ environment={environment || currentProject?.environments?.[0].slug}+ {...props}+ />+ );+};++export const SecretPathInput = ({ projectId, ...props }: Props) => {+ if (projectId !== undefined) {+ return <SecretPathInputBase projectId={projectId} {...props} />;+ }+ return <SecretPathInputWithProjectContext {...props} />;+};diff --git a/frontend/src/components/v3/platform/SecretPathInput/index.ts b/frontend/src/components/v3/platform/SecretPathInput/index.tsnew file mode 100644index 0000000000..1c42b78cca--- /dev/null+++ b/frontend/src/components/v3/platform/SecretPathInput/index.ts@@ -0,0 +1 @@+export * from "./SecretPathInput";diff --git a/frontend/src/components/v3/platform/index.ts b/frontend/src/components/v3/platform/index.tsindex d972aea0b6..bdb3389b35 100644--- a/frontend/src/components/v3/platform/index.ts+++ b/frontend/src/components/v3/platform/index.ts@@ -5,3 +5,4 @@ export * from "./PageLoader";export * from "./PasswordGenerator";export * from "./ScopeIcons";export * from "./SecretInput";+export * from "./SecretPathInput";diff --git a/frontend/src/helpers/secretSyncs.ts b/frontend/src/helpers/secretSyncs.tsindex 091ae04af5..f173e9fdad 100644--- a/frontend/src/helpers/secretSyncs.ts+++ b/frontend/src/helpers/secretSyncs.ts@@ -10,164 +10,276 @@ import { RenderSyncScope } from "@app/hooks/api/secretSyncs/types/render-sync";export const SECRET_SYNC_MAP: Record<SecretSync,- { name: string; image: string; aliases?: string[] }+ {+ name: string;+ image: string;+ category: string;+ description: string;+ aliases?: string[];+ }> = {- [SecretSync.AWSParameterStore]: { name: "AWS Parameter Store", image: "Amazon Web Services.png" },- [SecretSync.AWSSecretsManager]: { name: "AWS Secrets Manager", image: "Amazon Web Services.png" },- [SecretSync.GitHub]: { name: "GitHub", image: "GitHub.png" },- [SecretSync.GCPSecretManager]: { name: "GCP Secret Manager", image: "Google Cloud Platform.png" },- [SecretSync.AzureKeyVault]: { name: "Azure Key Vault", image: "Microsoft Azure.png" },+ [SecretSync.AWSParameterStore]: {+ name: "AWS Parameter Store",+ image: "Amazon Web Services.png",+ category: "AWS",+ description: "Hierarchical parameter store on AWS Systems Manager."+ },+ [SecretSync.AWSSecretsManager]: {+ name: "AWS Secrets Manager",+ image: "Amazon Web Services.png",+ category: "AWS",+ description: "Managed secret rotation and audit on AWS."+ },+ [SecretSync.GitHub]: {+ name: "GitHub",+ image: "GitHub.png",+ category: "CI/CD",+ description: "Repository or organization-level secrets."+ },+ [SecretSync.GCPSecretManager]: {+ name: "GCP Secret Manager",+ image: "Google Cloud Platform.png",+ category: "GOOGLE CLOUD",+ description: "Versioned secret storage on Google Cloud."+ },+ [SecretSync.AzureKeyVault]: {+ name: "Azure Key Vault",+ image: "Microsoft Azure.png",+ category: "AZURE",+ description: "Cloud-managed keys, secrets, and certificates."+ },[SecretSync.AzureAppConfiguration]: {name: "Azure App Configuration",- image: "Microsoft Azure.png"+ image: "Microsoft Azure.png",+ category: "AZURE",+ description: "Centralized app settings on Microsoft Azure."},[SecretSync.AzureDevOps]: {name: "Azure DevOps",- image: "Microsoft Azure.png"+ image: "Microsoft Azure.png",+ category: "AZURE",+ description: "Pipeline variables for Azure DevOps projects."},[SecretSync.Databricks]: {name: "Databricks",- image: "Databricks.png"+ image: "Databricks.png",+ category: "DATA",+ description: "Workspace secret scopes for jobs and notebooks."},[SecretSync.Humanitec]: {name: "Humanitec",- image: "Humanitec.png"+ image: "Humanitec.png",+ category: "PLATFORM",+ description: "Application or environment-level shared values."},[SecretSync.TerraformCloud]: {name: "Terraform Cloud",- image: "Terraform Cloud.png"+ image: "Terraform Cloud.png",+ category: "INFRASTRUCTURE",+ description: "Variables for Terraform Cloud workspaces."},[SecretSync.Camunda]: {name: "Camunda",- image: "Camunda.png"+ image: "Camunda.png",+ category: "PLATFORM",+ description: "Cluster secrets for Camunda Platform 8."},[SecretSync.Vercel]: {name: "Vercel",- image: "Vercel.png"+ image: "Vercel.png",+ category: "HOSTING",+ description: "Push environment variables to Vercel projects."},[SecretSync.Windmill]: {name: "Windmill",- image: "Windmill.png"+ image: "Windmill.png",+ category: "PLATFORM",+ description: "Workspace variables for Windmill scripts and flows."},[SecretSync.HCVault]: {name: "Hashicorp Vault",- image: "Vault.png"+ image: "Vault.png",+ category: "SELF-HOSTED",+ description: "KV v1 or v2 engine on a Vault instance you manage."},[SecretSync.TeamCity]: {name: "TeamCity",- image: "TeamCity.png"+ image: "TeamCity.png",+ category: "CI/CD",+ description: "Project parameters in JetBrains TeamCity."},[SecretSync.OCIVault]: {name: "OCI Vault",- image: "Oracle.png"+ image: "Oracle.png",+ category: "ORACLE",+ description: "Secret vault on Oracle Cloud Infrastructure."},[SecretSync.OnePass]: {name: "1Password",- image: "1Password.png"+ image: "1Password.png",+ category: "PASSWORD MANAGER",+ description: "Items in a 1Password vault."},[SecretSync.Heroku]: {name: "Heroku",- image: "Heroku.png"+ image: "Heroku.png",+ category: "HOSTING",+ description: "Config vars for Heroku applications."},[SecretSync.Render]: {name: "Render",- image: "Render.png"+ image: "Render.png",+ category: "HOSTING",+ description: "Environment variables for Render services."},[SecretSync.Flyio]: {name: "Fly.io",- image: "Flyio.svg"+ image: "Flyio.svg",+ category: "HOSTING",+ description: "Secrets for Fly.io apps."},[SecretSync.GitLab]: {name: "GitLab",- image: "GitLab.png"+ image: "GitLab.png",+ category: "CI/CD",+ description: "Project or group-level CI/CD variables."},[SecretSync.CloudflarePages]: {name: "Cloudflare Pages",- image: "Cloudflare.png"+ image: "Cloudflare.png",+ category: "HOSTING",+ description: "Environment variables for Cloudflare Pages."},[SecretSync.CloudflareWorkers]: {name: "Cloudflare Workers",- image: "Cloudflare.png"+ image: "Cloudflare.png",+ category: "HOSTING",+ description: "Secrets bound to Cloudflare Workers."},[SecretSync.Zabbix]: {name: "Zabbix",- image: "Zabbix.png"+ image: "Zabbix.png",+ category: "MONITORING",+ description: "Macros for Zabbix monitoring templates."},[SecretSync.Railway]: {name: "Railway",- image: "Railway.png"+ image: "Railway.png",+ category: "HOSTING",+ description: "Service variables on Railway."},[SecretSync.Checkly]: {name: "Checkly",- image: "Checkly.png"+ image: "Checkly.png",+ category: "MONITORING",+ description: "Environment variables for Checkly monitors."},[SecretSync.Supabase]: {name: "Supabase",- image: "Supabase.png"+ image: "Supabase.png",+ category: "DATA",+ description: "Project secrets for Supabase."},[SecretSync.DigitalOceanAppPlatform]: {name: "Digital Ocean App Platform",- image: "Digital Ocean.png"+ image: "Digital Ocean.png",+ category: "HOSTING",+ description: "App-level environment variables on DigitalOcean."},[SecretSync.Netlify]: {name: "Netlify",- image: "Netlify.png"+ image: "Netlify.png",+ category: "HOSTING",+ description: "Site-level environment variables."},[SecretSync.Bitbucket]: {name: "Bitbucket",- image: "Bitbucket.png"+ image: "Bitbucket.png",+ category: "CI/CD",+ description: "Repository and deployment variables on Bitbucket."},[SecretSync.Northflank]: {name: "Northflank",- image: "Northflank.png"+ image: "Northflank.png",+ category: "HOSTING",+ description: "Secret groups for Northflank projects."},[SecretSync.LaravelForge]: {name: "Laravel Forge",- image: "Laravel Forge.png"+ image: "Laravel Forge.png",+ category: "HOSTING",+ description: "Environment file values on Laravel Forge."},[SecretSync.Chef]: {name: "Chef",- image: "Chef.png"+ image: "Chef.png",+ category: "INFRASTRUCTURE",+ description: "Data bags for Chef Infra."},[SecretSync.OctopusDeploy]: {name: "Octopus Deploy",- image: "Octopus Deploy.png"+ image: "Octopus Deploy.png",+ category: "CI/CD",+ description: "Project variables in Octopus Deploy."},[SecretSync.CircleCI]: {name: "CircleCI",- image: "CircleCI.png"+ image: "CircleCI.png",+ category: "CI/CD",+ description: "Project or context environment variables."},[SecretSync.AzureEntraIdScim]: {name: "Azure Entra ID SCIM",- image: "Microsoft Azure.png"+ image: "Microsoft Azure.png",+ category: "AZURE",+ description: "SCIM provisioning tokens for Azure Entra ID Enterprise Applications."},[SecretSync.ExternalInfisical]: {name: "Infisical",- image: "Infisical.png"+ image: "Infisical.png",+ category: "SECRETS",+ description: "Secrets in another Infisical instance."},[SecretSync.OVH]: {name: "OVH Cloud",- image: "OVH.png"+ image: "OVH.png",+ category: "CLOUD",+ description: "Secret vault on OVHcloud."},[SecretSync.Devin]: {name: "Devin",- image: "Devin.png"+ image: "Devin.png",+ category: "AI",+ description: "Organization secrets for Devin agents."},[SecretSync.Ona]: {name: "Ona",image: "Ona.png",+ category: "AI",+ description: "Project-level environment variables on Ona.",aliases: ["gitpod"]},[SecretSync.TravisCI]: {name: "Travis CI",- image: "Travis CI.png"+ image: "Travis CI.png",+ category: "CI/CD",+ description: "Repository environment variables on Travis CI."},[SecretSync.Snowflake]: {name: "Snowflake",- image: "Snowflake.png"+ image: "Snowflake.png",+ category: "DATA",+ description: "Secret objects in a Snowflake account."}};+export const POPULAR_SECRET_SYNCS: SecretSync[] = [+ SecretSync.AWSParameterStore,+ SecretSync.GCPSecretManager,+ SecretSync.Vercel,+ SecretSync.GitHub+];+export const SECRET_SYNC_CONNECTION_MAP: Record<SecretSync, AppConnection> = {[SecretSync.AWSParameterStore]: AppConnection.AWS,[SecretSync.AWSSecretsManager]: AppConnection.AWS,diff --git a/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/SubmenuViews.tsx b/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/SubmenuViews.tsxindex 04951fea99..4c011fa790 100644--- a/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/SubmenuViews.tsx+++ b/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/SubmenuViews.tsx@@ -32,6 +32,7 @@ export const ProjectSubmenuView = ({const basePath = `/organizations/${currentOrg.id}/projects/${typePath}/${currentProject.id}`;const isOnExactPage = pathname.startsWith(`${basePath}/${submenu.pathSuffix}`);const currentTab = searchParams?.selectedTab;+ const anyItemMatchesDetail = submenu.items.some((s) => Boolean(s.activeMatch?.test(pathname)));return (<SidebarGroup>@@ -51,6 +52,7 @@ export const ProjectSubmenuView = ({const isActive =matchesDetail ||(isOnExactPage &&+ !anyItemMatchesDetail &&(currentTab === sub.tab || (!currentTab && sub.tab === submenu.defaultTab)));return (@@ -99,6 +101,7 @@ export const OrgSubmenuView = ({ submenu, onBack }: { submenu: Submenu; onBack:const isOnExactPage = pathname.startsWith(`/organizations/${orgId}/${submenu.pathSuffix}`);const currentTab = searchParams?.selectedTab;+ const anyItemMatchesDetail = submenu.items.some((s) => Boolean(s.activeMatch?.test(pathname)));return (<SidebarGroup>@@ -118,6 +121,7 @@ export const OrgSubmenuView = ({ submenu, onBack }: { submenu: Submenu; onBack:const isActive =matchesDetail ||(isOnExactPage &&+ !anyItemMatchesDetail &&(currentTab === sub.tab || (!currentTab && sub.tab === submenu.defaultTab)));return (diff --git a/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/submenus.ts b/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/submenus.tsindex bb04d37d8b..f3c79963a9 100644--- a/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/submenus.ts+++ b/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/submenus.ts@@ -119,7 +119,12 @@ export const INTEGRATIONS_SUBMENU: Submenu = {defaultTab: "app-connections",items: [{ label: "App Connections", icon: Cable, tab: "app-connections" },- { label: "Secret Syncs", icon: ArrowLeftRight, tab: "secret-syncs" },+ {+ label: "Secret Syncs",+ icon: ArrowLeftRight,+ tab: "secret-syncs",+ activeMatch: /\/integrations\/secret-syncs\//+ },{ label: "Framework Integrations", icon: Blocks, tab: "framework-integrations" },{ label: "Infrastructure Integrations", icon: Container, tab: "infrastructure-integrations" },{ label: "Native Integrations", icon: Plug, tab: "native-integrations" }diff --git a/frontend/src/pages/cert-manager/ApplicationDetailsByIDPage/components/ConfigureEnrollmentModal.tsx b/frontend/src/pages/cert-manager/ApplicationDetailsByIDPage/components/ConfigureEnrollmentModal.tsxindex 1a6b748daa..aa3e72cb57 100644--- a/frontend/src/pages/cert-manager/ApplicationDetailsByIDPage/components/ConfigureEnrollmentModal.tsx+++ b/frontend/src/pages/cert-manager/ApplicationDetailsByIDPage/components/ConfigureEnrollmentModal.tsx@@ -268,7 +268,12 @@ const ApiPanel = ({Automatically renew certificates issued via this profile before they expire.</p></div>- <Switch id="api-auto-renew" checked={field.value} onCheckedChange={field.onChange} />+ <Switch+ variant="project"+ id="api-auto-renew"+ checked={field.value}+ onCheckedChange={field.onChange}+ /></div>)}/>@@ -447,6 +452,7 @@ const EstPanel = ({</p></div><Switch+ variant="project"id="est-disable-bootstrap"checked={field.value}onCheckedChange={field.onChange}@@ -636,6 +642,7 @@ const AcmePanel = ({{/* span wrapper lets the tooltip listen for hover on a disabled control */}<span className="inline-flex"><Switch+ variant="project"id="acme-skip-dns"checked={field.value}onCheckedChange={(v) => {@@ -652,6 +659,7 @@ const AcmePanel = ({</Tooltip>) : (<Switch+ variant="project"id="acme-skip-dns"checked={field.value}onCheckedChange={(v) => {@@ -679,6 +687,7 @@ const AcmePanel = ({<TooltipTrigger asChild><span className="inline-flex"><Switch+ variant="project"id="acme-skip-eab"checked={field.value}onCheckedChange={(v) => {@@ -696,6 +705,7 @@ const AcmePanel = ({</Tooltip>) : (<Switch+ variant="project"id="acme-skip-eab"checked={field.value}onCheckedChange={(v) => {@@ -970,7 +980,12 @@ const ScepPanel = ({Return the issuing CA certificate inline alongside the issued cert.</p></div>- <Switch id="scep-include-ca" checked={field.value} onCheckedChange={field.onChange} />+ <Switch+ variant="project"+ id="scep-include-ca"+ checked={field.value}+ onCheckedChange={field.onChange}+ /></div>)}/>@@ -986,6 +1001,7 @@ const ScepPanel = ({</p></div><Switch+ variant="project"id="scep-cert-renewal"checked={field.value}onCheckedChange={field.onChange}diff --git a/frontend/src/pages/cert-manager/CertificatesPage/components/SaveViewModal.tsx b/frontend/src/pages/cert-manager/CertificatesPage/components/SaveViewModal.tsxindex bc0d619132..d61d582da9 100644--- a/frontend/src/pages/cert-manager/CertificatesPage/components/SaveViewModal.tsx+++ b/frontend/src/pages/cert-manager/CertificatesPage/components/SaveViewModal.tsx@@ -88,7 +88,7 @@ export const SaveViewModal = ({/>{/* eslint-disable-next-line jsx-a11y/label-has-associated-control */}<label className="mt-4 flex cursor-pointer items-center gap-2 text-sm text-foreground">- <Switch checked={isShared} onCheckedChange={setIsShared} />+ <Switch variant="project" checked={isShared} onCheckedChange={setIsShared} />Share with team</label><DialogFooter className="mt-6">diff --git a/frontend/src/pages/organization/SecretSharingPage/components/SecretSharingSettings/SecretSharingAllowShareToAnyone.tsx b/frontend/src/pages/organization/SecretSharingPage/components/SecretSharingSettings/SecretSharingAllowShareToAnyone.tsxindex 031d1cf127..01a0616823 100644--- a/frontend/src/pages/organization/SecretSharingPage/components/SecretSharingSettings/SecretSharingAllowShareToAnyone.tsx+++ b/frontend/src/pages/organization/SecretSharingPage/components/SecretSharingSettings/SecretSharingAllowShareToAnyone.tsx@@ -43,7 +43,7 @@ export const SecretSharingAllowShareToAnyone = () => {<OrgPermissionCan I={OrgPermissionActions.Edit} a={OrgPermissionSubjects.Settings}>{(isAllowed) => (<Switch- variant="org"+ variant="project"id="enable-secret-sharing-outside-org"onCheckedChange={(value) => handleSecretSharingToggle(value)}checked={currentOrg?.allowSecretSharingOutsideOrganization ?? false}diff --git a/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgGeneralAuthSection.tsx b/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgGeneralAuthSection.tsxindex c4172189d5..7a7a0e5717 100644--- a/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgGeneralAuthSection.tsx+++ b/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgGeneralAuthSection.tsx@@ -259,7 +259,7 @@ export const OrgGeneralAuthSection = ({{(isAllowed) => (<Switchid="enforce-saml-auth"- variant="org"+ variant="project"checked={currentOrg?.authEnforced ?? false}onCheckedChange={(value) =>handleEnforceOrgAuthToggle(value, EnforceAuthType.SAML)@@ -282,7 +282,7 @@ export const OrgGeneralAuthSection = ({{(isAllowed) => (<Switchid="enforce-oidc-auth"- variant="org"+ variant="project"checked={currentOrg?.authEnforced ?? false}onCheckedChange={(value) =>handleEnforceOrgAuthToggle(value, EnforceAuthType.OIDC)@@ -309,7 +309,7 @@ export const OrgGeneralAuthSection = ({{(isAllowed) => (<Switchid="enforce-google-sso"- variant="org"+ variant="project"checked={currentOrg?.googleSsoAuthEnforced ?? false}onCheckedChange={(value) =>handleEnforceOrgAuthToggle(value, EnforceAuthType.GOOGLE)@@ -365,7 +365,7 @@ export const OrgGeneralAuthSection = ({{(isAllowed) => (<Switchid="allow-admin-bypass"- variant="org"+ variant="project"checked={currentOrg?.bypassOrgAuthEnabled ?? false}onCheckedChange={(value) => handleEnableBypassOrgAuthToggle(value)}disabled={!isAllowed}@@ -425,7 +425,7 @@ export const OrgGeneralAuthSection = ({</FieldContent><Switchid="bypass-enabled-modal"- variant="org"+ variant="project"checked={bypassEnabledInModal}onCheckedChange={setBypassEnabledInModal}/>diff --git a/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgLDAPSection.tsx b/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgLDAPSection.tsxindex 8118a3ae3a..983a378183 100644--- a/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgLDAPSection.tsx+++ b/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgLDAPSection.tsx@@ -177,7 +177,7 @@ export const OrgLDAPSection = ({ onSwitchProvider }: Props): JSX.Element => {<div><Switchid="enable-ldap-sso"- variant="org"+ variant="project"checked={data.isActive}onCheckedChange={(value) => handleLDAPToggle(value)}disabled={!isAllowed || isGoogleOAuthEnabled}diff --git a/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgOIDCSection.tsx b/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgOIDCSection.tsxindex 5db0978e92..89bdc687a3 100644--- a/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgOIDCSection.tsx+++ b/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgOIDCSection.tsx@@ -167,7 +167,7 @@ export const OrgOIDCSection = ({ onSwitchProvider }: Props): JSX.Element => {<div><Switchid="enable-oidc-sso"- variant="org"+ variant="project"checked={data.isActive}onCheckedChange={(value) => handleOIDCToggle(value)}disabled={!isAllowed || isGoogleOAuthEnabled}@@ -223,7 +223,7 @@ export const OrgOIDCSection = ({ onSwitchProvider }: Props): JSX.Element => {{(isAllowed) => (<Switchid="enforce-org-auth"- variant="org"+ variant="project"checked={data?.manageGroupMemberships ?? false}onCheckedChange={(value) => handleOIDCGroupManagement(value)}disabled={!isAllowed}diff --git a/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgSSOSection.tsx b/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgSSOSection.tsxindex 0ab2bb97ae..cfeab9945b 100644--- a/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgSSOSection.tsx+++ b/frontend/src/pages/organization/SettingsPage/components/OrgSsoTab/OrgSSOSection.tsx@@ -187,7 +187,7 @@ export const OrgSSOSection = ({ onSwitchProvider }: Props): JSX.Element => {<div><Switchid="enable-saml-sso"- variant="org"+ variant="project"checked={data ? data.isActive : false}onCheckedChange={(value) => handleSamlSSOToggle(value)}disabled={!isAllowed || isGoogleOAuthEnabled}@@ -244,7 +244,7 @@ export const OrgSSOSection = ({ onSwitchProvider }: Props): JSX.Element => {{(isAllowed) => (<Switchid="enable-saml-group-sync"- variant="org"+ variant="project"checked={data?.enableGroupSync ?? false}onCheckedChange={(value) => handleSamlGroupManagement(value)}disabled={!isAllowed}diff --git a/frontend/src/pages/pam/PamResourceByIDPage/components/PamSessionRecordingModal.tsx b/frontend/src/pages/pam/PamResourceByIDPage/components/PamSessionRecordingModal.tsxindex cea7f988b3..d0fabce964 100644--- a/frontend/src/pages/pam/PamResourceByIDPage/components/PamSessionRecordingModal.tsx+++ b/frontend/src/pages/pam/PamResourceByIDPage/components/PamSessionRecordingModal.tsx@@ -145,9 +145,9 @@ export const PamSessionRecordingModal = ({ isOpen, onOpenChange, config, onSavecontrol={control}render={({ field }) => (<Switch+ variant="project"checked={field.value}onCheckedChange={field.onChange}- variant="success"/>)}/>diff --git a/frontend/src/pages/public/ShareSecretPage/components/ShareSecretForm.tsx b/frontend/src/pages/public/ShareSecretPage/components/ShareSecretForm.tsxindex 820e4e798a..ae773a6646 100644--- a/frontend/src/pages/public/ShareSecretPage/components/ShareSecretForm.tsx+++ b/frontend/src/pages/public/ShareSecretPage/components/ShareSecretForm.tsx@@ -268,11 +268,11 @@ export const ShareSecretForm = ({render={({ field: { onChange, ...field }, fieldState: { error } }) => (<Field orientation="horizontal"><Switch+ variant="project"checked={field.value === SecretSharingAccessType.Organization ||!allowSecretSharingOutsideOrganization}- variant="org"disabled={!allowSecretSharingOutsideOrganization}onCheckedChange={(v) =>onChange(@@ -444,9 +444,9 @@ export const ShareSecretForm = ({}) => (<Field orientation="horizontal"><Switch+ variant="project"checked={isOrgAccess ? false : (isChecked ?? false)}onCheckedChange={onChange}- variant="org"disabled={isOrgAccess}id="allow-external-emails"{...field}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 0f4096fec5..a9750b518d 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@@ -1,20 +1,19 @@import { useCallback } from "react";-import {- faBan,- faCheck,- faCopy,- faDownload,- faEllipsisV,- faEraser,- faInfoCircle,- faRotate,- faToggleOff,- faToggleOn,- faTrash-} from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";import { useNavigate } from "@tanstack/react-router";-import { AlertTriangleIcon } from "lucide-react";+import {+ AlertTriangleIcon,+ BanIcon,+ CheckIcon,+ CopyIcon,+ DownloadIcon,+ EraserIcon,+ InfoIcon,+ MoreHorizontalIcon,+ RefreshCwIcon,+ ToggleLeftIcon,+ ToggleRightIcon,+ Trash2Icon+} from "lucide-react";import { twMerge } from "tailwind-merge";import { createNotification } from "@app/components/notifications";@@ -25,16 +24,18 @@ import {SecretSyncStatusBadge} from "@app/components/secret-syncs";import {+ Badge,DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuTrigger,IconButton,- Td,+ TableCell,+ TableRow,Tooltip,- Tr-} from "@app/components/v2";-import { Badge } from "@app/components/v3";+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import { ROUTE_PATHS } from "@app/const/routes";import { useOrganization } from "@app/context";import { ProjectPermissionSecretSyncActions } from "@app/context/ProjectPermissionContext/types";@@ -44,7 +45,6 @@ import { SecretSyncStatus, TSecretSync, useSecretSyncOption } from "@app/hooks/aimport { getSecretSyncPermissionSubject } from "@app/lib/fn/permission";import { SecretSyncDestinationCol } from "./SecretSyncDestinationCol";-import { SecretSyncTableCell } from "./SecretSyncTableCell";type Props = {secretSync: TSecretSync;@@ -55,6 +55,31 @@ type Props = {onToggleEnable: (secretSync: TSecretSync) => void;};+const SecretSyncDestinationSourceCell = ({+ folderPath,+ environmentName+}: {+ folderPath: string;+ environmentName: string;+}) => {+ return (+ <TableCell className="max-w-0 min-w-32!">+ <Tooltip>+ <TooltipTrigger asChild>+ <div>+ <p className="truncate text-sm">{folderPath}</p>+ <p className="truncate text-xs leading-4 text-accent">{environmentName}</p>+ </div>+ </TooltipTrigger>+ <TooltipContent side="left" className="max-w-2xl break-words">+ <p className="text-sm">{folderPath}</p>+ <p className="text-xs leading-3 text-accent">{environmentName}</p>+ </TooltipContent>+ </Tooltip>+ </TableCell>+ );+};+export const SecretSyncRow = ({secretSync,onDelete,@@ -105,7 +130,7 @@ export const SecretSyncRow = ({const permissionSubject = getSecretSyncPermissionSubject(secretSync);return (- <Tr+ <TableRowonClick={() =>navigate({to: ROUTE_PATHS.SecretManager.SecretSyncDetailsByIDPage.path,@@ -118,49 +143,56 @@ export const SecretSyncRow = ({})}className={twMerge(- "group h-10 cursor-pointer transition-colors duration-100 hover:bg-mineshaft-700",+ "group h-12",syncStatus === SecretSyncStatus.Failed && "bg-red/5 hover:bg-red/10")}- key={`sync-${id}`}>- <Td>+ <TableCell><imgalt={`${destinationDetails.name} sync`}src={`/images/integrations/${destinationDetails.image}`}- className="min-w-7"+ className="size-6 min-w-6"/>- </Td>- <Td className="max-w-0 min-w-32!">+ </TableCell>+ <TableCell className="max-w-0 min-w-32!"><div><div className="flex w-full items-center"><p className="truncate">{name}</p>{description && (- <Tooltip content={description}>- <FontAwesomeIcon- icon={faInfoCircle}- size="xs"- className="ml-1 text-mineshaft-400"- />+ <Tooltip>+ <TooltipTrigger asChild>+ <InfoIcon className="ml-1 size-3 text-accent" />+ </TooltipTrigger>+ <TooltipContent>{description}</TooltipContent></Tooltip>)}</div>- <p className="truncate text-xs leading-4 text-bunker-300">{destinationDetails.name}</p>+ <p className="truncate text-xs leading-4 text-accent">{destinationDetails.name}</p></div>- </Td>+ </TableCell>{folder && environment ? (- <SecretSyncTableCell primaryText={folder.path} secondaryText={environment.name} />+ <SecretSyncDestinationSourceCell+ folderPath={folder.path}+ environmentName={environment.name}+ />) : (- <Td>- <Tooltip content="The source location for this sync has been deleted. Configure a new source or remove this sync.">- <Badge variant="danger">- <AlertTriangleIcon />- <span>Source Folder Deleted</span>- </Badge>+ <TableCell>+ <Tooltip>+ <TooltipTrigger asChild>+ <Badge variant="danger">+ <AlertTriangleIcon />+ <span>Source Folder Deleted</span>+ </Badge>+ </TooltipTrigger>+ <TooltipContent>+ The source location for this sync has been deleted. Configure a new source or remove+ this sync.+ </TooltipContent></Tooltip>- </Td>+ </TableCell>)}<SecretSyncDestinationCol secretSync={secretSync} />- <Td>+ <TableCell><div className="flex items-center gap-1">{syncStatus && (<SecretSyncStatusBadge@@ -170,177 +202,182 @@ export const SecretSyncRow = ({/>)}{!isAutoSyncEnabled && (- <Tooltip- className="text-xs"- content="Auto-Sync is disabled. Changes to the source location will not be automatically synced to the destination."- >- <div>+ <Tooltip>+ <TooltipTrigger asChild><Badge variant="neutral">- <FontAwesomeIcon icon={faBan} />+ <BanIcon />{!syncStatus && "Auto-Sync Disabled"}</Badge>- </div>+ </TooltipTrigger>+ <TooltipContent className="text-xs">+ Auto-Sync is disabled. Changes to the source location will not be automatically+ synced to the destination.+ </TooltipContent></Tooltip>)}<SecretSyncImportStatusBadge mini secretSync={secretSync} /><SecretSyncRemoveStatusBadge mini secretSync={secretSync} /></div>- </Td>- <Td>- <Tooltip className="max-w-sm text-center" content="Options">- <DropdownMenu>- <DropdownMenuTrigger asChild>- <IconButton- ariaLabel="Options"- colorSchema="secondary"- className="w-6"- variant="plain"- >- <FontAwesomeIcon icon={faEllipsisV} />- </IconButton>- </DropdownMenuTrigger>- <DropdownMenuContent sideOffset={2} align="end">- <DropdownMenuItem- icon={<FontAwesomeIcon icon={isIdCopied ? faCheck : faCopy} />}- onClick={(e) => {- e.stopPropagation();- handleCopyId();- }}- >- Copy Sync ID- </DropdownMenuItem>- <ProjectPermissionCan- I={ProjectPermissionSecretSyncActions.SyncSecrets}- a={permissionSubject}- >- {(isAllowed: boolean) => (- <DropdownMenuItem- icon={<FontAwesomeIcon icon={faRotate} />}- onClick={(e) => {- e.stopPropagation();- onTriggerSyncSecrets(secretSync);- }}- isDisabled={!isAllowed}- >- <Tooltip- position="left"- sideOffset={42}- content={`Manually trigger a sync for this ${destinationName} destination.`}- >- <div className="flex h-full w-full items-center justify-between gap-1">- <span> Trigger Sync</span>- <FontAwesomeIcon- className="text-bunker-300"- size="sm"- icon={faInfoCircle}- />- </div>- </Tooltip>- </DropdownMenuItem>- )}- </ProjectPermissionCan>- {syncOption?.canImportSecrets && (- <ProjectPermissionCan- I={ProjectPermissionSecretSyncActions.ImportSecrets}- a={permissionSubject}+ </TableCell>+ <TableCell>+ <DropdownMenu>+ <Tooltip>+ <TooltipTrigger>+ <DropdownMenuTrigger asChild>+ <IconButton+ variant="ghost"+ size="xs"+ aria-label="Options"+ onClick={(e) => e.stopPropagation()}>- {(isAllowed: boolean) => (- <DropdownMenuItem- icon={<FontAwesomeIcon icon={faDownload} />}- onClick={(e) => {- e.stopPropagation();- onTriggerImportSecrets(secretSync);- }}- isDisabled={!isAllowed}- >- <Tooltip- position="left"- sideOffset={42}- content={`Import secrets from this ${destinationName} destination into Infisical.`}- >- <div className="flex h-full w-full items-center justify-between gap-1">- <span>Import Secrets</span>- <FontAwesomeIcon- className="text-bunker-300"- size="sm"- icon={faInfoCircle}- />- </div>- </Tooltip>- </DropdownMenuItem>- )}- </ProjectPermissionCan>- )}- {syncOption?.canRemoveSecretsOnDeletion && (- <ProjectPermissionCan- I={ProjectPermissionSecretSyncActions.RemoveSecrets}- a={permissionSubject}+ <MoreHorizontalIcon />+ </IconButton>+ </DropdownMenuTrigger>+ </TooltipTrigger>+ <TooltipContent>Options</TooltipContent>+ </Tooltip>+ <DropdownMenuContent sideOffset={2} align="end">+ <DropdownMenuItem+ onClick={(e) => {+ e.preventDefault();+ e.stopPropagation();+ handleCopyId();+ }}+ >+ {isIdCopied ? <CheckIcon /> : <CopyIcon />}+ Copy Sync ID+ </DropdownMenuItem>+ <ProjectPermissionCan+ I={ProjectPermissionSecretSyncActions.SyncSecrets}+ a={permissionSubject}+ >+ {(isAllowed: boolean) => (+ <DropdownMenuItem+ isDisabled={!isAllowed}+ onClick={(e) => {+ e.preventDefault();+ e.stopPropagation();+ onTriggerSyncSecrets(secretSync);+ }}>- {(isAllowed: boolean) => (- <DropdownMenuItem- icon={<FontAwesomeIcon icon={faEraser} />}- onClick={(e) => {- e.stopPropagation();- onTriggerRemoveSecrets(secretSync);- }}- isDisabled={!isAllowed}- >- <Tooltip- position="left"- sideOffset={42}- content={`Remove secrets synced by Infisical from this ${destinationName} destination.`}- >- <div className="flex h-full w-full items-center justify-between gap-1">- <span>Remove Secrets</span>- <FontAwesomeIcon- className="text-bunker-300"- size="sm"- icon={faInfoCircle}- />- </div>- </Tooltip>- </DropdownMenuItem>- )}- </ProjectPermissionCan>+ <Tooltip>+ <TooltipTrigger asChild>+ <div className="flex w-full items-center justify-between gap-2">+ <span className="flex items-center gap-2">+ <RefreshCwIcon />+ Trigger Sync+ </span>+ <InfoIcon className="size-3.5 text-bunker-300" />+ </div>+ </TooltipTrigger>+ <TooltipContent side="left" sideOffset={20}>+ Manually trigger a sync for this {destinationName} destination.+ </TooltipContent>+ </Tooltip>+ </DropdownMenuItem>)}+ </ProjectPermissionCan>+ {syncOption?.canImportSecrets && (<ProjectPermissionCan- I={ProjectPermissionSecretSyncActions.Edit}+ I={ProjectPermissionSecretSyncActions.ImportSecrets}a={permissionSubject}>{(isAllowed: boolean) => (<DropdownMenuItemisDisabled={!isAllowed}- icon={<FontAwesomeIcon icon={isAutoSyncEnabled ? faToggleOff : faToggleOn} />}onClick={(e) => {+ e.preventDefault();e.stopPropagation();- onToggleEnable(secretSync);+ onTriggerImportSecrets(secretSync);}}>- {isAutoSyncEnabled ? "Disable" : "Enable"} Auto-Sync+ <Tooltip>+ <TooltipTrigger asChild>+ <div className="flex w-full items-center justify-between gap-2">+ <span className="flex items-center gap-2">+ <DownloadIcon />+ Import Secrets+ </span>+ <InfoIcon className="size-3.5 text-bunker-300" />+ </div>+ </TooltipTrigger>+ <TooltipContent side="left" sideOffset={20}>+ Import secrets from this {destinationName} destination into Infisical.+ </TooltipContent>+ </Tooltip></DropdownMenuItem>)}</ProjectPermissionCan>+ )}+ {syncOption?.canRemoveSecretsOnDeletion && (<ProjectPermissionCan- I={ProjectPermissionSecretSyncActions.Delete}+ I={ProjectPermissionSecretSyncActions.RemoveSecrets}a={permissionSubject}>{(isAllowed: boolean) => (<DropdownMenuItemisDisabled={!isAllowed}- icon={<FontAwesomeIcon icon={faTrash} />}onClick={(e) => {+ e.preventDefault();e.stopPropagation();- onDelete(secretSync);+ onTriggerRemoveSecrets(secretSync);}}>- Delete Sync+ <Tooltip>+ <TooltipTrigger asChild>+ <div className="flex w-full items-center justify-between gap-2">+ <span className="flex items-center gap-2">+ <EraserIcon />+ Remove Secrets+ </span>+ <InfoIcon className="size-3.5 text-bunker-300" />+ </div>+ </TooltipTrigger>+ <TooltipContent side="left" sideOffset={20}>+ Remove secrets synced by Infisical from this {destinationName} destination.+ </TooltipContent>+ </Tooltip></DropdownMenuItem>)}</ProjectPermissionCan>- </DropdownMenuContent>- </DropdownMenu>- </Tooltip>- </Td>- </Tr>+ )}+ <ProjectPermissionCan I={ProjectPermissionSecretSyncActions.Edit} a={permissionSubject}>+ {(isAllowed: boolean) => (+ <DropdownMenuItem+ isDisabled={!isAllowed}+ onClick={(e) => {+ e.preventDefault();+ e.stopPropagation();+ onToggleEnable(secretSync);+ }}+ >+ {isAutoSyncEnabled ? <ToggleLeftIcon /> : <ToggleRightIcon />}+ {isAutoSyncEnabled ? "Disable" : "Enable"} Auto-Sync+ </DropdownMenuItem>+ )}+ </ProjectPermissionCan>+ <ProjectPermissionCan+ I={ProjectPermissionSecretSyncActions.Delete}+ a={permissionSubject}+ >+ {(isAllowed: boolean) => (+ <DropdownMenuItem+ variant="danger"+ isDisabled={!isAllowed}+ onClick={(e) => {+ e.preventDefault();+ e.stopPropagation();+ onDelete(secretSync);+ }}+ >+ <Trash2Icon />+ Delete Sync+ </DropdownMenuItem>+ )}+ </ProjectPermissionCan>+ </DropdownMenuContent>+ </DropdownMenu>+ </TableCell>+ </TableRow>);};diff --git a/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncTableCell.tsx b/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncTableCell.tsxindex ee9cd8a5d9..9de12ba8e3 100644--- a/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncTableCell.tsx+++ b/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncTableCell.tsx@@ -1,9 +1,8 @@import { ReactNode } from "react";-import { faInfoCircle } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";+import { InfoIcon } from "lucide-react";import { twMerge } from "tailwind-merge";-import { Td, Tooltip } from "@app/components/v2";+import { TableCell, Tooltip, TooltipContent, TooltipTrigger } from "@app/components/v3";export type SecretSyncTableCellProps = {primaryText: string;@@ -23,49 +22,36 @@ export const SecretSyncTableCell = ({secondaryClassName}: SecretSyncTableCellProps) => {return (- <Td className="max-w-0 min-w-32!">- <Tooltip- side="left"- className="max-w-2xl break-words"- content={- <>- <p className="text-sm">{primaryText}</p>+ <TableCell className="max-w-0 min-w-32!">+ <Tooltip>+ <TooltipTrigger asChild>+ <div>+ <p className={twMerge("truncate text-sm", primaryClassName)}>+ {primaryText}+ {infoBadge === "primary" && (+ <InfoIcon className="ml-1 inline-block size-3 text-accent" />+ )}+ </p>{secondaryText && (- <p className={twMerge("text-xs leading-3 text-bunker-300", secondaryClassName)}>+ <p className={twMerge("truncate text-xs leading-4 text-accent", secondaryClassName)}>{secondaryText}+ {infoBadge === "secondary" && (+ <InfoIcon className="ml-1 inline-block size-3 text-accent" />+ )}</p>)}- {additionalTooltipContent}- </>- }- >- <div>- <p className={twMerge("truncate text-sm", primaryClassName)}>- {primaryText}- {infoBadge === "primary" && (- <FontAwesomeIcon- size="xs"- icon={faInfoCircle}- className="ml-1 inline-block text-bunker-300"- />- )}- </p>+ </div>+ </TooltipTrigger>+ <TooltipContent side="left" className="max-w-2xl break-words">+ <p className="text-sm">{primaryText}</p>{secondaryText && (- <p- className={twMerge("truncate text-xs leading-4 text-bunker-300", secondaryClassName)}- >+ <p className={twMerge("text-xs leading-3 text-accent", secondaryClassName)}>{secondaryText}- {infoBadge === "secondary" && (- <FontAwesomeIcon- size="xs"- icon={faInfoCircle}- className="ml-1 inline-block text-bunker-300"- />- )}</p>)}- </div>+ {additionalTooltipContent}+ </TooltipContent></Tooltip>- </Td>+ </TableCell>);};diff --git a/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncsTable.tsx b/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncsTable.tsxindex 93a22feb8d..931b44257a 100644--- a/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncsTable.tsx+++ b/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncsTable.tsx@@ -1,16 +1,12 @@import { useMemo, useState } from "react";import {- faArrowDown,- faArrowUp,- faCheck,- faCheckCircle,- faFilter,- faMagnifyingGlass,- faRotate,- faSearch,- faWarning-} from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";+ CheckIcon,+ ChevronDownIcon,+ FilterIcon,+ RefreshCwIcon,+ SearchIcon,+ TriangleAlertIcon+} from "lucide-react";import { twMerge } from "tailwind-merge";import { createNotification } from "@app/components/notifications";@@ -21,21 +17,28 @@ import {} from "@app/components/secret-syncs";import {DropdownMenu,+ DropdownMenuCheckboxItem,DropdownMenuContent,- DropdownMenuItem,DropdownMenuLabel,DropdownMenuTrigger,- EmptyState,+ Empty,+ EmptyDescription,+ EmptyHeader,+ EmptyMedia,+ EmptyTitle,IconButton,- Input,+ InputGroup,+ InputGroupAddon,+ InputGroupInput,Pagination,+ Skeleton,Table,- TableContainer,- TBody,- Th,- THead,- Tr-} from "@app/components/v2";+ TableBody,+ TableCell,+ TableHead,+ TableHeader,+ TableRow+} from "@app/components/v3";import { useProject } from "@app/context";import { SECRET_SYNC_MAP } from "@app/helpers/secretSyncs";import {@@ -85,16 +88,21 @@ const getSyncStatusOrderValue = (syncStatus: SecretSyncStatus | null) => {type Props = {secretSyncs: TSecretSync[];+ isPending: boolean;};const STATUS_ICON_MAP = {- [SecretSyncStatus.Succeeded]: { icon: faCheck, className: "text-green", name: "Synced" },- [SecretSyncStatus.Failed]: { icon: faWarning, className: "text-red", name: "Not Synced" },- [SecretSyncStatus.Pending]: { icon: faRotate, className: "text-yellow", name: "Syncing" },- [SecretSyncStatus.Running]: { icon: faRotate, className: "text-yellow", name: "Syncing" }+ [SecretSyncStatus.Succeeded]: { Icon: CheckIcon, className: "text-success", name: "Synced" },+ [SecretSyncStatus.Failed]: {+ Icon: TriangleAlertIcon,+ className: "text-danger",+ name: "Not Synced"+ },+ [SecretSyncStatus.Pending]: { Icon: RefreshCwIcon, className: "text-info", name: "Syncing" },+ [SecretSyncStatus.Running]: { Icon: RefreshCwIcon, className: "text-info", name: "Syncing" }};-export const SecretSyncsTable = ({ secretSyncs }: Props) => {+export const SecretSyncsTable = ({ secretSyncs, isPending }: Props) => {const { popUp, handlePopUpOpen, handlePopUpToggle } = usePopUp(["deleteSync","importSecrets",@@ -214,13 +222,9 @@ export const SecretSyncsTable = ({ secretSyncs }: Props) => {setOrderDirection(OrderByDirection.ASC);};- const getClassName = (col: SecretSyncsOrderBy) =>- twMerge("ml-2", orderBy === col ? "" : "opacity-30");-- const getColSortIcon = (col: SecretSyncsOrderBy) =>- orderDirection === OrderByDirection.DESC && orderBy === col ? faArrowUp : faArrowDown;-- const isTableFiltered = Boolean(filters.destinations.length);+ const isTableFiltered = Boolean(+ filters.destinations.length || filters.status.length || filters.environmentIds.length+ );const handleDelete = (secretSync: TSecretSync) => handlePopUpOpen("deleteSync", secretSync);@@ -263,103 +267,96 @@ export const SecretSyncsTable = ({ secretSyncs }: Props) => {});};+ const isFiltered = Boolean(search || isTableFiltered);+ const showEmpty = !isPending && filteredSecretSyncs.length === 0;+ const visibleSyncs = filteredSecretSyncs.slice(offset, perPage * page);+return (<div>- <div className="flex gap-2">- <Input- value={search}- onChange={(e) => setSearch(e.target.value)}- leftIcon={<FontAwesomeIcon icon={faMagnifyingGlass} />}- placeholder="Search secret syncs..."- className="flex-1"- />+ <div className="mb-4 flex gap-2">+ <InputGroup className="flex-1">+ <InputGroupAddon>+ <SearchIcon />+ </InputGroupAddon>+ <InputGroupInput+ value={search}+ onChange={(e) => setSearch(e.target.value)}+ placeholder="Search secret syncs..."+ />+ </InputGroup><DropdownMenu><DropdownMenuTrigger asChild><IconButton- ariaLabel="Filter secret syncs"- variant="plain"- size="sm"- className={twMerge(- "flex h-10 w-11 items-center justify-center overflow-hidden border border-mineshaft-600 bg-mineshaft-800 p-0 transition-all hover:border-primary/60 hover:bg-primary/10",- isTableFiltered && "border-primary/50 text-primary"- )}+ aria-label="Filter secret syncs"+ variant={isTableFiltered ? "project" : "outline"}>- <FontAwesomeIcon icon={faFilter} />+ <FilterIcon /></IconButton></DropdownMenuTrigger><DropdownMenuContent className="max-h-[70vh] thin-scrollbar overflow-y-auto" align="end"><DropdownMenuLabel>Status</DropdownMenuLabel>{[SecretSyncStatus.Running, SecretSyncStatus.Succeeded, SecretSyncStatus.Failed].map(- (status) => (- <DropdownMenuItem- onClick={(e) => {- e.preventDefault();- setFilters((prev) => ({- ...prev,- status: prev.status.includes(status)- ? prev.status.filter((s) => s !== status)- : [...prev.status, status]- }));- }}- key={status}- icon={- filters.status.includes(status) && (- <FontAwesomeIcon className="text-primary" icon={faCheckCircle} />- )- }- iconPos="right"- >- <div className="flex items-center gap-2">- <FontAwesomeIcon- icon={STATUS_ICON_MAP[status].icon}- className={STATUS_ICON_MAP[status].className}- />- <span className="capitalize">{STATUS_ICON_MAP[status].name}</span>- </div>- </DropdownMenuItem>- )- )}- <DropdownMenuLabel>Service</DropdownMenuLabel>- {secretSyncs.length ? (- [...new Set(secretSyncs.map(({ destination }) => destination))].map((destination) => {- const { name, image } = SECRET_SYNC_MAP[destination];-+ (status) => {+ const { Icon, className, name } = STATUS_ICON_MAP[status];return (- <DropdownMenuItem+ <DropdownMenuCheckboxItem+ key={status}+ checked={filters.status.includes(status)}onClick={(e) => {e.preventDefault();setFilters((prev) => ({...prev,- destinations: prev.destinations.includes(destination)- ? prev.destinations.filter((a) => a !== destination)- : [...prev.destinations, destination]+ status: prev.status.includes(status)+ ? prev.status.filter((s) => s !== status)+ : [...prev.status, status]}));}}- key={destination}- icon={- filters.destinations.includes(destination) && (- <FontAwesomeIcon className="text-primary" icon={faCheckCircle} />- )- }- iconPos="right">- <div className="flex items-center gap-2">- <img- alt={`${name} integration`}- src={`/images/integrations/${image}`}- className="h-4 w-4"- />- <span>{name}</span>- </div>- </DropdownMenuItem>+ <Icon className={className} />+ <span className="capitalize">{name}</span>+ </DropdownMenuCheckboxItem>);- })- ) : (- <DropdownMenuItem isDisabled>No Secret Syncs Configured</DropdownMenuItem>+ })}++ {secretSyncs.length ? (+ <>+ <DropdownMenuLabel>Service</DropdownMenuLabel>+ {[...new Set(secretSyncs.map(({ destination }) => destination))].map(+ (destination) => {+ const { name, image } = SECRET_SYNC_MAP[destination];++ return (+ <DropdownMenuCheckboxItem+ key={destination}+ checked={filters.destinations.includes(destination)}+ onClick={(e) => {+ e.preventDefault();+ setFilters((prev) => ({+ ...prev,+ destinations: prev.destinations.includes(destination)+ ? prev.destinations.filter((a) => a !== destination)+ : [...prev.destinations, destination]+ }));+ }}+ >+ <img+ alt={`${name} integration`}+ src={`/images/integrations/${image}`}+ className="h-4 w-4"+ />+ <span>{name}</span>+ </DropdownMenuCheckboxItem>+ );+ }+ )}+ </>+ ) : null}<DropdownMenuLabel>Environment</DropdownMenuLabel>{currentProject.environments.map((env) => (- <DropdownMenuItem+ <DropdownMenuCheckboxItem+ key={env.id}+ checked={filters.environmentIds.includes(env.id)}onClick={(e) => {e.preventDefault();setFilters((prev) => ({@@ -369,114 +366,139 @@ export const SecretSyncsTable = ({ secretSyncs }: Props) => {: [...prev.environmentIds, env.id]}));}}- key={env.id}- icon={- filters.environmentIds.includes(env.id) && (- <FontAwesomeIcon className="text-primary" icon={faCheckCircle} />- )- }- iconPos="right"><span className="capitalize">{env.name}</span>- </DropdownMenuItem>+ </DropdownMenuCheckboxItem>))}</DropdownMenuContent></DropdownMenu></div>- <TableContainer className="mt-4">- <Table>- <THead>- <Tr>- <Th className="w-2" />- <Th className="w-1/4">- <div className="flex items-center">+ {showEmpty ? (+ <Empty className="border">+ <EmptyHeader>+ <EmptyMedia variant="icon">+ {isFiltered ? <SearchIcon /> : <RefreshCwIcon />}+ </EmptyMedia>+ <EmptyTitle>+ {isFiltered ? "No syncs match search" : "This project has no syncs configured"}+ </EmptyTitle>+ <EmptyDescription>+ {isFiltered ? "Adjust your search or filter criteria." : "Add a sync to get started."}+ </EmptyDescription>+ </EmptyHeader>+ </Empty>+ ) : (+ <>+ <Table>+ <TableHeader>+ <TableRow>+ <TableHead className="w-2" />+ <TableHead className="w-1/4" onClick={() => handleSort(SecretSyncsOrderBy.Name)}>Name- <IconButton- variant="plain"- className={getClassName(SecretSyncsOrderBy.Name)}- ariaLabel="sort"- onClick={() => handleSort(SecretSyncsOrderBy.Name)}- >- <FontAwesomeIcon icon={getColSortIcon(SecretSyncsOrderBy.Name)} />- </IconButton>- </div>- </Th>- <Th className="w-1/3">- <div className="flex items-center">+ <ChevronDownIcon+ className={twMerge(+ "transition-transform",+ orderDirection === OrderByDirection.DESC &&+ orderBy === SecretSyncsOrderBy.Name &&+ "rotate-180",+ orderBy !== SecretSyncsOrderBy.Name && "opacity-30"+ )}+ />+ </TableHead>+ <TableHead className="w-1/3" onClick={() => handleSort(SecretSyncsOrderBy.Source)}>Source- <IconButton- variant="plain"- className={getClassName(SecretSyncsOrderBy.Source)}- ariaLabel="sort"- onClick={() => handleSort(SecretSyncsOrderBy.Source)}- >- <FontAwesomeIcon icon={getColSortIcon(SecretSyncsOrderBy.Source)} />- </IconButton>- </div>- </Th>- <Th className="w-1/3">- <div className="flex items-center">+ <ChevronDownIcon+ className={twMerge(+ "transition-transform",+ orderDirection === OrderByDirection.DESC &&+ orderBy === SecretSyncsOrderBy.Source &&+ "rotate-180",+ orderBy !== SecretSyncsOrderBy.Source && "opacity-30"+ )}+ />+ </TableHead>+ <TableHead+ className="w-1/3"+ onClick={() => handleSort(SecretSyncsOrderBy.Destination)}+ >Destination- <IconButton- variant="plain"- className={getClassName(SecretSyncsOrderBy.Destination)}- ariaLabel="sort"- onClick={() => handleSort(SecretSyncsOrderBy.Destination)}- >- <FontAwesomeIcon icon={getColSortIcon(SecretSyncsOrderBy.Destination)} />- </IconButton>- </div>- </Th>- <Th className="min-w-42">- <div className="flex items-center">+ <ChevronDownIcon+ className={twMerge(+ "transition-transform",+ orderDirection === OrderByDirection.DESC &&+ orderBy === SecretSyncsOrderBy.Destination &&+ "rotate-180",+ orderBy !== SecretSyncsOrderBy.Destination && "opacity-30"+ )}+ />+ </TableHead>+ <TableHead+ className="min-w-42"+ onClick={() => handleSort(SecretSyncsOrderBy.Status)}+ >Status- <IconButton- variant="plain"- className={getClassName(SecretSyncsOrderBy.Status)}- ariaLabel="sort"- onClick={() => handleSort(SecretSyncsOrderBy.Status)}- >- <FontAwesomeIcon icon={getColSortIcon(SecretSyncsOrderBy.Status)} />- </IconButton>- </div>- </Th>- <Th className="w-5" />- </Tr>- </THead>- <TBody>- {filteredSecretSyncs.slice(offset, perPage * page).map((secretSync) => (- <SecretSyncRow- key={secretSync.id}- secretSync={secretSync}- onDelete={handleDelete}- onTriggerSyncSecrets={handleTriggerSync}- onTriggerImportSecrets={handleTriggerImportSecrets}- onTriggerRemoveSecrets={handleTriggerRemoveSecrets}- onToggleEnable={handleToggleEnableSync}- />- ))}- </TBody>- </Table>- {Boolean(filteredSecretSyncs.length) && (- <Pagination- count={filteredSecretSyncs.length}- page={page}- perPage={perPage}- onChangePage={setPage}- onChangePerPage={handlePerPageChange}- />- )}- {!filteredSecretSyncs?.length && (- <EmptyState- title={- secretSyncs.length- ? "No syncs match search..."- : "This project has no syncs configured"- }- icon={secretSyncs.length ? faSearch : faRotate}- />- )}- </TableContainer>+ <ChevronDownIcon+ className={twMerge(+ "transition-transform",+ orderDirection === OrderByDirection.DESC &&+ orderBy === SecretSyncsOrderBy.Status &&+ "rotate-180",+ orderBy !== SecretSyncsOrderBy.Status && "opacity-30"+ )}+ />+ </TableHead>+ <TableHead className="w-5" />+ </TableRow>+ </TableHeader>+ <TableBody>+ {isPending &&+ Array.from({ length: 10 }).map((_, i) => (+ <TableRow key={`skeleton-${i + 1}`}>+ <TableCell>+ <Skeleton className="h-4 w-7" />+ </TableCell>+ <TableCell>+ <Skeleton className="h-4 w-full" />+ </TableCell>+ <TableCell>+ <Skeleton className="h-4 w-full" />+ </TableCell>+ <TableCell>+ <Skeleton className="h-4 w-full" />+ </TableCell>+ <TableCell>+ <Skeleton className="h-4 w-full" />+ </TableCell>+ <TableCell>+ <Skeleton className="h-4 w-4" />+ </TableCell>+ </TableRow>+ ))}+ {!isPending &&+ visibleSyncs.map((secretSync) => (+ <SecretSyncRow+ key={secretSync.id}+ secretSync={secretSync}+ onDelete={handleDelete}+ onTriggerSyncSecrets={handleTriggerSync}+ onTriggerImportSecrets={handleTriggerImportSecrets}+ onTriggerRemoveSecrets={handleTriggerRemoveSecrets}+ onToggleEnable={handleToggleEnableSync}+ />+ ))}+ </TableBody>+ </Table>+ {Boolean(filteredSecretSyncs.length) && (+ <Pagination+ count={filteredSecretSyncs.length}+ page={page}+ perPage={perPage}+ onChangePage={setPage}+ onChangePerPage={handlePerPageChange}+ />+ )}+ </>+ )}<DeleteSecretSyncModalonOpenChange={(isOpen) => handlePopUpToggle("deleteSync", isOpen)}isOpen={popUp.deleteSync.isOpen}diff --git a/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncsTab.tsx b/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncsTab.tsxindex e584a73f7b..3ddde57367 100644--- a/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncsTab.tsx+++ b/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncsTab.tsx@@ -1,13 +1,20 @@import { useEffect, useState } from "react";-import { faPlus } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";import { useNavigate, useSearch } from "@tanstack/react-router";+import { PlusIcon } from "lucide-react";import { ProjectPermissionCan } from "@app/components/permissions";import { CreateSecretSyncModal } from "@app/components/secret-syncs";import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";-import { Button, Spinner } from "@app/components/v2";-import { DocumentationLinkBadge } from "@app/components/v3";+import {+ Button,+ Card,+ CardAction,+ CardContent,+ CardDescription,+ CardHeader,+ CardTitle,+ DocumentationLinkBadge+} from "@app/components/v3";import { ROUTE_PATHS } from "@app/const/routes";import { ProjectPermissionSub, useOrganization, useProject } from "@app/context";import { ProjectPermissionSecretSyncActions } from "@app/context/ProjectPermissionContext/types";@@ -83,45 +90,39 @@ export const SecretSyncsTab = () => {});- if (isSecretSyncsPending)- return (- <div className="flex h-[60vh] flex-col items-center justify-center gap-2">- <Spinner />- </div>- );-return (<>- <div className="w-full rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">- <div className="mb-4 flex flex-wrap items-center justify-between gap-2">- <div>- <div className="flex items-center gap-1.5">- <p className="text-lg font-medium text-mineshaft-100">Secret Syncs</p>- <DocumentationLinkBadge href="https://infisical.com/docs/integrations/secret-syncs/overview" />- </div>- <p className="text-sm text-bunker-300">- Use App Connections to sync secrets to third-party services.- </p>- </div>- <ProjectPermissionCan- I={ProjectPermissionSecretSyncActions.Create}- a={ProjectPermissionSub.SecretSyncs}- >- {(isAllowed) => (- <Button- colorSchema="secondary"- type="submit"- leftIcon={<FontAwesomeIcon icon={faPlus} />}- onClick={() => handlePopUpOpen("addSync")}- isDisabled={!isAllowed}- >- Add Sync- </Button>- )}- </ProjectPermissionCan>- </div>- <SecretSyncsTable secretSyncs={secretSyncs} />- </div>+ <Card>+ <CardHeader>+ <CardTitle>+ Secret Syncs+ <DocumentationLinkBadge href="https://infisical.com/docs/integrations/secret-syncs/overview" />+ </CardTitle>+ <CardDescription>+ Use App Connections to sync secrets to third-party services.+ </CardDescription>+ <CardAction>+ <ProjectPermissionCan+ I={ProjectPermissionSecretSyncActions.Create}+ a={ProjectPermissionSub.SecretSyncs}+ >+ {(isAllowed) => (+ <Button+ variant="project"+ onClick={() => handlePopUpOpen("addSync")}+ isDisabled={!isAllowed}+ >+ <PlusIcon />+ Add Sync+ </Button>+ )}+ </ProjectPermissionCan>+ </CardAction>+ </CardHeader>+ <CardContent>+ <SecretSyncsTable secretSyncs={secretSyncs} isPending={isSecretSyncsPending} />+ </CardContent>+ </Card><CreateSecretSyncModalselectSync={popUp.addSync.data}isOpen={popUp.addSync.isOpen}diff --git a/frontend/src/pages/secret-manager/OverviewPage/components/SecretDropzone/ImportSecretsModal.tsx b/frontend/src/pages/secret-manager/OverviewPage/components/SecretDropzone/ImportSecretsModal.tsxindex 270187d35a..fc78ed5bb0 100644--- a/frontend/src/pages/secret-manager/OverviewPage/components/SecretDropzone/ImportSecretsModal.tsx+++ b/frontend/src/pages/secret-manager/OverviewPage/components/SecretDropzone/ImportSecretsModal.tsx@@ -690,8 +690,8 @@ const ImportSecretsContent = ({</Tooltip></FieldLabel><Switch+ variant="project"checked={shouldOverwrite}- variant="danger"onCheckedChange={setShouldOverwrite}/></Field>diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/SecretSyncDetailsByIDPage.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/SecretSyncDetailsByIDPage.tsxindex 3c7742de2a..651a6d28d1 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/SecretSyncDetailsByIDPage.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/SecretSyncDetailsByIDPage.tsx@@ -1,18 +1,32 @@import { Helmet } from "react-helmet";-import { faBan, faChevronLeft } from "@fortawesome/free-solid-svg-icons";+import { faChevronLeft } from "@fortawesome/free-solid-svg-icons";import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";-import { useNavigate, useParams } from "@tanstack/react-router";+import { Link, useParams } from "@tanstack/react-router";+import { BanIcon, PencilIcon } from "lucide-react";import { ProjectPermissionCan } from "@app/components/permissions";import { EditSecretSyncModal } from "@app/components/secret-syncs";-import { SecretSyncEditFields } from "@app/components/secret-syncs/types";-import { Button, ContentLoader, EmptyState } from "@app/components/v2";+import { ContentLoader } from "@app/components/v2";+import {+ Card,+ CardAction,+ CardContent,+ CardHeader,+ CardTitle,+ DetailGroup,+ Empty,+ EmptyHeader,+ EmptyMedia,+ EmptyTitle,+ IconButton+} from "@app/components/v3";import { ROUTE_PATHS } from "@app/const/routes";import { ProjectPermissionSub } from "@app/context";import { ProjectPermissionSecretSyncActions } from "@app/context/ProjectPermissionContext/types";import { SECRET_SYNC_MAP } from "@app/helpers/secretSyncs";import { usePopUp } from "@app/hooks";import { SecretSync, useGetSecretSync } from "@app/hooks/api/secretSyncs";+import { getSecretSyncPermissionSubject } from "@app/lib/fn/permission";import { IntegrationsListPageTabs } from "@app/types/integrations";import {@@ -25,7 +39,6 @@ import {} from "./components";const PageContent = () => {- const navigate = useNavigate();const { destination, syncId, projectId, orgId } = useParams({from: ROUTE_PATHS.SecretManager.SecretSyncDetailsByIDPage.id,select: (params) => ({@@ -51,71 +64,86 @@ const PageContent = () => {if (!secretSync) {return (<div className="flex h-full w-full items-center justify-center px-20">- <EmptyState- className="max-w-2xl rounded-md text-center"- icon={faBan}- title={`Could not find ${SECRET_SYNC_MAP[destination].name ?? "Secret"} Sync with ID ${syncId}`}- />+ <Empty className="max-w-2xl">+ <EmptyHeader>+ <EmptyMedia variant="icon">+ <BanIcon />+ </EmptyMedia>+ <EmptyTitle>+ Could not find {SECRET_SYNC_MAP[destination].name ?? "Secret"} Sync with ID {syncId}+ </EmptyTitle>+ </EmptyHeader>+ </Empty></div>);}const destinationDetails = SECRET_SYNC_MAP[secretSync.destination];- const handleEditDetails = () => handlePopUpOpen("editSync", SecretSyncEditFields.Details);-- const handleEditSource = () => handlePopUpOpen("editSync", SecretSyncEditFields.Source);-- const handleEditOptions = () => handlePopUpOpen("editSync", SecretSyncEditFields.Options);-- const handleEditDestination = () => handlePopUpOpen("editSync", SecretSyncEditFields.Destination);+ const handleEdit = () => handlePopUpOpen("editSync");return (<><div className="container mx-auto flex flex-col justify-between bg-bunker-800 font-inter text-white"><div className="mx-auto mb-6 w-full max-w-8xl">- <Button- variant="link"- type="submit"- leftIcon={<FontAwesomeIcon icon={faChevronLeft} />}- onClick={() => {- navigate({- to: ROUTE_PATHS.SecretManager.IntegrationsListPage.path,- params: {- orgId,- projectId- },- search: {- selectedTab: IntegrationsListPageTabs.SecretSyncs- }- });- }}+ <Link+ to={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">+ <FontAwesomeIcon icon={faChevronLeft} />Secret Syncs- </Button>+ </Link><div className="mb-6 flex w-full items-center gap-3"><imgalt={`${destinationDetails.name} sync`}src={`/images/integrations/${destinationDetails.image}`}- className="mt-3 ml-1 w-16"+ className="mt-1.5 ml-1 w-12"/><div className="min-w-0">- <p className="truncate text-3xl font-medium text-white">{secretSync.name}</p>- <p className="leading-3 text-bunker-300">{destinationDetails.name} Sync</p>+ <p className="truncate text-2xl font-medium text-white">{secretSync.name}</p>+ <p className="mt-1 leading-3 text-accent">+ {secretSync.description || `${destinationDetails.name} Sync`}+ </p></div>- <SecretSyncActionTriggers secretSync={secretSync} />+ <SecretSyncActionTriggers secretSync={secretSync} onEdit={handleEdit} /></div><div className="flex justify-center">- <div className="mr-4 flex w-72 flex-col gap-4">- <SecretSyncDetailsSection secretSync={secretSync} onEditDetails={handleEditDetails} />- <SecretSyncSourceSection secretSync={secretSync} onEditSource={handleEditSource} />- <SecretSyncOptionsSection secretSync={secretSync} onEditOptions={handleEditOptions} />+ <div className="mr-4 w-96">+ <Card>+ <CardHeader className="border-b">+ <CardTitle>Details</CardTitle>+ <CardAction>+ <ProjectPermissionCan+ I={ProjectPermissionSecretSyncActions.Edit}+ a={getSecretSyncPermissionSubject(secretSync)}+ >+ {(isAllowed) => (+ <IconButton+ variant="ghost-muted"+ size="xs"+ isDisabled={!isAllowed}+ aria-label="Edit sync details"+ onClick={handleEdit}+ >+ <PencilIcon />+ </IconButton>+ )}+ </ProjectPermissionCan>+ </CardAction>+ </CardHeader>+ <CardContent>+ <DetailGroup>+ <SecretSyncDetailsSection secretSync={secretSync} />+ <SecretSyncSourceSection secretSync={secretSync} />+ <SecretSyncDestinationSection secretSync={secretSync} />+ </DetailGroup>+ <SecretSyncOptionsSection secretSync={secretSync} />+ </CardContent>+ </Card></div><div className="flex flex-1 flex-col gap-4">- <SecretSyncDestinationSection- secretSync={secretSync}- onEditDestination={handleEditDestination}- /><SecretSyncAuditLogsSection secretSync={secretSync} /></div></div>@@ -124,7 +152,6 @@ const PageContent = () => {<EditSecretSyncModalisOpen={popUp.editSync.isOpen}onOpenChange={(isOpen) => handlePopUpToggle("editSync", isOpen)}- fields={popUp.editSync.data}secretSync={secretSync}/></>diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/AzureEntraIdScimSyncSourceSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/AzureEntraIdScimSyncSourceSection.tsxindex d809bdb210..45085f1821 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/AzureEntraIdScimSyncSourceSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/AzureEntraIdScimSyncSourceSection.tsx@@ -1,24 +1,26 @@-import { faEdit } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";import { AlertTriangleIcon } from "lucide-react";-import { ProjectPermissionCan } from "@app/components/permissions";-import { GenericFieldLabel } from "@app/components/secret-syncs";-import { IconButton, Tooltip } from "@app/components/v2";-import { Badge } from "@app/components/v3";+import {+ Badge,+ Detail,+ DetailGroup,+ DetailGroupHeader,+ DetailLabel,+ DetailValue,+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import { useProject } from "@app/context";-import { ProjectPermissionSecretSyncActions } from "@app/context/ProjectPermissionContext/types";import { useGetProjectSecrets } from "@app/hooks/api/secrets/queries";import { TSecretSync } from "@app/hooks/api/secretSyncs";import { TAzureEntraIdScimSync } from "@app/hooks/api/secretSyncs/types/azure-entra-id-scim-sync";-import { getSecretSyncPermissionSubject } from "@app/lib/fn/permission";type Props = {secretSync: TSecretSync;- onEditSource: VoidFunction;};-export const AzureEntraIdScimSyncSourceSection = ({ secretSync, onEditSource }: Props) => {+export const AzureEntraIdScimSyncSourceSection = ({ secretSync }: Props) => {const { folder, environment } = secretSync;const { currentProject } = useProject();@@ -37,47 +39,43 @@ export const AzureEntraIdScimSyncSourceSection = ({ secretSync, onEditSource }:const secretName = secretId ? secrets?.find((s) => s.id === secretId)?.key : undefined;- const permissionSubject = getSecretSyncPermissionSubject(secretSync);-return (- <div>- <div className="flex w-full flex-col gap-3 rounded-lg border border-mineshaft-600 bg-mineshaft-900 px-4 py-3">- <div className="flex items-center justify-between border-b border-mineshaft-400 pb-2">- <h3 className="font-medium text-mineshaft-100">Source</h3>- <div>- {(!folder || !environment) && (- <Tooltip content="The source location for this sync has been deleted. Configure a new source or remove this sync.">- <div className="mr-1 inline-block w-min">+ <DetailGroup>+ <DetailGroupHeader>+ Source+ {(!folder || !environment) && (+ <div className="ml-auto">+ <Tooltip>+ <TooltipTrigger asChild>+ <span className="inline-block"><Badge variant="danger"><AlertTriangleIcon />Folder Deleted</Badge>- </div>- </Tooltip>- )}- <ProjectPermissionCan I={ProjectPermissionSecretSyncActions.Edit} a={permissionSubject}>- {(isAllowed) => (- <IconButton- variant="plain"- colorSchema="secondary"- isDisabled={!isAllowed}- ariaLabel="Edit sync source"- onClick={onEditSource}- >- <FontAwesomeIcon icon={faEdit} />- </IconButton>- )}- </ProjectPermissionCan>- </div>- </div>- <div>- <div className="space-y-3">- <GenericFieldLabel label="Environment">{environment?.name}</GenericFieldLabel>- <GenericFieldLabel label="Path">{folder?.path}</GenericFieldLabel>- {secretName && <GenericFieldLabel label="Secret">{secretName}</GenericFieldLabel>}+ </span>+ </TooltipTrigger>+ <TooltipContent>+ The source location for this sync has been deleted. Configure a new source or remove+ this sync.+ </TooltipContent>+ </Tooltip></div>- </div>- </div>- </div>+ )}+ </DetailGroupHeader>+ <Detail>+ <DetailLabel>Environment</DetailLabel>+ <DetailValue>{environment?.name}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Path</DetailLabel>+ <DetailValue>{folder?.path}</DetailValue>+ </Detail>+ {secretName && (+ <Detail>+ <DetailLabel>Secret</DetailLabel>+ <DetailValue>{secretName}</DetailValue>+ </Detail>+ )}+ </DetailGroup>);};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncActionTriggers.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncActionTriggers.tsxindex 4a75e040e0..2c9a8a885e 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncActionTriggers.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncActionTriggers.tsx@@ -1,19 +1,18 @@import { useCallback } from "react";-import {- faCheck,- faCopy,- faDownload,- faEllipsisV,- faEraser,- faInfoCircle,- faRotate,- faToggleOff,- faToggleOn,- faTrash-} from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";import { useNavigate } from "@tanstack/react-router";-import { BanIcon, RefreshCwIcon } from "lucide-react";+import {+ CheckIcon,+ CopyIcon,+ DownloadIcon,+ EllipsisIcon,+ EraserIcon,+ InfoIcon,+ PencilIcon,+ RefreshCwIcon,+ ToggleLeftIcon,+ ToggleRightIcon,+ Trash2Icon+} from "lucide-react";import { createNotification } from "@app/components/notifications";import { ProjectPermissionCan } from "@app/components/permissions";@@ -30,10 +29,10 @@ import {DropdownMenuContent,DropdownMenuItem,DropdownMenuTrigger,- IconButton,- Tooltip-} from "@app/components/v2";-import { Badge } from "@app/components/v3";+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import { ROUTE_PATHS } from "@app/const/routes";import { useOrganization } from "@app/context";import { ProjectPermissionSecretSyncActions } from "@app/context/ProjectPermissionContext/types";@@ -50,9 +49,10 @@ import { IntegrationsListPageTabs } from "@app/types/integrations";type Props = {secretSync: TSecretSync;+ onEdit: () => void;};-export const SecretSyncActionTriggers = ({ secretSync }: Props) => {+export const SecretSyncActionTriggers = ({ secretSync, onEdit }: Props) => {const { popUp, handlePopUpOpen, handlePopUpToggle } = usePopUp(["importSecrets","removeSecrets",@@ -123,152 +123,119 @@ export const SecretSyncActionTriggers = ({ secretSync }: Props) => {<div className="mt-4 ml-auto flex shrink-0 flex-wrap items-center justify-end gap-2"><SecretSyncImportStatusBadge secretSync={secretSync} /><SecretSyncRemoveStatusBadge secretSync={secretSync} />- {secretSync.isAutoSyncEnabled ? (- <Badge variant="info">- <RefreshCwIcon />- Auto-Sync Enabled- </Badge>- ) : (- <Tooltip- className="text-xs"- content="Auto-Sync is disabled. Changes to the source location will not be automatically synced to the destination."- >- <Badge variant="neutral">- <BanIcon />- Auto-Sync Disabled- </Badge>- </Tooltip>- )}- <div>- <ProjectPermissionCan- I={ProjectPermissionSecretSyncActions.SyncSecrets}- a={permissionSubject}- >- {(isAllowed: boolean) => (- <Button- variant="outline_bg"- leftIcon={<FontAwesomeIcon icon={faRotate} />}- onClick={handleTriggerSync}- className="h-9 rounded-r-none bg-mineshaft-500"- isDisabled={!isAllowed}- >- Trigger Sync- </Button>- )}- </ProjectPermissionCan>- <DropdownMenu>- <DropdownMenuTrigger asChild>- <IconButton- ariaLabel="add-folder-or-import"- variant="outline_bg"- className="h-9 w-10 rounded-l-none border-l-2 border-mineshaft border-l-mineshaft-700 bg-mineshaft-500"- >- <FontAwesomeIcon icon={faEllipsisV} />- </IconButton>- </DropdownMenuTrigger>- <DropdownMenuContent align="end">- <DropdownMenuItem- icon={<FontAwesomeIcon icon={isIdCopied ? faCheck : faCopy} />}- onClick={(e) => {- e.stopPropagation();- handleCopyId();- }}- >- Copy Sync ID- </DropdownMenuItem>- {syncOption?.canImportSecrets && (- <ProjectPermissionCan- I={ProjectPermissionSecretSyncActions.ImportSecrets}- a={permissionSubject}- >- {(isAllowed: boolean) => (- <DropdownMenuItem- icon={<FontAwesomeIcon icon={faDownload} />}- onClick={() => handlePopUpOpen("importSecrets")}- isDisabled={!isAllowed}- >- <Tooltip- position="left"- sideOffset={42}- content={`Import secrets from this ${destinationName} destination into Infisical.`}- >- <div className="flex h-full w-full items-center justify-between gap-1">- <span>Import Secrets</span>- <FontAwesomeIcon- className="text-bunker-300"- size="sm"- icon={faInfoCircle}- />- </div>- </Tooltip>- </DropdownMenuItem>- )}- </ProjectPermissionCan>+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <Button variant="outline">+ Options+ <EllipsisIcon />+ </Button>+ </DropdownMenuTrigger>+ <DropdownMenuContent align="end">+ <ProjectPermissionCan I={ProjectPermissionSecretSyncActions.Edit} a={permissionSubject}>+ {(isAllowed: boolean) => (+ <DropdownMenuItem onClick={onEdit} isDisabled={!isAllowed}>+ <PencilIcon />+ Edit Sync+ </DropdownMenuItem>)}- {syncOption?.canRemoveSecretsOnDeletion && (- <ProjectPermissionCan- I={ProjectPermissionSecretSyncActions.RemoveSecrets}- a={permissionSubject}- >- {(isAllowed: boolean) => (- <DropdownMenuItem- icon={<FontAwesomeIcon icon={faEraser} />}- onClick={() => handlePopUpOpen("removeSecrets")}- isDisabled={!isAllowed}- >- <Tooltip- position="left"- sideOffset={42}- content={`Remove secrets synced by Infisical from this ${destinationName} destination.`}- >- <div className="flex h-full w-full items-center justify-between gap-1">- <span>Remove Secrets</span>- <FontAwesomeIcon- className="text-bunker-300"- size="sm"- icon={faInfoCircle}- />- </div>- </Tooltip>- </DropdownMenuItem>- )}- </ProjectPermissionCan>+ </ProjectPermissionCan>+ <ProjectPermissionCan+ I={ProjectPermissionSecretSyncActions.SyncSecrets}+ a={permissionSubject}+ >+ {(isAllowed: boolean) => (+ <DropdownMenuItem onClick={handleTriggerSync} isDisabled={!isAllowed}>+ <RefreshCwIcon />+ Trigger Sync+ </DropdownMenuItem>)}+ </ProjectPermissionCan>+ <DropdownMenuItem+ onClick={(e) => {+ e.stopPropagation();+ handleCopyId();+ }}+ >+ {isIdCopied ? <CheckIcon /> : <CopyIcon />}+ Copy Sync ID+ </DropdownMenuItem>+ {syncOption?.canImportSecrets && (<ProjectPermissionCan- I={ProjectPermissionSecretSyncActions.Edit}+ I={ProjectPermissionSecretSyncActions.ImportSecrets}a={permissionSubject}>{(isAllowed: boolean) => (<DropdownMenuItem+ onClick={() => handlePopUpOpen("importSecrets")}isDisabled={!isAllowed}- icon={- <FontAwesomeIcon- icon={secretSync.isAutoSyncEnabled ? faToggleOff : faToggleOn}- />- }- onClick={handleToggleEnableSync}>- {secretSync.isAutoSyncEnabled ? "Disable" : "Enable"} Auto-Sync+ <DownloadIcon />+ <Tooltip>+ <TooltipTrigger asChild>+ <div className="flex h-full w-full items-center justify-between gap-1">+ <span>Import Secrets</span>+ <InfoIcon className="text-muted" />+ </div>+ </TooltipTrigger>+ <TooltipContent side="left" sideOffset={42}>+ Import secrets from this {destinationName} destination into Infisical.+ </TooltipContent>+ </Tooltip></DropdownMenuItem>)}</ProjectPermissionCan>+ )}+ {syncOption?.canRemoveSecretsOnDeletion && (<ProjectPermissionCan- I={ProjectPermissionSecretSyncActions.Delete}+ I={ProjectPermissionSecretSyncActions.RemoveSecrets}a={permissionSubject}>{(isAllowed: boolean) => (<DropdownMenuItem+ onClick={() => handlePopUpOpen("removeSecrets")}isDisabled={!isAllowed}- icon={<FontAwesomeIcon icon={faTrash} />}- onClick={() => handlePopUpOpen("deleteSync")}>- Delete Sync+ <EraserIcon />+ <Tooltip>+ <TooltipTrigger asChild>+ <div className="flex h-full w-full items-center justify-between gap-1">+ <span>Remove Secrets</span>+ <InfoIcon className="text-muted" />+ </div>+ </TooltipTrigger>+ <TooltipContent side="left" sideOffset={42}>+ Remove secrets synced by Infisical from this {destinationName} destination.+ </TooltipContent>+ </Tooltip></DropdownMenuItem>)}</ProjectPermissionCan>- </DropdownMenuContent>- </DropdownMenu>- </div>+ )}+ <ProjectPermissionCan I={ProjectPermissionSecretSyncActions.Edit} a={permissionSubject}>+ {(isAllowed: boolean) => (+ <DropdownMenuItem isDisabled={!isAllowed} onClick={handleToggleEnableSync}>+ {secretSync.isAutoSyncEnabled ? <ToggleLeftIcon /> : <ToggleRightIcon />}+ {secretSync.isAutoSyncEnabled ? "Disable" : "Enable"} Auto-Sync+ </DropdownMenuItem>+ )}+ </ProjectPermissionCan>+ <ProjectPermissionCan+ I={ProjectPermissionSecretSyncActions.Delete}+ a={permissionSubject}+ >+ {(isAllowed: boolean) => (+ <DropdownMenuItem+ isDisabled={!isAllowed}+ onClick={() => handlePopUpOpen("deleteSync")}+ variant="danger"+ >+ <Trash2Icon />+ Delete Sync+ </DropdownMenuItem>+ )}+ </ProjectPermissionCan>+ </DropdownMenuContent>+ </DropdownMenu></div><SecretSyncImportSecretsModalonOpenChange={(isOpen) => handlePopUpToggle("importSecrets", isOpen)}diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncAuditLogsSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncAuditLogsSection.tsxindex 70393e97fe..02ce9986cd 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncAuditLogsSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncAuditLogsSection.tsx@@ -1,10 +1,23 @@-import { faFingerprint } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";import { Link } from "@tanstack/react-router";+import { FingerprintIcon, RefreshCwIcon } from "lucide-react";+import { createNotification } from "@app/components/notifications";+import { ProjectPermissionCan } from "@app/components/permissions";+import {+ Button,+ Card,+ CardAction,+ CardContent,+ CardDescription,+ CardHeader,+ CardTitle+} from "@app/components/v3";import { useOrganization, useProject, useSubscription } from "@app/context";+import { ProjectPermissionSecretSyncActions } from "@app/context/ProjectPermissionContext/types";+import { SECRET_SYNC_MAP } from "@app/helpers/secretSyncs";import { EventType } from "@app/hooks/api/auditLogs/enums";-import { TSecretSync } from "@app/hooks/api/secretSyncs";+import { TSecretSync, useTriggerSecretSyncSyncSecrets } from "@app/hooks/api/secretSyncs";+import { getSecretSyncPermissionSubject } from "@app/lib/fn/permission";import { LogsSection } from "@app/pages/organization/AuditLogsPage/components/LogsSection";const INTEGRATION_EVENTS = [@@ -22,70 +35,107 @@ export const SecretSyncAuditLogsSection = ({ secretSync }: Props) => {const { currentOrg } = useOrganization();const { currentProject } = useProject();+ const triggerSyncSecrets = useTriggerSecretSyncSyncSecrets();+ const destinationName = SECRET_SYNC_MAP[secretSync.destination].name;+ const permissionSubject = getSecretSyncPermissionSubject(secretSync);+const auditLogsRetentionDays = subscription?.auditLogsRetentionDays ?? 30;+ const handleTriggerSync = async () => {+ await triggerSyncSecrets.mutateAsync({+ syncId: secretSync.id,+ destination: secretSync.destination,+ projectId: secretSync.projectId+ });++ createNotification({+ text: `Successfully triggered ${destinationName} Sync`,+ type: "success"+ });+ };+return (- <div className="flex max-h-full w-full flex-col gap-3 rounded-lg border border-mineshaft-600 bg-mineshaft-900 px-4 py-3">- <div className="flex items-center justify-between border-b border-mineshaft-400 pb-2">- <h3 className="font-medium text-mineshaft-100">Sync Logs</h3>+ <Card className="max-h-full">+ <CardHeader className="border-b">+ <CardTitle>Sync Logs</CardTitle>{subscription.auditLogs && (- <p className="text-xs text-bunker-300">+ <CardDescription>Displaying audit logs from the last {Math.min(auditLogsRetentionDays, 60)} days- </p>+ </CardDescription>)}- </div>- {subscription.auditLogs ? (- <LogsSection- refetchInterval={15_000}- showFilters={false}- project={currentProject}- presets={{- eventMetadata: { syncId: secretSync.id },- startDate: new Date(- new Date().setDate(new Date().getDate() - Math.min(auditLogsRetentionDays, 60))- ),- eventType: INTEGRATION_EVENTS- }}- />- ) : (- <div className="flex h-full items-center justify-center rounded-lg bg-mineshaft-800 text-sm text-mineshaft-200">- <div className="flex flex-col items-center gap-4 py-20">- <FontAwesomeIcon size="2x" icon={faFingerprint} />- <p>- Please{" "}- {subscription && subscription.slug !== null ? (- <Link- to="/organizations/$orgId/billing"- params={{ orgId: currentOrg.id }}- target="_blank"- rel="noopener noreferrer"- >- <a- className="cursor-pointer underline transition-all hover:text-white"+ <CardAction>+ <ProjectPermissionCan+ I={ProjectPermissionSecretSyncActions.SyncSecrets}+ a={permissionSubject}+ >+ {(isAllowed: boolean) => (+ <Button+ variant="outline"+ onClick={handleTriggerSync}+ isDisabled={!isAllowed}+ isPending={triggerSyncSecrets.isPending}+ >+ <RefreshCwIcon />+ Trigger Sync+ </Button>+ )}+ </ProjectPermissionCan>+ </CardAction>+ </CardHeader>+ <CardContent>+ {subscription.auditLogs ? (+ <LogsSection+ refetchInterval={15_000}+ showFilters={false}+ project={currentProject}+ presets={{+ eventMetadata: { syncId: secretSync.id },+ startDate: new Date(+ new Date().setDate(new Date().getDate() - Math.min(auditLogsRetentionDays, 60))+ ),+ eventType: INTEGRATION_EVENTS+ }}+ />+ ) : (+ <div className="flex h-full items-center justify-center rounded-lg bg-mineshaft-800 text-sm text-mineshaft-200">+ <div className="flex flex-col items-center gap-4 py-20">+ <FingerprintIcon className="size-8" />+ <p>+ Please{" "}+ {subscription && subscription.slug !== null ? (+ <Link+ to="/organizations/$orgId/billing"+ params={{ orgId: currentOrg.id }}target="_blank"+ rel="noopener noreferrer">- upgrade your subscription- </a>- </Link>- ) : (- <a- href="https://infisical.com/scheduledemo"- target="_blank"- rel="noopener noreferrer"- >+ <a+ className="cursor-pointer underline transition-all hover:text-white"+ target="_blank"+ >+ upgrade your subscription+ </a>+ </Link>+ ) : (<a- className="cursor-pointer underline transition-all hover:text-white"+ href="https://infisical.com/scheduledemo"target="_blank"+ rel="noopener noreferrer">- upgrade your subscription+ <a+ className="cursor-pointer underline transition-all hover:text-white"+ target="_blank"+ >+ upgrade your subscription+ </a></a>- </a>- )}{" "}- to view sync logs.- </p>+ )}{" "}+ to view sync logs.+ </p>+ </div></div>- </div>- )}- </div>+ )}+ </CardContent>+ </Card>);};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/1PasswordSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/1PasswordSyncDestinationSection.tsxindex b83e525961..0383d360ad 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/1PasswordSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/1PasswordSyncDestinationSection.tsx@@ -1,4 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { TOnePassSync } from "@app/hooks/api/secretSyncs/types/1password-sync";type Props = {@@ -12,8 +12,14 @@ export const OnePassSyncDestinationSection = ({ secretSync }: Props) => {return (<>- <GenericFieldLabel label="Vault ID">{vaultId}</GenericFieldLabel>- <GenericFieldLabel label="Value Key">{valueLabel || "value"}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Vault ID</DetailLabel>+ <DetailValue>{vaultId}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Value Key</DetailLabel>+ <DetailValue>{valueLabel || "value"}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/AwsParameterStoreSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/AwsParameterStoreSyncDestinationSection.tsxindex ccd7ba7957..038c4a87c2 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/AwsParameterStoreSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/AwsParameterStoreSyncDestinationSection.tsx@@ -1,5 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";-import { Badge } from "@app/components/v3";+import { Badge, Detail, DetailLabel, DetailValue } from "@app/components/v3";import { AWS_REGIONS } from "@app/helpers/appConnections";import { TAwsParameterStoreSync } from "@app/hooks/api/secretSyncs/types/aws-parameter-store-sync";@@ -16,13 +15,19 @@ export const AwsParameterStoreSyncDestinationSection = ({ secretSync }: Props) =return (<>- <GenericFieldLabel label="Region">- {awsRegion?.name}- <Badge className="ml-1" variant="neutral">- {awsRegion?.slug}- </Badge>- </GenericFieldLabel>- <GenericFieldLabel label="Path">{path}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Region</DetailLabel>+ <DetailValue>+ {awsRegion?.name}+ <Badge className="ml-1" variant="neutral">+ {awsRegion?.slug}+ </Badge>+ </DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Path</DetailLabel>+ <DetailValue>{path}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/AwsSecretsManagerSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/AwsSecretsManagerSyncDestinationSection.tsxindex 48bac5186d..43bec15cfe 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/AwsSecretsManagerSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/AwsSecretsManagerSyncDestinationSection.tsx@@ -1,5 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";-import { Badge } from "@app/components/v3";+import { Badge, Detail, DetailLabel, DetailValue } from "@app/components/v3";import { AWS_REGIONS } from "@app/helpers/appConnections";import {AwsSecretsManagerSyncMappingBehavior,@@ -17,17 +16,24 @@ export const AwsSecretsManagerSyncDestinationSection = ({ secretSync }: Props) =return (<>- <GenericFieldLabel label="Region">- {awsRegion?.name}- <Badge className="ml-1" variant="neutral">- {awsRegion?.slug}- </Badge>- </GenericFieldLabel>- <GenericFieldLabel label="Mapping Behavior" className="capitalize">- {destinationConfig.mappingBehavior}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Region</DetailLabel>+ <DetailValue>+ {awsRegion?.name}+ <Badge className="ml-1" variant="neutral">+ {awsRegion?.slug}+ </Badge>+ </DetailValue>+ </Detail>+ <Detail className="capitalize">+ <DetailLabel>Mapping Behavior</DetailLabel>+ <DetailValue>{destinationConfig.mappingBehavior}</DetailValue>+ </Detail>{destinationConfig.mappingBehavior === AwsSecretsManagerSyncMappingBehavior.ManyToOne && (- <GenericFieldLabel label="Secret Name">{destinationConfig.secretName}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Secret Name</DetailLabel>+ <DetailValue>{destinationConfig.secretName}</DetailValue>+ </Detail>)}</>);diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/AzureAppConfigurationSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/AzureAppConfigurationSyncDestinationSection.tsxindex a46ff66cde..cab4c5b9e2 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/AzureAppConfigurationSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/AzureAppConfigurationSyncDestinationSection.tsx@@ -1,4 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { TAzureAppConfigurationSync } from "@app/hooks/api/secretSyncs/types/azure-app-configuration-sync";type Props = {@@ -12,8 +12,14 @@ export const AzureAppConfigurationSyncDestinationSection = ({ secretSync }: Propreturn (<>- <GenericFieldLabel label="Configuration URL">{configurationUrl}</GenericFieldLabel>- <GenericFieldLabel label="Label">{label}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Configuration URL</DetailLabel>+ <DetailValue>{configurationUrl}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Label</DetailLabel>+ <DetailValue>{label}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/AzureDevOpsSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/AzureDevOpsSyncDestinationSection.tsxindex 5aead5869d..4ab803bac3 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/AzureDevOpsSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/AzureDevOpsSyncDestinationSection.tsx@@ -1,4 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { TAzureDevOpsSync } from "@app/hooks/api/secretSyncs/types/azure-devops-sync";type Props = {@@ -11,8 +11,9 @@ export const AzureDevOpsSyncDestinationSection = ({ secretSync }: Props) => {} = secretSync;return (- <GenericFieldLabel label={devopsProjectName ? "Project" : "Project ID"}>- {devopsProjectName || devopsProjectId}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>{devopsProjectName ? "Project" : "Project ID"}</DetailLabel>+ <DetailValue>{devopsProjectName || devopsProjectId}</DetailValue>+ </Detail>);};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/AzureEntraIdScimSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/AzureEntraIdScimSyncDestinationSection.tsxindex 7e9c44f44f..c7144f0d56 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/AzureEntraIdScimSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/AzureEntraIdScimSyncDestinationSection.tsx@@ -1,4 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { TAzureEntraIdScimSync } from "@app/hooks/api/secretSyncs/types/azure-entra-id-scim-sync";type Props = {@@ -11,8 +11,9 @@ export const AzureEntraIdScimSyncDestinationSection = ({ secretSync }: Props) =>} = secretSync;return (- <GenericFieldLabel label="SCIM Service Principal">- {servicePrincipalDisplayName || servicePrincipalId}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>SCIM Service Principal</DetailLabel>+ <DetailValue>{servicePrincipalDisplayName || servicePrincipalId}</DetailValue>+ </Detail>);};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/AzureKeyVaultSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/AzureKeyVaultSyncDestinationSection.tsxindex 6df27c16bd..241e299b82 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/AzureKeyVaultSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/AzureKeyVaultSyncDestinationSection.tsx@@ -1,4 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { TAzureKeyVaultSync } from "@app/hooks/api/secretSyncs/types/azure-key-vault-sync";type Props = {@@ -10,5 +10,10 @@ export const AzureKeyVaultSyncDestinationSection = ({ secretSync }: Props) => {destinationConfig: { vaultBaseUrl }} = secretSync;- return <GenericFieldLabel label="Vault URL">{vaultBaseUrl}</GenericFieldLabel>;+ return (+ <Detail>+ <DetailLabel>Vault URL</DetailLabel>+ <DetailValue>{vaultBaseUrl}</DetailValue>+ </Detail>+ );};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/BitbucketSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/BitbucketSyncDestinationSection.tsxindex 04999b9697..6a2737e6f0 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/BitbucketSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/BitbucketSyncDestinationSection.tsx@@ -1,4 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { TBitbucketSync } from "@app/hooks/api/secretSyncs/types/bitbucket-sync";type Props = {@@ -12,10 +12,19 @@ export const BitbucketSyncDestinationSection = ({ secretSync }: Props) => {return (<>- <GenericFieldLabel label="Workspace">{workspaceSlug}</GenericFieldLabel>- <GenericFieldLabel label="Repository">{repositorySlug}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Workspace</DetailLabel>+ <DetailValue>{workspaceSlug}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Repository</DetailLabel>+ <DetailValue>{repositorySlug}</DetailValue>+ </Detail>{environmentId && (- <GenericFieldLabel label="Deployment Environment">{environmentId}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Deployment Environment</DetailLabel>+ <DetailValue>{environmentId}</DetailValue>+ </Detail>)}</>);diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/CamundaSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/CamundaSyncDestinationSection.tsxindex 078fe58a4b..f74f45e3fa 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/CamundaSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/CamundaSyncDestinationSection.tsx@@ -1,4 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { useCamundaConnectionListClusters } from "@app/hooks/api/appConnections/camunda";import { TCamundaSync } from "@app/hooks/api/secretSyncs/types/camunda-sync";@@ -13,9 +13,19 @@ export const CamundaSyncDestinationSection = ({ secretSync }: Props) => {} = secretSync;if (isPending) {- return <GenericFieldLabel label="Cluster">Loading...</GenericFieldLabel>;+ return (+ <Detail>+ <DetailLabel>Cluster</DetailLabel>+ <DetailValue>Loading...</DetailValue>+ </Detail>+ );}const clusterName = clusters?.find((cluster) => cluster.uuid === clusterUUID)?.name;- return <GenericFieldLabel label="Cluster">{clusterName ?? clusterUUID}</GenericFieldLabel>;+ return (+ <Detail>+ <DetailLabel>Cluster</DetailLabel>+ <DetailValue>{clusterName ?? clusterUUID}</DetailValue>+ </Detail>+ );};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/ChecklySyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/ChecklySyncDestinationSection.tsxindex 517398e738..adb2c55721 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/ChecklySyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/ChecklySyncDestinationSection.tsx@@ -1,4 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { TChecklySync } from "@app/hooks/api/secretSyncs/types/checkly-sync";type Props = {@@ -10,9 +10,15 @@ export const ChecklySyncDestinationSection = ({ secretSync }: Props) => {return (<>- <GenericFieldLabel label="Account">{destinationConfig.accountName}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Account</DetailLabel>+ <DetailValue>{destinationConfig.accountName}</DetailValue>+ </Detail>{destinationConfig.groupId && (- <GenericFieldLabel label="Group">{destinationConfig.groupName}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Group</DetailLabel>+ <DetailValue>{destinationConfig.groupName}</DetailValue>+ </Detail>)}</>);diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/ChefSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/ChefSyncDestinationSection.tsxindex c5e2308782..69b8c8914a 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/ChefSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/ChefSyncDestinationSection.tsx@@ -1,4 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { TChefSync } from "@app/hooks/api/secretSyncs/types/chef-sync";type Props = {@@ -10,10 +10,14 @@ export const ChefSyncDestinationSection = ({ secretSync }: Props) => {return (<>- <GenericFieldLabel label="Data Bag">{destinationConfig.dataBagName}</GenericFieldLabel>- <GenericFieldLabel label="Data Bag Item">- {destinationConfig.dataBagItemName}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Data Bag</DetailLabel>+ <DetailValue>{destinationConfig.dataBagName}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Data Bag Item</DetailLabel>+ <DetailValue>{destinationConfig.dataBagItemName}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/CircleCISyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/CircleCISyncDestinationSection.tsxindex 4fa589c60d..94b329102f 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/CircleCISyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/CircleCISyncDestinationSection.tsx@@ -1,4 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { TCircleCISync } from "@app/hooks/api/secretSyncs/types/circleci-sync";type Props = {@@ -12,8 +12,14 @@ export const CircleCISyncDestinationSection = ({ secretSync }: Props) => {return (<>- <GenericFieldLabel label="Organization">{orgName}</GenericFieldLabel>- <GenericFieldLabel label="Project">{projectName}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Organization</DetailLabel>+ <DetailValue>{orgName}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Project</DetailLabel>+ <DetailValue>{projectName}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/CloudflarePagesSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/CloudflarePagesSyncDestinationSection.tsxindex f34d8e4611..9fd410803f 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/CloudflarePagesSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/CloudflarePagesSyncDestinationSection.tsx@@ -1,4 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { TCloudflarePagesSync } from "@app/hooks/api/secretSyncs/types/cloudflare-pages-sync";type Props = {@@ -12,8 +12,14 @@ export const CloudflarePagesSyncDestinationSection = ({ secretSync }: Props) =>return (<>- <GenericFieldLabel label="Project">{projectName}</GenericFieldLabel>- <GenericFieldLabel label="Environment">{environment}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Project</DetailLabel>+ <DetailValue>{projectName}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Environment</DetailLabel>+ <DetailValue>{environment}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/CloudflareWorkersSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/CloudflareWorkersSyncDestinationSection.tsxindex 7d60315ca5..8db98e43c8 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/CloudflareWorkersSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/CloudflareWorkersSyncDestinationSection.tsx@@ -1,4 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { TCloudflareWorkersSync } from "@app/hooks/api/secretSyncs/types/cloudflare-workers-sync";type Props = {@@ -10,5 +10,10 @@ export const CloudflareWorkersSyncDestinationSection = ({ secretSync }: Props) =destinationConfig: { scriptId }} = secretSync;- return <GenericFieldLabel label="Script ID">{scriptId}</GenericFieldLabel>;+ return (+ <Detail>+ <DetailLabel>Script ID</DetailLabel>+ <DetailValue>{scriptId}</DetailValue>+ </Detail>+ );};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/DatabricksSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/DatabricksSyncDestinationSection.tsxindex ce206c113a..452cf2321f 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/DatabricksSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/DatabricksSyncDestinationSection.tsx@@ -1,4 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { TDatabricksSync } from "@app/hooks/api/secretSyncs/types/databricks-sync";type Props = {@@ -10,5 +10,10 @@ export const DatabricksSyncDestinationSection = ({ secretSync }: Props) => {destinationConfig: { scope }} = secretSync;- return <GenericFieldLabel label="Secret Scope">{scope}</GenericFieldLabel>;+ return (+ <Detail>+ <DetailLabel>Secret Scope</DetailLabel>+ <DetailValue>{scope}</DetailValue>+ </Detail>+ );};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/DevinSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/DevinSyncDestinationSection.tsxindex f62c246c0f..5aa0c07e16 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/DevinSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/DevinSyncDestinationSection.tsx@@ -1,4 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { TDevinSync } from "@app/hooks/api/secretSyncs/types/devin-sync";type Props = {@@ -8,5 +8,10 @@ type Props = {export const DevinSyncDestinationSection = ({ secretSync }: Props) => {const { destinationConfig } = secretSync;- return <GenericFieldLabel label="Organization ID">{destinationConfig.orgId}</GenericFieldLabel>;+ return (+ <Detail>+ <DetailLabel>Organization ID</DetailLabel>+ <DetailValue>{destinationConfig.orgId}</DetailValue>+ </Detail>+ );};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/DigitalOceanAppPlatformSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/DigitalOceanAppPlatformSyncDestinationSection.tsxindex f692312172..d2e0ef4d7d 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/DigitalOceanAppPlatformSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/DigitalOceanAppPlatformSyncDestinationSection.tsx@@ -1,4 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { TDigitalOceanAppPlatformSync } from "@app/hooks/api/secretSyncs/types/digital-ocean-app-platform-sync";type Props = {@@ -8,5 +8,10 @@ type Props = {export const DigitalOceanAppPlatformSyncDestinationSection = ({ secretSync }: Props) => {const { destinationConfig } = secretSync;- return <GenericFieldLabel label="App">{destinationConfig.appName}</GenericFieldLabel>;+ return (+ <Detail>+ <DetailLabel>App</DetailLabel>+ <DetailValue>{destinationConfig.appName}</DetailValue>+ </Detail>+ );};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/ExternalInfisicalSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/ExternalInfisicalSyncDestinationSection.tsxindex df43cb2df3..dca9324892 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/ExternalInfisicalSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/ExternalInfisicalSyncDestinationSection.tsx@@ -1,4 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { TExternalInfisicalSync } from "@app/hooks/api/secretSyncs/types/external-infisical-sync";type Props = {@@ -10,9 +10,18 @@ export const ExternalInfisicalSyncDestinationSection = ({ secretSync }: Props) =return (<>- <GenericFieldLabel label="Project ID">{destinationConfig.projectId}</GenericFieldLabel>- <GenericFieldLabel label="Environment">{destinationConfig.environment}</GenericFieldLabel>- <GenericFieldLabel label="Secret Path">{destinationConfig.secretPath}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Project ID</DetailLabel>+ <DetailValue>{destinationConfig.projectId}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Environment</DetailLabel>+ <DetailValue>{destinationConfig.environment}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Secret Path</DetailLabel>+ <DetailValue>{destinationConfig.secretPath}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/FlyioSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/FlyioSyncDestinationSection.tsxindex 2e06d2285e..9968aa4627 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/FlyioSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/FlyioSyncDestinationSection.tsx@@ -1,4 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { TFlyioSync } from "@app/hooks/api/secretSyncs/types/flyio-sync";type Props = {@@ -10,5 +10,10 @@ export const FlyioSyncDestinationSection = ({ secretSync }: Props) => {destinationConfig: { appId }} = secretSync;- return <GenericFieldLabel label="App">{appId}</GenericFieldLabel>;+ return (+ <Detail>+ <DetailLabel>App</DetailLabel>+ <DetailValue>{appId}</DetailValue>+ </Detail>+ );};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/GcpSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/GcpSyncDestinationSection.tsxindex 88e146c481..a8aa05702d 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/GcpSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/GcpSyncDestinationSection.tsx@@ -1,4 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { GcpSyncScope, TGcpSync } from "@app/hooks/api/secretSyncs/types/gcp-sync";type Props = {@@ -10,12 +10,19 @@ export const GcpSyncDestinationSection = ({ secretSync }: Props) => {return (<>- <GenericFieldLabel label="Project ID">{destinationConfig.projectId}</GenericFieldLabel>- <GenericFieldLabel label="Scope" className="capitalize">- {destinationConfig.scope}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Project ID</DetailLabel>+ <DetailValue>{destinationConfig.projectId}</DetailValue>+ </Detail>+ <Detail className="capitalize">+ <DetailLabel>Scope</DetailLabel>+ <DetailValue>{destinationConfig.scope}</DetailValue>+ </Detail>{destinationConfig.scope === GcpSyncScope.Region && (- <GenericFieldLabel label="Region">{destinationConfig.locationId}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Region</DetailLabel>+ <DetailValue>{destinationConfig.locationId}</DetailValue>+ </Detail>)}</>);diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/GitHubSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/GitHubSyncDestinationSection.tsxindex 0fb7e56197..09e1a63810 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/GitHubSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/GitHubSyncDestinationSection.tsx@@ -1,10 +1,15 @@import { ReactNode } from "react";-import { faInfoCircle } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";+import { InfoIcon } from "lucide-react";-import { GenericFieldLabel } from "@app/components/secret-syncs";import { GitHubSyncSelectedRepositoriesTooltipContent } from "@app/components/secret-syncs/github";-import { Tooltip } from "@app/components/v2";+import {+ Detail,+ DetailLabel,+ DetailValue,+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import {GitHubSyncScope,GitHubSyncVisibility,@@ -23,38 +28,56 @@ export const GitHubSyncDestinationSection = ({ secretSync }: Props) => {case GitHubSyncScope.Organization:Components = (<>- <GenericFieldLabel label="Organization">{destinationConfig.org}</GenericFieldLabel>- <GenericFieldLabel label="Visibility" className="capitalize">- {destinationConfig.visibility} Repositories- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Organization</DetailLabel>+ <DetailValue>{destinationConfig.org}</DetailValue>+ </Detail>+ <Detail className="capitalize">+ <DetailLabel>Visibility</DetailLabel>+ <DetailValue>{destinationConfig.visibility} Repositories</DetailValue>+ </Detail>{destinationConfig.visibility === GitHubSyncVisibility.Selected && (- <GenericFieldLabel label="Selected Repositories">- {destinationConfig.selectedRepositoryIds?.length ?? 0} Repositories- <Tooltip- side="bottom"- content={<GitHubSyncSelectedRepositoriesTooltipContent secretSync={secretSync} />}- >- <FontAwesomeIcon size="xs" className="ml-1 text-bunker-300" icon={faInfoCircle} />- </Tooltip>- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Selected Repositories</DetailLabel>+ <DetailValue>+ {destinationConfig.selectedRepositoryIds?.length ?? 0} Repositories+ <Tooltip>+ <TooltipTrigger asChild>+ <InfoIcon className="ml-1 inline size-3 text-bunker-300" />+ </TooltipTrigger>+ <TooltipContent side="bottom">+ <GitHubSyncSelectedRepositoriesTooltipContent secretSync={secretSync} />+ </TooltipContent>+ </Tooltip>+ </DetailValue>+ </Detail>)}</>);break;case GitHubSyncScope.Repository:Components = (- <GenericFieldLabel label="Repository">- {destinationConfig.owner}/{destinationConfig.repo}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Repository</DetailLabel>+ <DetailValue>+ {destinationConfig.owner}/{destinationConfig.repo}+ </DetailValue>+ </Detail>);break;case GitHubSyncScope.RepositoryEnvironment:Components = (<>- <GenericFieldLabel label="Repository">- {destinationConfig.owner}/{destinationConfig.repo}- </GenericFieldLabel>- <GenericFieldLabel label="Environment">{destinationConfig.env}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Repository</DetailLabel>+ <DetailValue>+ {destinationConfig.owner}/{destinationConfig.repo}+ </DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Environment</DetailLabel>+ <DetailValue>{destinationConfig.env}</DetailValue>+ </Detail></>);break;@@ -66,9 +89,10 @@ export const GitHubSyncDestinationSection = ({ secretSync }: Props) => {return (<>- <GenericFieldLabel className="capitalize" label="Scope">- {destinationConfig.scope.replace("-", " ")}- </GenericFieldLabel>+ <Detail className="capitalize">+ <DetailLabel>Scope</DetailLabel>+ <DetailValue>{destinationConfig.scope.replace("-", " ")}</DetailValue>+ </Detail>{Components}</>);diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/GitLabSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/GitLabSyncDestinationSection.tsxindex 11ded27525..3aa12e2462 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/GitLabSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/GitLabSyncDestinationSection.tsx@@ -1,4 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { GitLabSyncScope, TGitLabSync } from "@app/hooks/api/secretSyncs/types/gitlab-sync";type Props = {@@ -19,32 +19,46 @@ export const GitLabSyncDestinationSection = ({ secretSync }: Props) => {<>{secretSync.destinationConfig.scope === GitLabSyncScope.Project && (<>- <GenericFieldLabel label="Project Name">- {secretSync.destinationConfig.projectName}- </GenericFieldLabel>- <GenericFieldLabel label="Project ID">- {secretSync.destinationConfig.projectId}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Project Name</DetailLabel>+ <DetailValue>{secretSync.destinationConfig.projectName}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Project ID</DetailLabel>+ <DetailValue>{secretSync.destinationConfig.projectId}</DetailValue>+ </Detail></>)}{secretSync.destinationConfig.scope === GitLabSyncScope.Group && (<>- <GenericFieldLabel label="Group Name">- {secretSync.destinationConfig.groupName}- </GenericFieldLabel>- <GenericFieldLabel label="Group ID">- {secretSync.destinationConfig.groupId}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Group Name</DetailLabel>+ <DetailValue>{secretSync.destinationConfig.groupName}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Group ID</DetailLabel>+ <DetailValue>{secretSync.destinationConfig.groupId}</DetailValue>+ </Detail></>)}{targetEnvironment && (- <GenericFieldLabel label="Environment">{targetEnvironment}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Environment</DetailLabel>+ <DetailValue>{targetEnvironment}</DetailValue>+ </Detail>)}- <GenericFieldLabel label="Protect Secrets">- {shouldProtectSecrets ? "Yes" : "No"}- </GenericFieldLabel>- <GenericFieldLabel label="Mask Secrets">{shouldMaskSecrets ? "Yes" : "No"}</GenericFieldLabel>- <GenericFieldLabel label="Hide Secrets">{shouldHideSecrets ? "Yes" : "No"}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Protect Secrets</DetailLabel>+ <DetailValue>{shouldProtectSecrets ? "Yes" : "No"}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Mask Secrets</DetailLabel>+ <DetailValue>{shouldMaskSecrets ? "Yes" : "No"}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Hide Secrets</DetailLabel>+ <DetailValue>{shouldHideSecrets ? "Yes" : "No"}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/HCVaultSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/HCVaultSyncDestinationSection.tsxindex 423e56cf0c..86cbbf66cc 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/HCVaultSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/HCVaultSyncDestinationSection.tsx@@ -1,4 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { THCVaultSync } from "@app/hooks/api/secretSyncs/types/hc-vault-sync";type Props = {@@ -12,8 +12,14 @@ export const HCVaultSyncDestinationSection = ({ secretSync }: Props) => {return (<>- <GenericFieldLabel label="Secrets Engine Mount">{mount}</GenericFieldLabel>- <GenericFieldLabel label="Path">{path}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Secrets Engine Mount</DetailLabel>+ <DetailValue>{mount}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Path</DetailLabel>+ <DetailValue>{path}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/HerokuSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/HerokuSyncDestinationSection.tsxindex 05831e8a7e..132f11aa71 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/HerokuSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/HerokuSyncDestinationSection.tsx@@ -1,4 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { THerokuSync } from "@app/hooks/api/secretSyncs/types/heroku-sync";type Props = {@@ -12,8 +12,14 @@ export const HerokuSyncDestinationSection = ({ secretSync }: Props) => {return (<>- <GenericFieldLabel label="App Name">{appName}</GenericFieldLabel>- <GenericFieldLabel label="App ID">{app}</GenericFieldLabel>+ <Detail>+ <DetailLabel>App Name</DetailLabel>+ <DetailValue>{appName}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>App ID</DetailLabel>+ <DetailValue>{app}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/HumanitecSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/HumanitecSyncDestinationSection.tsxindex 1c9c4c3306..61a86be3d1 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/HumanitecSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/HumanitecSyncDestinationSection.tsx@@ -1,6 +1,6 @@import { ReactNode } from "react";-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import {HumanitecSyncScope,THumanitecSync@@ -18,17 +18,32 @@ export const HumanitecSyncDestinationSection = ({ secretSync }: Props) => {case HumanitecSyncScope.Application:Components = (<>- <GenericFieldLabel label="Application">{destinationConfig.app}</GenericFieldLabel>- <GenericFieldLabel label="Organization">{destinationConfig.org}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Application</DetailLabel>+ <DetailValue>{destinationConfig.app}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Organization</DetailLabel>+ <DetailValue>{destinationConfig.org}</DetailValue>+ </Detail></>);break;case HumanitecSyncScope.Environment:Components = (<>- <GenericFieldLabel label="Application">{destinationConfig.app}</GenericFieldLabel>- <GenericFieldLabel label="Organization">{destinationConfig.org}</GenericFieldLabel>- <GenericFieldLabel label="Environment">{destinationConfig.env}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Application</DetailLabel>+ <DetailValue>{destinationConfig.app}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Organization</DetailLabel>+ <DetailValue>{destinationConfig.org}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Environment</DetailLabel>+ <DetailValue>{destinationConfig.env}</DetailValue>+ </Detail></>);break;@@ -40,9 +55,10 @@ export const HumanitecSyncDestinationSection = ({ secretSync }: Props) => {return (<>- <GenericFieldLabel className="capitalize" label="Scope">- {destinationConfig.scope.replace("-", " ")}- </GenericFieldLabel>+ <Detail className="capitalize">+ <DetailLabel>Scope</DetailLabel>+ <DetailValue>{destinationConfig.scope.replace("-", " ")}</DetailValue>+ </Detail>{Components}</>);diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/LaravelForgeSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/LaravelForgeSyncDestinationSection.tsxindex 7d78fd770e..e11faf53c7 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/LaravelForgeSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/LaravelForgeSyncDestinationSection.tsx@@ -1,4 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { TLaravelForgeSync } from "@app/hooks/api/secretSyncs/types/laravel-forge-sync";type Props = {@@ -10,15 +10,18 @@ export const LaravelForgeSyncDestinationSection = ({ secretSync }: Props) => {return (<>- <GenericFieldLabel label="Account">- {destinationConfig.orgName || destinationConfig.orgSlug}- </GenericFieldLabel>- <GenericFieldLabel label="Server">- {destinationConfig.serverName || destinationConfig.serverId}- </GenericFieldLabel>- <GenericFieldLabel label="Site">- {destinationConfig.siteName || destinationConfig.siteId}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Account</DetailLabel>+ <DetailValue>{destinationConfig.orgName || destinationConfig.orgSlug}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Server</DetailLabel>+ <DetailValue>{destinationConfig.serverName || destinationConfig.serverId}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Site</DetailLabel>+ <DetailValue>{destinationConfig.siteName || destinationConfig.siteId}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/NetlifySyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/NetlifySyncDestinationSection.tsxindex 40981361bd..cfb54772bf 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/NetlifySyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/NetlifySyncDestinationSection.tsx@@ -1,4 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { TNetlifySync } from "@app/hooks/api/secretSyncs/types/netlify-sync";type Props = {@@ -10,13 +10,20 @@ export const NetlifySyncDestinationSection = ({ secretSync }: Props) => {return (<>- <GenericFieldLabel label="Account">- {destinationConfig.accountName || destinationConfig.accountId}- </GenericFieldLabel>- <GenericFieldLabel label="Site">- {destinationConfig.siteName || destinationConfig.siteId || "None"}- </GenericFieldLabel>- <GenericFieldLabel label="Context">{destinationConfig.context || "None"}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Account</DetailLabel>+ <DetailValue>{destinationConfig.accountName || destinationConfig.accountId}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Site</DetailLabel>+ <DetailValue>+ {destinationConfig.siteName || destinationConfig.siteId || "None"}+ </DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Context</DetailLabel>+ <DetailValue>{destinationConfig.context || "None"}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/NorthflankSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/NorthflankSyncDestinationSection.tsxindex ec4bbf901e..5f7d342ccb 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/NorthflankSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/NorthflankSyncDestinationSection.tsx@@ -1,4 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { TNorthflankSync } from "@app/hooks/api/secretSyncs/types/northflank-sync";type Props = {@@ -10,12 +10,16 @@ export const NorthflankSyncDestinationSection = ({ secretSync }: Props) => {return (<>- <GenericFieldLabel label="Project">- {destinationConfig.projectName || destinationConfig.projectId}- </GenericFieldLabel>- <GenericFieldLabel label="Secret Group">- {destinationConfig.secretGroupName || destinationConfig.secretGroupId}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Project</DetailLabel>+ <DetailValue>{destinationConfig.projectName || destinationConfig.projectId}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Secret Group</DetailLabel>+ <DetailValue>+ {destinationConfig.secretGroupName || destinationConfig.secretGroupId}+ </DetailValue>+ </Detail></>);};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/OCIVaultSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/OCIVaultSyncDestinationSection.tsxindex 3855a551c5..7b2406d4e0 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/OCIVaultSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/OCIVaultSyncDestinationSection.tsx@@ -1,5 +1,11 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";-import { Tooltip } from "@app/components/v2";+import {+ Detail,+ DetailLabel,+ DetailValue,+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import { TOCIVaultSync } from "@app/hooks/api/secretSyncs/types/oci-vault-sync";type Props = {@@ -13,29 +19,53 @@ export const OCIVaultSyncDestinationSection = ({ secretSync }: Props) => {return (<>- <Tooltip side="bottom" className="max-w-sm break-words select-text" content={compartmentOcid}>- <div>- <GenericFieldLabel label="Compartment OCID">- {compartmentOcid.substring(0, 21)}...- {compartmentOcid.substring(compartmentOcid.length - 6)}- </GenericFieldLabel>- </div>+ <Tooltip>+ <TooltipTrigger asChild>+ <div>+ <Detail>+ <DetailLabel>Compartment OCID</DetailLabel>+ <DetailValue>+ {compartmentOcid.substring(0, 21)}...+ {compartmentOcid.substring(compartmentOcid.length - 6)}+ </DetailValue>+ </Detail>+ </div>+ </TooltipTrigger>+ <TooltipContent side="bottom" className="max-w-sm break-words select-text">+ {compartmentOcid}+ </TooltipContent></Tooltip>- <Tooltip side="bottom" className="max-w-sm break-words select-text" content={compartmentOcid}>- <div>- <GenericFieldLabel label="Vault OCID">- {vaultOcid.substring(0, 15)}...- {vaultOcid.substring(vaultOcid.length - 6)}- </GenericFieldLabel>- </div>+ <Tooltip>+ <TooltipTrigger asChild>+ <div>+ <Detail>+ <DetailLabel>Vault OCID</DetailLabel>+ <DetailValue>+ {vaultOcid.substring(0, 15)}...+ {vaultOcid.substring(vaultOcid.length - 6)}+ </DetailValue>+ </Detail>+ </div>+ </TooltipTrigger>+ <TooltipContent side="bottom" className="max-w-sm break-words select-text">+ {compartmentOcid}+ </TooltipContent></Tooltip>- <Tooltip side="bottom" className="max-w-sm break-words select-text" content={compartmentOcid}>- <div>- <GenericFieldLabel label="Key OCID">- {keyOcid.substring(0, 13)}...- {keyOcid.substring(keyOcid.length - 6)}- </GenericFieldLabel>- </div>+ <Tooltip>+ <TooltipTrigger asChild>+ <div>+ <Detail>+ <DetailLabel>Key OCID</DetailLabel>+ <DetailValue>+ {keyOcid.substring(0, 13)}...+ {keyOcid.substring(keyOcid.length - 6)}+ </DetailValue>+ </Detail>+ </div>+ </TooltipTrigger>+ <TooltipContent side="bottom" className="max-w-sm break-words select-text">+ {compartmentOcid}+ </TooltipContent></Tooltip></>);diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/OctopusDeploySyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/OctopusDeploySyncDestinationSection.tsxindex 4431d99c59..5a2ff98227 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/OctopusDeploySyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/OctopusDeploySyncDestinationSection.tsx@@ -1,4 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { useOctopusDeployConnectionGetScopeValues } from "@app/hooks/api/appConnections/octopus-deploy";import {OctopusDeploySyncScope,@@ -35,62 +35,87 @@ export const OctopusDeploySyncDestinationSection = ({ secretSync }: Props) => {return (<>- <GenericFieldLabel label="Space">{spaceName || spaceId}</GenericFieldLabel>- <GenericFieldLabel label="Scope" className="capitalize">- {scope}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Space</DetailLabel>+ <DetailValue>{spaceName || spaceId}</DetailValue>+ </Detail>+ <Detail className="capitalize">+ <DetailLabel>Scope</DetailLabel>+ <DetailValue>{scope}</DetailValue>+ </Detail>{scope === OctopusDeploySyncScope.Project && (- <GenericFieldLabel label="Project">{projectName || projectId}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Project</DetailLabel>+ <DetailValue>{projectName || projectId}</DetailValue>+ </Detail>)}{isFetched && (<>{environments.length > 0 && (- <GenericFieldLabel label="Environments">- {scopeValuesData?.environments- .filter((env) => environments.includes(env.id))- .map((env) => env.name)- .join(", ") ?? environments.join(", ")}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Environments</DetailLabel>+ <DetailValue>+ {scopeValuesData?.environments+ .filter((env) => environments.includes(env.id))+ .map((env) => env.name)+ .join(", ") ?? environments.join(", ")}+ </DetailValue>+ </Detail>)}{roles.length > 0 && (- <GenericFieldLabel label="Target Tags">- {scopeValuesData?.roles- .filter((role) => roles.includes(role.id))- .map((role) => role.name)- .join(", ") ?? roles.join(", ")}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Target Tags</DetailLabel>+ <DetailValue>+ {scopeValuesData?.roles+ .filter((role) => roles.includes(role.id))+ .map((role) => role.name)+ .join(", ") ?? roles.join(", ")}+ </DetailValue>+ </Detail>)}{machines.length > 0 && (- <GenericFieldLabel label="Targets">- {scopeValuesData?.machines- .filter((machine) => machines.includes(machine.id))- .map((machine) => machine.name)- .join(", ") ?? machines.join(", ")}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Targets</DetailLabel>+ <DetailValue>+ {scopeValuesData?.machines+ .filter((machine) => machines.includes(machine.id))+ .map((machine) => machine.name)+ .join(", ") ?? machines.join(", ")}+ </DetailValue>+ </Detail>)}{processes.length > 0 && (- <GenericFieldLabel label="Processes">- {scopeValuesData?.processes- .filter((process) => processes.includes(process.id))- .map((process) => process.name)- .join(", ") ?? processes.join(", ")}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Processes</DetailLabel>+ <DetailValue>+ {scopeValuesData?.processes+ .filter((process) => processes.includes(process.id))+ .map((process) => process.name)+ .join(", ") ?? processes.join(", ")}+ </DetailValue>+ </Detail>)}{actions.length > 0 && (- <GenericFieldLabel label="Deployment Steps">- {scopeValuesData?.actions- .filter((action) => actions.includes(action.id))- .map((action) => action.name)- .join(", ") ?? actions.join(", ")}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Deployment Steps</DetailLabel>+ <DetailValue>+ {scopeValuesData?.actions+ .filter((action) => actions.includes(action.id))+ .map((action) => action.name)+ .join(", ") ?? actions.join(", ")}+ </DetailValue>+ </Detail>)}{channels.length > 0 && (- <GenericFieldLabel label="Channels">- {scopeValuesData?.channels- .filter((channel) => channels.includes(channel.id))- .map((channel) => channel.name)- .join(", ") ?? channels.join(", ")}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Channels</DetailLabel>+ <DetailValue>+ {scopeValuesData?.channels+ .filter((channel) => channels.includes(channel.id))+ .map((channel) => channel.name)+ .join(", ") ?? channels.join(", ")}+ </DetailValue>+ </Detail>)}</>)}diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/OnaSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/OnaSyncDestinationSection.tsxindex a9cb4b68a5..0c55f5120a 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/OnaSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/OnaSyncDestinationSection.tsx@@ -1,4 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { TOnaSync } from "@app/hooks/api/secretSyncs/types/ona-sync";type Props = {@@ -9,8 +9,9 @@ export const OnaSyncDestinationSection = ({ secretSync }: Props) => {const { destinationConfig } = secretSync;return (- <GenericFieldLabel label="Ona Project">- {destinationConfig.projectName || destinationConfig.projectId}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Ona Project</DetailLabel>+ <DetailValue>{destinationConfig.projectName || destinationConfig.projectId}</DetailValue>+ </Detail>);};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/OvhSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/OvhSyncDestinationSection.tsxindex 7a032ddb8e..9544a35287 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/OvhSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/OvhSyncDestinationSection.tsx@@ -1,4 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { TOvhSync } from "@app/hooks/api/secretSyncs/types/ovh-sync";type Props = {@@ -10,5 +10,10 @@ export const OvhSyncDestinationSection = ({ secretSync }: Props) => {destinationConfig: { path }} = secretSync;- return <GenericFieldLabel label="Path">{path}</GenericFieldLabel>;+ return (+ <Detail>+ <DetailLabel>Path</DetailLabel>+ <DetailValue>{path}</DetailValue>+ </Detail>+ );};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/RailwaySyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/RailwaySyncDestinationSection.tsxindex 03b650c5bd..712c798f4b 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/RailwaySyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/RailwaySyncDestinationSection.tsx@@ -1,4 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { TRailwaySync } from "@app/hooks/api/secretSyncs/types/railway-sync";type Props = {@@ -10,8 +10,14 @@ export const RailwaySyncDestinationSection = ({ secretSync }: Props) => {return (<>- <GenericFieldLabel label="Project">{destinationConfig.projectName}</GenericFieldLabel>- <GenericFieldLabel label="Environment">{destinationConfig.environmentName}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Project</DetailLabel>+ <DetailValue>{destinationConfig.projectName}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Environment</DetailLabel>+ <DetailValue>{destinationConfig.environmentName}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/RenderSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/RenderSyncDestinationSection.tsxindex a9dcab11ca..3b52791c70 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/RenderSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/RenderSyncDestinationSection.tsx@@ -1,4 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import {useRenderConnectionListEnvironmentGroups,useRenderConnectionListServices@@ -27,22 +27,42 @@ export const RenderSyncDestinationSection = ({ secretSync }: Props) => {const id = secretSync.destinationConfig.serviceId;if (isPending) {- return <GenericFieldLabel label="Service">Loading...</GenericFieldLabel>;+ return (+ <Detail>+ <DetailLabel>Service</DetailLabel>+ <DetailValue>Loading...</DetailValue>+ </Detail>+ );}const serviceName = services.find((service) => service.id === id)?.name;- return <GenericFieldLabel label="Service">{serviceName ?? id}</GenericFieldLabel>;+ return (+ <Detail>+ <DetailLabel>Service</DetailLabel>+ <DetailValue>{serviceName ?? id}</DetailValue>+ </Detail>+ );}case RenderSyncScope.EnvironmentGroup: {const id = secretSync.destinationConfig.environmentGroupId;if (isGroupsPending) {- return <GenericFieldLabel label="Environment Group">Loading...</GenericFieldLabel>;+ return (+ <Detail>+ <DetailLabel>Environment Group</DetailLabel>+ <DetailValue>Loading...</DetailValue>+ </Detail>+ );}const envName = groups.find((g) => g.id === id)?.name;- return <GenericFieldLabel label="Environment Group">{envName ?? id}</GenericFieldLabel>;+ return (+ <Detail>+ <DetailLabel>Environment Group</DetailLabel>+ <DetailValue>{envName ?? id}</DetailValue>+ </Detail>+ );}default:throw new Error("Unknown render sync destination scope");diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/SecretSyncDestinatonSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/SecretSyncDestinatonSection.tsxindex b2400b1658..33cb7f35c6 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/SecretSyncDestinatonSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/SecretSyncDestinatonSection.tsx@@ -1,14 +1,8 @@import { ReactNode } from "react";-import { faEdit } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";-import { ProjectPermissionCan } from "@app/components/permissions";-import { GenericFieldLabel } from "@app/components/secret-syncs";-import { IconButton } from "@app/components/v2";-import { ProjectPermissionSecretSyncActions } from "@app/context/ProjectPermissionContext/types";+import { Detail, DetailGroupHeader, DetailLabel, DetailValue } from "@app/components/v3";import { APP_CONNECTION_MAP } from "@app/helpers/appConnections";import { SecretSync, TSecretSync } from "@app/hooks/api/secretSyncs";-import { getSecretSyncPermissionSubject } from "@app/lib/fn/permission";import { OnePassSyncDestinationSection } from "./1PasswordSyncDestinationSection";import { AwsParameterStoreSyncDestinationSection } from "./AwsParameterStoreSyncDestinationSection";@@ -55,10 +49,9 @@ import { ZabbixSyncDestinationSection } from "./ZabbixSyncDestinationSection";type Props = {secretSync: TSecretSync;- onEditDestination: VoidFunction;};-export const SecretSyncDestinationSection = ({ secretSync, onEditDestination }: Props) => {+export const SecretSyncDestinationSection = ({ secretSync }: Props) => {const { destination, connection } = secretSync;const app = APP_CONNECTION_MAP[connection.app].name;@@ -199,30 +192,14 @@ export const SecretSyncDestinationSection = ({ secretSync, onEditDestination }:throw new Error(`Unhandled Destination Section components: ${destination}`);}- const permissionSubject = getSecretSyncPermissionSubject(secretSync);-return (- <div className="flex w-full flex-col gap-3 rounded-lg border border-mineshaft-600 bg-mineshaft-900 px-4 py-3">- <div className="flex items-center justify-between border-b border-mineshaft-400 pb-2">- <h3 className="font-medium text-mineshaft-100">Destination Configuration</h3>- <ProjectPermissionCan I={ProjectPermissionSecretSyncActions.Edit} a={permissionSubject}>- {(isAllowed) => (- <IconButton- variant="plain"- colorSchema="secondary"- isDisabled={!isAllowed}- ariaLabel="Edit sync destination"- onClick={onEditDestination}- >- <FontAwesomeIcon icon={faEdit} />- </IconButton>- )}- </ProjectPermissionCan>- </div>- <div className="flex w-full flex-wrap gap-8">- <GenericFieldLabel label={`${app} Connection`}>{connection.name}</GenericFieldLabel>- {DestinationComponents}- </div>- </div>+ <>+ <DetailGroupHeader>Destination Configuration</DetailGroupHeader>+ <Detail>+ <DetailLabel>{`${app} Connection`}</DetailLabel>+ <DetailValue>{connection.name}</DetailValue>+ </Detail>+ {DestinationComponents}+ </>);};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/SnowflakeSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/SnowflakeSyncDestinationSection.tsxindex d125c0bc79..8af1ed4799 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/SnowflakeSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/SnowflakeSyncDestinationSection.tsx@@ -1,4 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { TSnowflakeSync } from "@app/hooks/api/secretSyncs/types/snowflake-sync";type Props = {@@ -10,8 +10,14 @@ export const SnowflakeSyncDestinationSection = ({ secretSync }: Props) => {return (<>- <GenericFieldLabel label="Database">{destinationConfig.database}</GenericFieldLabel>- <GenericFieldLabel label="Schema">{destinationConfig.schema}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Database</DetailLabel>+ <DetailValue>{destinationConfig.database}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Schema</DetailLabel>+ <DetailValue>{destinationConfig.schema}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/SupabaseSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/SupabaseSyncDestinationSection.tsxindex baa771a039..10f87c215e 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/SupabaseSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/SupabaseSyncDestinationSection.tsx@@ -1,4 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { TSupabaseSync } from "@app/hooks/api/secretSyncs/types/supabase";type Props = {@@ -8,5 +8,10 @@ type Props = {export const SupabaseSyncDestinationSection = ({ secretSync }: Props) => {const { destinationConfig } = secretSync;- return <GenericFieldLabel label="Project">{destinationConfig.projectName}</GenericFieldLabel>;+ return (+ <Detail>+ <DetailLabel>Project</DetailLabel>+ <DetailValue>{destinationConfig.projectName}</DetailValue>+ </Detail>+ );};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/TeamCitySyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/TeamCitySyncDestinationSection.tsxindex f712eaa20f..f0ab027360 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/TeamCitySyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/TeamCitySyncDestinationSection.tsx@@ -1,4 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { TTeamCitySync } from "@app/hooks/api/secretSyncs/types/teamcity-sync";type Props = {@@ -12,8 +12,14 @@ export const TeamCitySyncDestinationSection = ({ secretSync }: Props) => {return (<>- <GenericFieldLabel label="Project">{project}</GenericFieldLabel>- <GenericFieldLabel label="Build Configuration">{buildConfig}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Project</DetailLabel>+ <DetailValue>{project}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Build Configuration</DetailLabel>+ <DetailValue>{buildConfig}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/TerraformCloudSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/TerraformCloudSyncDestinationSection.tsxindex 5cb902eda6..8efbc6b0e8 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/TerraformCloudSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/TerraformCloudSyncDestinationSection.tsx@@ -1,6 +1,6 @@import { ReactNode } from "react";-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { TerraformCloudSyncCategory } from "@app/hooks/api/appConnections/terraform-cloud";import {TerraformCloudSyncScope,@@ -19,32 +19,48 @@ export const TerraformCloudSyncDestinationSection = ({ secretSync }: Props) => {case TerraformCloudSyncScope.VariableSet:Components = (<>- <GenericFieldLabel label="Organization">{destinationConfig.org}</GenericFieldLabel>- <GenericFieldLabel label="Variable Set">- {destinationConfig.variableSetName}- </GenericFieldLabel>- <GenericFieldLabel label="Category">- {Object.keys(TerraformCloudSyncCategory).find(- (key) =>- TerraformCloudSyncCategory[key as keyof typeof TerraformCloudSyncCategory] ===- destinationConfig.category- )}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Organization</DetailLabel>+ <DetailValue>{destinationConfig.org}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Variable Set</DetailLabel>+ <DetailValue>{destinationConfig.variableSetName}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Category</DetailLabel>+ <DetailValue>+ {Object.keys(TerraformCloudSyncCategory).find(+ (key) =>+ TerraformCloudSyncCategory[key as keyof typeof TerraformCloudSyncCategory] ===+ destinationConfig.category+ )}+ </DetailValue>+ </Detail></>);break;case TerraformCloudSyncScope.Workspace:Components = (<>- <GenericFieldLabel label="Organization">{destinationConfig.org}</GenericFieldLabel>- <GenericFieldLabel label="Workspace">{destinationConfig.workspaceName}</GenericFieldLabel>- <GenericFieldLabel label="Category">- {Object.keys(TerraformCloudSyncCategory).find(- (key) =>- TerraformCloudSyncCategory[key as keyof typeof TerraformCloudSyncCategory] ===- destinationConfig.category- )}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Organization</DetailLabel>+ <DetailValue>{destinationConfig.org}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Workspace</DetailLabel>+ <DetailValue>{destinationConfig.workspaceName}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Category</DetailLabel>+ <DetailValue>+ {Object.keys(TerraformCloudSyncCategory).find(+ (key) =>+ TerraformCloudSyncCategory[key as keyof typeof TerraformCloudSyncCategory] ===+ destinationConfig.category+ )}+ </DetailValue>+ </Detail></>);break;@@ -56,9 +72,10 @@ export const TerraformCloudSyncDestinationSection = ({ secretSync }: Props) => {return (<>- <GenericFieldLabel className="capitalize" label="Scope">- {destinationConfig.scope.replace("-", " ")}- </GenericFieldLabel>+ <Detail className="capitalize">+ <DetailLabel>Scope</DetailLabel>+ <DetailValue>{destinationConfig.scope.replace("-", " ")}</DetailValue>+ </Detail>{Components}</>);diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/TravisCISyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/TravisCISyncDestinationSection.tsxindex b3ab5e320a..7ee67d6df0 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/TravisCISyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/TravisCISyncDestinationSection.tsx@@ -1,4 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { TTravisCISync } from "@app/hooks/api/secretSyncs/types/travis-ci-sync";type Props = {@@ -10,9 +10,15 @@ export const TravisCISyncDestinationSection = ({ secretSync }: Props) => {return (<>- <GenericFieldLabel label="Repository">{destinationConfig.repositorySlug}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Repository</DetailLabel>+ <DetailValue>{destinationConfig.repositorySlug}</DetailValue>+ </Detail>{destinationConfig.branch && (- <GenericFieldLabel label="Branch">{destinationConfig.branch}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Branch</DetailLabel>+ <DetailValue>{destinationConfig.branch}</DetailValue>+ </Detail>)}</>);diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/VercelSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/VercelSyncDestinationSection.tsxindex 765d02f29f..3296518405 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/VercelSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/VercelSyncDestinationSection.tsx@@ -1,6 +1,6 @@import { ReactNode, useMemo } from "react";-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { useVercelConnectionListOrganizations } from "@app/hooks/api/appConnections/vercel";import {TVercelSync,@@ -40,24 +40,36 @@ export const VercelSyncDestinationSection = ({ secretSync }: Props) => {if (destinationConfig.scope === VercelSyncScope.Team) {return (<>- <GenericFieldLabel label="Scope">Team</GenericFieldLabel>- <GenericFieldLabel label="Vercel Team">{selectedTeam?.name}</GenericFieldLabel>- <GenericFieldLabel label="Target Environments">- {destinationConfig.targetEnvironments?.length- ? destinationConfig.targetEnvironments- .map((env) => env.charAt(0).toUpperCase() + env.slice(1))- .join(", ")- : "None"}- </GenericFieldLabel>- <GenericFieldLabel label="All Custom Environments">- {destinationConfig.applyToAllCustomEnvironments ? "Yes" : "No"}- </GenericFieldLabel>- <GenericFieldLabel label="Target Projects">- {selectedProjects?.map((project) => project?.name).join(", ")}- </GenericFieldLabel>- <GenericFieldLabel label="Sensitive">- {destinationConfig.sensitive ? "Yes" : "No"}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Scope</DetailLabel>+ <DetailValue>Team</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Vercel Team</DetailLabel>+ <DetailValue>{selectedTeam?.name}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Target Environments</DetailLabel>+ <DetailValue>+ {destinationConfig.targetEnvironments?.length+ ? destinationConfig.targetEnvironments+ .map((env) => env.charAt(0).toUpperCase() + env.slice(1))+ .join(", ")+ : "None"}+ </DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>All Custom Environments</DetailLabel>+ <DetailValue>{destinationConfig.applyToAllCustomEnvironments ? "Yes" : "No"}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Target Projects</DetailLabel>+ <DetailValue>{selectedProjects?.map((project) => project?.name).join(", ")}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Sensitive</DetailLabel>+ <DetailValue>{destinationConfig.sensitive ? "Yes" : "No"}</DetailValue>+ </Detail></>);}@@ -66,28 +78,47 @@ export const VercelSyncDestinationSection = ({ secretSync }: Props) => {if (destinationConfig.env === VercelEnvironmentType.Preview && destinationConfig.branch) {Components = (<>- <GenericFieldLabel label="Scope">Project</GenericFieldLabel>- <GenericFieldLabel label="Vercel Project">- {destinationConfig.appName || destinationConfig.app}- </GenericFieldLabel>- <GenericFieldLabel label="Environment">{destinationConfig.env}</GenericFieldLabel>- <GenericFieldLabel label="Preview Branch">{destinationConfig.branch}</GenericFieldLabel>- <GenericFieldLabel label="Sensitive">- {destinationConfig.sensitive ? "Yes" : "No"}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Scope</DetailLabel>+ <DetailValue>Project</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Vercel Project</DetailLabel>+ <DetailValue>{destinationConfig.appName || destinationConfig.app}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Environment</DetailLabel>+ <DetailValue>{destinationConfig.env}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Preview Branch</DetailLabel>+ <DetailValue>{destinationConfig.branch}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Sensitive</DetailLabel>+ <DetailValue>{destinationConfig.sensitive ? "Yes" : "No"}</DetailValue>+ </Detail></>);} else {Components = (<>- <GenericFieldLabel label="Scope">Project</GenericFieldLabel>- <GenericFieldLabel label="Vercel Project">- {destinationConfig.appName || destinationConfig.app}- </GenericFieldLabel>- <GenericFieldLabel label="Environment">{destinationConfig.env}</GenericFieldLabel>- <GenericFieldLabel label="Sensitive">- {destinationConfig.sensitive ? "Yes" : "No"}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Scope</DetailLabel>+ <DetailValue>Project</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Vercel Project</DetailLabel>+ <DetailValue>{destinationConfig.appName || destinationConfig.app}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Environment</DetailLabel>+ <DetailValue>{destinationConfig.env}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Sensitive</DetailLabel>+ <DetailValue>{destinationConfig.sensitive ? "Yes" : "No"}</DetailValue>+ </Detail></>);}diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/WindmillSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/WindmillSyncDestinationSection.tsxindex 65149b90e5..fb1afc447a 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/WindmillSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/WindmillSyncDestinationSection.tsx@@ -1,4 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { TWindmillSync } from "@app/hooks/api/secretSyncs/types/windmill-sync";type Props = {@@ -12,8 +12,14 @@ export const WindmillSyncDestinationSection = ({ secretSync }: Props) => {return (<>- <GenericFieldLabel label="Workspace">{workspace}</GenericFieldLabel>- <GenericFieldLabel label="Path">{path}</GenericFieldLabel>+ <Detail>+ <DetailLabel>Workspace</DetailLabel>+ <DetailValue>{workspace}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Path</DetailLabel>+ <DetailValue>{path}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/ZabbixSyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/ZabbixSyncDestinationSection.tsxindex 13053c1374..003a2d89f6 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/ZabbixSyncDestinationSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/ZabbixSyncDestinationSection.tsx@@ -1,4 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";+import { Detail, DetailLabel, DetailValue } from "@app/components/v3";import { ZabbixSyncScope } from "@app/hooks/api/appConnections/zabbix";import { TZabbixSync } from "@app/hooks/api/secretSyncs/types/zabbix-sync";@@ -17,17 +17,20 @@ export const ZabbixSyncDestinationSection = ({ secretSync }: Props) => {<>{secretSync.destinationConfig.scope === ZabbixSyncScope.Host && (<>- <GenericFieldLabel label="Host Name">- {secretSync.destinationConfig.hostName}- </GenericFieldLabel>- <GenericFieldLabel label="Host ID">- {secretSync.destinationConfig.hostId}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Host Name</DetailLabel>+ <DetailValue>{secretSync.destinationConfig.hostName}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Host ID</DetailLabel>+ <DetailValue>{secretSync.destinationConfig.hostId}</DetailValue>+ </Detail></>)}- <GenericFieldLabel label="Macro Type">- {isTextMacro(macroType) ? "Text" : "Secret"}- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Macro Type</DetailLabel>+ <DetailValue>{isTextMacro(macroType) ? "Text" : "Secret"}</DetailValue>+ </Detail></>);};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDetailsSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDetailsSection.tsxindex 20aa1abc85..a58d47b529 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDetailsSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDetailsSection.tsx@@ -1,22 +1,17 @@import { useMemo } from "react";-import { faEdit } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";import { format } from "date-fns";+import { BanIcon, RefreshCwIcon } from "lucide-react";-import { ProjectPermissionCan } from "@app/components/permissions";-import { GenericFieldLabel, SecretSyncStatusBadge } from "@app/components/secret-syncs";-import { IconButton } from "@app/components/v2";-import { ProjectPermissionSecretSyncActions } from "@app/context/ProjectPermissionContext/types";+import { SecretSyncStatusBadge } from "@app/components/secret-syncs";+import { Badge, Detail, DetailLabel, DetailValue } from "@app/components/v3";import { SecretSyncStatus, TSecretSync } from "@app/hooks/api/secretSyncs";-import { getSecretSyncPermissionSubject } from "@app/lib/fn/permission";type Props = {secretSync: TSecretSync;- onEditDetails: VoidFunction;};-export const SecretSyncDetailsSection = ({ secretSync, onEditDetails }: Props) => {- const { syncStatus, lastSyncMessage, lastSyncedAt, name, description } = secretSync;+export const SecretSyncDetailsSection = ({ secretSync }: Props) => {+ const { syncStatus, lastSyncMessage, lastSyncedAt, isAutoSyncEnabled } = secretSync;const failureMessage = useMemo(() => {if (syncStatus === SecretSyncStatus.Failed) {@@ -32,51 +27,46 @@ export const SecretSyncDetailsSection = ({ secretSync, onEditDetails }: Props) =return null;}, [syncStatus, lastSyncMessage]);- const permissionSubject = getSecretSyncPermissionSubject(secretSync);-return (- <div className="flex w-full flex-col gap-3 rounded-lg border border-mineshaft-600 bg-mineshaft-900 px-4 py-3">- <div className="flex items-center justify-between border-b border-mineshaft-400 pb-2">- <h3 className="font-medium text-mineshaft-100">Details</h3>- <ProjectPermissionCan I={ProjectPermissionSecretSyncActions.Edit} a={permissionSubject}>- {(isAllowed) => (- <IconButton- variant="plain"- colorSchema="secondary"- isDisabled={!isAllowed}- ariaLabel="Edit sync details"- onClick={onEditDetails}- >- <FontAwesomeIcon icon={faEdit} />- </IconButton>- )}- </ProjectPermissionCan>- </div>- <div>- <div className="space-y-3">- <GenericFieldLabel label="Name" truncate>- {name}- </GenericFieldLabel>- <GenericFieldLabel label="Description">{description}</GenericFieldLabel>- {syncStatus && (- <GenericFieldLabel label="Status">- <SecretSyncStatusBadge status={syncStatus} />- </GenericFieldLabel>- )}- {lastSyncedAt && (- <GenericFieldLabel label="Last Synced">- {format(new Date(lastSyncedAt), "yyyy-MM-dd, hh:mm aaa")}- </GenericFieldLabel>- )}- {syncStatus === SecretSyncStatus.Failed && failureMessage && (- <GenericFieldLabel labelClassName="text-red" label="Last Sync Error">- <p className="rounded-sm bg-mineshaft-600 p-2 text-xs break-words">- {failureMessage}- </p>- </GenericFieldLabel>+ <>+ {syncStatus && (+ <Detail>+ <DetailLabel>Status</DetailLabel>+ <DetailValue>+ <SecretSyncStatusBadge status={syncStatus} />+ </DetailValue>+ </Detail>+ )}+ <Detail>+ <DetailLabel>Auto-Sync</DetailLabel>+ <DetailValue>+ {isAutoSyncEnabled ? (+ <Badge variant="info">+ <RefreshCwIcon />+ Enabled+ </Badge>+ ) : (+ <Badge variant="neutral">+ <BanIcon />+ Disabled+ </Badge>)}- </div>- </div>- </div>+ </DetailValue>+ </Detail>+ {lastSyncedAt && (+ <Detail>+ <DetailLabel>Last Synced</DetailLabel>+ <DetailValue>{format(new Date(lastSyncedAt), "yyyy-MM-dd, hh:mm aaa")}</DetailValue>+ </Detail>+ )}+ {syncStatus === SecretSyncStatus.Failed && failureMessage && (+ <Detail>+ <DetailLabel className="text-red">Last Sync Error</DetailLabel>+ <DetailValue>+ <p className="rounded-sm bg-mineshaft-600 p-2 text-xs break-words">{failureMessage}</p>+ </DetailValue>+ </Detail>+ )}+ </>);};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncOptionsSection/AwsParameterStoreSyncOptionsSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncOptionsSection/AwsParameterStoreSyncOptionsSection.tsxindex 5354f50b44..153fcd126c 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncOptionsSection/AwsParameterStoreSyncOptionsSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncOptionsSection/AwsParameterStoreSyncOptionsSection.tsx@@ -1,8 +1,20 @@import { EyeIcon } from "lucide-react";-import { GenericFieldLabel } from "@app/components/secret-syncs";-import { Table, TBody, Td, Th, THead, Tooltip, Tr } from "@app/components/v2";-import { Badge } from "@app/components/v3";+import {+ Badge,+ Detail,+ DetailLabel,+ DetailValue,+ Table,+ TableBody,+ TableCell,+ TableHead,+ TableHeader,+ TableRow,+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import { TAwsParameterStoreSync } from "@app/hooks/api/secretSyncs/types/aws-parameter-store-sync";type Props = {@@ -16,42 +28,54 @@ export const AwsParameterStoreSyncOptionsSection = ({ secretSync }: Props) => {return (<>- {keyId && <GenericFieldLabel label="KMS Key">{keyId}</GenericFieldLabel>}+ {keyId && (+ <Detail>+ <DetailLabel>KMS Key</DetailLabel>+ <DetailValue>{keyId}</DetailValue>+ </Detail>+ )}{tags && tags.length > 0 && (- <GenericFieldLabel label="Resource Tags">- <Tooltip- side="right"- className="max-w-xl p-1"- content={- <Table>- <THead>- <Th className="p-2 whitespace-nowrap">Key</Th>- <Th className="p-2">Value</Th>- </THead>- <TBody>- {tags.map((tag) => (- <Tr key={tag.key}>- <Td className="p-2">{tag.key}</Td>- <Td className="p-2">{tag.value}</Td>- </Tr>- ))}- </TBody>- </Table>- }- >- <div className="w-min">- <Badge variant="neutral">- <EyeIcon />- {tags.length} Tag{tags.length > 1 ? "s" : ""}- </Badge>- </div>- </Tooltip>- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Resource Tags</DetailLabel>+ <DetailValue>+ <Tooltip>+ <TooltipTrigger asChild>+ <span className="inline-block w-min">+ <Badge variant="neutral">+ <EyeIcon />+ {tags.length} Tag{tags.length > 1 ? "s" : ""}+ </Badge>+ </span>+ </TooltipTrigger>+ <TooltipContent side="right" className="max-w-xl bg-background p-1">+ <Table>+ <TableHeader>+ <TableRow>+ <TableHead className="p-2 whitespace-nowrap">Key</TableHead>+ <TableHead className="p-2">Value</TableHead>+ </TableRow>+ </TableHeader>+ <TableBody>+ {tags.map((tag) => (+ <TableRow key={tag.key}>+ <TableCell className="p-2">{tag.key}</TableCell>+ <TableCell className="p-2">{tag.value}</TableCell>+ </TableRow>+ ))}+ </TableBody>+ </Table>+ </TooltipContent>+ </Tooltip>+ </DetailValue>+ </Detail>)}{syncSecretMetadataAsTags && (- <GenericFieldLabel label="Sync Secret Metadata as Resource Tags">- <Badge variant="success">Enabled</Badge>- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Sync Secret Metadata as Resource Tags</DetailLabel>+ <DetailValue>+ <Badge variant="success">Enabled</Badge>+ </DetailValue>+ </Detail>)}</>);diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncOptionsSection/AwsSecretsManagerSyncOptionsSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncOptionsSection/AwsSecretsManagerSyncOptionsSection.tsxindex f1c990c005..e3381d0475 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncOptionsSection/AwsSecretsManagerSyncOptionsSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncOptionsSection/AwsSecretsManagerSyncOptionsSection.tsx@@ -1,10 +1,20 @@-import { faEye } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";import { EyeIcon } from "lucide-react";-import { GenericFieldLabel } from "@app/components/secret-syncs";-import { Table, TBody, Td, Th, THead, Tooltip, Tr } from "@app/components/v2";-import { Badge } from "@app/components/v3";+import {+ Badge,+ Detail,+ DetailLabel,+ DetailValue,+ Table,+ TableBody,+ TableCell,+ TableHead,+ TableHeader,+ TableRow,+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import { TAwsSecretsManagerSync } from "@app/hooks/api/secretSyncs/types/aws-secrets-manager-sync";type Props = {@@ -18,43 +28,54 @@ export const AwsSecretsManagerSyncOptionsSection = ({ secretSync }: Props) => {return (<>- {keyId && <GenericFieldLabel label="KMS Key">{keyId}</GenericFieldLabel>}+ {keyId && (+ <Detail>+ <DetailLabel>KMS Key</DetailLabel>+ <DetailValue>{keyId}</DetailValue>+ </Detail>+ )}{tags && tags.length > 0 && (- <GenericFieldLabel label="Tags">- <Tooltip- side="right"- className="max-w-xl p-1"- content={- <Table>- <THead>- <Th className="p-2 whitespace-nowrap">Key</Th>- <Th className="p-2">Value</Th>- </THead>- <TBody>- {tags.map((tag) => (- <Tr key={tag.key}>- <Td className="p-2">{tag.key}</Td>- <Td className="p-2">{tag.value}</Td>- </Tr>- ))}- </TBody>- </Table>- }- >- <div className="w-min">- <Badge variant="neutral">- <EyeIcon />- <FontAwesomeIcon icon={faEye} />- {tags.length} Tag{tags.length > 1 ? "s" : ""}- </Badge>- </div>- </Tooltip>- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Tags</DetailLabel>+ <DetailValue>+ <Tooltip>+ <TooltipTrigger asChild>+ <span className="inline-block w-min">+ <Badge variant="neutral">+ <EyeIcon />+ {tags.length} Tag{tags.length > 1 ? "s" : ""}+ </Badge>+ </span>+ </TooltipTrigger>+ <TooltipContent side="right" className="max-w-xl bg-background p-1">+ <Table>+ <TableHeader>+ <TableRow>+ <TableHead className="p-2 whitespace-nowrap">Key</TableHead>+ <TableHead className="p-2">Value</TableHead>+ </TableRow>+ </TableHeader>+ <TableBody>+ {tags.map((tag) => (+ <TableRow key={tag.key}>+ <TableCell className="p-2">{tag.key}</TableCell>+ <TableCell className="p-2">{tag.value}</TableCell>+ </TableRow>+ ))}+ </TableBody>+ </Table>+ </TooltipContent>+ </Tooltip>+ </DetailValue>+ </Detail>)}{syncSecretMetadataAsTags && (- <GenericFieldLabel label="Sync Secret Metadata as Tags">- <Badge variant="success">Enabled</Badge>- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Sync Secret Metadata as Tags</DetailLabel>+ <DetailValue>+ <Badge variant="success">Enabled</Badge>+ </DetailValue>+ </Detail>)}</>);diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncOptionsSection/FlyioSyncOptionsSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncOptionsSection/FlyioSyncOptionsSection.tsxindex b9ce00aab4..4178aa227e 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncOptionsSection/FlyioSyncOptionsSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncOptionsSection/FlyioSyncOptionsSection.tsx@@ -1,5 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";-import { Badge } from "@app/components/v3";+import { Badge, Detail, DetailLabel, DetailValue } from "@app/components/v3";import { TFlyioSync } from "@app/hooks/api/secretSyncs/types/flyio-sync";type Props = {@@ -12,10 +11,13 @@ export const FlyioSyncOptionsSection = ({ secretSync }: Props) => {} = secretSync;return (- <GenericFieldLabel label="Auto Redeploy On Secret Change">- <Badge variant={autoRedeploy ? "success" : "danger"}>- {autoRedeploy ? "Enabled" : "Disabled"}- </Badge>- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Auto Redeploy On Secret Change</DetailLabel>+ <DetailValue>+ <Badge variant={autoRedeploy ? "success" : "danger"}>+ {autoRedeploy ? "Enabled" : "Disabled"}+ </Badge>+ </DetailValue>+ </Detail>);};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncOptionsSection/RenderSyncOptionsSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncOptionsSection/RenderSyncOptionsSection.tsxindex 044a6fe181..ae72d1c168 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncOptionsSection/RenderSyncOptionsSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncOptionsSection/RenderSyncOptionsSection.tsx@@ -1,5 +1,4 @@-import { GenericFieldLabel } from "@app/components/secret-syncs";-import { Badge } from "@app/components/v3";+import { Badge, Detail, DetailLabel, DetailValue } from "@app/components/v3";import { TRenderSync } from "@app/hooks/api/secretSyncs/types/render-sync";type Props = {@@ -12,10 +11,13 @@ export const RenderSyncOptionsSection = ({ secretSync }: Props) => {} = secretSync;return (- <GenericFieldLabel label="Auto Redeploy Services">- <Badge variant={autoRedeployServices ? "success" : "danger"}>- {autoRedeployServices ? "Enabled" : "Disabled"}- </Badge>- </GenericFieldLabel>+ <Detail>+ <DetailLabel>Auto Redeploy Services</DetailLabel>+ <DetailValue>+ <Badge variant={autoRedeployServices ? "success" : "danger"}>+ {autoRedeployServices ? "Enabled" : "Disabled"}+ </Badge>+ </DetailValue>+ </Detail>);};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncOptionsSection/SecretSyncOptionsSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncOptionsSection/SecretSyncOptionsSection.tsxindex 34a601ffac..15dceb3eb6 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncOptionsSection/SecretSyncOptionsSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncOptionsSection/SecretSyncOptionsSection.tsx@@ -1,15 +1,19 @@import { ReactNode } from "react";-import { faEdit } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";-import { ProjectPermissionCan } from "@app/components/permissions";-import { GenericFieldLabel } from "@app/components/secret-syncs";-import { IconButton } from "@app/components/v2";-import { Badge } from "@app/components/v3";-import { ProjectPermissionSecretSyncActions } from "@app/context/ProjectPermissionContext/types";+import {+ Accordion,+ AccordionContent,+ AccordionItem,+ AccordionTrigger,+ Badge,+ Detail,+ DetailGroup,+ DetailLabel,+ DetailValue,+ Separator+} from "@app/components/v3";import { SECRET_SYNC_INITIAL_SYNC_BEHAVIOR_MAP } from "@app/helpers/secretSyncs";import { SecretSync, TSecretSync } from "@app/hooks/api/secretSyncs";-import { getSecretSyncPermissionSubject } from "@app/lib/fn/permission";import { AwsParameterStoreSyncOptionsSection } from "./AwsParameterStoreSyncOptionsSection";import { AwsSecretsManagerSyncOptionsSection } from "./AwsSecretsManagerSyncOptionsSection";@@ -18,17 +22,15 @@ import { RenderSyncOptionsSection } from "./RenderSyncOptionsSection";type Props = {secretSync: TSecretSync;- onEditOptions: VoidFunction;};-export const SecretSyncOptionsSection = ({ secretSync, onEditOptions }: Props) => {+export const SecretSyncOptionsSection = ({ secretSync }: Props) => {const {destination,syncOptions: { initialSyncBehavior, disableSecretDeletion, keySchema }} = secretSync;let AdditionalSyncOptionsComponent: ReactNode;- let allowEdits: boolean;switch (destination) {case SecretSync.AWSParameterStore:@@ -91,52 +93,41 @@ export const SecretSyncOptionsSection = ({ secretSync, onEditOptions }: Props) =throw new Error(`Unhandled Destination Review Fields: ${destination}`);}- switch (destination) {- case SecretSync.AzureEntraIdScim:- allowEdits = false;- break;- default:- allowEdits = true;- }-- const permissionSubject = getSecretSyncPermissionSubject(secretSync);-return (- <div>- <div className="flex w-full flex-col gap-3 rounded-lg border border-mineshaft-600 bg-mineshaft-900 px-4 py-3">- <div className="flex items-center justify-between border-b border-mineshaft-400 pb-2">- <h3 className="font-medium text-mineshaft-100">Sync Options</h3>- {allowEdits && (- <ProjectPermissionCan I={ProjectPermissionSecretSyncActions.Edit} a={permissionSubject}>- {(isAllowed) => (- <IconButton- variant="plain"- colorSchema="secondary"- isDisabled={!isAllowed}- ariaLabel="Edit sync options"- onClick={onEditOptions}- >- <FontAwesomeIcon icon={faEdit} />- </IconButton>+ <>+ <Separator className="mt-4" />+ <Accordion type="multiple" variant="ghost">+ <AccordionItem value="sync-options">+ <AccordionTrigger>Sync Options</AccordionTrigger>+ <AccordionContent>+ <DetailGroup>+ <Detail>+ <DetailLabel>Initial Sync Behavior</DetailLabel>+ <DetailValue>+ {SECRET_SYNC_INITIAL_SYNC_BEHAVIOR_MAP[initialSyncBehavior](destination).name}+ </DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Key Schema</DetailLabel>+ {keySchema ? (+ <DetailValue>{keySchema}</DetailValue>+ ) : (+ <DetailValue className="text-muted">—</DetailValue>+ )}+ </Detail>+ {AdditionalSyncOptionsComponent}+ {disableSecretDeletion && (+ <Detail>+ <DetailLabel>Secret Deletion</DetailLabel>+ <DetailValue>+ <Badge variant="neutral">Disabled</Badge>+ </DetailValue>+ </Detail>)}- </ProjectPermissionCan>- )}- </div>- <div>- <div className="space-y-3">- <GenericFieldLabel label="Initial Sync Behavior">- {SECRET_SYNC_INITIAL_SYNC_BEHAVIOR_MAP[initialSyncBehavior](destination).name}- </GenericFieldLabel>- <GenericFieldLabel label="Key Schema">{keySchema}</GenericFieldLabel>- {AdditionalSyncOptionsComponent}- {disableSecretDeletion && (- <GenericFieldLabel label="Secret Deletion">- <Badge variant="neutral">Disabled</Badge>- </GenericFieldLabel>- )}- </div>- </div>- </div>- </div>+ </DetailGroup>+ </AccordionContent>+ </AccordionItem>+ </Accordion>+ </>);};diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncSourceSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncSourceSection.tsxindex 2ed5832ff8..ec85e0167d 100644--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncSourceSection.tsx+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncSourceSection.tsx@@ -1,76 +1,66 @@-import { faEdit } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";import { AlertTriangleIcon } from "lucide-react";-import { ProjectPermissionCan } from "@app/components/permissions";-import { GenericFieldLabel } from "@app/components/secret-syncs";-import { IconButton, Tooltip } from "@app/components/v2";-import { Badge } from "@app/components/v3";-import { ProjectPermissionSecretSyncActions } from "@app/context/ProjectPermissionContext/types";+import {+ Badge,+ Detail,+ DetailGroupHeader,+ DetailLabel,+ DetailValue,+ Tooltip,+ TooltipContent,+ TooltipTrigger+} from "@app/components/v3";import { SecretSync, TSecretSync } from "@app/hooks/api/secretSyncs";-import { getSecretSyncPermissionSubject } from "@app/lib/fn/permission";import { AzureEntraIdScimSyncSourceSection } from "./AzureEntraIdScimSyncSourceSection";type Props = {secretSync: TSecretSync;- onEditSource: VoidFunction;};-const DefaultSecretSyncSourceSection = ({ secretSync, onEditSource }: Props) => {+const DefaultSecretSyncSourceSection = ({ secretSync }: Props) => {const { folder, environment } = secretSync;- const permissionSubject = getSecretSyncPermissionSubject(secretSync);-return (- <div>- <div className="flex w-full flex-col gap-3 rounded-lg border border-mineshaft-600 bg-mineshaft-900 px-4 py-3">- <div className="flex items-center justify-between border-b border-mineshaft-400 pb-2">- <h3 className="font-medium text-mineshaft-100">Source</h3>- <div>- {(!folder || !environment) && (- <Tooltip content="The source location for this sync has been deleted. Configure a new source or remove this sync.">- <div className="mr-1 inline-block w-min">+ <>+ <DetailGroupHeader>+ Source+ {(!folder || !environment) && (+ <div className="ml-auto">+ <Tooltip>+ <TooltipTrigger asChild>+ <span className="inline-block"><Badge variant="danger"><AlertTriangleIcon />Folder Deleted</Badge>- </div>- </Tooltip>- )}- <ProjectPermissionCan I={ProjectPermissionSecretSyncActions.Edit} a={permissionSubject}>- {(isAllowed) => (- <IconButton- variant="plain"- colorSchema="secondary"- isDisabled={!isAllowed}- ariaLabel="Edit sync source"- onClick={onEditSource}- >- <FontAwesomeIcon icon={faEdit} />- </IconButton>- )}- </ProjectPermissionCan>- </div>- </div>- <div>- <div className="space-y-3">- <GenericFieldLabel label="Environment">{environment?.name}</GenericFieldLabel>- <GenericFieldLabel label="Path">{folder?.path}</GenericFieldLabel>+ </span>+ </TooltipTrigger>+ <TooltipContent>+ The source location for this sync has been deleted. Configure a new source or remove+ this sync.+ </TooltipContent>+ </Tooltip></div>- </div>- </div>- </div>+ )}+ </DetailGroupHeader>+ <Detail>+ <DetailLabel>Environment</DetailLabel>+ <DetailValue>{environment?.name}</DetailValue>+ </Detail>+ <Detail>+ <DetailLabel>Path</DetailLabel>+ <DetailValue>{folder?.path}</DetailValue>+ </Detail>+ </>);};-export const SecretSyncSourceSection = ({ secretSync, onEditSource }: Props) => {+export const SecretSyncSourceSection = ({ secretSync }: Props) => {switch (secretSync.destination) {case SecretSync.AzureEntraIdScim:- return (- <AzureEntraIdScimSyncSourceSection secretSync={secretSync} onEditSource={onEditSource} />- );+ return <AzureEntraIdScimSyncSourceSection secretSync={secretSync} />;default:- return <DefaultSecretSyncSourceSection secretSync={secretSync} onEditSource={onEditSource} />;+ return <DefaultSecretSyncSourceSection secretSync={secretSync} />;}};diff --git a/sync-form-validation-checklist.md b/sync-form-validation-checklist.mdnew file mode 100644index 0000000000..3ea3d048ee--- /dev/null+++ b/sync-form-validation-checklist.md@@ -0,0 +1,77 @@+# Secret Sync Form Validation++Tracking checklist for the "Add Secret Sync" flow on every provider, validated against the dummy app connections seeded by `backend/src/db/seeds/6-app-connections.ts`.++## How to test++1. From `backend/`, run `npm run seed-dev` — dummy connections with IDs `00000000-0000-0000-0000-000000000NNN` appear in the seed org.+2. Log in to the frontend as `[email protected]`.+3. For each row below: navigate to **Add Secret Sync**, pick the provider, fill the form, submit.+4. Expected: a sync record is created. The background sync job will fail — that's fine, we're only testing the form flow.+5. Tick the box once form submission succeeds (or note the failure inline).++## Known caveats++- **Azure Entra ID SCIM** — form submit is expected to throw because the provider's `preSaveTransformDestinationConfig` calls Microsoft Graph live, which the stub layer can't intercept.+- **OVH, Devin** — no list-resource endpoints exist for these providers, so destination-config fields are manual text entry only (no stubbed dropdowns).++## Cloud secret stores++- [ ] AWS Parameter Store+- [ ] AWS Secrets Manager+- [ ] GCP Secret Manager+- [ ] Azure Key Vault+- [ ] Azure App Configuration+- [ ] Hashicorp Vault+- [ ] OCI Vault+- [ ] 1Password++## Source control / CI++- [ ] GitHub+- [ ] GitLab+- [ ] Bitbucket+- [ ] Azure DevOps+- [ ] CircleCI+- [ ] Travis CI+- [ ] TeamCity+- [ ] Octopus Deploy++## Hosting / PaaS++- [ ] Vercel+- [ ] Heroku+- [ ] Render+- [ ] Fly.io+- [ ] Netlify+- [ ] Cloudflare Pages+- [ ] Cloudflare Workers+- [ ] Digital Ocean App Platform+- [ ] Railway+- [ ] Northflank+- [ ] Supabase+- [ ] Laravel Forge++## Configuration / Infrastructure++- [ ] Terraform Cloud+- [ ] Databricks+- [ ] Humanitec+- [ ] Camunda+- [ ] Windmill+- [ ] Chef+- [ ] Zabbix+- [ ] Snowflake++## Identity / Miscellaneous++- [ ] Azure Entra ID SCIM — submit expected to fail+- [ ] External Infisical+- [ ] OVH — manual text entry only+- [ ] Devin — manual text entry only+- [ ] Ona+- [ ] Checkly++---++**Total: 42 sync providers** (8 cloud secret stores + 8 source/CI + 12 hosting + 8 config/infra + 6 identity/misc)