@burdenoff/microfe-integrations 2026.929.3 → 2026.930.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.
Files changed (83) hide show
  1. package/dist/generated/wspace-operations.d.ts +0 -137
  2. package/dist/generated/wspace-operations.d.ts.map +1 -1
  3. package/dist/generated/wspace-operations.js +73 -142
  4. package/dist/generated/wspace-operations.js.map +1 -1
  5. package/dist/index.js +4 -3
  6. package/dist/integrations/ConnectSourceDialog.d.ts +21 -0
  7. package/dist/integrations/ConnectSourceDialog.d.ts.map +1 -0
  8. package/dist/integrations/ConnectSourceDialog.js +56 -0
  9. package/dist/integrations/ConnectSourceDialog.js.map +1 -0
  10. package/dist/integrations/ConnectionsPanel.d.ts.map +1 -1
  11. package/dist/integrations/ConnectionsPanel.js.map +1 -1
  12. package/dist/integrations/components/AddConnectionDialog.d.ts +22 -11
  13. package/dist/integrations/components/AddConnectionDialog.d.ts.map +1 -1
  14. package/dist/integrations/components/AddConnectionDialog.js +54 -602
  15. package/dist/integrations/components/AddConnectionDialog.js.map +1 -1
  16. package/dist/integrations/components/AuthMethodsEditor.d.ts.map +1 -1
  17. package/dist/integrations/components/AuthMethodsEditor.js +69 -68
  18. package/dist/integrations/components/AuthMethodsEditor.js.map +1 -1
  19. package/dist/integrations/components/ConnectionCard.js +28 -28
  20. package/dist/integrations/components/ConnectionCard.js.map +1 -1
  21. package/dist/integrations/components/ConnectionModalFrame.d.ts +38 -0
  22. package/dist/integrations/components/ConnectionModalFrame.d.ts.map +1 -0
  23. package/dist/integrations/components/ConnectionModalFrame.js +64 -0
  24. package/dist/integrations/components/ConnectionModalFrame.js.map +1 -0
  25. package/dist/integrations/components/ProviderCard.js +29 -29
  26. package/dist/integrations/components/ProviderCard.js.map +1 -1
  27. package/dist/integrations/hooks/useConnections.js +91 -102
  28. package/dist/integrations/hooks/useConnections.js.map +1 -1
  29. package/dist/integrations/hooks/useLogs.js +4 -4
  30. package/dist/integrations/hooks/useProviders.js +36 -36
  31. package/dist/integrations/index.d.ts +2 -0
  32. package/dist/integrations/index.d.ts.map +1 -1
  33. package/dist/integrations/index.js +1 -0
  34. package/dist/integrations/pages/AddConnectionWizard.d.ts.map +1 -1
  35. package/dist/integrations/pages/AddConnectionWizard.js +281 -277
  36. package/dist/integrations/pages/AddConnectionWizard.js.map +1 -1
  37. package/dist/integrations/pages/ConnectionDetail.js +24 -24
  38. package/dist/integrations/pages/ConnectionDetail.js.map +1 -1
  39. package/dist/integrations/pages/ConnectionsList.js +7 -7
  40. package/dist/integrations/pages/ConnectionsList.js.map +1 -1
  41. package/dist/integrations/pages/IntegrationsOverview.js +34 -34
  42. package/dist/integrations/pages/ProviderCatalog.js +4 -4
  43. package/dist/integrations/pages/ProviderDetail.js +110 -110
  44. package/dist/integrations/pages/ProviderDetail.js.map +1 -1
  45. package/dist/integrations/translations/en.d.ts +21 -0
  46. package/dist/integrations/translations/en.d.ts.map +1 -1
  47. package/dist/integrations/utils/appearance.d.ts +0 -3
  48. package/dist/integrations/utils/appearance.d.ts.map +1 -1
  49. package/dist/integrations/utils/appearance.js +1 -20
  50. package/dist/integrations/utils/appearance.js.map +1 -1
  51. package/dist/integrations/utils/integrationsHelpers.js +1 -4
  52. package/dist/integrations/utils/integrationsHelpers.js.map +1 -1
  53. package/package.json +5 -3
  54. package/dist/integrations/assets/brands/bigconsole.js +0 -6
  55. package/dist/integrations/assets/brands/bigconsole.js.map +0 -1
  56. package/dist/integrations/assets/brands/burdenoff.js +0 -6
  57. package/dist/integrations/assets/brands/burdenoff.js.map +0 -1
  58. package/dist/integrations/components/AuthMethodSelector.d.ts +0 -30
  59. package/dist/integrations/components/AuthMethodSelector.d.ts.map +0 -1
  60. package/dist/integrations/components/AuthMethodSelector.js +0 -66
  61. package/dist/integrations/components/AuthMethodSelector.js.map +0 -1
  62. package/dist/integrations/components/CredentialStorageSelector.d.ts +0 -16
  63. package/dist/integrations/components/CredentialStorageSelector.d.ts.map +0 -1
  64. package/dist/integrations/components/CredentialStorageSelector.js +0 -262
  65. package/dist/integrations/components/CredentialStorageSelector.js.map +0 -1
  66. package/dist/integrations/components/ProviderIcon.d.ts +0 -25
  67. package/dist/integrations/components/ProviderIcon.d.ts.map +0 -1
  68. package/dist/integrations/components/ProviderIcon.js +0 -166
  69. package/dist/integrations/components/ProviderIcon.js.map +0 -1
  70. package/dist/integrations/components/SchemaForm.d.ts +0 -60
  71. package/dist/integrations/components/SchemaForm.d.ts.map +0 -1
  72. package/dist/integrations/components/SchemaForm.js +0 -235
  73. package/dist/integrations/components/SchemaForm.js.map +0 -1
  74. package/dist/integrations/hooks/useCredentialVaults.d.ts +0 -40
  75. package/dist/integrations/hooks/useCredentialVaults.d.ts.map +0 -1
  76. package/dist/integrations/hooks/useCredentialVaults.js +0 -98
  77. package/dist/integrations/hooks/useCredentialVaults.js.map +0 -1
  78. package/dist/integrations/utils/oauthPopup.d.ts +0 -16
  79. package/dist/integrations/utils/oauthPopup.d.ts.map +0 -1
  80. package/dist/integrations/utils/oauthPopup.js +0 -62
  81. package/dist/integrations/utils/oauthPopup.js.map +0 -1
  82. package/dist/node_modules/@iconify/react/dist/iconify.js +0 -1005
  83. package/dist/node_modules/@iconify/react/dist/iconify.js.map +0 -1
@@ -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';\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 { usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { useTr } from '../hooks/useTr';\nimport { useAuthTypeLabel } from '../hooks/useLabel';\nimport { useFormatLastUsed } from '../hooks/useFormatLastUsed';\nimport { useFormatDate } from '../hooks/useFormatDate';\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 {\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 {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n Button,\n GlassCard,\n EmphasisPanel,\n ShowMore,\n CTAOverflowMenu,\n PagePurpose,\n NextSteps,\n type NextStep,\n type CTAAction,\n} from '@burdenoff/fe-libs/ui';\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 tr = useTr();\n const getAuthTypeLabel = useAuthTypeLabel();\n const formatLastUsed = useFormatLastUsed();\n const formatDate = useFormatDate();\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-text-secondary\">\n {tr('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 {tr('integrations.connectionDetail.error.title', 'Connection not found')}\n </h3>\n <p className=\"text-sm text-status-error-text mb-3\">\n {error?.message ||\n tr(\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 {tr('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-subtle hover:bg-accent transition-colors\"\n >\n <ArrowLeft size={14} />{' '}\n {tr('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 tr(\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 tr('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: tr('integrations.connectionDetail.deleteDialog.title', 'Delete Connection'),\n message: tr(\n 'integrations.connectionDetail.deleteDialog.message',\n 'Delete this connection? This cannot be undone.'\n ),\n okButtonTitle: tr('integrations.connectionDetail.deleteDialog.confirm', 'Delete'),\n cancelButtonTitle: tr('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 tr('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 const nextSteps: NextStep[] = [\n {\n id: 'test',\n label: tr('integrations.connectionDetail.nextSteps.test.label', 'Test the connection'),\n description: tr(\n 'integrations.connectionDetail.nextSteps.test.description',\n 'Run a live check to confirm credentials still work before relying on it.'\n ),\n icon: <Zap size={16} />,\n onClick: () => {\n void handleTest();\n },\n done: connection.status === 'active' && Boolean(testResult?.success),\n },\n ...(canUpdate && connection.provider.authType === 'oauth2' && canRefreshToken\n ? [\n {\n id: 'refresh',\n label: tr(\n 'integrations.connectionDetail.nextSteps.refresh.label',\n 'Refresh the access token'\n ),\n description: tr(\n 'integrations.connectionDetail.nextSteps.refresh.description',\n 'Renew OAuth credentials if requests start failing with an auth error.'\n ),\n icon: <RotateCcw size={16} />,\n onClick: () => {\n void handleRefresh();\n },\n } satisfies NextStep,\n ]\n : []),\n {\n id: 'logs',\n label: tr('integrations.connectionDetail.nextSteps.logs.label', 'Review activity logs'),\n description: tr(\n 'integrations.connectionDetail.nextSteps.logs.description',\n 'See recent requests and errors for this connection to debug issues.'\n ),\n icon: <Activity size={16} />,\n onClick: () => navigate?.(joinPath(basePath, 'logs')),\n },\n ];\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-200',\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 <AlertDialog\n open={deleteDialogOpen}\n onOpenChange={(next) => {\n if (!next) {\n setDeleteDialogOpen(false);\n setDeleteVaultSecret(false);\n }\n }}\n >\n <AlertDialogContent className=\"max-w-md\">\n <AlertDialogHeader>\n <AlertDialogTitle>\n {tr('integrations.connectionDetail.deleteDialog.title', 'Delete Connection')}\n </AlertDialogTitle>\n <AlertDialogDescription>\n {tr(\n 'integrations.connectionDetail.deleteDialog.message',\n 'This removes the connection record immediately. You can also remove the mapped vault secret if you no longer need it.'\n )}\n </AlertDialogDescription>\n </AlertDialogHeader>\n\n {usesVaultCredentials && (\n <label className=\"flex items-start gap-3 rounded-lg border border-border-subtle/60 bg-bg-surface 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={tr(\n 'integrations.connectionDetail.deleteDialog.removeVaultSecret',\n 'Also remove mapped vault secret'\n )}\n />\n <div>\n <p className=\"text-sm font-medium text-text-primary\">\n {tr(\n 'integrations.connectionDetail.deleteDialog.removeVaultSecret',\n 'Also remove mapped vault secret'\n )}\n </p>\n <p className=\"text-xs text-text-secondary mt-1\">\n {tr(\n 'integrations.connectionDetail.deleteDialog.removeVaultSecretHint',\n 'Use this only if no other connections rely on the same secret.'\n )}\n </p>\n </div>\n </label>\n )}\n\n <AlertDialogFooter>\n <AlertDialogCancel\n onClick={() => {\n setDeleteDialogOpen(false);\n setDeleteVaultSecret(false);\n }}\n >\n {tr('integrations.connectionDetail.deleteDialog.cancel', 'Cancel')}\n </AlertDialogCancel>\n <AlertDialogAction\n disabled={deleting}\n onClick={(event) => {\n event.preventDefault();\n confirmDelete();\n }}\n className=\"inline-flex items-center gap-2 bg-status-error-bg text-action-primary-text disabled:opacity-50\"\n >\n {deleting ? <Loader2 size={14} className=\"animate-spin\" /> : <Trash2 size={14} />}\n {tr(\n 'integrations.connectionDetail.deleteDialog.deleteConnection',\n 'Delete connection'\n )}\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n\n <ConfirmDialog\n open={revokeDialogOpen}\n title={tr('integrations.connectionDetail.confirm.revokeTitle', 'Revoke connection')}\n description={tr(\n 'integrations.connectionDetail.confirm.revoke',\n 'Are you sure you want to revoke this connection? This will disconnect the external service.'\n )}\n confirmLabel={tr('integrations.connectionDetail.actions.revoke', 'Revoke')}\n cancelLabel={tr('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=\"rounded-xl border border-border-seam bg-accent-wash p-6\">\n <div className=\"flex items-center gap-4\">\n <Button\n variant=\"ghost\"\n size=\"icon\"\n onClick={() => navigate?.(joinPath(basePath, 'connections'))}\n aria-label={tr('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-text-primary\">\n {connection.name}\n </h1>\n <ConnectionStatusBadge status={connection.status} size=\"md\" />\n </div>\n <p className=\"text-sm text-text-secondary mt-0.5\">\n {connection.provider.name} · {getAuthTypeLabel(connection.provider.authType)}\n </p>\n </div>\n </div>\n </div>\n\n {/* Page purpose */}\n <PagePurpose icon={<Activity size={16} />}>\n {tr(\n 'integrations.connectionDetail.purpose',\n 'This is a single live link to {provider}. From here you can confirm it is healthy, see which account and scopes were granted, test it on demand, refresh or revoke its access, and review where its credentials are stored.',\n { provider: connection.provider.name }\n )}\n </PagePurpose>\n\n {/* Next steps — guidance for managing this connection */}\n {(canUpdate || canDelete) && (\n <NextSteps storageKey=\"integrations-connection-detail\" steps={nextSteps} />\n )}\n\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n {/* Connection Info — the page's primary emphasis zone */}\n <EmphasisPanel className=\"p-5 space-y-4\">\n <h2 className=\"font-semibold text-text-primary flex items-center gap-2\">\n <Activity size={18} className=\"text-primary\" />\n {tr('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-seam\">\n <span className=\"text-xs text-text-secondary uppercase tracking-wide\">\n {tr('integrations.connectionDetail.fields.description', 'Description')}\n </span>\n <p className=\"text-sm text-text-primary mt-0.5\">{connection.description}</p>\n </div>\n )}\n <div className=\"flex items-center justify-between py-2 border-b border-border-seam\">\n <span className=\"text-sm text-text-secondary\">\n {tr('integrations.connectionDetail.fields.provider', 'Provider')}\n </span>\n <span className=\"text-sm font-medium text-text-primary\">\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-seam\">\n <span className=\"text-sm text-text-secondary flex items-center gap-1\">\n <Mail size={14} /> {tr('integrations.connectionDetail.fields.account', 'Account')}\n </span>\n <span className=\"text-sm font-medium text-text-primary\">\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-seam\">\n <span className=\"text-sm text-text-secondary flex items-center gap-1\">\n <User size={14} /> {tr('integrations.connectionDetail.fields.name', 'Name')}\n </span>\n <span className=\"text-sm font-medium text-text-primary\">\n {connection.externalAccountName}\n </span>\n </div>\n )}\n {connection.errorMessage && (\n <div className=\"py-2 border-b border-border-seam\">\n <span className=\"text-xs text-status-error-text uppercase tracking-wide\">\n {tr('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-seam\">\n <span className=\"text-sm text-text-secondary flex items-center gap-1\">\n <Clock size={14} />{' '}\n {tr('integrations.connectionDetail.fields.lastUsed', 'Last Used')}\n </span>\n <span className=\"text-sm text-text-primary\">\n {formatLastUsed(connection.lastUsedAt)}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2 border-b border-border-seam\">\n <span className=\"text-sm text-text-secondary\">\n {tr('integrations.connectionDetail.fields.healthCheck', 'Health Check')}\n </span>\n <span className=\"text-sm text-text-primary\">\n {formatDate(connection.lastHealthCheck)}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2\">\n <span className=\"text-sm text-text-secondary\">\n {tr('integrations.connectionDetail.fields.created', 'Created')}\n </span>\n <span className=\"text-sm text-text-primary\">{formatDate(connection.createdAt)}</span>\n </div>\n </div>\n </EmphasisPanel>\n\n {/* Scopes & Actions */}\n <div className=\"space-y-4\">\n {/* Granted Scopes */}\n <GlassCard className=\"border-border-seam p-5\">\n <h2 className=\"font-semibold text-text-primary flex items-center gap-2 mb-3\">\n <Shield size={18} className=\"text-primary\" />\n {tr('integrations.connectionDetail.sections.scopes', 'Granted Scopes')}\n </h2>\n {connection.grantedScopes.length > 0 ? (\n <ShowMore collapsedHeight={88} label=\"Show all scopes\">\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-bg-sunken text-text-secondary font-mono\"\n >\n {scope}\n </span>\n ))}\n </div>\n </ShowMore>\n ) : (\n <p className=\"text-sm text-text-secondary\">\n {tr('integrations.connectionDetail.scopes.empty', 'No scopes granted.')}\n </p>\n )}\n </GlassCard>\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 ? tr('integrations.connectionDetail.testResult.passed', 'Connection Test Passed')\n : tr('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-text-secondary mt-1\">\n {tr('integrations.connectionDetail.testResult.latency', 'Latency: {latency}ms', {\n latency: testResult.latencyMs,\n })}\n </p>\n </div>\n )}\n\n {usesVaultCredentials && (\n <GlassCard className=\"border-border-seam p-5\">\n <h2 className=\"font-semibold text-text-primary flex items-center gap-2 mb-3\">\n <Key size={18} className=\"text-primary\" />\n {tr(\n 'integrations.connectionDetail.sections.credentialStorage',\n 'Credential Storage'\n )}\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-text-secondary\">\n {tr('integrations.connectionDetail.fields.vault', 'Vault')}\n </span>\n <span className=\"font-medium text-text-primary 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-text-secondary\">\n {tr('integrations.connectionDetail.fields.secret', 'Secret')}\n </span>\n <span className=\"font-medium text-text-primary 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-text-secondary\">\n {tr('integrations.connectionDetail.fields.secretId', 'Secret ID')}\n </span>\n <span className=\"font-mono text-xs text-text-primary break-all\">\n {connection.credentialSecretId}\n </span>\n </div>\n )}\n </div>\n </GlassCard>\n )}\n\n {/* Actions — hidden entirely when user has no action permissions */}\n {(canUpdate || canDelete) && (\n <GlassCard className=\"border-border-seam p-5\">\n <h2 className=\"font-semibold text-text-primary flex items-center gap-2 mb-3\">\n <Key size={18} className=\"text-primary\" />\n {tr('integrations.connectionDetail.sections.actions', 'Actions')}\n </h2>\n <CTAOverflowMenu\n align=\"start\"\n primary={{\n label: tr('integrations.connectionDetail.actions.test', 'Test Connection'),\n onSelect: () => {\n void handleTest();\n },\n disabled: actionLoading,\n icon: testing ? (\n <Loader2 size={14} className=\"animate-spin\" />\n ) : (\n <Zap size={14} />\n ),\n }}\n actions={[\n ...(canUpdate && connection.provider.authType === 'oauth2' && canRefreshToken\n ? [\n {\n label: tr(\n 'integrations.connectionDetail.actions.refreshToken',\n 'Refresh Token'\n ),\n onSelect: () => {\n void handleRefresh();\n },\n disabled: actionLoading,\n icon: <RotateCcw size={14} />,\n } satisfies CTAAction,\n ]\n : []),\n ...(canDelete\n ? [\n {\n label: tr('integrations.connectionDetail.actions.revoke', 'Revoke'),\n onSelect: () => {\n void handleRevoke();\n },\n disabled: actionLoading,\n icon: <Shield size={14} />,\n } satisfies CTAAction,\n {\n label: tr('integrations.connectionDetail.actions.delete', 'Delete'),\n onSelect: () => {\n void handleDelete();\n },\n intent: 'destructive',\n disabled: actionLoading,\n icon: <Trash2 size={14} />,\n } satisfies CTAAction,\n ]\n : []),\n ]}\n />\n </GlassCard>\n )}\n </div>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAgEA,SAAgB,IAAmB;CACjC,IAAM,EAAE,oBAAiB,IAAqC,EACxD,EAAE,cAAW,KAAK,gBAAa,GAAiB,EAChD,IAAK,GAAO,EACZ,KAAmB,IAAkB,EACrC,KAAiB,GAAmB,EACpC,IAAa,IAAe,EAE5B,EAAE,eAAY,aAAS,UAAO,eAAY,GAAc,KAAgB,GAAG,EAC3E,EAAE,oBAAgB,SAAS,MAAY,IAAmB,EAC1D,EAAE,kBAAc,SAAS,OAAe,IAAiB,EACzD,EAAE,sBAAkB,SAAS,MAAa,IAAqB,EAC/D,EAAE,sBAAkB,SAAS,MAAa,IAAqB,EAC/D,IAAkB,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,GAAkB,KAAuB,EAAS,GAA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P,CAAA,CACH;;SAEP,EAAW,sBACV,kBAAC,OAAD;UAAK,WAAU;oBAAf,CACE,kBAAC,QAAD;WAAM,WAAU;qBACb,EAAG,iDAAiD,YAAY;WAC5D,CAAA,EACP,kBAAC,QAAD;WAAM,WAAU;qBACb,EAAW;WACP,CAAA,CACH;;SAEJ;UACI;;OAIZ,KAAa,MACb,kBAAC,GAAD;OAAW,WAAU;iBAArB,CACE,kBAAC,MAAD;QAAI,WAAU;kBAAd,CACE,kBAAC,GAAD;SAAK,MAAM;SAAI,WAAU;SAAiB,CAAA,EACzC,EAAG,kDAAkD,UAAU,CAC7D;WACL,kBAAC,GAAD;QACE,OAAM;QACN,SAAS;SACP,OAAO,EAAG,8CAA8C,kBAAkB;SAC1E,gBAAgB;AACT,aAAY;;SAEnB,UAAU;SACV,MAAM,IACJ,kBAAC,GAAD;UAAS,MAAM;UAAI,WAAU;UAAiB,CAAA,GAE9C,kBAAC,GAAD,EAAK,MAAM,IAAM,CAAA;SAEpB;QACD,SAAS,CACP,GAAI,KAAa,EAAW,SAAS,aAAa,YAAY,IAC1D,CACE;SACE,OAAO,EACL,sDACA,gBACD;SACD,gBAAgB;AACT,aAAe;;SAEtB,UAAU;SACV,MAAM,kBAAC,GAAD,EAAW,MAAM,IAAM,CAAA;SAC9B,CACF,GACD,EAAE,EACN,GAAI,IACA,CACE;SACE,OAAO,EAAG,gDAAgD,SAAS;SACnE,gBAAgB;AACT,cAAc;;SAErB,UAAU;SACV,MAAM,kBAAC,GAAD,EAAQ,MAAM,IAAM,CAAA;SAC3B,EACD;SACE,OAAO,EAAG,gDAAgD,SAAS;SACnE,gBAAgB;AACT,cAAc;;SAErB,QAAQ;SACR,UAAU;SACV,MAAM,kBAAC,GAAD,EAAQ,MAAM,IAAM,CAAA;SAC3B,CACF,GACD,EAAE,CACP;QACD,CAAA,CACQ;;MAEV;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';\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 { usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { useTr } from '../hooks/useTr';\nimport { useAuthTypeLabel } from '../hooks/useLabel';\nimport { useFormatLastUsed } from '../hooks/useFormatLastUsed';\nimport { useFormatDate } from '../hooks/useFormatDate';\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 {\n useConnection,\n useTestConnection,\n useRefreshToken,\n useRevokeConnection,\n useDeleteConnection,\n} from '../hooks/useConnections';\nimport { ProviderIcon } from '@burdenoff/fe-libs/connections';\nimport { ConnectionStatusBadge } from '../components/ConnectionStatusBadge';\nimport { ConfirmDialog } from '../components/ConfirmDialog';\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n Button,\n GlassCard,\n EmphasisPanel,\n ShowMore,\n CTAOverflowMenu,\n PagePurpose,\n NextSteps,\n type NextStep,\n type CTAAction,\n} from '@burdenoff/fe-libs/ui';\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 tr = useTr();\n const getAuthTypeLabel = useAuthTypeLabel();\n const formatLastUsed = useFormatLastUsed();\n const formatDate = useFormatDate();\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-text-secondary\">\n {tr('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 {tr('integrations.connectionDetail.error.title', 'Connection not found')}\n </h3>\n <p className=\"text-sm text-status-error-text mb-3\">\n {error?.message ||\n tr(\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 {tr('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-subtle hover:bg-accent transition-colors\"\n >\n <ArrowLeft size={14} />{' '}\n {tr('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 tr(\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 tr('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: tr('integrations.connectionDetail.deleteDialog.title', 'Delete Connection'),\n message: tr(\n 'integrations.connectionDetail.deleteDialog.message',\n 'Delete this connection? This cannot be undone.'\n ),\n okButtonTitle: tr('integrations.connectionDetail.deleteDialog.confirm', 'Delete'),\n cancelButtonTitle: tr('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 tr('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 const nextSteps: NextStep[] = [\n {\n id: 'test',\n label: tr('integrations.connectionDetail.nextSteps.test.label', 'Test the connection'),\n description: tr(\n 'integrations.connectionDetail.nextSteps.test.description',\n 'Run a live check to confirm credentials still work before relying on it.'\n ),\n icon: <Zap size={16} />,\n onClick: () => {\n void handleTest();\n },\n done: connection.status === 'active' && Boolean(testResult?.success),\n },\n ...(canUpdate && connection.provider.authType === 'oauth2' && canRefreshToken\n ? [\n {\n id: 'refresh',\n label: tr(\n 'integrations.connectionDetail.nextSteps.refresh.label',\n 'Refresh the access token'\n ),\n description: tr(\n 'integrations.connectionDetail.nextSteps.refresh.description',\n 'Renew OAuth credentials if requests start failing with an auth error.'\n ),\n icon: <RotateCcw size={16} />,\n onClick: () => {\n void handleRefresh();\n },\n } satisfies NextStep,\n ]\n : []),\n {\n id: 'logs',\n label: tr('integrations.connectionDetail.nextSteps.logs.label', 'Review activity logs'),\n description: tr(\n 'integrations.connectionDetail.nextSteps.logs.description',\n 'See recent requests and errors for this connection to debug issues.'\n ),\n icon: <Activity size={16} />,\n onClick: () => navigate?.(joinPath(basePath, 'logs')),\n },\n ];\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-200',\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 <AlertDialog\n open={deleteDialogOpen}\n onOpenChange={(next) => {\n if (!next) {\n setDeleteDialogOpen(false);\n setDeleteVaultSecret(false);\n }\n }}\n >\n <AlertDialogContent className=\"max-w-md\">\n <AlertDialogHeader>\n <AlertDialogTitle>\n {tr('integrations.connectionDetail.deleteDialog.title', 'Delete Connection')}\n </AlertDialogTitle>\n <AlertDialogDescription>\n {tr(\n 'integrations.connectionDetail.deleteDialog.message',\n 'This removes the connection record immediately. You can also remove the mapped vault secret if you no longer need it.'\n )}\n </AlertDialogDescription>\n </AlertDialogHeader>\n\n {usesVaultCredentials && (\n <label className=\"flex items-start gap-3 rounded-lg border border-border-subtle/60 bg-bg-surface 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={tr(\n 'integrations.connectionDetail.deleteDialog.removeVaultSecret',\n 'Also remove mapped vault secret'\n )}\n />\n <div>\n <p className=\"text-sm font-medium text-text-primary\">\n {tr(\n 'integrations.connectionDetail.deleteDialog.removeVaultSecret',\n 'Also remove mapped vault secret'\n )}\n </p>\n <p className=\"text-xs text-text-secondary mt-1\">\n {tr(\n 'integrations.connectionDetail.deleteDialog.removeVaultSecretHint',\n 'Use this only if no other connections rely on the same secret.'\n )}\n </p>\n </div>\n </label>\n )}\n\n <AlertDialogFooter>\n <AlertDialogCancel\n onClick={() => {\n setDeleteDialogOpen(false);\n setDeleteVaultSecret(false);\n }}\n >\n {tr('integrations.connectionDetail.deleteDialog.cancel', 'Cancel')}\n </AlertDialogCancel>\n <AlertDialogAction\n disabled={deleting}\n onClick={(event) => {\n event.preventDefault();\n confirmDelete();\n }}\n className=\"inline-flex items-center gap-2 bg-status-error-bg text-action-primary-text disabled:opacity-50\"\n >\n {deleting ? <Loader2 size={14} className=\"animate-spin\" /> : <Trash2 size={14} />}\n {tr(\n 'integrations.connectionDetail.deleteDialog.deleteConnection',\n 'Delete connection'\n )}\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n\n <ConfirmDialog\n open={revokeDialogOpen}\n title={tr('integrations.connectionDetail.confirm.revokeTitle', 'Revoke connection')}\n description={tr(\n 'integrations.connectionDetail.confirm.revoke',\n 'Are you sure you want to revoke this connection? This will disconnect the external service.'\n )}\n confirmLabel={tr('integrations.connectionDetail.actions.revoke', 'Revoke')}\n cancelLabel={tr('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=\"rounded-xl border border-border-seam bg-accent-wash p-6\">\n <div className=\"flex items-center gap-4\">\n <Button\n variant=\"ghost\"\n size=\"icon\"\n onClick={() => navigate?.(joinPath(basePath, 'connections'))}\n aria-label={tr('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-text-primary\">\n {connection.name}\n </h1>\n <ConnectionStatusBadge status={connection.status} size=\"md\" />\n </div>\n <p className=\"text-sm text-text-secondary mt-0.5\">\n {connection.provider.name} · {getAuthTypeLabel(connection.provider.authType)}\n </p>\n </div>\n </div>\n </div>\n\n {/* Page purpose */}\n <PagePurpose icon={<Activity size={16} />}>\n {tr(\n 'integrations.connectionDetail.purpose',\n 'This is a single live link to {provider}. From here you can confirm it is healthy, see which account and scopes were granted, test it on demand, refresh or revoke its access, and review where its credentials are stored.',\n { provider: connection.provider.name }\n )}\n </PagePurpose>\n\n {/* Next steps — guidance for managing this connection */}\n {(canUpdate || canDelete) && (\n <NextSteps storageKey=\"integrations-connection-detail\" steps={nextSteps} />\n )}\n\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n {/* Connection Info — the page's primary emphasis zone */}\n <EmphasisPanel className=\"p-5 space-y-4\">\n <h2 className=\"font-semibold text-text-primary flex items-center gap-2\">\n <Activity size={18} className=\"text-primary\" />\n {tr('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-seam\">\n <span className=\"text-xs text-text-secondary uppercase tracking-wide\">\n {tr('integrations.connectionDetail.fields.description', 'Description')}\n </span>\n <p className=\"text-sm text-text-primary mt-0.5\">{connection.description}</p>\n </div>\n )}\n <div className=\"flex items-center justify-between py-2 border-b border-border-seam\">\n <span className=\"text-sm text-text-secondary\">\n {tr('integrations.connectionDetail.fields.provider', 'Provider')}\n </span>\n <span className=\"text-sm font-medium text-text-primary\">\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-seam\">\n <span className=\"text-sm text-text-secondary flex items-center gap-1\">\n <Mail size={14} /> {tr('integrations.connectionDetail.fields.account', 'Account')}\n </span>\n <span className=\"text-sm font-medium text-text-primary\">\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-seam\">\n <span className=\"text-sm text-text-secondary flex items-center gap-1\">\n <User size={14} /> {tr('integrations.connectionDetail.fields.name', 'Name')}\n </span>\n <span className=\"text-sm font-medium text-text-primary\">\n {connection.externalAccountName}\n </span>\n </div>\n )}\n {connection.errorMessage && (\n <div className=\"py-2 border-b border-border-seam\">\n <span className=\"text-xs text-status-error-text uppercase tracking-wide\">\n {tr('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-seam\">\n <span className=\"text-sm text-text-secondary flex items-center gap-1\">\n <Clock size={14} />{' '}\n {tr('integrations.connectionDetail.fields.lastUsed', 'Last Used')}\n </span>\n <span className=\"text-sm text-text-primary\">\n {formatLastUsed(connection.lastUsedAt)}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2 border-b border-border-seam\">\n <span className=\"text-sm text-text-secondary\">\n {tr('integrations.connectionDetail.fields.healthCheck', 'Health Check')}\n </span>\n <span className=\"text-sm text-text-primary\">\n {formatDate(connection.lastHealthCheck)}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2\">\n <span className=\"text-sm text-text-secondary\">\n {tr('integrations.connectionDetail.fields.created', 'Created')}\n </span>\n <span className=\"text-sm text-text-primary\">{formatDate(connection.createdAt)}</span>\n </div>\n </div>\n </EmphasisPanel>\n\n {/* Scopes & Actions */}\n <div className=\"space-y-4\">\n {/* Granted Scopes */}\n <GlassCard className=\"border-border-seam p-5\">\n <h2 className=\"font-semibold text-text-primary flex items-center gap-2 mb-3\">\n <Shield size={18} className=\"text-primary\" />\n {tr('integrations.connectionDetail.sections.scopes', 'Granted Scopes')}\n </h2>\n {connection.grantedScopes.length > 0 ? (\n <ShowMore collapsedHeight={88} label=\"Show all scopes\">\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-bg-sunken text-text-secondary font-mono\"\n >\n {scope}\n </span>\n ))}\n </div>\n </ShowMore>\n ) : (\n <p className=\"text-sm text-text-secondary\">\n {tr('integrations.connectionDetail.scopes.empty', 'No scopes granted.')}\n </p>\n )}\n </GlassCard>\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 ? tr('integrations.connectionDetail.testResult.passed', 'Connection Test Passed')\n : tr('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-text-secondary mt-1\">\n {tr('integrations.connectionDetail.testResult.latency', 'Latency: {latency}ms', {\n latency: testResult.latencyMs,\n })}\n </p>\n </div>\n )}\n\n {usesVaultCredentials && (\n <GlassCard className=\"border-border-seam p-5\">\n <h2 className=\"font-semibold text-text-primary flex items-center gap-2 mb-3\">\n <Key size={18} className=\"text-primary\" />\n {tr(\n 'integrations.connectionDetail.sections.credentialStorage',\n 'Credential Storage'\n )}\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-text-secondary\">\n {tr('integrations.connectionDetail.fields.vault', 'Vault')}\n </span>\n <span className=\"font-medium text-text-primary 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-text-secondary\">\n {tr('integrations.connectionDetail.fields.secret', 'Secret')}\n </span>\n <span className=\"font-medium text-text-primary 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-text-secondary\">\n {tr('integrations.connectionDetail.fields.secretId', 'Secret ID')}\n </span>\n <span className=\"font-mono text-xs text-text-primary break-all\">\n {connection.credentialSecretId}\n </span>\n </div>\n )}\n </div>\n </GlassCard>\n )}\n\n {/* Actions — hidden entirely when user has no action permissions */}\n {(canUpdate || canDelete) && (\n <GlassCard className=\"border-border-seam p-5\">\n <h2 className=\"font-semibold text-text-primary flex items-center gap-2 mb-3\">\n <Key size={18} className=\"text-primary\" />\n {tr('integrations.connectionDetail.sections.actions', 'Actions')}\n </h2>\n <CTAOverflowMenu\n align=\"start\"\n primary={{\n label: tr('integrations.connectionDetail.actions.test', 'Test Connection'),\n onSelect: () => {\n void handleTest();\n },\n disabled: actionLoading,\n icon: testing ? (\n <Loader2 size={14} className=\"animate-spin\" />\n ) : (\n <Zap size={14} />\n ),\n }}\n actions={[\n ...(canUpdate && connection.provider.authType === 'oauth2' && canRefreshToken\n ? [\n {\n label: tr(\n 'integrations.connectionDetail.actions.refreshToken',\n 'Refresh Token'\n ),\n onSelect: () => {\n void handleRefresh();\n },\n disabled: actionLoading,\n icon: <RotateCcw size={14} />,\n } satisfies CTAAction,\n ]\n : []),\n ...(canDelete\n ? [\n {\n label: tr('integrations.connectionDetail.actions.revoke', 'Revoke'),\n onSelect: () => {\n void handleRevoke();\n },\n disabled: actionLoading,\n icon: <Shield size={14} />,\n } satisfies CTAAction,\n {\n label: tr('integrations.connectionDetail.actions.delete', 'Delete'),\n onSelect: () => {\n void handleDelete();\n },\n intent: 'destructive',\n disabled: actionLoading,\n icon: <Trash2 size={14} />,\n } satisfies CTAAction,\n ]\n : []),\n ]}\n />\n </GlassCard>\n )}\n </div>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAgEA,SAAgB,IAAmB;CACjC,IAAM,EAAE,oBAAiB,IAAqC,EACxD,EAAE,cAAW,KAAK,gBAAa,GAAiB,EAChD,IAAK,GAAO,EACZ,KAAmB,IAAkB,EACrC,KAAiB,IAAmB,EACpC,IAAa,IAAe,EAE5B,EAAE,eAAY,aAAS,UAAO,eAAY,EAAc,KAAgB,GAAG,EAC3E,EAAE,oBAAgB,SAAS,MAAY,IAAmB,EAC1D,EAAE,kBAAc,SAAS,OAAe,IAAiB,EACzD,EAAE,sBAAkB,SAAS,MAAa,IAAqB,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G,gDAAgD,SAAS;SACnE,gBAAgB;AACT,cAAc;;SAErB,UAAU;SACV,MAAM,kBAAC,GAAD,EAAQ,MAAM,IAAM,CAAA;SAC3B,EACD;SACE,OAAO,EAAG,gDAAgD,SAAS;SACnE,gBAAgB;AACT,cAAc;;SAErB,QAAQ;SACR,UAAU;SACV,MAAM,kBAAC,GAAD,EAAQ,MAAM,IAAM,CAAA;SAC3B,CACF,GACD,EAAE,CACP;QACD,CAAA,CACQ;;MAEV;OACF;;GACF"}
@@ -4,9 +4,9 @@ import { cn as n } from "../utils/cn.js";
4
4
  import { INTEGRATION_PERMISSIONS as r } from "../constants/permissions.js";
5
5
  import { useIntegrationsStore as i } from "../store/integrationsStore.js";
6
6
  import { joinPath as a } from "../utils/navigation.js";
7
- import { useConnections as o } from "../hooks/useConnections.js";
8
- import { AddConnectionDialog as s } from "../components/AddConnectionDialog.js";
9
- import { CONNECTION_STATUS_OPTIONS as c, PROVIDER_CATEGORIES as ee } from "../utils/constants.js";
7
+ import { AddConnectionDialog as o } from "../components/AddConnectionDialog.js";
8
+ import { CONNECTION_STATUS_OPTIONS as s, PROVIDER_CATEGORIES as c } from "../utils/constants.js";
9
+ import { useConnections as ee } from "../hooks/useConnections.js";
10
10
  import { ConnectionCard as te } from "../components/ConnectionCard.js";
11
11
  import { useId as l, useMemo as u, useState as d } from "react";
12
12
  import { AlertCircle as f, ArrowLeft as p, Filter as m, Grid3x3 as h, Link2 as g, List as _, Plus as v, RefreshCw as y, Search as b, X as x } from "lucide-react";
@@ -15,7 +15,7 @@ import { jsx as C, jsxs as w } from "react/jsx-runtime";
15
15
  import { Button as T, EmphasisPanel as ne, IllustratedEmptyState as re, PagePurpose as ie } from "@burdenoff/fe-libs/ui";
16
16
  //#region src/integrations/pages/ConnectionsList.tsx
17
17
  function E() {
18
- let { basePath: E = "/", navigate: D, onConnectionSelect: O } = e(), k = t(), { viewMode: A, setViewMode: j, connectionFilter: M, updateConnectionFilter: N, addConnectionDialogOpen: P, openAddConnectionDialog: F, closeAddConnectionDialog: I } = i(), { connections: L, loading: R, answered: z, error: B, refetch: V } = o(), H = !R && !B && !z, { hasPermission: U, isLoading: W } = S(), G = !W && U(r.CONNECTION_CREATE), [K, q] = d(!1), J = l(), Y = `${J}-status`, X = `${J}-category`, Z = u(() => {
18
+ let { basePath: E = "/", navigate: D, onConnectionSelect: O } = e(), k = t(), { viewMode: A, setViewMode: j, connectionFilter: M, updateConnectionFilter: N, addConnectionDialogOpen: P, openAddConnectionDialog: F, closeAddConnectionDialog: I } = i(), { connections: L, loading: R, answered: z, error: B, refetch: V } = ee(), H = !R && !B && !z, { hasPermission: U, isLoading: W } = S(), G = !W && U(r.CONNECTION_CREATE), [K, q] = d(!1), J = l(), Y = `${J}-status`, X = `${J}-category`, Z = u(() => {
19
19
  let e = L ?? [];
20
20
  if (M.search) {
21
21
  let t = M.search.toLowerCase();
@@ -160,7 +160,7 @@ function E() {
160
160
  children: [/* @__PURE__ */ C("option", {
161
161
  value: "all",
162
162
  children: k("integrations.connections.filters.statusAll", "All Statuses")
163
- }), c.map((e) => /* @__PURE__ */ C("option", {
163
+ }), s.map((e) => /* @__PURE__ */ C("option", {
164
164
  value: e.value,
165
165
  children: k(`integrations.status.${e.value}`, e.label)
166
166
  }, e.value))]
@@ -179,7 +179,7 @@ function E() {
179
179
  children: [/* @__PURE__ */ C("option", {
180
180
  value: "all",
181
181
  children: k("integrations.connections.filters.categoryAll", "All Categories")
182
- }), ee.map((e) => /* @__PURE__ */ C("option", {
182
+ }), c.map((e) => /* @__PURE__ */ C("option", {
183
183
  value: e.value,
184
184
  children: k(`integrations.category.${e.value}`, e.label)
185
185
  }, e.value))]
@@ -296,7 +296,7 @@ function E() {
296
296
  }) : void 0
297
297
  })]
298
298
  }),
299
- /* @__PURE__ */ C(s, {
299
+ /* @__PURE__ */ C(o, {
300
300
  open: P,
301
301
  onClose: I,
302
302
  onConnectionCreated: () => {
@@ -1 +1 @@
1
- {"version":3,"file":"ConnectionsList.js","names":[],"sources":["../../../src/integrations/pages/ConnectionsList.tsx"],"sourcesContent":["import { useState, useMemo, useId } from 'react';\nimport {\n Search,\n Filter,\n X,\n Grid3x3,\n List,\n Plus,\n Link2,\n AlertCircle,\n RefreshCw,\n ArrowLeft,\n} from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { useTr } from '../hooks/useTr';\nimport { useIntegrations } from '../providers/IntegrationsProvider';\nimport { INTEGRATION_PERMISSIONS } from '../constants/permissions';\nimport { useIntegrationsStore } from '../store/integrationsStore';\nimport { useConnections } from '../hooks/useConnections';\nimport { joinPath } from '../utils/navigation';\nimport { ConnectionCard } from '../components/ConnectionCard';\nimport { AddConnectionDialog } from '../components/AddConnectionDialog';\nimport { CONNECTION_STATUS_OPTIONS, PROVIDER_CATEGORIES } from '../utils/constants';\nimport type { IntegrationConnection, ConnectionStatus, ProviderCategory } from '../types';\nimport { Button, EmphasisPanel, IllustratedEmptyState, PagePurpose } from '@burdenoff/fe-libs/ui';\n\n/**\n * Connections List — list of all connections with search and status filter.\n */\nexport function ConnectionsList() {\n const { basePath = '/', navigate, onConnectionSelect } = useIntegrations();\n const tr = useTr();\n const {\n viewMode,\n setViewMode,\n connectionFilter,\n updateConnectionFilter,\n addConnectionDialogOpen,\n openAddConnectionDialog,\n closeAddConnectionDialog,\n } = useIntegrationsStore();\n\n const { connections, loading, answered, error, refetch } = useConnections();\n\n /**\n * ★★ NEVER CLAIM \"no connections\" UNTIL THE SERVER HAS SAID SO.\n *\n * Measured in production 2026-09-13: this page rendered \"No connections yet\"\n * while the workspace held 46 connections — 8 ACTIVE (Gmail, GitHub, Google\n * Sheets, Linear, Anthropic), 1 EXPIRED, 37 PENDING_AUTH. The assistant, asked\n * the same question through the API, listed all 46. The loading state never\n * appeared and no error was shown, so the page presented a confident, wrong\n * answer and the user reasonably believed they had nothing connected.\n *\n * The cause is that `loading: false, error: undefined, data: undefined` — what\n * Apollo returns for a SKIPPED query, and equally for one resolved from an\n * empty cache entry — is indistinguishable here from \"asked and found none\".\n * `answered` closes that gap: it is false until `data.getConnections` exists.\n *\n * Gating the empty state is the point. Rendering the unanswered case as\n * loading is a presentation choice; claiming emptiness we never verified is a\n * correctness bug.\n */\n const unanswered = !loading && !error && !answered;\n const { hasPermission, isLoading: permissionsLoading } = usePermissions();\n const canCreate = !permissionsLoading && hasPermission(INTEGRATION_PERMISSIONS.CONNECTION_CREATE);\n const [showFilters, setShowFilters] = useState(false);\n const idPrefix = useId();\n const statusFilterId = `${idPrefix}-status`;\n const categoryFilterId = `${idPrefix}-category`;\n\n const filteredConnections = useMemo(() => {\n let result = connections ?? [];\n\n if (connectionFilter.search) {\n const q = connectionFilter.search.toLowerCase();\n result = result.filter(\n (c: IntegrationConnection) =>\n c.name.toLowerCase().includes(q) ||\n c.provider.name.toLowerCase().includes(q) ||\n (c.externalAccountEmail?.toLowerCase().includes(q) ?? false)\n );\n }\n\n if (connectionFilter.status !== 'all') {\n result = result.filter((c: IntegrationConnection) => c.status === connectionFilter.status);\n }\n\n if (connectionFilter.providerId) {\n result = result.filter(\n (c: IntegrationConnection) => c.provider.id === connectionFilter.providerId\n );\n }\n\n if (connectionFilter.category !== 'all') {\n result = result.filter(\n (c: IntegrationConnection) => c.provider.category === connectionFilter.category\n );\n }\n\n return result.sort(\n (a: IntegrationConnection, b: IntegrationConnection) =>\n new Date(b.updatedAt).getTime() - new Date(a.updatedAt).getTime()\n );\n }, [connections, connectionFilter]);\n\n const hasActiveFilters =\n connectionFilter.search ||\n connectionFilter.status !== 'all' ||\n connectionFilter.providerId ||\n connectionFilter.category !== 'all';\n\n const handleClearFilters = () => {\n updateConnectionFilter({ search: '', status: 'all', providerId: null, category: 'all' });\n };\n\n const handleConnectionClick = (connection: IntegrationConnection) => {\n onConnectionSelect?.(connection);\n navigate?.(joinPath(basePath, `connections/${connection.id}`));\n };\n\n return (\n <div className=\"space-y-6 p-6 max-w-7xl mx-auto\">\n {/* Header */}\n <div\n className=\"rounded-xl border border-border-seam bg-accent-wash p-6\"\n data-tour=\"integrations-connections-header\"\n >\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n <div className=\"flex min-w-0 items-center gap-4\">\n <Button\n variant=\"ghost\"\n size=\"icon\"\n className=\"shrink-0\"\n onClick={() => navigate?.(basePath)}\n aria-label={tr('integrations.connections.actions.backAriaLabel', 'Back to overview')}\n >\n <ArrowLeft size={20} />\n </Button>\n <div className=\"shrink-0 p-2.5 rounded-lg bg-action-primary-bg/10\">\n <Link2 size={24} className=\"text-primary\" />\n </div>\n <div className=\"min-w-0\">\n <h1 className=\"text-2xl sm:text-3xl font-bold text-text-primary\">\n {tr('integrations.connections.title', 'Connections')}\n </h1>\n <p className=\"text-sm text-text-secondary mt-0.5\">\n {tr('integrations.connections.subtitle', 'Manage your integration connections')}\n </p>\n </div>\n </div>\n {canCreate && (\n <Button className=\"shrink-0\" onClick={() => openAddConnectionDialog()}>\n <Plus size={16} />\n {tr('integrations.connections.actions.addConnection', 'Add Connection')}\n </Button>\n )}\n </div>\n </div>\n\n {/* Page purpose */}\n <PagePurpose icon={<Link2 size={16} />}>\n {tr(\n 'integrations.connections.purpose',\n 'A connection is one authenticated link between your workspace and an external service (for example, \"Marketing Slack\" or \"Finance Google Drive\"). Use this page to see every connection at a glance, check its health, search by provider or account, and open one to test, refresh, or revoke its access.'\n )}\n </PagePurpose>\n\n {/* Search & Filters */}\n <div className=\"space-y-4\">\n <div className=\"flex flex-col sm:flex-row gap-3\">\n <div className=\"flex-1 relative group\" data-tour=\"integrations-connections-search\">\n <Search\n size={18}\n className=\"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary group-focus-within:text-primary transition-colors\"\n />\n <input\n type=\"text\"\n placeholder={tr(\n 'integrations.connections.search.placeholder',\n 'Search connections...'\n )}\n value={connectionFilter.search}\n onChange={(e) => updateConnectionFilter({ search: e.target.value })}\n className=\"w-full pl-10 pr-4 py-2.5 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-all\"\n aria-label={tr('integrations.connections.search.ariaLabel', 'Search connections')}\n />\n </div>\n\n <button\n type=\"button\"\n onClick={() => setShowFilters(!showFilters)}\n className={cn(\n 'inline-flex items-center gap-2 px-4 py-2.5 rounded-lg border text-sm font-medium transition-all',\n showFilters || hasActiveFilters\n ? 'bg-action-primary-bg text-action-primary-text border-primary'\n : 'bg-bg-surface text-text-primary border-border-subtle hover:bg-accent'\n )}\n >\n <Filter size={16} />\n {showFilters\n ? tr('integrations.connections.filters.hide', 'Hide')\n : tr('integrations.connections.filters.show', 'Filter')}\n </button>\n\n <div\n className=\"flex items-center border border-border-subtle rounded-lg overflow-hidden\"\n data-tour=\"integrations-connections-view-toggle\"\n >\n <button\n type=\"button\"\n onClick={() => setViewMode('grid')}\n className={cn(\n 'p-2.5 transition-colors',\n viewMode === 'grid'\n ? 'bg-action-primary-bg text-action-primary-text'\n : 'hover:bg-accent'\n )}\n aria-label={tr('integrations.connections.view.gridAriaLabel', 'Grid view')}\n >\n <Grid3x3 size={16} />\n </button>\n <button\n type=\"button\"\n onClick={() => setViewMode('list')}\n className={cn(\n 'p-2.5 transition-colors',\n viewMode === 'list'\n ? 'bg-action-primary-bg text-action-primary-text'\n : 'hover:bg-accent'\n )}\n aria-label={tr('integrations.connections.view.listAriaLabel', 'List view')}\n >\n <List size={16} />\n </button>\n </div>\n </div>\n\n {showFilters && (\n <div className=\"rounded-xl border border-border-seam bg-bg-surface p-5 animate-in slide-in-from-top-2 duration-200\">\n <div className=\"flex items-center justify-between mb-4\">\n <h3 className=\"font-semibold text-text-primary flex items-center gap-2\">\n <Filter size={16} className=\"text-primary\" />\n {tr('integrations.connections.filters.panelTitle', 'Filters')}\n </h3>\n {hasActiveFilters && (\n <button\n type=\"button\"\n onClick={handleClearFilters}\n className=\"text-sm text-text-secondary hover:text-status-error-text transition-colors flex items-center gap-1\"\n >\n <X size={14} /> {tr('integrations.connections.filters.clearAll', 'Clear All')}\n </button>\n )}\n </div>\n <div className=\"grid grid-cols-1 sm:grid-cols-2 gap-4\">\n <div className=\"space-y-2\">\n <label\n htmlFor={statusFilterId}\n className=\"block text-sm font-medium text-text-primary\"\n >\n {tr('integrations.connections.filters.statusLabel', 'Status')}\n </label>\n <select\n id={statusFilterId}\n value={connectionFilter.status}\n onChange={(e) =>\n updateConnectionFilter({ status: e.target.value as ConnectionStatus | 'all' })\n }\n className=\"w-full px-3 py-2 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary\"\n >\n <option value=\"all\">\n {tr('integrations.connections.filters.statusAll', 'All Statuses')}\n </option>\n {CONNECTION_STATUS_OPTIONS.map((opt) => (\n <option key={opt.value} value={opt.value}>\n {tr(`integrations.status.${opt.value}`, opt.label)}\n </option>\n ))}\n </select>\n </div>\n <div className=\"space-y-2\">\n <label\n htmlFor={categoryFilterId}\n className=\"block text-sm font-medium text-text-primary\"\n >\n {tr('integrations.connections.filters.categoryLabel', 'Category')}\n </label>\n <select\n id={categoryFilterId}\n value={connectionFilter.category}\n onChange={(e) =>\n updateConnectionFilter({ category: e.target.value as ProviderCategory | 'all' })\n }\n className=\"w-full px-3 py-2 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary\"\n >\n <option value=\"all\">\n {tr('integrations.connections.filters.categoryAll', 'All Categories')}\n </option>\n {PROVIDER_CATEGORIES.map((cat) => (\n <option key={cat.value} value={cat.value}>\n {tr(`integrations.category.${cat.value}`, cat.label)}\n </option>\n ))}\n </select>\n </div>\n </div>\n </div>\n )}\n </div>\n\n {/* Error */}\n {error && (\n <div className=\"rounded-xl border border-border-default bg-status-error-bg-subtle p-5 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 {tr('integrations.connections.error.title', 'Error loading connections')}\n </h3>\n <p className=\"text-sm text-status-error-text mb-3\">{error.message}</p>\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} /> {tr('integrations.common.retry', 'Try Again')}\n </button>\n </div>\n </div>\n )}\n\n {/* Loading */}\n {(loading || unanswered) && (\n <div\n className={cn(\n viewMode === 'grid'\n ? 'grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4'\n : 'space-y-3'\n )}\n >\n {[...Array(6)].map((_, i) => (\n <div key={i} className=\"rounded-xl border border-border-seam bg-bg-surface p-5\">\n <div className=\"flex items-start gap-3\">\n <div className=\"size-11 bg-bg-sunken rounded-xl animate-vc-shimmer\" />\n <div className=\"flex-1 space-y-2\">\n <div className=\"h-4 w-3/4 bg-bg-sunken rounded animate-vc-shimmer\" />\n <div className=\"h-3 w-1/2 bg-bg-sunken rounded animate-vc-shimmer\" />\n </div>\n </div>\n </div>\n ))}\n </div>\n )}\n\n {/* Connections — the page's primary emphasis zone */}\n {!loading && !error && !unanswered && (\n <EmphasisPanel className=\"overflow-hidden p-0\">\n <div className=\"flex items-center justify-between gap-2 p-5 border-b border-border-seam\">\n <div className=\"flex items-center gap-2\">\n <Link2 size={18} className=\"text-primary\" />\n <h2 className=\"font-semibold text-text-primary\">\n {tr('integrations.connections.results.title', 'Your Connections')}\n {filteredConnections.length > 0 && (\n <span className=\"ml-2 text-sm font-normal text-text-secondary tabular-nums\">\n ({filteredConnections.length})\n </span>\n )}\n </h2>\n </div>\n {canCreate && filteredConnections.length > 0 && (\n <Button size=\"sm\" variant=\"outline\" onClick={() => openAddConnectionDialog()}>\n <Plus size={14} /> {tr('integrations.connections.actions.add', 'Add')}\n </Button>\n )}\n </div>\n\n {filteredConnections.length > 0 ? (\n <div\n className={cn(\n 'p-5',\n viewMode === 'grid'\n ? 'grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4'\n : 'space-y-3'\n )}\n >\n {filteredConnections.map((conn: IntegrationConnection) => (\n <ConnectionCard\n key={conn.id}\n connection={conn}\n displayMode={viewMode}\n onClick={handleConnectionClick}\n />\n ))}\n </div>\n ) : (\n <IllustratedEmptyState\n illustration={hasActiveFilters ? 'empty-search' : 'empty-data'}\n title={\n hasActiveFilters\n ? tr('integrations.connections.empty.filteredTitle', 'No matching connections')\n : tr('integrations.connections.empty.title', 'No connections yet')\n }\n description={\n hasActiveFilters\n ? tr(\n 'integrations.connections.empty.filteredDescription',\n 'Try adjusting your search or filters.'\n )\n : canCreate\n ? tr(\n 'integrations.connections.empty.description',\n 'Add a connection to start integrating with external services.'\n )\n : tr(\n 'integrations.connections.empty.readOnlyDescription',\n 'No connections are configured yet. Contact your workspace admin to add one.'\n )\n }\n action={\n hasActiveFilters ? (\n <Button variant=\"outline\" onClick={handleClearFilters}>\n <X size={14} />{' '}\n {tr('integrations.connections.empty.clearFilters', 'Clear Filters')}\n </Button>\n ) : canCreate ? (\n <Button onClick={() => openAddConnectionDialog()}>\n <Plus size={14} />{' '}\n {tr('integrations.connections.actions.addConnection', 'Add Connection')}\n </Button>\n ) : undefined\n }\n />\n )}\n </EmphasisPanel>\n )}\n {/* Add Connection Dialog */}\n <AddConnectionDialog\n open={addConnectionDialogOpen}\n onClose={closeAddConnectionDialog}\n onConnectionCreated={() => {\n refetch();\n }}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA8BA,SAAgB,IAAkB;CAChC,IAAM,EAAE,cAAW,KAAK,aAAU,0BAAuB,GAAiB,EACpE,IAAK,GAAO,EACZ,EACJ,aACA,gBACA,qBACA,2BACA,4BACA,4BACA,gCACE,GAAsB,EAEpB,EAAE,gBAAa,YAAS,aAAU,UAAO,eAAY,GAAgB,EAqBrE,IAAa,CAAC,KAAW,CAAC,KAAS,CAAC,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BAAC,GAAD;MAAQ,SAAQ;MAAU,SAAS;gBAAnC;OACE,kBAAC,GAAD,EAAG,MAAM,IAAM,CAAA;OAAC;OACf,EAAG,+CAA+C,gBAAgB;OAC5D;UACP,IACF,kBAAC,GAAD;MAAQ,eAAe,GAAyB;gBAAhD;OACE,kBAAC,GAAD,EAAM,MAAM,IAAM,CAAA;OAAC;OAClB,EAAG,kDAAkD,iBAAiB;OAChE;UACP,KAAA;KAEN,CAAA,CAEU;;GAGlB,kBAAC,GAAD;IACE,MAAM;IACN,SAAS;IACT,2BAA2B;AACzB,QAAS;;IAEX,CAAA;GACE"}
1
+ {"version":3,"file":"ConnectionsList.js","names":[],"sources":["../../../src/integrations/pages/ConnectionsList.tsx"],"sourcesContent":["import { useState, useMemo, useId } from 'react';\nimport {\n Search,\n Filter,\n X,\n Grid3x3,\n List,\n Plus,\n Link2,\n AlertCircle,\n RefreshCw,\n ArrowLeft,\n} from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { useTr } from '../hooks/useTr';\nimport { useIntegrations } from '../providers/IntegrationsProvider';\nimport { INTEGRATION_PERMISSIONS } from '../constants/permissions';\nimport { useIntegrationsStore } from '../store/integrationsStore';\nimport { useConnections } from '../hooks/useConnections';\nimport { joinPath } from '../utils/navigation';\nimport { ConnectionCard } from '../components/ConnectionCard';\nimport { AddConnectionDialog } from '../components/AddConnectionDialog';\nimport { CONNECTION_STATUS_OPTIONS, PROVIDER_CATEGORIES } from '../utils/constants';\nimport type { IntegrationConnection, ConnectionStatus, ProviderCategory } from '../types';\nimport { Button, EmphasisPanel, IllustratedEmptyState, PagePurpose } from '@burdenoff/fe-libs/ui';\n\n/**\n * Connections List — list of all connections with search and status filter.\n */\nexport function ConnectionsList() {\n const { basePath = '/', navigate, onConnectionSelect } = useIntegrations();\n const tr = useTr();\n const {\n viewMode,\n setViewMode,\n connectionFilter,\n updateConnectionFilter,\n addConnectionDialogOpen,\n openAddConnectionDialog,\n closeAddConnectionDialog,\n } = useIntegrationsStore();\n\n const { connections, loading, answered, error, refetch } = useConnections();\n\n /**\n * ★★ NEVER CLAIM \"no connections\" UNTIL THE SERVER HAS SAID SO.\n *\n * Measured in production 2026-09-13: this page rendered \"No connections yet\"\n * while the workspace held 46 connections — 8 ACTIVE (Gmail, GitHub, Google\n * Sheets, Linear, Anthropic), 1 EXPIRED, 37 PENDING_AUTH. The assistant, asked\n * the same question through the API, listed all 46. The loading state never\n * appeared and no error was shown, so the page presented a confident, wrong\n * answer and the user reasonably believed they had nothing connected.\n *\n * The cause is that `loading: false, error: undefined, data: undefined` — what\n * Apollo returns for a SKIPPED query, and equally for one resolved from an\n * empty cache entry — is indistinguishable here from \"asked and found none\".\n * `answered` closes that gap: it is false until `data.getConnections` exists.\n *\n * Gating the empty state is the point. Rendering the unanswered case as\n * loading is a presentation choice; claiming emptiness we never verified is a\n * correctness bug.\n */\n const unanswered = !loading && !error && !answered;\n const { hasPermission, isLoading: permissionsLoading } = usePermissions();\n const canCreate = !permissionsLoading && hasPermission(INTEGRATION_PERMISSIONS.CONNECTION_CREATE);\n const [showFilters, setShowFilters] = useState(false);\n const idPrefix = useId();\n const statusFilterId = `${idPrefix}-status`;\n const categoryFilterId = `${idPrefix}-category`;\n\n const filteredConnections = useMemo(() => {\n let result = connections ?? [];\n\n if (connectionFilter.search) {\n const q = connectionFilter.search.toLowerCase();\n result = result.filter(\n (c: IntegrationConnection) =>\n c.name.toLowerCase().includes(q) ||\n c.provider.name.toLowerCase().includes(q) ||\n (c.externalAccountEmail?.toLowerCase().includes(q) ?? false)\n );\n }\n\n if (connectionFilter.status !== 'all') {\n result = result.filter((c: IntegrationConnection) => c.status === connectionFilter.status);\n }\n\n if (connectionFilter.providerId) {\n result = result.filter(\n (c: IntegrationConnection) => c.provider.id === connectionFilter.providerId\n );\n }\n\n if (connectionFilter.category !== 'all') {\n result = result.filter(\n (c: IntegrationConnection) => c.provider.category === connectionFilter.category\n );\n }\n\n return result.sort(\n (a: IntegrationConnection, b: IntegrationConnection) =>\n new Date(b.updatedAt).getTime() - new Date(a.updatedAt).getTime()\n );\n }, [connections, connectionFilter]);\n\n const hasActiveFilters =\n connectionFilter.search ||\n connectionFilter.status !== 'all' ||\n connectionFilter.providerId ||\n connectionFilter.category !== 'all';\n\n const handleClearFilters = () => {\n updateConnectionFilter({ search: '', status: 'all', providerId: null, category: 'all' });\n };\n\n const handleConnectionClick = (connection: IntegrationConnection) => {\n onConnectionSelect?.(connection);\n navigate?.(joinPath(basePath, `connections/${connection.id}`));\n };\n\n return (\n <div className=\"space-y-6 p-6 max-w-7xl mx-auto\">\n {/* Header */}\n <div\n className=\"rounded-xl border border-border-seam bg-accent-wash p-6\"\n data-tour=\"integrations-connections-header\"\n >\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n <div className=\"flex min-w-0 items-center gap-4\">\n <Button\n variant=\"ghost\"\n size=\"icon\"\n className=\"shrink-0\"\n onClick={() => navigate?.(basePath)}\n aria-label={tr('integrations.connections.actions.backAriaLabel', 'Back to overview')}\n >\n <ArrowLeft size={20} />\n </Button>\n <div className=\"shrink-0 p-2.5 rounded-lg bg-action-primary-bg/10\">\n <Link2 size={24} className=\"text-primary\" />\n </div>\n <div className=\"min-w-0\">\n <h1 className=\"text-2xl sm:text-3xl font-bold text-text-primary\">\n {tr('integrations.connections.title', 'Connections')}\n </h1>\n <p className=\"text-sm text-text-secondary mt-0.5\">\n {tr('integrations.connections.subtitle', 'Manage your integration connections')}\n </p>\n </div>\n </div>\n {canCreate && (\n <Button className=\"shrink-0\" onClick={() => openAddConnectionDialog()}>\n <Plus size={16} />\n {tr('integrations.connections.actions.addConnection', 'Add Connection')}\n </Button>\n )}\n </div>\n </div>\n\n {/* Page purpose */}\n <PagePurpose icon={<Link2 size={16} />}>\n {tr(\n 'integrations.connections.purpose',\n 'A connection is one authenticated link between your workspace and an external service (for example, \"Marketing Slack\" or \"Finance Google Drive\"). Use this page to see every connection at a glance, check its health, search by provider or account, and open one to test, refresh, or revoke its access.'\n )}\n </PagePurpose>\n\n {/* Search & Filters */}\n <div className=\"space-y-4\">\n <div className=\"flex flex-col sm:flex-row gap-3\">\n <div className=\"flex-1 relative group\" data-tour=\"integrations-connections-search\">\n <Search\n size={18}\n className=\"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary group-focus-within:text-primary transition-colors\"\n />\n <input\n type=\"text\"\n placeholder={tr(\n 'integrations.connections.search.placeholder',\n 'Search connections...'\n )}\n value={connectionFilter.search}\n onChange={(e) => updateConnectionFilter({ search: e.target.value })}\n className=\"w-full pl-10 pr-4 py-2.5 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-all\"\n aria-label={tr('integrations.connections.search.ariaLabel', 'Search connections')}\n />\n </div>\n\n <button\n type=\"button\"\n onClick={() => setShowFilters(!showFilters)}\n className={cn(\n 'inline-flex items-center gap-2 px-4 py-2.5 rounded-lg border text-sm font-medium transition-all',\n showFilters || hasActiveFilters\n ? 'bg-action-primary-bg text-action-primary-text border-primary'\n : 'bg-bg-surface text-text-primary border-border-subtle hover:bg-accent'\n )}\n >\n <Filter size={16} />\n {showFilters\n ? tr('integrations.connections.filters.hide', 'Hide')\n : tr('integrations.connections.filters.show', 'Filter')}\n </button>\n\n <div\n className=\"flex items-center border border-border-subtle rounded-lg overflow-hidden\"\n data-tour=\"integrations-connections-view-toggle\"\n >\n <button\n type=\"button\"\n onClick={() => setViewMode('grid')}\n className={cn(\n 'p-2.5 transition-colors',\n viewMode === 'grid'\n ? 'bg-action-primary-bg text-action-primary-text'\n : 'hover:bg-accent'\n )}\n aria-label={tr('integrations.connections.view.gridAriaLabel', 'Grid view')}\n >\n <Grid3x3 size={16} />\n </button>\n <button\n type=\"button\"\n onClick={() => setViewMode('list')}\n className={cn(\n 'p-2.5 transition-colors',\n viewMode === 'list'\n ? 'bg-action-primary-bg text-action-primary-text'\n : 'hover:bg-accent'\n )}\n aria-label={tr('integrations.connections.view.listAriaLabel', 'List view')}\n >\n <List size={16} />\n </button>\n </div>\n </div>\n\n {showFilters && (\n <div className=\"rounded-xl border border-border-seam bg-bg-surface p-5 animate-in slide-in-from-top-2 duration-200\">\n <div className=\"flex items-center justify-between mb-4\">\n <h3 className=\"font-semibold text-text-primary flex items-center gap-2\">\n <Filter size={16} className=\"text-primary\" />\n {tr('integrations.connections.filters.panelTitle', 'Filters')}\n </h3>\n {hasActiveFilters && (\n <button\n type=\"button\"\n onClick={handleClearFilters}\n className=\"text-sm text-text-secondary hover:text-status-error-text transition-colors flex items-center gap-1\"\n >\n <X size={14} /> {tr('integrations.connections.filters.clearAll', 'Clear All')}\n </button>\n )}\n </div>\n <div className=\"grid grid-cols-1 sm:grid-cols-2 gap-4\">\n <div className=\"space-y-2\">\n <label\n htmlFor={statusFilterId}\n className=\"block text-sm font-medium text-text-primary\"\n >\n {tr('integrations.connections.filters.statusLabel', 'Status')}\n </label>\n <select\n id={statusFilterId}\n value={connectionFilter.status}\n onChange={(e) =>\n updateConnectionFilter({ status: e.target.value as ConnectionStatus | 'all' })\n }\n className=\"w-full px-3 py-2 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary\"\n >\n <option value=\"all\">\n {tr('integrations.connections.filters.statusAll', 'All Statuses')}\n </option>\n {CONNECTION_STATUS_OPTIONS.map((opt) => (\n <option key={opt.value} value={opt.value}>\n {tr(`integrations.status.${opt.value}`, opt.label)}\n </option>\n ))}\n </select>\n </div>\n <div className=\"space-y-2\">\n <label\n htmlFor={categoryFilterId}\n className=\"block text-sm font-medium text-text-primary\"\n >\n {tr('integrations.connections.filters.categoryLabel', 'Category')}\n </label>\n <select\n id={categoryFilterId}\n value={connectionFilter.category}\n onChange={(e) =>\n updateConnectionFilter({ category: e.target.value as ProviderCategory | 'all' })\n }\n className=\"w-full px-3 py-2 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary\"\n >\n <option value=\"all\">\n {tr('integrations.connections.filters.categoryAll', 'All Categories')}\n </option>\n {PROVIDER_CATEGORIES.map((cat) => (\n <option key={cat.value} value={cat.value}>\n {tr(`integrations.category.${cat.value}`, cat.label)}\n </option>\n ))}\n </select>\n </div>\n </div>\n </div>\n )}\n </div>\n\n {/* Error */}\n {error && (\n <div className=\"rounded-xl border border-border-default bg-status-error-bg-subtle p-5 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 {tr('integrations.connections.error.title', 'Error loading connections')}\n </h3>\n <p className=\"text-sm text-status-error-text mb-3\">{error.message}</p>\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} /> {tr('integrations.common.retry', 'Try Again')}\n </button>\n </div>\n </div>\n )}\n\n {/* Loading */}\n {(loading || unanswered) && (\n <div\n className={cn(\n viewMode === 'grid'\n ? 'grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4'\n : 'space-y-3'\n )}\n >\n {[...Array(6)].map((_, i) => (\n <div key={i} className=\"rounded-xl border border-border-seam bg-bg-surface p-5\">\n <div className=\"flex items-start gap-3\">\n <div className=\"size-11 bg-bg-sunken rounded-xl animate-vc-shimmer\" />\n <div className=\"flex-1 space-y-2\">\n <div className=\"h-4 w-3/4 bg-bg-sunken rounded animate-vc-shimmer\" />\n <div className=\"h-3 w-1/2 bg-bg-sunken rounded animate-vc-shimmer\" />\n </div>\n </div>\n </div>\n ))}\n </div>\n )}\n\n {/* Connections — the page's primary emphasis zone */}\n {!loading && !error && !unanswered && (\n <EmphasisPanel className=\"overflow-hidden p-0\">\n <div className=\"flex items-center justify-between gap-2 p-5 border-b border-border-seam\">\n <div className=\"flex items-center gap-2\">\n <Link2 size={18} className=\"text-primary\" />\n <h2 className=\"font-semibold text-text-primary\">\n {tr('integrations.connections.results.title', 'Your Connections')}\n {filteredConnections.length > 0 && (\n <span className=\"ml-2 text-sm font-normal text-text-secondary tabular-nums\">\n ({filteredConnections.length})\n </span>\n )}\n </h2>\n </div>\n {canCreate && filteredConnections.length > 0 && (\n <Button size=\"sm\" variant=\"outline\" onClick={() => openAddConnectionDialog()}>\n <Plus size={14} /> {tr('integrations.connections.actions.add', 'Add')}\n </Button>\n )}\n </div>\n\n {filteredConnections.length > 0 ? (\n <div\n className={cn(\n 'p-5',\n viewMode === 'grid'\n ? 'grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4'\n : 'space-y-3'\n )}\n >\n {filteredConnections.map((conn: IntegrationConnection) => (\n <ConnectionCard\n key={conn.id}\n connection={conn}\n displayMode={viewMode}\n onClick={handleConnectionClick}\n />\n ))}\n </div>\n ) : (\n <IllustratedEmptyState\n illustration={hasActiveFilters ? 'empty-search' : 'empty-data'}\n title={\n hasActiveFilters\n ? tr('integrations.connections.empty.filteredTitle', 'No matching connections')\n : tr('integrations.connections.empty.title', 'No connections yet')\n }\n description={\n hasActiveFilters\n ? tr(\n 'integrations.connections.empty.filteredDescription',\n 'Try adjusting your search or filters.'\n )\n : canCreate\n ? tr(\n 'integrations.connections.empty.description',\n 'Add a connection to start integrating with external services.'\n )\n : tr(\n 'integrations.connections.empty.readOnlyDescription',\n 'No connections are configured yet. Contact your workspace admin to add one.'\n )\n }\n action={\n hasActiveFilters ? (\n <Button variant=\"outline\" onClick={handleClearFilters}>\n <X size={14} />{' '}\n {tr('integrations.connections.empty.clearFilters', 'Clear Filters')}\n </Button>\n ) : canCreate ? (\n <Button onClick={() => openAddConnectionDialog()}>\n <Plus size={14} />{' '}\n {tr('integrations.connections.actions.addConnection', 'Add Connection')}\n </Button>\n ) : undefined\n }\n />\n )}\n </EmphasisPanel>\n )}\n {/* Add Connection Dialog */}\n <AddConnectionDialog\n open={addConnectionDialogOpen}\n onClose={closeAddConnectionDialog}\n onConnectionCreated={() => {\n refetch();\n }}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA8BA,SAAgB,IAAkB;CAChC,IAAM,EAAE,cAAW,KAAK,aAAU,0BAAuB,GAAiB,EACpE,IAAK,GAAO,EACZ,EACJ,aACA,gBACA,qBACA,2BACA,4BACA,4BACA,gCACE,GAAsB,EAEpB,EAAE,gBAAa,YAAS,aAAU,UAAO,eAAY,IAAgB,EAqBrE,IAAa,CAAC,KAAW,CAAC,KAAS,CAAC,GACpC,EAAE,kBAAe,WAAW,MAAuB,GAAgB,EACnE,IAAY,CAAC,KAAsB,EAAc,EAAwB,kBAAkB,EAC3F,CAAC,GAAa,KAAkB,EAAS,GAAM,EAC/C,IAAW,GAAO,EAClB,IAAiB,GAAG,EAAS,UAC7B,IAAmB,GAAG,EAAS,YAE/B,IAAsB,QAAc;EACxC,IAAI,IAAS,KAAe,EAAE;AAE9B,MAAI,EAAiB,QAAQ;GAC3B,IAAM,IAAI,EAAiB,OAAO,aAAa;AAC/C,OAAS,EAAO,QACb,MACC,EAAE,KAAK,aAAa,CAAC,SAAS,EAAE,IAChC,EAAE,SAAS,KAAK,aAAa,CAAC,SAAS,EAAE,KACxC,EAAE,sBAAsB,aAAa,CAAC,SAAS,EAAE,IAAI,IACzD;;AAmBH,SAhBI,EAAiB,WAAW,UAC9B,IAAS,EAAO,QAAQ,MAA6B,EAAE,WAAW,EAAiB,OAAO,GAGxF,EAAiB,eACnB,IAAS,EAAO,QACb,MAA6B,EAAE,SAAS,OAAO,EAAiB,WAClE,GAGC,EAAiB,aAAa,UAChC,IAAS,EAAO,QACb,MAA6B,EAAE,SAAS,aAAa,EAAiB,SACxE,GAGI,EAAO,MACX,GAA0B,MACzB,IAAI,KAAK,EAAE,UAAU,CAAC,SAAS,GAAG,IAAI,KAAK,EAAE,UAAU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AEP;QAEL,EAAoB,SAAS,IAC5B,kBAAC,OAAD;KACE,WAAW,EACT,OACA,MAAa,SACT,yDACA,YACL;eAEA,EAAoB,KAAK,MACxB,kBAAC,IAAD;MAEE,YAAY;MACZ,aAAa;MACb,SAAS;MACT,EAJK,EAAK,GAIV,CACF;KACE,CAAA,GAEN,kBAAC,IAAD;KACE,cAAc,IAAmB,iBAAiB;KAClD,OACE,IACI,EAAG,gDAAgD,0BAA0B,GAC7E,EAAG,wCAAwC,qBAAqB;KAEtE,aACE,IACI,EACE,sDACA,wCACD,GACD,IACE,EACE,8CACA,gEACD,GACD,EACE,sDACA,8EACD;KAET,QACE,IACE,kBAAC,GAAD;MAAQ,SAAQ;MAAU,SAAS;gBAAnC;OACE,kBAAC,GAAD,EAAG,MAAM,IAAM,CAAA;OAAC;OACf,EAAG,+CAA+C,gBAAgB;OAC5D;UACP,IACF,kBAAC,GAAD;MAAQ,eAAe,GAAyB;gBAAhD;OACE,kBAAC,GAAD,EAAM,MAAM,IAAM,CAAA;OAAC;OAClB,EAAG,kDAAkD,iBAAiB;OAChE;UACP,KAAA;KAEN,CAAA,CAEU;;GAGlB,kBAAC,GAAD;IACE,MAAM;IACN,SAAS;IACT,2BAA2B;AACzB,QAAS;;IAEX,CAAA;GACE"}
@@ -6,9 +6,9 @@ import { useIntegrationsStore as i } from "../store/integrationsStore.js";
6
6
  import { joinPath as a } from "../utils/navigation.js";
7
7
  import { getStatusDotColor as o } from "../utils/integrationsHelpers.js";
8
8
  import { useFormatLastUsed as s } from "../hooks/useFormatLastUsed.js";
9
- import { mapConnection as c, mapProvider as l } from "../utils/mappers.js";
10
- import { getAccentClasses as u } from "../utils/appearance.js";
11
- import { AddConnectionDialog as d } from "../components/AddConnectionDialog.js";
9
+ import { AddConnectionDialog as c } from "../components/AddConnectionDialog.js";
10
+ import { getAccentClasses as l } from "../utils/appearance.js";
11
+ import { mapConnection as u, mapProvider as d } from "../utils/mappers.js";
12
12
  import { useMemo as f } from "react";
13
13
  import { AlertCircle as p, ArrowRight as m, CheckCircle2 as h, Clock as g, LayoutDashboard as _, Link2 as v, Loader2 as y, Plug as b, Plus as x, RefreshCw as S, Store as C, XCircle as w } from "lucide-react";
14
14
  import { gql as T } from "@apollo/client";
@@ -96,15 +96,15 @@ function z() {
96
96
  nextFetchPolicy: "cache-first"
97
97
  });
98
98
  return {
99
- providers: (e?.getProviders?.items ?? []).map((e) => l(e)),
100
- connections: (e?.getConnections?.items ?? []).map((e) => c(e)),
99
+ providers: (e?.getProviders?.items ?? []).map((e) => d(e)),
100
+ connections: (e?.getConnections?.items ?? []).map((e) => u(e)),
101
101
  loading: t,
102
102
  error: n,
103
103
  refetch: r
104
104
  };
105
105
  }
106
106
  function B({ label: e, value: t, icon: r, tone: i = "primary", onClick: a, glow: o = !1 }) {
107
- let s = u(i);
107
+ let s = l(i);
108
108
  return /* @__PURE__ */ O(N, {
109
109
  treatment: "metric",
110
110
  glow: o,
@@ -131,35 +131,35 @@ function B({ label: e, value: t, icon: r, tone: i = "primary", onClick: a, glow:
131
131
  });
132
132
  }
133
133
  function V() {
134
- let { basePath: c = "/", navigate: l } = e(), u = t(), T = s(), { addConnectionDialogOpen: E, openAddConnectionDialog: N, closeAddConnectionDialog: R } = i(), { hasPermission: V, isLoading: H } = D(), U = !H && V(r.CONNECTION_CREATE), { providers: W, connections: G, loading: K, error: q, refetch: J } = z(), Y = f(() => ({
134
+ let { basePath: l = "/", navigate: u } = e(), d = t(), T = s(), { addConnectionDialogOpen: E, openAddConnectionDialog: N, closeAddConnectionDialog: R } = i(), { hasPermission: V, isLoading: H } = D(), U = !H && V(r.CONNECTION_CREATE), { providers: W, connections: G, loading: K, error: q, refetch: J } = z(), Y = f(() => ({
135
135
  totalProviders: (W ?? []).length,
136
136
  installedProviders: (W ?? []).filter((e) => e.pluginStatus === "installed").length,
137
137
  activeConnections: (G ?? []).filter((e) => e.status === "active").length,
138
138
  pendingAuth: (G ?? []).filter((e) => e.status === "pending_auth").length,
139
139
  errorConnections: (G ?? []).filter((e) => e.status === "error").length
140
140
  }), [W, G]), X = f(() => [...G ?? []].sort((e, t) => new Date(t.updatedAt).getTime() - new Date(e.updatedAt).getTime()).slice(0, 5), [G]), Z = (e) => {
141
- l && l(a(c, e));
141
+ u && u(a(l, e));
142
142
  }, Q = [
143
143
  {
144
144
  id: "browse-providers",
145
- label: u("integrations.overview.nextSteps.browse.label", "Browse the provider catalog"),
146
- description: u("integrations.overview.nextSteps.browse.description", "See which services you can connect to — Slack, Google Drive, GitHub and more."),
145
+ label: d("integrations.overview.nextSteps.browse.label", "Browse the provider catalog"),
146
+ description: d("integrations.overview.nextSteps.browse.description", "See which services you can connect to — Slack, Google Drive, GitHub and more."),
147
147
  icon: /* @__PURE__ */ O(C, { size: 16 }),
148
148
  onClick: () => Z("providers"),
149
149
  done: Y.installedProviders > 0
150
150
  },
151
151
  ...U ? [{
152
152
  id: "add-connection",
153
- label: u("integrations.overview.nextSteps.connect.label", "Add your first connection"),
154
- description: u("integrations.overview.nextSteps.connect.description", "Authenticate a provider so your workspace can start exchanging data with it."),
153
+ label: d("integrations.overview.nextSteps.connect.label", "Add your first connection"),
154
+ description: d("integrations.overview.nextSteps.connect.description", "Authenticate a provider so your workspace can start exchanging data with it."),
155
155
  icon: /* @__PURE__ */ O(x, { size: 16 }),
156
156
  onClick: () => N(),
157
157
  done: (G ?? []).length > 0
158
158
  }] : [],
159
159
  {
160
160
  id: "review-activity",
161
- label: u("integrations.overview.nextSteps.logs.label", "Review activity logs"),
162
- description: u("integrations.overview.nextSteps.logs.description", "Track requests and troubleshoot any connection that reports an error."),
161
+ label: d("integrations.overview.nextSteps.logs.label", "Review activity logs"),
162
+ description: d("integrations.overview.nextSteps.logs.description", "Track requests and troubleshoot any connection that reports an error."),
163
163
  icon: /* @__PURE__ */ O(g, { size: 16 }),
164
164
  onClick: () => Z("logs"),
165
165
  done: Y.errorConnections === 0 && Y.activeConnections > 0
@@ -183,10 +183,10 @@ function V() {
183
183
  })
184
184
  }), /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("h1", {
185
185
  className: "text-2xl sm:text-3xl font-bold text-text-primary",
186
- children: /* @__PURE__ */ O(P, { children: u("integrations.overview.title", "Integrations") })
186
+ children: /* @__PURE__ */ O(P, { children: d("integrations.overview.title", "Integrations") })
187
187
  }), /* @__PURE__ */ O("p", {
188
188
  className: "text-sm text-text-secondary mt-0.5",
189
- children: u("integrations.overview.subtitle", "Connect your workspace to external services and tools")
189
+ children: d("integrations.overview.subtitle", "Connect your workspace to external services and tools")
190
190
  })] })]
191
191
  }), /* @__PURE__ */ O("div", {
192
192
  className: "flex items-center gap-2",
@@ -196,7 +196,7 @@ function V() {
196
196
  onClick: () => {
197
197
  J();
198
198
  },
199
- "aria-label": u("integrations.overview.actions.refreshAriaLabel", "Refresh"),
199
+ "aria-label": d("integrations.overview.actions.refreshAriaLabel", "Refresh"),
200
200
  children: /* @__PURE__ */ O(S, {
201
201
  size: 18,
202
202
  className: "text-text-secondary"
@@ -207,7 +207,7 @@ function V() {
207
207
  }),
208
208
  /* @__PURE__ */ O(L, {
209
209
  icon: /* @__PURE__ */ O(b, { size: 16 }),
210
- children: u("integrations.overview.purpose", "Integrations let your workspace talk to outside tools — sending messages to Slack, syncing files with Google Drive, opening issues in GitHub, and more. Install a provider, add a connection by authenticating once, and the rest of the platform can reuse it. This dashboard summarizes what is connected and what needs attention.")
210
+ children: d("integrations.overview.purpose", "Integrations let your workspace talk to outside tools — sending messages to Slack, syncing files with Google Drive, opening issues in GitHub, and more. Install a provider, add a connection by authenticating once, and the rest of the platform can reuse it. This dashboard summarizes what is connected and what needs attention.")
211
211
  }),
212
212
  /* @__PURE__ */ O(I, {
213
213
  storageKey: "integrations-overview",
@@ -226,7 +226,7 @@ function V() {
226
226
  children: [
227
227
  /* @__PURE__ */ O("h3", {
228
228
  className: "font-semibold text-status-error-text mb-1",
229
- children: u("integrations.overview.error.title", "Failed to load integrations data")
229
+ children: d("integrations.overview.error.title", "Failed to load integrations data")
230
230
  }),
231
231
  /* @__PURE__ */ O("p", {
232
232
  className: "text-sm text-status-error-text mb-3",
@@ -238,7 +238,7 @@ function V() {
238
238
  J();
239
239
  },
240
240
  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",
241
- children: [/* @__PURE__ */ O(S, { size: 14 }), u("integrations.overview.error.retry", "Try Again")]
241
+ children: [/* @__PURE__ */ O(S, { size: 14 }), d("integrations.overview.error.retry", "Try Again")]
242
242
  })
243
243
  ]
244
244
  })]
@@ -266,7 +266,7 @@ function V() {
266
266
  "data-tour": "integrations-stats-cards",
267
267
  children: [
268
268
  /* @__PURE__ */ O(B, {
269
- label: u("integrations.overview.stats.installedProviders", "Installed Providers"),
269
+ label: d("integrations.overview.stats.installedProviders", "Installed Providers"),
270
270
  value: Y.installedProviders,
271
271
  icon: /* @__PURE__ */ O(C, {
272
272
  size: 24,
@@ -276,7 +276,7 @@ function V() {
276
276
  onClick: () => Z("providers")
277
277
  }),
278
278
  /* @__PURE__ */ O(B, {
279
- label: u("integrations.overview.stats.activeConnections", "Active Connections"),
279
+ label: d("integrations.overview.stats.activeConnections", "Active Connections"),
280
280
  value: Y.activeConnections,
281
281
  icon: /* @__PURE__ */ O(h, {
282
282
  size: 24,
@@ -287,7 +287,7 @@ function V() {
287
287
  onClick: () => Z("connections")
288
288
  }),
289
289
  /* @__PURE__ */ O(B, {
290
- label: u("integrations.overview.stats.pendingAuth", "Pending Auth"),
290
+ label: d("integrations.overview.stats.pendingAuth", "Pending Auth"),
291
291
  value: Y.pendingAuth,
292
292
  icon: /* @__PURE__ */ O(g, {
293
293
  size: 24,
@@ -297,7 +297,7 @@ function V() {
297
297
  onClick: () => Z("connections")
298
298
  }),
299
299
  /* @__PURE__ */ O(B, {
300
- label: u("integrations.overview.stats.errors", "Errors"),
300
+ label: d("integrations.overview.stats.errors", "Errors"),
301
301
  value: Y.errorConnections,
302
302
  icon: /* @__PURE__ */ O(w, {
303
303
  size: 24,
@@ -327,10 +327,10 @@ function V() {
327
327
  className: "flex-1",
328
328
  children: [/* @__PURE__ */ O("h3", {
329
329
  className: "font-semibold text-text-primary",
330
- children: u("integrations.overview.quickActions.browseProviders.title", "Browse Providers")
330
+ children: d("integrations.overview.quickActions.browseProviders.title", "Browse Providers")
331
331
  }), /* @__PURE__ */ O("p", {
332
332
  className: "text-sm text-text-secondary mt-0.5",
333
- children: u("integrations.overview.quickActions.browseProviders.description", "Discover and install integration plugins")
333
+ children: d("integrations.overview.quickActions.browseProviders.description", "Discover and install integration plugins")
334
334
  })]
335
335
  }),
336
336
  /* @__PURE__ */ O(m, {
@@ -354,10 +354,10 @@ function V() {
354
354
  className: "flex-1",
355
355
  children: [/* @__PURE__ */ O("h3", {
356
356
  className: "font-semibold text-text-primary",
357
- children: u("integrations.overview.quickActions.addConnection.title", "Add Connection")
357
+ children: d("integrations.overview.quickActions.addConnection.title", "Add Connection")
358
358
  }), /* @__PURE__ */ O("p", {
359
359
  className: "text-sm text-text-secondary mt-0.5",
360
- children: u("integrations.overview.quickActions.addConnection.description", "Connect to an external service")
360
+ children: d("integrations.overview.quickActions.addConnection.description", "Connect to an external service")
361
361
  })]
362
362
  }),
363
363
  /* @__PURE__ */ O(m, {
@@ -380,13 +380,13 @@ function V() {
380
380
  className: "text-primary"
381
381
  }), /* @__PURE__ */ O("h2", {
382
382
  className: "font-semibold text-text-primary",
383
- children: u("integrations.overview.recentConnections.title", "Recent Connections")
383
+ children: d("integrations.overview.recentConnections.title", "Recent Connections")
384
384
  })]
385
385
  }), /* @__PURE__ */ O("button", {
386
386
  type: "button",
387
387
  onClick: () => Z("connections"),
388
388
  className: "text-sm text-primary hover:underline",
389
- children: u("integrations.overview.recentConnections.viewAll", "View all")
389
+ children: d("integrations.overview.recentConnections.viewAll", "View all")
390
390
  })]
391
391
  }),
392
392
  K && /* @__PURE__ */ O("div", {
@@ -398,11 +398,11 @@ function V() {
398
398
  }),
399
399
  !K && X.length === 0 && /* @__PURE__ */ O(F, {
400
400
  illustration: "empty-data",
401
- title: u("integrations.overview.empty.title", "No connections yet"),
402
- description: U ? u("integrations.overview.empty.canCreateDescription", "Create your first connection to start integrating with external services.") : u("integrations.overview.empty.readOnlyDescription", "No connections have been configured yet."),
401
+ title: d("integrations.overview.empty.title", "No connections yet"),
402
+ description: U ? d("integrations.overview.empty.canCreateDescription", "Create your first connection to start integrating with external services.") : d("integrations.overview.empty.readOnlyDescription", "No connections have been configured yet."),
403
403
  action: U ? /* @__PURE__ */ k(j, {
404
404
  onClick: () => N(),
405
- children: [/* @__PURE__ */ O(x, { size: 16 }), u("integrations.overview.actions.addConnection", "Add Connection")]
405
+ children: [/* @__PURE__ */ O(x, { size: 16 }), d("integrations.overview.actions.addConnection", "Add Connection")]
406
406
  }) : void 0
407
407
  }),
408
408
  !K && X.length > 0 && /* @__PURE__ */ O("div", {
@@ -445,7 +445,7 @@ function V() {
445
445
  })
446
446
  ]
447
447
  }),
448
- /* @__PURE__ */ O(d, {
448
+ /* @__PURE__ */ O(c, {
449
449
  open: E,
450
450
  onClose: R,
451
451
  onConnectionCreated: () => {