@burdenoff/microfe-integrations 2026.525.3 → 2026.527.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/integrations/IntegrationsAdminRoutes.js +4 -3
- package/dist/integrations/IntegrationsAdminRoutes.js.map +1 -1
- package/dist/integrations/IntegrationsUserRoutes.js +4 -3
- package/dist/integrations/IntegrationsUserRoutes.js.map +1 -1
- package/dist/integrations/components/AddConnectionDialog.js +281 -258
- package/dist/integrations/components/AddConnectionDialog.js.map +1 -1
- package/dist/integrations/components/CredentialStorageSelector.js +56 -48
- package/dist/integrations/components/CredentialStorageSelector.js.map +1 -1
- package/dist/integrations/components/ProviderCard.js +2 -0
- package/dist/integrations/components/ProviderCard.js.map +1 -1
- package/dist/integrations/hooks/useConnections.js.map +1 -1
- package/dist/integrations/hooks/useLogs.js.map +1 -1
- package/dist/integrations/hooks/useProviders.js.map +1 -1
- package/dist/integrations/pages/AddConnectionWizard.js +21 -2
- package/dist/integrations/pages/AddConnectionWizard.js.map +1 -1
- package/dist/integrations/pages/ConnectionDetail.js +10 -2
- package/dist/integrations/pages/ConnectionDetail.js.map +1 -1
- package/dist/integrations/pages/ConnectionLogs.js +122 -110
- package/dist/integrations/pages/ConnectionLogs.js.map +1 -1
- package/dist/integrations/pages/ConnectionsList.js +122 -109
- package/dist/integrations/pages/ConnectionsList.js.map +1 -1
- package/dist/integrations/pages/IntegrationsOverview.js +11 -5
- package/dist/integrations/pages/IntegrationsOverview.js.map +1 -1
- package/dist/integrations/pages/IntegrationsSettings.js +9 -2
- package/dist/integrations/pages/IntegrationsSettings.js.map +1 -1
- package/dist/integrations/pages/ProviderCatalog.js +9 -2
- package/dist/integrations/pages/ProviderCatalog.js.map +1 -1
- package/dist/integrations/pages/ProviderDetail.js +13 -2
- package/dist/integrations/pages/ProviderDetail.js.map +1 -1
- package/dist/integrations/pages/ProviderEditorPage.js +76 -25
- package/dist/integrations/pages/ProviderEditorPage.js.map +1 -1
- package/dist/integrations/providers/IntegrationsProvider.js +1 -1
- package/dist/integrations/providers/IntegrationsProvider.js.map +1 -1
- package/dist/integrations/utils/constants.js.map +1 -1
- package/dist/integrations/utils/integrationsHelpers.js.map +1 -1
- package/package.json +1 -1
|
@@ -57,6 +57,7 @@ function C() {
|
|
|
57
57
|
/* @__PURE__ */ S("div", {
|
|
58
58
|
className: "flex gap-2",
|
|
59
59
|
children: [/* @__PURE__ */ S("button", {
|
|
60
|
+
type: "button",
|
|
60
61
|
onClick: () => j(),
|
|
61
62
|
className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-status-error-bg-subtle text-status-error-text hover:bg-status-error-bg-subtle/80 transition-colors",
|
|
62
63
|
children: [
|
|
@@ -65,6 +66,7 @@ function C() {
|
|
|
65
66
|
D("integrations.connectionDetail.error.retry", "Try Again")
|
|
66
67
|
]
|
|
67
68
|
}), /* @__PURE__ */ S("button", {
|
|
69
|
+
type: "button",
|
|
68
70
|
onClick: () => T?.(r(w, "connections")),
|
|
69
71
|
className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors",
|
|
70
72
|
children: [
|
|
@@ -135,7 +137,8 @@ function C() {
|
|
|
135
137
|
type: "checkbox",
|
|
136
138
|
checked: K,
|
|
137
139
|
onChange: (e) => q(e.target.checked),
|
|
138
|
-
className: "mt-0.5"
|
|
140
|
+
className: "mt-0.5",
|
|
141
|
+
"aria-label": "Also remove mapped vault secret"
|
|
139
142
|
}), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
|
|
140
143
|
className: "text-sm font-medium text-foreground",
|
|
141
144
|
children: "Also remove mapped vault secret"
|
|
@@ -185,6 +188,7 @@ function C() {
|
|
|
185
188
|
className: "relative z-10 flex items-center gap-4",
|
|
186
189
|
children: [
|
|
187
190
|
/* @__PURE__ */ x("button", {
|
|
191
|
+
type: "button",
|
|
188
192
|
onClick: () => T?.(r(w, "connections")),
|
|
189
193
|
className: "p-2.5 hover:bg-accent rounded-lg transition-all",
|
|
190
194
|
"aria-label": D("integrations.connectionDetail.actions.backAriaLabel", "Back"),
|
|
@@ -215,7 +219,7 @@ function C() {
|
|
|
215
219
|
})]
|
|
216
220
|
})
|
|
217
221
|
]
|
|
218
|
-
}), /* @__PURE__ */ x("div", { className: "absolute top-0 right-0
|
|
222
|
+
}), /* @__PURE__ */ x("div", { className: "absolute top-0 right-0 size-64 bg-gradient-to-br from-primary/10 to-transparent rounded-full blur-3xl -z-0" })]
|
|
219
223
|
}),
|
|
220
224
|
/* @__PURE__ */ S("div", {
|
|
221
225
|
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
@@ -419,6 +423,7 @@ function C() {
|
|
|
419
423
|
className: "flex flex-wrap gap-2",
|
|
420
424
|
children: [
|
|
421
425
|
/* @__PURE__ */ S("button", {
|
|
426
|
+
type: "button",
|
|
422
427
|
onClick: we,
|
|
423
428
|
disabled: Q,
|
|
424
429
|
className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
|
|
@@ -428,6 +433,7 @@ function C() {
|
|
|
428
433
|
}) : /* @__PURE__ */ x(pe, { size: 14 }), D("integrations.connectionDetail.actions.test", "Test Connection")]
|
|
429
434
|
}),
|
|
430
435
|
B && O.provider.authType === "oauth2" && ye && /* @__PURE__ */ S("button", {
|
|
436
|
+
type: "button",
|
|
431
437
|
onClick: Te,
|
|
432
438
|
disabled: Q,
|
|
433
439
|
className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors disabled:opacity-50",
|
|
@@ -437,6 +443,7 @@ function C() {
|
|
|
437
443
|
}) : /* @__PURE__ */ x(de, { size: 14 }), D("integrations.connectionDetail.actions.refreshToken", "Refresh Token")]
|
|
438
444
|
}),
|
|
439
445
|
V && /* @__PURE__ */ S("button", {
|
|
446
|
+
type: "button",
|
|
440
447
|
onClick: Ee,
|
|
441
448
|
disabled: Q,
|
|
442
449
|
className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border-default text-status-warning-text hover:bg-status-warning-bg-subtle transition-colors disabled:opacity-50",
|
|
@@ -446,6 +453,7 @@ function C() {
|
|
|
446
453
|
}) : /* @__PURE__ */ x(v, { size: 14 }), D("integrations.connectionDetail.actions.revoke", "Revoke")]
|
|
447
454
|
}),
|
|
448
455
|
V && /* @__PURE__ */ S("button", {
|
|
456
|
+
type: "button",
|
|
449
457
|
onClick: De,
|
|
450
458
|
disabled: Q,
|
|
451
459
|
className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border-default text-status-error-text hover:bg-status-error-bg-subtle transition-colors disabled:opacity-50",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectionDetail.js","names":[],"sources":["../../../src/integrations/pages/ConnectionDetail.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { useParams } from 'react-router-dom';\nimport {\n ArrowLeft,\n Loader2,\n AlertCircle,\n RefreshCw,\n Shield,\n Clock,\n Activity,\n CheckCircle2,\n XCircle,\n Key,\n RotateCcw,\n Zap,\n Mail,\n User,\n Trash2,\n} from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { useI18n, usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { useFeatureFlag } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { useIntegrations } from '../providers/IntegrationsProvider';\nimport { INTEGRATION_PERMISSIONS } from '../constants/permissions';\nimport { INTEGRATION_FEATURE_FLAGS } from '../constants/featureFlags';\nimport { joinPath } from '../utils/navigation';\nimport { formatDate, formatLastUsed, getAuthTypeLabel } from '../utils/integrationsHelpers';\nimport {\n useConnection,\n useTestConnection,\n useRefreshToken,\n useRevokeConnection,\n useDeleteConnection,\n} from '../hooks/useConnections';\nimport { ProviderIcon } from '../components/ProviderIcon';\nimport { ConnectionStatusBadge } from '../components/ConnectionStatusBadge';\nimport { ConfirmDialog } from '../components/ConfirmDialog';\nimport { nativeConfirm, nativeImpact, nativeNotify } from '../../utils/nativeBridge';\n\n/**\n * Connection Detail — Single connection view with info, scopes, and action buttons.\n */\nexport function ConnectionDetail() {\n const { connectionId } = useParams<{ connectionId: string }>();\n const { basePath = '/', navigate } = useIntegrations();\n const { t } = useI18n();\n const tx = (key: string, fallback: string, params?: Record<string, string | number>) => {\n const translated = t(key, params);\n if (translated !== key) return translated;\n if (!params) return fallback;\n\n return Object.entries(params).reduce(\n (value, [paramKey, paramValue]) =>\n value\n .replace(`{{${paramKey}}}`, String(paramValue))\n .replace(`{${paramKey}}`, String(paramValue)),\n fallback\n );\n };\n\n const { connection, loading, error, refetch } = useConnection(connectionId ?? '');\n const { testConnection, loading: testing } = useTestConnection();\n const { refreshToken, loading: refreshing } = useRefreshToken();\n const { revokeConnection, loading: revoking } = useRevokeConnection();\n const { deleteConnection, loading: deleting } = useDeleteConnection();\n const canRefreshToken = useFeatureFlag(INTEGRATION_FEATURE_FLAGS.OAUTH_REFRESH, true);\n\n const { hasPermission, isLoading: permissionsLoading } = usePermissions();\n const canUpdate = hasPermission(INTEGRATION_PERMISSIONS.CONNECTION_UPDATE);\n const canDelete = hasPermission(INTEGRATION_PERMISSIONS.CONNECTION_DELETE);\n\n const [testResult, setTestResult] = useState<{\n success: boolean;\n message: string;\n latencyMs: number;\n } | null>(null);\n const [notification, setNotification] = useState<{\n type: 'success' | 'error';\n message: string;\n } | null>(null);\n const [deleteDialogOpen, setDeleteDialogOpen] = useState(false);\n const [deleteVaultSecret, setDeleteVaultSecret] = useState(false);\n const [revokeDialogOpen, setRevokeDialogOpen] = useState(false);\n\n const showNotification = (type: 'success' | 'error', message: string) => {\n setNotification({ type, message });\n setTimeout(() => setNotification(null), 5000);\n };\n\n if (loading || permissionsLoading) {\n return (\n <div className=\"flex flex-col items-center justify-center py-20\">\n <Loader2 size={48} className=\"animate-spin text-primary\" />\n <span className=\"mt-6 text-sm font-medium text-muted-foreground\">\n {tx('integrations.connectionDetail.loading', 'Loading connection details...')}\n </span>\n </div>\n );\n }\n\n if (error || !connection) {\n return (\n <div className=\"p-6 max-w-4xl mx-auto\">\n <div className=\"rounded-xl border border-border-default bg-status-error-bg-subtle p-6 flex items-start gap-4\">\n <AlertCircle size={24} className=\"text-status-error-text flex-shrink-0\" />\n <div className=\"flex-1\">\n <h3 className=\"font-semibold text-status-error-text mb-1\">\n {tx('integrations.connectionDetail.error.title', 'Connection not found')}\n </h3>\n <p className=\"text-sm text-status-error-text mb-3\">\n {error?.message ||\n tx(\n 'integrations.connectionDetail.error.description',\n 'The requested connection could not be loaded.'\n )}\n </p>\n <div className=\"flex gap-2\">\n <button\n onClick={() => refetch()}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-status-error-bg-subtle text-status-error-text hover:bg-status-error-bg-subtle/80 transition-colors\"\n >\n <RefreshCw size={14} />{' '}\n {tx('integrations.connectionDetail.error.retry', 'Try Again')}\n </button>\n <button\n onClick={() => navigate?.(joinPath(basePath, 'connections'))}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors\"\n >\n <ArrowLeft size={14} />{' '}\n {tx('integrations.connectionDetail.error.back', 'Back to Connections')}\n </button>\n </div>\n </div>\n </div>\n </div>\n );\n }\n\n const handleTest = async () => {\n const result = await testConnection(connection.id);\n if (result) {\n setTestResult(result);\n showNotification(result.success ? 'success' : 'error', result.message);\n }\n };\n\n const handleRefresh = async () => {\n await refreshToken(connection.id);\n showNotification(\n 'success',\n tx(\n 'integrations.connectionDetail.notifications.refreshSuccess',\n 'Token refreshed successfully'\n )\n );\n refetch();\n };\n\n const handleRevoke = async () => {\n setRevokeDialogOpen(true);\n };\n\n const confirmRevoke = async () => {\n await revokeConnection(connection.id);\n showNotification(\n 'success',\n tx('integrations.connectionDetail.notifications.revokeSuccess', 'Connection revoked')\n );\n setRevokeDialogOpen(false);\n refetch();\n };\n\n const handleDelete = async () => {\n void nativeImpact('medium');\n const result = await nativeConfirm({\n title: tx('integrations.connectionDetail.deleteDialog.title', 'Delete Connection'),\n message: tx(\n 'integrations.connectionDetail.deleteDialog.message',\n 'Delete this connection? This cannot be undone.'\n ),\n okButtonTitle: tx('integrations.connectionDetail.deleteDialog.confirm', 'Delete'),\n cancelButtonTitle: tx('integrations.connectionDetail.deleteDialog.cancel', 'Cancel'),\n });\n if (result === null) {\n setDeleteDialogOpen(true);\n return;\n }\n if (result) {\n await confirmDelete();\n }\n };\n\n const confirmDelete = async () => {\n try {\n await deleteConnection(connection.id, deleteVaultSecret);\n showNotification(\n 'success',\n tx('integrations.connectionDetail.notifications.deleteSuccess', 'Connection deleted')\n );\n void nativeNotify('success');\n setDeleteDialogOpen(false);\n setDeleteVaultSecret(false);\n navigate?.(joinPath(basePath, 'connections'));\n } catch (error) {\n showNotification(\n 'error',\n error instanceof Error ? error.message : 'Failed to delete connection'\n );\n void nativeNotify('error');\n }\n };\n\n const actionLoading = testing || refreshing || revoking || deleting;\n const usesVaultCredentials = Boolean(connection.vaultId || connection.credentialSecretId);\n\n return (\n <div className=\"space-y-6 p-6 max-w-5xl mx-auto\">\n {/* Notification */}\n {notification && (\n <div\n className={cn(\n 'fixed top-4 right-4 z-50 flex items-center gap-3 px-5 py-3 rounded-xl shadow-2xl border-2 animate-in slide-in-from-top-4 duration-300',\n notification.type === 'success'\n ? 'bg-status-success-bg-subtle text-status-success-text border-border-default'\n : 'bg-status-error-bg-subtle text-status-error-text border-border-default'\n )}\n >\n {notification.type === 'success' ? <CheckCircle2 size={20} /> : <XCircle size={20} />}\n <span className=\"font-medium\">{notification.message}</span>\n </div>\n )}\n\n {deleteDialogOpen && (\n <div className=\"fixed inset-0 z-50 flex items-center justify-center bg-foreground/40 px-4\">\n <div className=\"w-full max-w-md rounded-xl border border-border bg-background p-6 shadow-2xl space-y-4\">\n <div>\n <h2 className=\"text-lg font-semibold text-foreground\">Delete connection</h2>\n <p className=\"text-sm text-muted-foreground mt-1\">\n This removes the connection record immediately. You can also remove the mapped vault\n secret if you no longer need it.\n </p>\n </div>\n\n {usesVaultCredentials && (\n <label className=\"flex items-start gap-3 rounded-lg border border-border/60 bg-card px-4 py-3 cursor-pointer\">\n <input\n type=\"checkbox\"\n checked={deleteVaultSecret}\n onChange={(event) => setDeleteVaultSecret(event.target.checked)}\n className=\"mt-0.5\"\n />\n <div>\n <p className=\"text-sm font-medium text-foreground\">\n Also remove mapped vault secret\n </p>\n <p className=\"text-xs text-muted-foreground mt-1\">\n Use this only if no other connections rely on the same secret.\n </p>\n </div>\n </label>\n )}\n\n <div className=\"flex justify-end gap-3\">\n <button\n type=\"button\"\n onClick={() => {\n setDeleteDialogOpen(false);\n setDeleteVaultSecret(false);\n }}\n className=\"px-4 py-2 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors\"\n >\n Cancel\n </button>\n <button\n type=\"button\"\n onClick={confirmDelete}\n disabled={deleting}\n className=\"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-lg bg-destructive text-primary-foreground disabled:opacity-50\"\n >\n {deleting ? <Loader2 size={14} className=\"animate-spin\" /> : <Trash2 size={14} />}\n Delete connection\n </button>\n </div>\n </div>\n </div>\n )}\n\n <ConfirmDialog\n open={revokeDialogOpen}\n title={tx('integrations.connectionDetail.confirm.revokeTitle', 'Revoke connection')}\n description={tx(\n 'integrations.connectionDetail.confirm.revoke',\n 'Are you sure you want to revoke this connection? This will disconnect the external service.'\n )}\n confirmLabel={tx('integrations.connectionDetail.actions.revoke', 'Revoke')}\n cancelLabel={tx('integrations.connectionDetail.actions.cancel', 'Cancel')}\n loading={revoking}\n destructive\n icon={<Shield size={20} />}\n onConfirm={confirmRevoke}\n onCancel={() => setRevokeDialogOpen(false)}\n />\n\n {/* Header */}\n <div className=\"relative overflow-hidden rounded-xl bg-gradient-to-br from-primary/5 via-primary/3 to-background border border-border/50 p-6 shadow-sm\">\n <div className=\"relative z-10 flex items-center gap-4\">\n <button\n onClick={() => navigate?.(joinPath(basePath, 'connections'))}\n className=\"p-2.5 hover:bg-accent rounded-lg transition-all\"\n aria-label={tx('integrations.connectionDetail.actions.backAriaLabel', 'Back')}\n >\n <ArrowLeft size={20} />\n </button>\n <ProviderIcon provider={connection.provider} size={56} />\n <div className=\"flex-1\">\n <div className=\"flex items-center gap-3\">\n <h1 className=\"text-2xl sm:text-3xl font-bold text-foreground\">{connection.name}</h1>\n <ConnectionStatusBadge status={connection.status} size=\"md\" />\n </div>\n <p className=\"text-sm text-muted-foreground mt-0.5\">\n {connection.provider.name} · {getAuthTypeLabel(connection.provider.authType)}\n </p>\n </div>\n </div>\n <div className=\"absolute top-0 right-0 w-64 h-64 bg-gradient-to-br from-primary/10 to-transparent rounded-full blur-3xl -z-0\" />\n </div>\n\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n {/* Connection Info */}\n <div className=\"rounded-xl border border-border/50 bg-card p-5 space-y-4\">\n <h2 className=\"font-semibold text-foreground flex items-center gap-2\">\n <Activity size={18} className=\"text-primary\" />\n {tx('integrations.connectionDetail.sections.info', 'Connection Info')}\n </h2>\n <div className=\"space-y-3\">\n {connection.description && (\n <div className=\"py-2 border-b border-border/50\">\n <span className=\"text-xs text-muted-foreground uppercase tracking-wide\">\n {tx('integrations.connectionDetail.fields.description', 'Description')}\n </span>\n <p className=\"text-sm text-foreground mt-0.5\">{connection.description}</p>\n </div>\n )}\n <div className=\"flex items-center justify-between py-2 border-b border-border/50\">\n <span className=\"text-sm text-muted-foreground\">\n {tx('integrations.connectionDetail.fields.provider', 'Provider')}\n </span>\n <span className=\"text-sm font-medium text-foreground\">\n {connection.provider.name}\n </span>\n </div>\n {connection.externalAccountEmail && (\n <div className=\"flex items-center justify-between py-2 border-b border-border/50\">\n <span className=\"text-sm text-muted-foreground flex items-center gap-1\">\n <Mail size={14} /> {tx('integrations.connectionDetail.fields.account', 'Account')}\n </span>\n <span className=\"text-sm font-medium text-foreground\">\n {connection.externalAccountEmail}\n </span>\n </div>\n )}\n {connection.externalAccountName && (\n <div className=\"flex items-center justify-between py-2 border-b border-border/50\">\n <span className=\"text-sm text-muted-foreground flex items-center gap-1\">\n <User size={14} /> {tx('integrations.connectionDetail.fields.name', 'Name')}\n </span>\n <span className=\"text-sm font-medium text-foreground\">\n {connection.externalAccountName}\n </span>\n </div>\n )}\n {connection.errorMessage && (\n <div className=\"py-2 border-b border-border/50\">\n <span className=\"text-xs text-status-error-text uppercase tracking-wide\">\n {tx('integrations.connectionDetail.fields.error', 'Error')}\n </span>\n <p className=\"text-sm text-status-error-text mt-0.5 bg-status-error-bg-subtle rounded-lg p-2\">\n {connection.errorMessage}\n </p>\n </div>\n )}\n <div className=\"flex items-center justify-between py-2 border-b border-border/50\">\n <span className=\"text-sm text-muted-foreground flex items-center gap-1\">\n <Clock size={14} />{' '}\n {tx('integrations.connectionDetail.fields.lastUsed', 'Last Used')}\n </span>\n <span className=\"text-sm text-foreground\">\n {formatLastUsed(connection.lastUsedAt)}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2 border-b border-border/50\">\n <span className=\"text-sm text-muted-foreground\">\n {tx('integrations.connectionDetail.fields.healthCheck', 'Health Check')}\n </span>\n <span className=\"text-sm text-foreground\">\n {formatDate(connection.lastHealthCheck)}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2\">\n <span className=\"text-sm text-muted-foreground\">\n {tx('integrations.connectionDetail.fields.created', 'Created')}\n </span>\n <span className=\"text-sm text-foreground\">{formatDate(connection.createdAt)}</span>\n </div>\n </div>\n </div>\n\n {/* Scopes & Actions */}\n <div className=\"space-y-4\">\n {/* Granted Scopes */}\n <div className=\"rounded-xl border border-border/50 bg-card p-5\">\n <h2 className=\"font-semibold text-foreground flex items-center gap-2 mb-3\">\n <Shield size={18} className=\"text-primary\" />\n {tx('integrations.connectionDetail.sections.scopes', 'Granted Scopes')}\n </h2>\n {connection.grantedScopes.length > 0 ? (\n <div className=\"flex flex-wrap gap-2\">\n {connection.grantedScopes.map((scope) => (\n <span\n key={scope}\n className=\"text-xs px-2.5 py-1 rounded-full bg-muted text-muted-foreground font-mono\"\n >\n {scope}\n </span>\n ))}\n </div>\n ) : (\n <p className=\"text-sm text-muted-foreground\">\n {tx('integrations.connectionDetail.scopes.empty', 'No scopes granted.')}\n </p>\n )}\n </div>\n\n {/* Test Result */}\n {testResult && (\n <div\n className={cn(\n 'rounded-xl border p-5',\n testResult.success\n ? 'border-border-default bg-status-success-bg-subtle'\n : 'border-border-default bg-status-error-bg-subtle'\n )}\n >\n <h2\n className={cn(\n 'font-semibold flex items-center gap-2 mb-2',\n testResult.success ? 'text-status-success-text' : 'text-status-error-text'\n )}\n >\n {testResult.success ? <CheckCircle2 size={18} /> : <XCircle size={18} />}\n {testResult.success\n ? tx('integrations.connectionDetail.testResult.passed', 'Connection Test Passed')\n : tx('integrations.connectionDetail.testResult.failed', 'Connection Test Failed')}\n </h2>\n <p\n className={cn(\n 'text-sm',\n testResult.success ? 'text-status-success-text' : 'text-status-error-text'\n )}\n >\n {testResult.message}\n </p>\n <p className=\"text-xs text-muted-foreground mt-1\">\n {tx('integrations.connectionDetail.testResult.latency', 'Latency: {latency}ms', {\n latency: testResult.latencyMs,\n })}\n </p>\n </div>\n )}\n\n {usesVaultCredentials && (\n <div className=\"rounded-xl border border-border/50 bg-card p-5\">\n <h2 className=\"font-semibold text-foreground flex items-center gap-2 mb-3\">\n <Key size={18} className=\"text-primary\" />\n Credential Storage\n </h2>\n <div className=\"space-y-2 text-sm\">\n {connection.vaultId && (\n <div className=\"flex items-center justify-between gap-3\">\n <span className=\"text-muted-foreground\">Vault</span>\n <span className=\"font-medium text-foreground break-all\">\n {connection.vaultId}\n </span>\n </div>\n )}\n {connection.credentialSecretName && (\n <div className=\"flex items-center justify-between gap-3\">\n <span className=\"text-muted-foreground\">Secret</span>\n <span className=\"font-medium text-foreground break-all\">\n {connection.credentialSecretName}\n </span>\n </div>\n )}\n {connection.credentialSecretId && (\n <div className=\"flex items-center justify-between gap-3\">\n <span className=\"text-muted-foreground\">Secret ID</span>\n <span className=\"font-mono text-xs text-foreground break-all\">\n {connection.credentialSecretId}\n </span>\n </div>\n )}\n </div>\n </div>\n )}\n\n {/* Actions — hidden entirely when user has no action permissions */}\n {(canUpdate || canDelete) && (\n <div className=\"rounded-xl border border-border/50 bg-card p-5\">\n <h2 className=\"font-semibold text-foreground flex items-center gap-2 mb-3\">\n <Key size={18} className=\"text-primary\" />\n {tx('integrations.connectionDetail.sections.actions', 'Actions')}\n </h2>\n <div className=\"flex flex-wrap gap-2\">\n <button\n onClick={handleTest}\n disabled={actionLoading}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50\"\n >\n {testing ? <Loader2 size={14} className=\"animate-spin\" /> : <Zap size={14} />}\n {tx('integrations.connectionDetail.actions.test', 'Test Connection')}\n </button>\n {canUpdate && connection.provider.authType === 'oauth2' && canRefreshToken && (\n <button\n onClick={handleRefresh}\n disabled={actionLoading}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors disabled:opacity-50\"\n >\n {refreshing ? (\n <Loader2 size={14} className=\"animate-spin\" />\n ) : (\n <RotateCcw size={14} />\n )}\n {tx('integrations.connectionDetail.actions.refreshToken', 'Refresh Token')}\n </button>\n )}\n {canDelete && (\n <button\n onClick={handleRevoke}\n disabled={actionLoading}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border-default text-status-warning-text hover:bg-status-warning-bg-subtle transition-colors disabled:opacity-50\"\n >\n {revoking ? (\n <Loader2 size={14} className=\"animate-spin\" />\n ) : (\n <Shield size={14} />\n )}\n {tx('integrations.connectionDetail.actions.revoke', 'Revoke')}\n </button>\n )}\n {canDelete && (\n <button\n onClick={handleDelete}\n disabled={actionLoading}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border-default text-status-error-text hover:bg-status-error-bg-subtle transition-colors disabled:opacity-50\"\n >\n {deleting ? (\n <Loader2 size={14} className=\"animate-spin\" />\n ) : (\n <Trash2 size={14} />\n )}\n {tx('integrations.connectionDetail.actions.delete', 'Delete')}\n </button>\n )}\n </div>\n </div>\n )}\n </div>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AA0CA,SAAgB,IAAmB;CACjC,IAAM,EAAE,oBAAiB,IAAqC,EACxD,EAAE,cAAW,KAAK,gBAAa,GAAiB,EAChD,EAAE,SAAM,IAAS,EACjB,KAAM,GAAa,GAAkB,MAA6C;EACtF,IAAM,IAAa,EAAE,GAAK,EAAO;AAIjC,SAHI,MAAe,IACd,IAEE,OAAO,QAAQ,EAAO,CAAC,QAC3B,GAAO,CAAC,GAAU,OACjB,EACG,QAAQ,KAAK,EAAS,KAAK,OAAO,EAAW,CAAC,CAC9C,QAAQ,IAAI,EAAS,IAAI,OAAO,EAAW,CAAC,EACjD,EACD,GARmB,IADW;IAY3B,EAAE,eAAY,YAAS,UAAO,eAAY,EAAc,KAAgB,GAAG,EAC3E,EAAE,mBAAgB,SAAS,MAAY,IAAmB,EAC1D,EAAE,iBAAc,SAAS,MAAe,IAAiB,EACzD,EAAE,qBAAkB,SAAS,MAAa,IAAqB,EAC/D,EAAE,sBAAkB,SAAS,MAAa,GAAqB,EAC/D,KAAkB,GAAe,GAA0B,eAAe,GAAK,EAE/E,EAAE,kBAAe,WAAW,OAAuB,IAAgB,EACnE,IAAY,EAAc,EAAwB,kBAAkB,EACpE,IAAY,EAAc,EAAwB,kBAAkB,EAEpE,CAAC,GAAY,MAAiB,EAI1B,KAAK,EACT,CAAC,GAAc,KAAmB,EAG9B,KAAK,EACT,CAAC,IAAkB,KAAuB,EAAS,GAAM,EACzD,CAAC,GAAmB,KAAwB,EAAS,GAAM,EAC3D,CAAC,IAAkB,KAAuB,EAAS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AAU;oBAHZ,CAKG,IACC,kBAAC,GAAD;WAAS,MAAM;WAAI,WAAU;WAAiB,CAAA,GAE9C,kBAAC,GAAD,EAAQ,MAAM,IAAM,CAAA,EAErB,EAAG,gDAAgD,SAAS,CACtD;;SAEP;UACF;;MAEJ;OACF;;GACF"}
|
|
1
|
+
{"version":3,"file":"ConnectionDetail.js","names":[],"sources":["../../../src/integrations/pages/ConnectionDetail.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { useParams } from 'react-router-dom';\nimport {\n ArrowLeft,\n Loader2,\n AlertCircle,\n RefreshCw,\n Shield,\n Clock,\n Activity,\n CheckCircle2,\n XCircle,\n Key,\n RotateCcw,\n Zap,\n Mail,\n User,\n Trash2,\n} from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { useI18n, usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { useFeatureFlag } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { useIntegrations } from '../providers/IntegrationsProvider';\nimport { INTEGRATION_PERMISSIONS } from '../constants/permissions';\nimport { INTEGRATION_FEATURE_FLAGS } from '../constants/featureFlags';\nimport { joinPath } from '../utils/navigation';\nimport { formatDate, formatLastUsed, getAuthTypeLabel } from '../utils/integrationsHelpers';\nimport {\n useConnection,\n useTestConnection,\n useRefreshToken,\n useRevokeConnection,\n useDeleteConnection,\n} from '../hooks/useConnections';\nimport { ProviderIcon } from '../components/ProviderIcon';\nimport { ConnectionStatusBadge } from '../components/ConnectionStatusBadge';\nimport { ConfirmDialog } from '../components/ConfirmDialog';\nimport { nativeConfirm, nativeImpact, nativeNotify } from '../../utils/nativeBridge';\n\n/**\n * Connection Detail — Single connection view with info, scopes, and action buttons.\n */\nexport function ConnectionDetail() {\n const { connectionId } = useParams<{ connectionId: string }>();\n const { basePath = '/', navigate } = useIntegrations();\n const { t } = useI18n();\n const tx = (key: string, fallback: string, params?: Record<string, string | number>) => {\n const translated = t(key, params);\n if (translated !== key) return translated;\n if (!params) return fallback;\n\n return Object.entries(params).reduce(\n (value, [paramKey, paramValue]) =>\n value\n .replace(`{{${paramKey}}}`, String(paramValue))\n .replace(`{${paramKey}}`, String(paramValue)),\n fallback\n );\n };\n\n const { connection, loading, error, refetch } = useConnection(connectionId ?? '');\n const { testConnection, loading: testing } = useTestConnection();\n const { refreshToken, loading: refreshing } = useRefreshToken();\n const { revokeConnection, loading: revoking } = useRevokeConnection();\n const { deleteConnection, loading: deleting } = useDeleteConnection();\n const canRefreshToken = useFeatureFlag(INTEGRATION_FEATURE_FLAGS.OAUTH_REFRESH, true);\n\n const { hasPermission, isLoading: permissionsLoading } = usePermissions();\n const canUpdate = hasPermission(INTEGRATION_PERMISSIONS.CONNECTION_UPDATE);\n const canDelete = hasPermission(INTEGRATION_PERMISSIONS.CONNECTION_DELETE);\n\n const [testResult, setTestResult] = useState<{\n success: boolean;\n message: string;\n latencyMs: number;\n } | null>(null);\n const [notification, setNotification] = useState<{\n type: 'success' | 'error';\n message: string;\n } | null>(null);\n const [deleteDialogOpen, setDeleteDialogOpen] = useState(false);\n const [deleteVaultSecret, setDeleteVaultSecret] = useState(false);\n const [revokeDialogOpen, setRevokeDialogOpen] = useState(false);\n\n const showNotification = (type: 'success' | 'error', message: string) => {\n setNotification({ type, message });\n setTimeout(() => setNotification(null), 5000);\n };\n\n if (loading || permissionsLoading) {\n return (\n <div className=\"flex flex-col items-center justify-center py-20\">\n <Loader2 size={48} className=\"animate-spin text-primary\" />\n <span className=\"mt-6 text-sm font-medium text-muted-foreground\">\n {tx('integrations.connectionDetail.loading', 'Loading connection details...')}\n </span>\n </div>\n );\n }\n\n if (error || !connection) {\n return (\n <div className=\"p-6 max-w-4xl mx-auto\">\n <div className=\"rounded-xl border border-border-default bg-status-error-bg-subtle p-6 flex items-start gap-4\">\n <AlertCircle size={24} className=\"text-status-error-text flex-shrink-0\" />\n <div className=\"flex-1\">\n <h3 className=\"font-semibold text-status-error-text mb-1\">\n {tx('integrations.connectionDetail.error.title', 'Connection not found')}\n </h3>\n <p className=\"text-sm text-status-error-text mb-3\">\n {error?.message ||\n tx(\n 'integrations.connectionDetail.error.description',\n 'The requested connection could not be loaded.'\n )}\n </p>\n <div className=\"flex gap-2\">\n <button\n type=\"button\"\n onClick={() => refetch()}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-status-error-bg-subtle text-status-error-text hover:bg-status-error-bg-subtle/80 transition-colors\"\n >\n <RefreshCw size={14} />{' '}\n {tx('integrations.connectionDetail.error.retry', 'Try Again')}\n </button>\n <button\n type=\"button\"\n onClick={() => navigate?.(joinPath(basePath, 'connections'))}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors\"\n >\n <ArrowLeft size={14} />{' '}\n {tx('integrations.connectionDetail.error.back', 'Back to Connections')}\n </button>\n </div>\n </div>\n </div>\n </div>\n );\n }\n\n const handleTest = async () => {\n const result = await testConnection(connection.id);\n if (result) {\n setTestResult(result);\n showNotification(result.success ? 'success' : 'error', result.message);\n }\n };\n\n const handleRefresh = async () => {\n await refreshToken(connection.id);\n showNotification(\n 'success',\n tx(\n 'integrations.connectionDetail.notifications.refreshSuccess',\n 'Token refreshed successfully'\n )\n );\n refetch();\n };\n\n const handleRevoke = async () => {\n setRevokeDialogOpen(true);\n };\n\n const confirmRevoke = async () => {\n await revokeConnection(connection.id);\n showNotification(\n 'success',\n tx('integrations.connectionDetail.notifications.revokeSuccess', 'Connection revoked')\n );\n setRevokeDialogOpen(false);\n refetch();\n };\n\n const handleDelete = async () => {\n void nativeImpact('medium');\n const result = await nativeConfirm({\n title: tx('integrations.connectionDetail.deleteDialog.title', 'Delete Connection'),\n message: tx(\n 'integrations.connectionDetail.deleteDialog.message',\n 'Delete this connection? This cannot be undone.'\n ),\n okButtonTitle: tx('integrations.connectionDetail.deleteDialog.confirm', 'Delete'),\n cancelButtonTitle: tx('integrations.connectionDetail.deleteDialog.cancel', 'Cancel'),\n });\n if (result === null) {\n setDeleteDialogOpen(true);\n return;\n }\n if (result) {\n await confirmDelete();\n }\n };\n\n const confirmDelete = async () => {\n try {\n await deleteConnection(connection.id, deleteVaultSecret);\n showNotification(\n 'success',\n tx('integrations.connectionDetail.notifications.deleteSuccess', 'Connection deleted')\n );\n void nativeNotify('success');\n setDeleteDialogOpen(false);\n setDeleteVaultSecret(false);\n navigate?.(joinPath(basePath, 'connections'));\n } catch (error) {\n showNotification(\n 'error',\n error instanceof Error ? error.message : 'Failed to delete connection'\n );\n void nativeNotify('error');\n }\n };\n\n const actionLoading = testing || refreshing || revoking || deleting;\n const usesVaultCredentials = Boolean(connection.vaultId || connection.credentialSecretId);\n\n return (\n <div className=\"space-y-6 p-6 max-w-5xl mx-auto\">\n {/* Notification */}\n {notification && (\n <div\n className={cn(\n 'fixed top-4 right-4 z-50 flex items-center gap-3 px-5 py-3 rounded-xl shadow-2xl border-2 animate-in slide-in-from-top-4 duration-300',\n notification.type === 'success'\n ? 'bg-status-success-bg-subtle text-status-success-text border-border-default'\n : 'bg-status-error-bg-subtle text-status-error-text border-border-default'\n )}\n >\n {notification.type === 'success' ? <CheckCircle2 size={20} /> : <XCircle size={20} />}\n <span className=\"font-medium\">{notification.message}</span>\n </div>\n )}\n\n {deleteDialogOpen && (\n <div className=\"fixed inset-0 z-50 flex items-center justify-center bg-foreground/40 px-4\">\n <div className=\"w-full max-w-md rounded-xl border border-border bg-background p-6 shadow-2xl space-y-4\">\n <div>\n <h2 className=\"text-lg font-semibold text-foreground\">Delete connection</h2>\n <p className=\"text-sm text-muted-foreground mt-1\">\n This removes the connection record immediately. You can also remove the mapped vault\n secret if you no longer need it.\n </p>\n </div>\n\n {usesVaultCredentials && (\n <label className=\"flex items-start gap-3 rounded-lg border border-border/60 bg-card px-4 py-3 cursor-pointer\">\n <input\n type=\"checkbox\"\n checked={deleteVaultSecret}\n onChange={(event) => setDeleteVaultSecret(event.target.checked)}\n className=\"mt-0.5\"\n aria-label=\"Also remove mapped vault secret\"\n />\n <div>\n <p className=\"text-sm font-medium text-foreground\">\n Also remove mapped vault secret\n </p>\n <p className=\"text-xs text-muted-foreground mt-1\">\n Use this only if no other connections rely on the same secret.\n </p>\n </div>\n </label>\n )}\n\n <div className=\"flex justify-end gap-3\">\n <button\n type=\"button\"\n onClick={() => {\n setDeleteDialogOpen(false);\n setDeleteVaultSecret(false);\n }}\n className=\"px-4 py-2 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors\"\n >\n Cancel\n </button>\n <button\n type=\"button\"\n onClick={confirmDelete}\n disabled={deleting}\n className=\"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-lg bg-destructive text-primary-foreground disabled:opacity-50\"\n >\n {deleting ? <Loader2 size={14} className=\"animate-spin\" /> : <Trash2 size={14} />}\n Delete connection\n </button>\n </div>\n </div>\n </div>\n )}\n\n <ConfirmDialog\n open={revokeDialogOpen}\n title={tx('integrations.connectionDetail.confirm.revokeTitle', 'Revoke connection')}\n description={tx(\n 'integrations.connectionDetail.confirm.revoke',\n 'Are you sure you want to revoke this connection? This will disconnect the external service.'\n )}\n confirmLabel={tx('integrations.connectionDetail.actions.revoke', 'Revoke')}\n cancelLabel={tx('integrations.connectionDetail.actions.cancel', 'Cancel')}\n loading={revoking}\n destructive\n icon={<Shield size={20} />}\n onConfirm={confirmRevoke}\n onCancel={() => setRevokeDialogOpen(false)}\n />\n\n {/* Header */}\n <div className=\"relative overflow-hidden rounded-xl bg-gradient-to-br from-primary/5 via-primary/3 to-background border border-border/50 p-6 shadow-sm\">\n <div className=\"relative z-10 flex items-center gap-4\">\n <button\n type=\"button\"\n onClick={() => navigate?.(joinPath(basePath, 'connections'))}\n className=\"p-2.5 hover:bg-accent rounded-lg transition-all\"\n aria-label={tx('integrations.connectionDetail.actions.backAriaLabel', 'Back')}\n >\n <ArrowLeft size={20} />\n </button>\n <ProviderIcon provider={connection.provider} size={56} />\n <div className=\"flex-1\">\n <div className=\"flex items-center gap-3\">\n <h1 className=\"text-2xl sm:text-3xl font-bold text-foreground\">{connection.name}</h1>\n <ConnectionStatusBadge status={connection.status} size=\"md\" />\n </div>\n <p className=\"text-sm text-muted-foreground mt-0.5\">\n {connection.provider.name} · {getAuthTypeLabel(connection.provider.authType)}\n </p>\n </div>\n </div>\n <div className=\"absolute top-0 right-0 size-64 bg-gradient-to-br from-primary/10 to-transparent rounded-full blur-3xl -z-0\" />\n </div>\n\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n {/* Connection Info */}\n <div className=\"rounded-xl border border-border/50 bg-card p-5 space-y-4\">\n <h2 className=\"font-semibold text-foreground flex items-center gap-2\">\n <Activity size={18} className=\"text-primary\" />\n {tx('integrations.connectionDetail.sections.info', 'Connection Info')}\n </h2>\n <div className=\"space-y-3\">\n {connection.description && (\n <div className=\"py-2 border-b border-border/50\">\n <span className=\"text-xs text-muted-foreground uppercase tracking-wide\">\n {tx('integrations.connectionDetail.fields.description', 'Description')}\n </span>\n <p className=\"text-sm text-foreground mt-0.5\">{connection.description}</p>\n </div>\n )}\n <div className=\"flex items-center justify-between py-2 border-b border-border/50\">\n <span className=\"text-sm text-muted-foreground\">\n {tx('integrations.connectionDetail.fields.provider', 'Provider')}\n </span>\n <span className=\"text-sm font-medium text-foreground\">\n {connection.provider.name}\n </span>\n </div>\n {connection.externalAccountEmail && (\n <div className=\"flex items-center justify-between py-2 border-b border-border/50\">\n <span className=\"text-sm text-muted-foreground flex items-center gap-1\">\n <Mail size={14} /> {tx('integrations.connectionDetail.fields.account', 'Account')}\n </span>\n <span className=\"text-sm font-medium text-foreground\">\n {connection.externalAccountEmail}\n </span>\n </div>\n )}\n {connection.externalAccountName && (\n <div className=\"flex items-center justify-between py-2 border-b border-border/50\">\n <span className=\"text-sm text-muted-foreground flex items-center gap-1\">\n <User size={14} /> {tx('integrations.connectionDetail.fields.name', 'Name')}\n </span>\n <span className=\"text-sm font-medium text-foreground\">\n {connection.externalAccountName}\n </span>\n </div>\n )}\n {connection.errorMessage && (\n <div className=\"py-2 border-b border-border/50\">\n <span className=\"text-xs text-status-error-text uppercase tracking-wide\">\n {tx('integrations.connectionDetail.fields.error', 'Error')}\n </span>\n <p className=\"text-sm text-status-error-text mt-0.5 bg-status-error-bg-subtle rounded-lg p-2\">\n {connection.errorMessage}\n </p>\n </div>\n )}\n <div className=\"flex items-center justify-between py-2 border-b border-border/50\">\n <span className=\"text-sm text-muted-foreground flex items-center gap-1\">\n <Clock size={14} />{' '}\n {tx('integrations.connectionDetail.fields.lastUsed', 'Last Used')}\n </span>\n <span className=\"text-sm text-foreground\">\n {formatLastUsed(connection.lastUsedAt)}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2 border-b border-border/50\">\n <span className=\"text-sm text-muted-foreground\">\n {tx('integrations.connectionDetail.fields.healthCheck', 'Health Check')}\n </span>\n <span className=\"text-sm text-foreground\">\n {formatDate(connection.lastHealthCheck)}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2\">\n <span className=\"text-sm text-muted-foreground\">\n {tx('integrations.connectionDetail.fields.created', 'Created')}\n </span>\n <span className=\"text-sm text-foreground\">{formatDate(connection.createdAt)}</span>\n </div>\n </div>\n </div>\n\n {/* Scopes & Actions */}\n <div className=\"space-y-4\">\n {/* Granted Scopes */}\n <div className=\"rounded-xl border border-border/50 bg-card p-5\">\n <h2 className=\"font-semibold text-foreground flex items-center gap-2 mb-3\">\n <Shield size={18} className=\"text-primary\" />\n {tx('integrations.connectionDetail.sections.scopes', 'Granted Scopes')}\n </h2>\n {connection.grantedScopes.length > 0 ? (\n <div className=\"flex flex-wrap gap-2\">\n {connection.grantedScopes.map((scope) => (\n <span\n key={scope}\n className=\"text-xs px-2.5 py-1 rounded-full bg-muted text-muted-foreground font-mono\"\n >\n {scope}\n </span>\n ))}\n </div>\n ) : (\n <p className=\"text-sm text-muted-foreground\">\n {tx('integrations.connectionDetail.scopes.empty', 'No scopes granted.')}\n </p>\n )}\n </div>\n\n {/* Test Result */}\n {testResult && (\n <div\n className={cn(\n 'rounded-xl border p-5',\n testResult.success\n ? 'border-border-default bg-status-success-bg-subtle'\n : 'border-border-default bg-status-error-bg-subtle'\n )}\n >\n <h2\n className={cn(\n 'font-semibold flex items-center gap-2 mb-2',\n testResult.success ? 'text-status-success-text' : 'text-status-error-text'\n )}\n >\n {testResult.success ? <CheckCircle2 size={18} /> : <XCircle size={18} />}\n {testResult.success\n ? tx('integrations.connectionDetail.testResult.passed', 'Connection Test Passed')\n : tx('integrations.connectionDetail.testResult.failed', 'Connection Test Failed')}\n </h2>\n <p\n className={cn(\n 'text-sm',\n testResult.success ? 'text-status-success-text' : 'text-status-error-text'\n )}\n >\n {testResult.message}\n </p>\n <p className=\"text-xs text-muted-foreground mt-1\">\n {tx('integrations.connectionDetail.testResult.latency', 'Latency: {latency}ms', {\n latency: testResult.latencyMs,\n })}\n </p>\n </div>\n )}\n\n {usesVaultCredentials && (\n <div className=\"rounded-xl border border-border/50 bg-card p-5\">\n <h2 className=\"font-semibold text-foreground flex items-center gap-2 mb-3\">\n <Key size={18} className=\"text-primary\" />\n Credential Storage\n </h2>\n <div className=\"space-y-2 text-sm\">\n {connection.vaultId && (\n <div className=\"flex items-center justify-between gap-3\">\n <span className=\"text-muted-foreground\">Vault</span>\n <span className=\"font-medium text-foreground break-all\">\n {connection.vaultId}\n </span>\n </div>\n )}\n {connection.credentialSecretName && (\n <div className=\"flex items-center justify-between gap-3\">\n <span className=\"text-muted-foreground\">Secret</span>\n <span className=\"font-medium text-foreground break-all\">\n {connection.credentialSecretName}\n </span>\n </div>\n )}\n {connection.credentialSecretId && (\n <div className=\"flex items-center justify-between gap-3\">\n <span className=\"text-muted-foreground\">Secret ID</span>\n <span className=\"font-mono text-xs text-foreground break-all\">\n {connection.credentialSecretId}\n </span>\n </div>\n )}\n </div>\n </div>\n )}\n\n {/* Actions — hidden entirely when user has no action permissions */}\n {(canUpdate || canDelete) && (\n <div className=\"rounded-xl border border-border/50 bg-card p-5\">\n <h2 className=\"font-semibold text-foreground flex items-center gap-2 mb-3\">\n <Key size={18} className=\"text-primary\" />\n {tx('integrations.connectionDetail.sections.actions', 'Actions')}\n </h2>\n <div className=\"flex flex-wrap gap-2\">\n <button\n type=\"button\"\n onClick={handleTest}\n disabled={actionLoading}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50\"\n >\n {testing ? <Loader2 size={14} className=\"animate-spin\" /> : <Zap size={14} />}\n {tx('integrations.connectionDetail.actions.test', 'Test Connection')}\n </button>\n {canUpdate && connection.provider.authType === 'oauth2' && canRefreshToken && (\n <button\n type=\"button\"\n onClick={handleRefresh}\n disabled={actionLoading}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors disabled:opacity-50\"\n >\n {refreshing ? (\n <Loader2 size={14} className=\"animate-spin\" />\n ) : (\n <RotateCcw size={14} />\n )}\n {tx('integrations.connectionDetail.actions.refreshToken', 'Refresh Token')}\n </button>\n )}\n {canDelete && (\n <button\n type=\"button\"\n onClick={handleRevoke}\n disabled={actionLoading}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border-default text-status-warning-text hover:bg-status-warning-bg-subtle transition-colors disabled:opacity-50\"\n >\n {revoking ? (\n <Loader2 size={14} className=\"animate-spin\" />\n ) : (\n <Shield size={14} />\n )}\n {tx('integrations.connectionDetail.actions.revoke', 'Revoke')}\n </button>\n )}\n {canDelete && (\n <button\n type=\"button\"\n onClick={handleDelete}\n disabled={actionLoading}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border-default text-status-error-text hover:bg-status-error-bg-subtle transition-colors disabled:opacity-50\"\n >\n {deleting ? (\n <Loader2 size={14} className=\"animate-spin\" />\n ) : (\n <Trash2 size={14} />\n )}\n {tx('integrations.connectionDetail.actions.delete', 'Delete')}\n </button>\n )}\n </div>\n </div>\n )}\n </div>\n </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