@burdenoff/microfe-cosmicintersection 2026.1108.2 → 2026.1109.1

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 (85) hide show
  1. package/dist/cosmicintersection/api/databricksTransport.d.ts +13 -0
  2. package/dist/cosmicintersection/api/databricksTransport.d.ts.map +1 -0
  3. package/dist/cosmicintersection/api/databricksTransport.js +38 -0
  4. package/dist/cosmicintersection/api/databricksTransport.js.map +1 -0
  5. package/dist/cosmicintersection/components/ActionMenu.js +17 -17
  6. package/dist/cosmicintersection/components/DatabricksQueueForm.d.ts +13 -0
  7. package/dist/cosmicintersection/components/DatabricksQueueForm.d.ts.map +1 -0
  8. package/dist/cosmicintersection/components/DatabricksQueueForm.js +221 -0
  9. package/dist/cosmicintersection/components/DatabricksQueueForm.js.map +1 -0
  10. package/dist/cosmicintersection/components/DatabricksRunPanel.d.ts +6 -0
  11. package/dist/cosmicintersection/components/DatabricksRunPanel.d.ts.map +1 -0
  12. package/dist/cosmicintersection/components/DatabricksRunPanel.js +206 -0
  13. package/dist/cosmicintersection/components/DatabricksRunPanel.js.map +1 -0
  14. package/dist/cosmicintersection/components/EntityFormShell.js +7 -7
  15. package/dist/cosmicintersection/components/EntityTagsField.js +8 -8
  16. package/dist/cosmicintersection/components/ErrorState.js +4 -4
  17. package/dist/cosmicintersection/components/FileUploadField.js +8 -8
  18. package/dist/cosmicintersection/components/Pagination.js +6 -6
  19. package/dist/cosmicintersection/components/ReleaseDraftDialog.js +17 -17
  20. package/dist/cosmicintersection/components/RunTriageCard.js +12 -12
  21. package/dist/cosmicintersection/components/SchemaProposalPanel.js +35 -35
  22. package/dist/cosmicintersection/components/SchemaProposalPanel.js.map +1 -1
  23. package/dist/cosmicintersection/components/WorkspaceTagsPicker.js +12 -12
  24. package/dist/cosmicintersection/components/index.js +7 -7
  25. package/dist/cosmicintersection/context/CosmicIntersectionContext.d.ts +2 -0
  26. package/dist/cosmicintersection/context/CosmicIntersectionContext.d.ts.map +1 -1
  27. package/dist/cosmicintersection/context/CosmicIntersectionContext.js +17 -13
  28. package/dist/cosmicintersection/context/CosmicIntersectionContext.js.map +1 -1
  29. package/dist/cosmicintersection/hooks/useDatabricksExecutions.d.ts +69 -0
  30. package/dist/cosmicintersection/hooks/useDatabricksExecutions.d.ts.map +1 -0
  31. package/dist/cosmicintersection/hooks/useDatabricksExecutions.js +89 -0
  32. package/dist/cosmicintersection/hooks/useDatabricksExecutions.js.map +1 -0
  33. package/dist/cosmicintersection/hooks/useDatabricksQueueForm.d.ts +59 -0
  34. package/dist/cosmicintersection/hooks/useDatabricksQueueForm.d.ts.map +1 -0
  35. package/dist/cosmicintersection/hooks/useDatabricksQueueForm.js +158 -0
  36. package/dist/cosmicintersection/hooks/useDatabricksQueueForm.js.map +1 -0
  37. package/dist/cosmicintersection/lib/databricksForm.d.ts +4 -0
  38. package/dist/cosmicintersection/lib/databricksForm.d.ts.map +1 -0
  39. package/dist/cosmicintersection/lib/databricksForm.js +31 -0
  40. package/dist/cosmicintersection/lib/databricksForm.js.map +1 -0
  41. package/dist/cosmicintersection/lib/databricksIntent.d.ts +19 -0
  42. package/dist/cosmicintersection/lib/databricksIntent.d.ts.map +1 -0
  43. package/dist/cosmicintersection/lib/databricksIntent.js +60 -0
  44. package/dist/cosmicintersection/lib/databricksIntent.js.map +1 -0
  45. package/dist/cosmicintersection/lib/databricksPresentation.d.ts +5 -0
  46. package/dist/cosmicintersection/lib/databricksPresentation.d.ts.map +1 -0
  47. package/dist/cosmicintersection/lib/databricksPresentation.js +27 -0
  48. package/dist/cosmicintersection/lib/databricksPresentation.js.map +1 -0
  49. package/dist/cosmicintersection/pages/access/AccessPage.js +62 -62
  50. package/dist/cosmicintersection/pages/access/AccessPage.js.map +1 -1
  51. package/dist/cosmicintersection/pages/analyses/AnalysesPage.js +107 -107
  52. package/dist/cosmicintersection/pages/analyses/AnalysesPage.js.map +1 -1
  53. package/dist/cosmicintersection/pages/collections/CollectionDetailPage.js +24 -24
  54. package/dist/cosmicintersection/pages/collections/CollectionsPage.js +12 -12
  55. package/dist/cosmicintersection/pages/dashboard/DashboardPage.js +18 -18
  56. package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js +91 -91
  57. package/dist/cosmicintersection/pages/datasets/DatasetsPage.js +209 -209
  58. package/dist/cosmicintersection/pages/datasets/DatasetsPage.js.map +1 -1
  59. package/dist/cosmicintersection/pages/discovery/DiscoveryPage.js +98 -98
  60. package/dist/cosmicintersection/pages/discovery/DiscoveryPage.js.map +1 -1
  61. package/dist/cosmicintersection/pages/lineage/LineagePage.js +15 -15
  62. package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.js +139 -139
  63. package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.js.map +1 -1
  64. package/dist/cosmicintersection/pages/notebooks/NotebooksPage.js +34 -34
  65. package/dist/cosmicintersection/pages/pipelines/PipelineDetailPage.js +39 -39
  66. package/dist/cosmicintersection/pages/pipelines/PipelineDetailPage.js.map +1 -1
  67. package/dist/cosmicintersection/pages/pipelines/PipelineFormPage.js +107 -107
  68. package/dist/cosmicintersection/pages/pipelines/PipelineFormPage.js.map +1 -1
  69. package/dist/cosmicintersection/pages/pipelines/PipelinesPage.js +32 -32
  70. package/dist/cosmicintersection/pages/releases/ReleasesPage.js +213 -213
  71. package/dist/cosmicintersection/pages/releases/ReleasesPage.js.map +1 -1
  72. package/dist/cosmicintersection/pages/runs/RunDetailPage.d.ts.map +1 -1
  73. package/dist/cosmicintersection/pages/runs/RunDetailPage.js +250 -213
  74. package/dist/cosmicintersection/pages/runs/RunDetailPage.js.map +1 -1
  75. package/dist/cosmicintersection/pages/runs/RunsPage.js +31 -31
  76. package/dist/cosmicintersection/pages/sources/SourceDetailPage.js +41 -41
  77. package/dist/cosmicintersection/pages/sources/SourcesPage.js +122 -122
  78. package/dist/cosmicintersection/pages/sources/SourcesPage.js.map +1 -1
  79. package/dist/generated/wspace-operations.d.ts +243 -0
  80. package/dist/generated/wspace-operations.d.ts.map +1 -0
  81. package/dist/generated/wspace-operations.js +1472 -0
  82. package/dist/generated/wspace-operations.js.map +1 -0
  83. package/dist/generated/wspace-types.d.ts +183281 -30204
  84. package/dist/generated/wspace-types.d.ts.map +1 -1
  85. package/package.json +10 -7
@@ -1 +1 @@
1
- {"version":3,"file":"NotebookDetailPage.js","names":[],"sources":["../../../../src/cosmicintersection/pages/notebooks/NotebookDetailPage.tsx"],"sourcesContent":["/**\n * NotebookDetailPage — full record for one notebook.\n *\n * Header renders the notebook's metadata (status, runtime, environment JSON,\n * description, sharing, attached file download). Below it an Analyses section\n * lists `cosListAnalyses(notebookId)` and a \"Run analysis\" dialog kicks off a\n * new `cosRunAnalysis` bound to this notebook. Archive is available from the\n * header action menu. No fabricated data — everything is read from the backend.\n */\nimport { useMemo, useState, type FormEvent } from 'react';\nimport { useParams } from 'react-router';\nimport {\n Beaker,\n Database,\n Download,\n FileCode2,\n MessageSquare,\n Pencil,\n Play,\n Share2,\n Sparkles,\n} from 'lucide-react';\nimport {\n Badge,\n Button,\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n Input,\n Label,\n Switch,\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n} from '@burdenoff/fe-libs/ui';\n\nimport {\n useCosAnalysesQuery,\n useCosArchiveNotebookMutation,\n useCosDatasetsQuery,\n useCosNotebookQuery,\n useCosRunAnalysisMutation,\n type CosAnalysis,\n} from '../../api/cosmicApi';\nimport {\n ActionMenu,\n DiscussionPanel,\n EmptyState,\n ErrorState,\n LoadingState,\n PageLayout,\n ReleaseDraftDialog,\n StatusBadge,\n useFileDownloadUrl,\n} from '../../components';\nimport { useCosmicIntersection } from '../../context/CosmicIntersectionContext';\nimport { notify } from '../../lib/toast';\nimport { useTrackRecentItem } from '../../lib/useTrackRecentItem';\n\nfunction formatDateTime(value?: string | null): string {\n if (!value) {\n return '—';\n }\n const date = new Date(value);\n if (Number.isNaN(date.getTime())) {\n return '—';\n }\n return date.toLocaleString(undefined, {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n });\n}\n\n/** Renders a presigned download link for an attached wspace-files artifact. */\nfunction FileDownloadLink({ fileId, label }: { fileId: string; label: string }) {\n const { data, loading } = useFileDownloadUrl(fileId);\n const url = data?.getFileDownloadUrl ?? null;\n if (loading) {\n return <span className=\"text-xs text-text-secondary\">Resolving link…</span>;\n }\n if (!url) {\n return <span className=\"text-xs text-text-secondary\">File {fileId}</span>;\n }\n return (\n <a\n href={url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1 text-sm text-text-primary underline-offset-2 hover:underline\"\n >\n <Download className=\"size-3.5\" aria-hidden=\"true\" />\n {label}\n </a>\n );\n}\n\ninterface RunAnalysisDialogProps {\n notebookId: string;\n open: boolean;\n onOpenChange: (open: boolean) => void;\n onCompleted: () => void;\n}\n\n/** Dialog to launch a new analysis on this notebook. */\nfunction RunAnalysisDialog({\n notebookId,\n open,\n onOpenChange,\n onCompleted,\n}: RunAnalysisDialogProps) {\n const [title, setTitle] = useState('');\n const [method, setMethod] = useState('');\n const [aiAssisted, setAiAssisted] = useState(false);\n const [runAnalysis, { loading }] = useCosRunAnalysisMutation();\n\n const reset = () => {\n setTitle('');\n setMethod('');\n setAiAssisted(false);\n };\n\n const handleSubmit = async (event: FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n const trimmed = title.trim();\n if (!trimmed) {\n notify.error('Title is required', 'Give the analysis a descriptive title.');\n return;\n }\n const response = await runAnalysis({\n variables: {\n input: {\n notebookId,\n title: trimmed,\n method: method.trim() || undefined,\n aiAssisted,\n },\n },\n });\n if (response.error || !response.data?.cosRunAnalysis?.id) {\n return;\n }\n notify.success('Analysis started', `“${trimmed}” is now running.`);\n reset();\n onOpenChange(false);\n onCompleted();\n };\n\n return (\n <Dialog\n open={open}\n onOpenChange={(next) => {\n if (!loading) {\n onOpenChange(next);\n }\n }}\n >\n <DialogContent>\n <form onSubmit={handleSubmit} className=\"space-y-4\">\n <DialogHeader>\n <DialogTitle>Run analysis</DialogTitle>\n <DialogDescription>\n Launch a new analysis run against this notebook. It starts in the running state and\n can be completed later with results.\n </DialogDescription>\n </DialogHeader>\n\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"run-analysis-title\">Title</Label>\n <Input\n id=\"run-analysis-title\"\n value={title}\n onChange={(event) => setTitle(event.target.value)}\n placeholder=\"e.g. Period-folding search\"\n required\n />\n </div>\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"run-analysis-method\">Method</Label>\n <Input\n id=\"run-analysis-method\"\n value={method}\n onChange={(event) => setMethod(event.target.value)}\n placeholder=\"e.g. box-least-squares\"\n />\n </div>\n <div className=\"flex items-center gap-3\">\n <Switch\n id=\"run-analysis-ai\"\n checked={aiAssisted}\n onCheckedChange={(checked) => setAiAssisted(checked)}\n />\n <Label htmlFor=\"run-analysis-ai\" className=\"cursor-pointer\">\n AI-assisted analysis\n </Label>\n </div>\n\n <DialogFooter>\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={() => onOpenChange(false)}\n disabled={loading}\n >\n Cancel\n </Button>\n <Button type=\"submit\" disabled={loading}>\n <Play className=\"size-4\" />\n {loading ? 'Starting…' : 'Run analysis'}\n </Button>\n </DialogFooter>\n </form>\n </DialogContent>\n </Dialog>\n );\n}\n\nexport default function NotebookDetailPage() {\n const { id = '' } = useParams<{ id: string }>();\n const { navigate } = useCosmicIntersection();\n const [runOpen, setRunOpen] = useState(false);\n const [draftOpen, setDraftOpen] = useState(false);\n\n const { data, loading, error, refetch } = useCosNotebookQuery(id);\n const {\n data: analysesData,\n loading: analysesLoading,\n error: analysesError,\n refetch: refetchAnalyses,\n } = useCosAnalysesQuery({ notebookId: id });\n // Resolve the notebook's linked dataset UUIDs to human names for chips.\n const { data: datasetsData } = useCosDatasetsQuery({ pagination: { limit: 100, offset: 0 } });\n const [archiveNotebook] = useCosArchiveNotebookMutation();\n\n const notebook = data?.cosNotebook ?? null;\n useTrackRecentItem(\n notebook\n ? {\n type: 'notebook',\n id: notebook.id,\n name: notebook.title,\n path: `notebooks/${encodeURIComponent(notebook.id)}`,\n }\n : null\n );\n const analyses = analysesData?.cosListAnalyses ?? [];\n\n const datasetNameById = useMemo(() => {\n const map = new Map<string, string>();\n for (const dataset of datasetsData?.cosListDatasets.items ?? []) {\n map.set(dataset.id, dataset.name);\n }\n return map;\n }, [datasetsData]);\n\n const handleArchive = async () => {\n if (!notebook) {\n return;\n }\n const response = await archiveNotebook({ variables: { id: notebook.id } });\n if (response.error) {\n throw new Error(response.error.message);\n }\n if (!response.data?.cosArchiveNotebook) {\n notify.error('Could not archive notebook', 'The server did not confirm the change.');\n throw new Error('Archive not confirmed');\n }\n await refetch();\n notify.success('Notebook archived', `“${notebook.title}” was archived.`);\n };\n\n if (loading) {\n return (\n <PageLayout title=\"Notebook\" backPath=\"notebooks\">\n <LoadingState label=\"Loading notebook…\" />\n </PageLayout>\n );\n }\n\n if (error) {\n return (\n <PageLayout title=\"Notebook\" backPath=\"notebooks\">\n <ErrorState\n message=\"We could not load this notebook. Please try again.\"\n onRetry={() => void refetch()}\n />\n </PageLayout>\n );\n }\n\n if (!notebook) {\n return (\n <PageLayout title=\"Notebook\" backPath=\"notebooks\">\n <EmptyState\n icon={FileCode2}\n title=\"Notebook not found.\"\n description=\"This notebook may have been removed or is outside your current scope.\"\n action={\n <Button type=\"button\" onClick={() => navigate('notebooks')}>\n Back to notebooks\n </Button>\n }\n />\n </PageLayout>\n );\n }\n\n const environmentJson =\n notebook.environment && Object.keys(notebook.environment).length > 0\n ? JSON.stringify(notebook.environment, null, 2)\n : null;\n\n const actions = (\n <div className=\"flex items-center gap-2\">\n <Button type=\"button\" onClick={() => setRunOpen(true)}>\n <Play className=\"size-4\" />\n Run analysis\n </Button>\n <Button type=\"button\" variant=\"outline\" onClick={() => setDraftOpen(true)}>\n <Sparkles className=\"size-4\" />\n Draft release\n </Button>\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={() => navigate(`notebooks/${notebook.id}/edit`)}\n >\n <Pencil className=\"size-4\" />\n Edit\n </Button>\n <ActionMenu\n ariaLabel={`Actions for ${notebook.title}`}\n entityName={notebook.title}\n onDelete={notebook.status === 'ARCHIVED' ? undefined : handleArchive}\n deleteLabel=\"Archive notebook\"\n />\n </div>\n );\n\n return (\n <PageLayout\n title={notebook.title}\n description=\"Notebook detail\"\n backPath=\"notebooks\"\n actions={actions}\n >\n <div className=\"space-y-6\">\n {/* Overview */}\n <section className=\"rounded-card border border-border-default bg-bg-elevated p-6\">\n <div className=\"flex flex-wrap items-center gap-3\">\n <StatusBadge status={notebook.status} />\n {notebook.runtime ? <Badge variant=\"outline\">Runtime: {notebook.runtime}</Badge> : null}\n {notebook.isShared ? (\n <Badge variant=\"secondary\" className=\"gap-1\">\n <Share2 className=\"size-3\" aria-hidden=\"true\" />\n Shared{notebook.shareSlug ? `: ${notebook.shareSlug}` : ''}\n </Badge>\n ) : (\n <Badge variant=\"outline\">Private</Badge>\n )}\n </div>\n\n {notebook.description ? (\n <p className=\"mt-4 text-sm text-text-secondary\">{notebook.description}</p>\n ) : (\n <p className=\"mt-4 text-sm text-text-secondary\">No description provided.</p>\n )}\n\n <div className=\"mt-6\">\n <p className=\"text-xs uppercase tracking-wide text-text-secondary\">Linked datasets</p>\n {notebook.datasetIds.length === 0 ? (\n <p className=\"mt-2 text-sm text-text-secondary\">No datasets linked.</p>\n ) : (\n <div className=\"mt-2 flex flex-wrap gap-2\">\n {notebook.datasetIds.map((datasetId) => {\n const name = datasetNameById.get(datasetId);\n return (\n <Button\n key={datasetId}\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n className=\"h-auto gap-1.5 px-2.5 py-1\"\n onClick={() => navigate(`datasets/${datasetId}`)}\n >\n <Database className=\"size-3.5 shrink-0\" aria-hidden=\"true\" />\n <span className={name ? 'max-w-[16rem] truncate' : 'font-mono text-xs'}>\n {name ?? datasetId}\n </span>\n </Button>\n );\n })}\n </div>\n )}\n </div>\n\n <dl className=\"mt-6 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3\">\n <div>\n <dt className=\"text-xs uppercase tracking-wide text-text-secondary\">Created</dt>\n <dd className=\"mt-1 text-sm text-text-primary\">\n {formatDateTime(notebook.createdAt)}\n </dd>\n </div>\n <div>\n <dt className=\"text-xs uppercase tracking-wide text-text-secondary\">Updated</dt>\n <dd className=\"mt-1 text-sm text-text-primary\">\n {formatDateTime(notebook.updatedAt)}\n </dd>\n </div>\n <div>\n <dt className=\"text-xs uppercase tracking-wide text-text-secondary\">Notebook file</dt>\n <dd className=\"mt-1 text-sm text-text-primary\">\n {notebook.file?.id ? (\n <FileDownloadLink fileId={notebook.file.id} label=\"Download notebook\" />\n ) : (\n <span className=\"text-text-secondary\">No file attached</span>\n )}\n </dd>\n </div>\n </dl>\n\n {notebook.tags.length > 0 ? (\n <div className=\"mt-6\">\n <p className=\"text-xs uppercase tracking-wide text-text-secondary\">Tags</p>\n <div className=\"mt-2 flex flex-wrap gap-2\">\n {notebook.tags.map((tag) => (\n <Badge key={tag} variant=\"outline\">\n {tag}\n </Badge>\n ))}\n </div>\n </div>\n ) : null}\n\n {environmentJson ? (\n <div className=\"mt-6\">\n <p className=\"text-xs uppercase tracking-wide text-text-secondary\">Environment</p>\n <pre className=\"mt-2 max-h-64 overflow-auto rounded-card border border-border-default bg-bg-sunken p-4 font-mono text-xs text-text-primary\">\n {environmentJson}\n </pre>\n </div>\n ) : null}\n </section>\n\n {/* Discussion */}\n <section className=\"space-y-4\">\n <div className=\"flex items-center gap-2\">\n <MessageSquare className=\"size-5 text-text-secondary\" aria-hidden=\"true\" />\n <h2 className=\"text-lg font-semibold text-text-primary\">Discussion</h2>\n </div>\n <DiscussionPanel\n entityType=\"cosmicintersection-notebook\"\n entityId={notebook.id}\n title={notebook.title}\n widgetKey=\"notebook-discussion\"\n />\n </section>\n\n {/* Analyses */}\n <section className=\"space-y-4\">\n <div className=\"flex flex-wrap items-center justify-between gap-3\">\n <div>\n <h2 className=\"text-lg font-semibold text-text-primary\">Analyses</h2>\n <p className=\"text-sm text-text-secondary\">\n Analysis runs executed against this notebook.\n </p>\n </div>\n <Button type=\"button\" variant=\"outline\" onClick={() => setRunOpen(true)}>\n <Play className=\"size-4\" />\n Run analysis\n </Button>\n </div>\n\n {analysesLoading ? (\n <LoadingState variant=\"rows\" rows={3} label=\"Loading analyses…\" />\n ) : analysesError ? (\n <ErrorState\n message=\"We could not load analyses for this notebook.\"\n onRetry={() => void refetchAnalyses()}\n />\n ) : analyses.length === 0 ? (\n <EmptyState\n icon={Beaker}\n title=\"No analyses yet.\"\n description=\"Run an analysis to generate results and artifacts from this notebook.\"\n action={\n <Button type=\"button\" onClick={() => setRunOpen(true)}>\n <Play className=\"size-4\" />\n Run analysis\n </Button>\n }\n />\n ) : (\n <>\n {/* Desktop table */}\n <div className=\"hidden rounded-card border border-border-default bg-bg-elevated md:block\">\n <Table>\n <TableHeader>\n <TableRow>\n <TableHead>Title</TableHead>\n <TableHead>Method</TableHead>\n <TableHead>AI</TableHead>\n <TableHead>Status</TableHead>\n <TableHead>Started</TableHead>\n <TableHead>Output</TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n {analyses.map((analysis: CosAnalysis) => (\n <TableRow key={analysis.id}>\n <TableCell className=\"font-medium text-text-primary\">\n {analysis.title}\n </TableCell>\n <TableCell className=\"text-text-secondary\">\n {analysis.method ?? '—'}\n </TableCell>\n <TableCell>\n {analysis.aiAssisted ? (\n <Badge variant=\"secondary\" className=\"gap-1\">\n <Sparkles className=\"size-3\" aria-hidden=\"true\" />\n AI\n </Badge>\n ) : (\n <span className=\"text-text-secondary\">—</span>\n )}\n </TableCell>\n <TableCell>\n <StatusBadge status={analysis.status} />\n </TableCell>\n <TableCell className=\"whitespace-nowrap text-text-secondary\">\n {formatDateTime(analysis.startedAt)}\n </TableCell>\n <TableCell>\n {analysis.outputFile?.id ? (\n <FileDownloadLink fileId={analysis.outputFile.id} label=\"Download\" />\n ) : analysis.results && Object.keys(analysis.results).length > 0 ? (\n <span className=\"text-xs text-text-secondary\">Results recorded</span>\n ) : (\n <span className=\"text-text-secondary\">—</span>\n )}\n </TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </div>\n\n {/* Mobile card list */}\n <ul className=\"space-y-3 md:hidden\">\n {analyses.map((analysis: CosAnalysis) => (\n <li\n key={analysis.id}\n className=\"space-y-2 rounded-card border border-border-default bg-bg-elevated p-4\"\n >\n <div className=\"flex items-start justify-between gap-3\">\n <div className=\"min-w-0\">\n <p className=\"truncate font-medium text-text-primary\">{analysis.title}</p>\n {analysis.method ? (\n <p className=\"truncate text-xs text-text-secondary\">{analysis.method}</p>\n ) : null}\n </div>\n <StatusBadge status={analysis.status} />\n </div>\n <div className=\"flex flex-wrap items-center gap-2 text-xs text-text-secondary\">\n {analysis.aiAssisted ? (\n <Badge variant=\"secondary\" className=\"gap-1\">\n <Sparkles className=\"size-3\" aria-hidden=\"true\" />\n AI\n </Badge>\n ) : null}\n <span>Started {formatDateTime(analysis.startedAt)}</span>\n </div>\n <div>\n {analysis.outputFile?.id ? (\n <FileDownloadLink fileId={analysis.outputFile.id} label=\"Download\" />\n ) : analysis.results && Object.keys(analysis.results).length > 0 ? (\n <span className=\"text-xs text-text-secondary\">Results recorded</span>\n ) : (\n <span className=\"text-xs text-text-secondary\">No output</span>\n )}\n </div>\n </li>\n ))}\n </ul>\n </>\n )}\n </section>\n </div>\n\n <RunAnalysisDialog\n notebookId={notebook.id}\n open={runOpen}\n onOpenChange={setRunOpen}\n onCompleted={() => void refetchAnalyses()}\n />\n\n <ReleaseDraftDialog notebook={notebook} open={draftOpen} onOpenChange={setDraftOpen} />\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAiEA,SAAS,EAAe,GAA+B;CACrD,IAAI,CAAC,GACH,OAAO;CAET,IAAM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,WAAU;qBAArC,CACE,kBAAC,GAAD;YAAU,WAAU;YAAS,eAAY;WAAQ,CAAA,GAAC,IAE7C;eACL,MACJ,kBAAC,QAAD,EAAA,UAAA,CAAM,YAAS,EAAe,EAAS,SAAS,CAAQ,EAAA,CAAA,CACrD;;SACL,kBAAC,OAAD,EAAA,UACG,EAAS,YAAY,KACpB,kBAAC,GAAD;UAAkB,QAAQ,EAAS,WAAW;UAAI,OAAM;SAAY,CAAA,IAClE,EAAS,WAAW,OAAO,KAAK,EAAS,OAAO,CAAC,CAAC,SAAS,IAC7D,kBAAC,QAAD;UAAM,WAAU;oBAA8B;SAAsB,CAAA,IAEpE,kBAAC,QAAD;UAAM,WAAU;oBAA8B;SAAe,CAAA,EAE5D,CAAA;QACH;UA9BG,EAAS,EA8BZ,CACL;MACC,CAAA,CACJ,EAAA,CAAA,CAEG;;IACN;;GAEL,kBAAC,IAAD;IACE,YAAY,EAAS;IACrB,MAAM;IACN,cAAc;IACd,mBAAmB,KAAK,EAAgB;GACzC,CAAA;GAED,kBAAC,GAAD;IAA8B;IAAU,MAAM;IAAW,cAAc;GAAe,CAAA;EAC5E;;AAEhB"}
1
+ {"version":3,"file":"NotebookDetailPage.js","names":[],"sources":["../../../../src/cosmicintersection/pages/notebooks/NotebookDetailPage.tsx"],"sourcesContent":["/**\n * NotebookDetailPage — full record for one notebook.\n *\n * Header renders the notebook's metadata (status, runtime, environment JSON,\n * description, sharing, attached file download). Below it an Analyses section\n * lists `cosListAnalyses(notebookId)` and a \"Run analysis\" dialog kicks off a\n * new `cosRunAnalysis` bound to this notebook. Archive is available from the\n * header action menu. No fabricated data — everything is read from the backend.\n */\nimport { useMemo, useState, type FormEvent } from 'react';\nimport { useParams } from 'react-router';\nimport {\n Beaker,\n Database,\n Download,\n FileCode2,\n MessageSquare,\n Pencil,\n Play,\n Share2,\n Sparkles,\n} from 'lucide-react';\nimport {\n Badge,\n Button,\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n Input,\n Label,\n Switch,\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n} from '@burdenoff/fe-libs/ui';\n\nimport {\n useCosAnalysesQuery,\n useCosArchiveNotebookMutation,\n useCosDatasetsQuery,\n useCosNotebookQuery,\n useCosRunAnalysisMutation,\n type CosAnalysis,\n} from '../../api/cosmicApi';\nimport {\n ActionMenu,\n DiscussionPanel,\n EmptyState,\n ErrorState,\n LoadingState,\n PageLayout,\n ReleaseDraftDialog,\n StatusBadge,\n useFileDownloadUrl,\n} from '../../components';\nimport { useCosmicIntersection } from '../../context/CosmicIntersectionContext';\nimport { notify } from '../../lib/toast';\nimport { useTrackRecentItem } from '../../lib/useTrackRecentItem';\n\nfunction formatDateTime(value?: string | null): string {\n if (!value) {\n return '—';\n }\n const date = new Date(value);\n if (Number.isNaN(date.getTime())) {\n return '—';\n }\n return date.toLocaleString(undefined, {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n });\n}\n\n/** Renders a presigned download link for an attached wspace-files artifact. */\nfunction FileDownloadLink({ fileId, label }: { fileId: string; label: string }) {\n const { data, loading } = useFileDownloadUrl(fileId);\n const url = data?.getFileDownloadUrl ?? null;\n if (loading) {\n return <span className=\"text-xs text-text-secondary\">Resolving link…</span>;\n }\n if (!url) {\n return <span className=\"text-xs text-text-secondary\">File {fileId}</span>;\n }\n return (\n <a\n href={url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1 text-sm text-text-primary underline-offset-2 hover:underline\"\n >\n <Download className=\"size-3.5\" aria-hidden=\"true\" />\n {label}\n </a>\n );\n}\n\ninterface RunAnalysisDialogProps {\n notebookId: string;\n open: boolean;\n onOpenChange: (open: boolean) => void;\n onCompleted: () => void;\n}\n\n/** Dialog to launch a new analysis on this notebook. */\nfunction RunAnalysisDialog({\n notebookId,\n open,\n onOpenChange,\n onCompleted,\n}: RunAnalysisDialogProps) {\n const [title, setTitle] = useState('');\n const [method, setMethod] = useState('');\n const [aiAssisted, setAiAssisted] = useState(false);\n const [runAnalysis, { loading }] = useCosRunAnalysisMutation();\n\n const reset = () => {\n setTitle('');\n setMethod('');\n setAiAssisted(false);\n };\n\n const handleSubmit = async (event: FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n const trimmed = title.trim();\n if (!trimmed) {\n notify.error('Title is required', 'Give the analysis a descriptive title.');\n return;\n }\n const response = await runAnalysis({\n variables: {\n input: {\n notebookId,\n title: trimmed,\n method: method.trim() || undefined,\n aiAssisted,\n },\n },\n });\n if (response.error || !response.data?.cosRunAnalysis?.id) {\n return;\n }\n notify.success('Analysis started', `“${trimmed}” is now running.`);\n reset();\n onOpenChange(false);\n onCompleted();\n };\n\n return (\n <Dialog\n open={open}\n onOpenChange={(next) => {\n if (!loading) {\n onOpenChange(next);\n }\n }}\n >\n <DialogContent>\n <form onSubmit={handleSubmit} className=\"space-y-4\">\n <DialogHeader>\n <DialogTitle>Run analysis</DialogTitle>\n <DialogDescription>\n Launch a new analysis run against this notebook. It starts in the running state and\n can be completed later with results.\n </DialogDescription>\n </DialogHeader>\n\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"run-analysis-title\">Title</Label>\n <Input\n id=\"run-analysis-title\"\n value={title}\n onChange={(event) => setTitle(event.target.value)}\n placeholder=\"e.g. Period-folding search\"\n required\n />\n </div>\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"run-analysis-method\">Method</Label>\n <Input\n id=\"run-analysis-method\"\n value={method}\n onChange={(event) => setMethod(event.target.value)}\n placeholder=\"e.g. box-least-squares\"\n />\n </div>\n <div className=\"flex items-center gap-3\">\n <Switch\n id=\"run-analysis-ai\"\n checked={aiAssisted}\n onCheckedChange={(checked) => setAiAssisted(checked)}\n />\n <Label htmlFor=\"run-analysis-ai\" className=\"cursor-pointer\">\n AI-assisted analysis\n </Label>\n </div>\n\n <DialogFooter>\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={() => onOpenChange(false)}\n disabled={loading}\n >\n Cancel\n </Button>\n <Button type=\"submit\" disabled={loading}>\n <Play className=\"size-4\" />\n {loading ? 'Starting…' : 'Run analysis'}\n </Button>\n </DialogFooter>\n </form>\n </DialogContent>\n </Dialog>\n );\n}\n\nexport default function NotebookDetailPage() {\n const { id = '' } = useParams<{ id: string }>();\n const { navigate } = useCosmicIntersection();\n const [runOpen, setRunOpen] = useState(false);\n const [draftOpen, setDraftOpen] = useState(false);\n\n const { data, loading, error, refetch } = useCosNotebookQuery(id);\n const {\n data: analysesData,\n loading: analysesLoading,\n error: analysesError,\n refetch: refetchAnalyses,\n } = useCosAnalysesQuery({ notebookId: id });\n // Resolve the notebook's linked dataset UUIDs to human names for chips.\n const { data: datasetsData } = useCosDatasetsQuery({ pagination: { limit: 100, offset: 0 } });\n const [archiveNotebook] = useCosArchiveNotebookMutation();\n\n const notebook = data?.cosNotebook ?? null;\n useTrackRecentItem(\n notebook\n ? {\n type: 'notebook',\n id: notebook.id,\n name: notebook.title,\n path: `notebooks/${encodeURIComponent(notebook.id)}`,\n }\n : null\n );\n const analyses = analysesData?.cosListAnalyses ?? [];\n\n const datasetNameById = useMemo(() => {\n const map = new Map<string, string>();\n for (const dataset of datasetsData?.cosListDatasets.items ?? []) {\n map.set(dataset.id, dataset.name);\n }\n return map;\n }, [datasetsData]);\n\n const handleArchive = async () => {\n if (!notebook) {\n return;\n }\n const response = await archiveNotebook({ variables: { id: notebook.id } });\n if (response.error) {\n throw new Error(response.error.message);\n }\n if (!response.data?.cosArchiveNotebook) {\n notify.error('Could not archive notebook', 'The server did not confirm the change.');\n throw new Error('Archive not confirmed');\n }\n await refetch();\n notify.success('Notebook archived', `“${notebook.title}” was archived.`);\n };\n\n if (loading) {\n return (\n <PageLayout title=\"Notebook\" backPath=\"notebooks\">\n <LoadingState label=\"Loading notebook…\" />\n </PageLayout>\n );\n }\n\n if (error) {\n return (\n <PageLayout title=\"Notebook\" backPath=\"notebooks\">\n <ErrorState\n message=\"We could not load this notebook. Please try again.\"\n onRetry={() => void refetch()}\n />\n </PageLayout>\n );\n }\n\n if (!notebook) {\n return (\n <PageLayout title=\"Notebook\" backPath=\"notebooks\">\n <EmptyState\n icon={FileCode2}\n title=\"Notebook not found.\"\n description=\"This notebook may have been removed or is outside your current scope.\"\n action={\n <Button type=\"button\" onClick={() => navigate('notebooks')}>\n Back to notebooks\n </Button>\n }\n />\n </PageLayout>\n );\n }\n\n const environmentJson =\n notebook.environment && Object.keys(notebook.environment).length > 0\n ? JSON.stringify(notebook.environment, null, 2)\n : null;\n\n const actions = (\n <div className=\"flex items-center gap-2\">\n <Button type=\"button\" onClick={() => setRunOpen(true)}>\n <Play className=\"size-4\" />\n Run analysis\n </Button>\n <Button type=\"button\" variant=\"outline\" onClick={() => setDraftOpen(true)}>\n <Sparkles className=\"size-4\" />\n Draft release\n </Button>\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={() => navigate(`notebooks/${notebook.id}/edit`)}\n >\n <Pencil className=\"size-4\" />\n Edit\n </Button>\n <ActionMenu\n ariaLabel={`Actions for ${notebook.title}`}\n entityName={notebook.title}\n onDelete={notebook.status === 'ARCHIVED' ? undefined : handleArchive}\n deleteLabel=\"Archive notebook\"\n />\n </div>\n );\n\n return (\n <PageLayout\n title={notebook.title}\n description=\"Notebook detail\"\n backPath=\"notebooks\"\n actions={actions}\n >\n <div className=\"space-y-6\">\n {/* Overview */}\n <section className=\"rounded-card border border-border-default bg-bg-elevated p-6\">\n <div className=\"flex flex-wrap items-center gap-3\">\n <StatusBadge status={notebook.status} />\n {notebook.runtime ? <Badge variant=\"outline\">Runtime: {notebook.runtime}</Badge> : null}\n {notebook.isShared ? (\n <Badge variant=\"secondary\" className=\"gap-1\">\n <Share2 className=\"size-3\" aria-hidden=\"true\" />\n Shared{notebook.shareSlug ? `: ${notebook.shareSlug}` : ''}\n </Badge>\n ) : (\n <Badge variant=\"outline\">Private</Badge>\n )}\n </div>\n\n {notebook.description ? (\n <p className=\"mt-4 text-sm text-text-secondary\">{notebook.description}</p>\n ) : (\n <p className=\"mt-4 text-sm text-text-secondary\">No description provided.</p>\n )}\n\n <div className=\"mt-6\">\n <p className=\"text-xs uppercase tracking-wide text-text-secondary\">Linked datasets</p>\n {notebook.datasetIds.length === 0 ? (\n <p className=\"mt-2 text-sm text-text-secondary\">No datasets linked.</p>\n ) : (\n <div className=\"mt-2 flex flex-wrap gap-2\">\n {notebook.datasetIds.map((datasetId) => {\n const name = datasetNameById.get(datasetId);\n return (\n <Button\n key={datasetId}\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n className=\"h-auto gap-1.5 px-2.5 py-1\"\n onClick={() => navigate(`datasets/${datasetId}`)}\n >\n <Database className=\"size-3.5 shrink-0\" aria-hidden=\"true\" />\n <span className={name ? 'max-w-[16rem] truncate' : 'font-mono text-xs'}>\n {name ?? datasetId}\n </span>\n </Button>\n );\n })}\n </div>\n )}\n </div>\n\n <dl className=\"mt-6 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3\">\n <div>\n <dt className=\"text-xs uppercase tracking-wide text-text-secondary\">Created</dt>\n <dd className=\"mt-1 text-sm text-text-primary\">\n {formatDateTime(notebook.createdAt)}\n </dd>\n </div>\n <div>\n <dt className=\"text-xs uppercase tracking-wide text-text-secondary\">Updated</dt>\n <dd className=\"mt-1 text-sm text-text-primary\">\n {formatDateTime(notebook.updatedAt)}\n </dd>\n </div>\n <div>\n <dt className=\"text-xs uppercase tracking-wide text-text-secondary\">Notebook file</dt>\n <dd className=\"mt-1 text-sm text-text-primary\">\n {notebook.file?.id ? (\n <FileDownloadLink fileId={notebook.file.id} label=\"Download notebook\" />\n ) : (\n <span className=\"text-text-secondary\">No file attached</span>\n )}\n </dd>\n </div>\n </dl>\n\n {notebook.tags.length > 0 ? (\n <div className=\"mt-6\">\n <p className=\"text-xs uppercase tracking-wide text-text-secondary\">Tags</p>\n <div className=\"mt-2 flex flex-wrap gap-2\">\n {notebook.tags.map((tag) => (\n <Badge key={tag} variant=\"outline\">\n {tag}\n </Badge>\n ))}\n </div>\n </div>\n ) : null}\n\n {environmentJson ? (\n <div className=\"mt-6\">\n <p className=\"text-xs uppercase tracking-wide text-text-secondary\">Environment</p>\n <pre className=\"mt-2 max-h-64 overflow-auto rounded-card border border-border-default bg-bg-sunken p-4 font-mono text-xs text-text-primary\">\n {environmentJson}\n </pre>\n </div>\n ) : null}\n </section>\n\n {/* Discussion */}\n <section className=\"space-y-4\">\n <div className=\"flex items-center gap-2\">\n <MessageSquare className=\"size-5 text-text-secondary\" aria-hidden=\"true\" />\n <h2 className=\"text-lg font-semibold text-text-primary\">Discussion</h2>\n </div>\n <DiscussionPanel\n entityType=\"cosmicintersection-notebook\"\n entityId={notebook.id}\n title={notebook.title}\n widgetKey=\"notebook-discussion\"\n />\n </section>\n\n {/* Analyses */}\n <section className=\"space-y-4\">\n <div className=\"flex flex-wrap items-center justify-between gap-3\">\n <div>\n <h2 className=\"text-lg font-semibold text-text-primary\">Analyses</h2>\n <p className=\"text-sm text-text-secondary\">\n Analysis runs executed against this notebook.\n </p>\n </div>\n <Button type=\"button\" variant=\"outline\" onClick={() => setRunOpen(true)}>\n <Play className=\"size-4\" />\n Run analysis\n </Button>\n </div>\n\n {analysesLoading ? (\n <LoadingState variant=\"rows\" rows={3} label=\"Loading analyses…\" />\n ) : analysesError ? (\n <ErrorState\n message=\"We could not load analyses for this notebook.\"\n onRetry={() => void refetchAnalyses()}\n />\n ) : analyses.length === 0 ? (\n <EmptyState\n icon={Beaker}\n title=\"No analyses yet.\"\n description=\"Run an analysis to generate results and artifacts from this notebook.\"\n action={\n <Button type=\"button\" onClick={() => setRunOpen(true)}>\n <Play className=\"size-4\" />\n Run analysis\n </Button>\n }\n />\n ) : (\n <>\n {/* Desktop table */}\n <div className=\"hidden rounded-card border border-border-default bg-bg-elevated md:block\">\n <Table>\n <TableHeader>\n <TableRow>\n <TableHead>Title</TableHead>\n <TableHead>Method</TableHead>\n <TableHead>AI</TableHead>\n <TableHead>Status</TableHead>\n <TableHead>Started</TableHead>\n <TableHead>Output</TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n {analyses.map((analysis: CosAnalysis) => (\n <TableRow key={analysis.id}>\n <TableCell className=\"font-medium text-text-primary\">\n {analysis.title}\n </TableCell>\n <TableCell className=\"text-text-secondary\">\n {analysis.method ?? '—'}\n </TableCell>\n <TableCell>\n {analysis.aiAssisted ? (\n <Badge variant=\"secondary\" className=\"gap-1\">\n <Sparkles className=\"size-3\" aria-hidden=\"true\" />\n AI\n </Badge>\n ) : (\n <span className=\"text-text-secondary\">—</span>\n )}\n </TableCell>\n <TableCell>\n <StatusBadge status={analysis.status} />\n </TableCell>\n <TableCell className=\"whitespace-nowrap text-text-secondary\">\n {formatDateTime(analysis.startedAt)}\n </TableCell>\n <TableCell>\n {analysis.outputFile?.id ? (\n <FileDownloadLink fileId={analysis.outputFile.id} label=\"Download\" />\n ) : analysis.results && Object.keys(analysis.results).length > 0 ? (\n <span className=\"text-xs text-text-secondary\">Results recorded</span>\n ) : (\n <span className=\"text-text-secondary\">—</span>\n )}\n </TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </div>\n\n {/* Mobile card list */}\n <ul className=\"space-y-3 md:hidden\">\n {analyses.map((analysis: CosAnalysis) => (\n <li\n key={analysis.id}\n className=\"space-y-2 rounded-card border border-border-default bg-bg-elevated p-4\"\n >\n <div className=\"flex items-start justify-between gap-3\">\n <div className=\"min-w-0\">\n <p className=\"truncate font-medium text-text-primary\">{analysis.title}</p>\n {analysis.method ? (\n <p className=\"truncate text-xs text-text-secondary\">{analysis.method}</p>\n ) : null}\n </div>\n <StatusBadge status={analysis.status} />\n </div>\n <div className=\"flex flex-wrap items-center gap-2 text-xs text-text-secondary\">\n {analysis.aiAssisted ? (\n <Badge variant=\"secondary\" className=\"gap-1\">\n <Sparkles className=\"size-3\" aria-hidden=\"true\" />\n AI\n </Badge>\n ) : null}\n <span>Started {formatDateTime(analysis.startedAt)}</span>\n </div>\n <div>\n {analysis.outputFile?.id ? (\n <FileDownloadLink fileId={analysis.outputFile.id} label=\"Download\" />\n ) : analysis.results && Object.keys(analysis.results).length > 0 ? (\n <span className=\"text-xs text-text-secondary\">Results recorded</span>\n ) : (\n <span className=\"text-xs text-text-secondary\">No output</span>\n )}\n </div>\n </li>\n ))}\n </ul>\n </>\n )}\n </section>\n </div>\n\n <RunAnalysisDialog\n notebookId={notebook.id}\n open={runOpen}\n onOpenChange={setRunOpen}\n onCompleted={() => void refetchAnalyses()}\n />\n\n <ReleaseDraftDialog notebook={notebook} open={draftOpen} onOpenChange={setDraftOpen} />\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAiEA,SAAS,EAAe,GAA+B;CACrD,IAAI,CAAC,GACH,OAAO;CAET,IAAM,IAAO,IAAI,KAAK,CAAK;CAI3B,OAHI,OAAO,MAAM,EAAK,QAAQ,CAAC,IACtB,MAEF,EAAK,eAAe,KAAA,GAAW;EACpC,MAAM;EACN,OAAO;EACP,KAAK;EACL,MAAM;EACN,QAAQ;CACV,CAAC;AACH;AAGA,SAAS,EAAiB,EAAE,WAAQ,YAA4C;CAC9E,IAAM,EAAE,SAAM,eAAY,EAAmB,CAAM,GAC7C,IAAM,GAAM,sBAAsB;CAOxC,OANI,IACK,kBAAC,QAAD;EAAM,WAAU;YAA8B;CAAqB,CAAA,IAEvE,IAIH,kBAAC,KAAD;EACE,MAAM;EACN,QAAO;EACP,KAAI;EACJ,WAAU;YAJZ,CAME,kBAAC,GAAD;GAAU,WAAU;GAAW,eAAY;EAAQ,CAAA,GAClD,CACA;MAXI,kBAAC,QAAD;EAAM,WAAU;YAAhB,CAA8C,SAAM,CAAa;;AAa5E;AAUA,SAAS,GAAkB,EACzB,eACA,SACA,iBACA,kBACyB;CACzB,IAAM,CAAC,GAAO,KAAY,EAAS,EAAE,GAC/B,CAAC,GAAQ,KAAa,EAAS,EAAE,GACjC,CAAC,GAAY,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EhB"}
@@ -12,8 +12,8 @@ import { StatusBadge as f } from "../../components/StatusBadge.js";
12
12
  import "../../components/index.js";
13
13
  import { useState as p } from "react";
14
14
  import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
15
- import { NotebookText as _, Plus as v, Share2 as y } from "lucide-react";
16
- import { Badge as b, Button as x, Select as S, SelectContent as C, SelectItem as w, SelectTrigger as T, SelectValue as E, Table as D, TableBody as O, TableCell as k, TableHead as A, TableHeader as j, TableRow as M } from "@burdenoff/fe-libs/ui";
15
+ import { Badge as _, Button as v, Select as y, SelectContent as b, SelectItem as x, SelectTrigger as S, SelectValue as C, Table as w, TableBody as T, TableCell as E, TableHead as D, TableHeader as O, TableRow as k } from "@burdenoff/fe-libs/ui";
16
+ import { NotebookText as A, Plus as j, Share2 as M } from "lucide-react";
17
17
  //#region src/cosmicintersection/pages/notebooks/NotebooksPage.tsx
18
18
  var N = [
19
19
  {
@@ -57,10 +57,10 @@ function I() {
57
57
  if (n.error) throw Error(n.error.message);
58
58
  if (!n.data?.cosArchiveNotebook) throw t.error(L("cosmicintersection.pages.notebooks.archiveError", "Could not archive notebook"), L("cosmicintersection.pages.notebooks.archiveErrorDescription", "The server did not confirm the change.")), Error("Archive not confirmed");
59
59
  await W(), t.success(L("cosmicintersection.pages.notebooks.archiveSuccess", "Notebook archived"), L("cosmicintersection.pages.notebooks.archiveSuccessDescription", "“{{name}}” was archived.", { name: e.title }));
60
- }, Y = /* @__PURE__ */ g(x, {
60
+ }, Y = /* @__PURE__ */ g(v, {
61
61
  type: "button",
62
62
  onClick: () => I("notebooks/create"),
63
- children: [/* @__PURE__ */ h(v, { className: "size-4" }), L("cosmicintersection.pages.notebooks.create", "New notebook")]
63
+ children: [/* @__PURE__ */ h(j, { className: "size-4" }), L("cosmicintersection.pages.notebooks.create", "New notebook")]
64
64
  });
65
65
  return /* @__PURE__ */ h(l, {
66
66
  title: L("cosmicintersection.pages.notebooks.title", "Notebooks"),
@@ -75,18 +75,18 @@ function I() {
75
75
  className: "text-sm text-text-secondary",
76
76
  htmlFor: "notebook-status-filter",
77
77
  children: "Status"
78
- }), /* @__PURE__ */ g(S, {
78
+ }), /* @__PURE__ */ g(y, {
79
79
  value: R ?? P,
80
80
  onValueChange: (e) => z(e === P ? void 0 : e),
81
- children: [/* @__PURE__ */ h(T, {
81
+ children: [/* @__PURE__ */ h(S, {
82
82
  id: "notebook-status-filter",
83
83
  className: "w-48",
84
84
  "aria-label": "Filter by status",
85
- children: /* @__PURE__ */ h(E, {})
86
- }), /* @__PURE__ */ g(C, { children: [/* @__PURE__ */ h(w, {
85
+ children: /* @__PURE__ */ h(C, {})
86
+ }), /* @__PURE__ */ g(b, { children: [/* @__PURE__ */ h(x, {
87
87
  value: P,
88
88
  children: "All statuses"
89
- }), N.map((e) => /* @__PURE__ */ h(w, {
89
+ }), N.map((e) => /* @__PURE__ */ h(x, {
90
90
  value: e.value,
91
91
  children: e.label
92
92
  }, e.value))] })]
@@ -100,52 +100,52 @@ function I() {
100
100
  message: L("cosmicintersection.pages.notebooks.error", "We could not load your notebooks. Please try again."),
101
101
  onRetry: () => void W()
102
102
  }) : K.length === 0 ? /* @__PURE__ */ h(o, {
103
- icon: _,
103
+ icon: A,
104
104
  title: R ? L("cosmicintersection.pages.notebooks.emptyFilterTitle", "No notebooks match this filter.") : L("cosmicintersection.pages.notebooks.emptyTitle", "No notebooks yet."),
105
105
  description: R ? L("cosmicintersection.pages.notebooks.emptyFilterDescription", "Try a different status filter.") : L("cosmicintersection.pages.notebooks.emptyDescription", "Create your first notebook to start analysing federated datasets."),
106
- action: R ? void 0 : /* @__PURE__ */ g(x, {
106
+ action: R ? void 0 : /* @__PURE__ */ g(v, {
107
107
  type: "button",
108
108
  onClick: () => I("notebooks/create"),
109
- children: [/* @__PURE__ */ h(v, { className: "size-4" }), L("cosmicintersection.pages.notebooks.create", "New notebook")]
109
+ children: [/* @__PURE__ */ h(j, { className: "size-4" }), L("cosmicintersection.pages.notebooks.create", "New notebook")]
110
110
  })
111
111
  }) : /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("div", {
112
112
  className: "hidden rounded-card border border-border-default bg-bg-elevated md:block",
113
- children: /* @__PURE__ */ g(D, { children: [/* @__PURE__ */ h(j, { children: /* @__PURE__ */ g(M, { children: [
114
- /* @__PURE__ */ h(A, { children: "Title" }),
115
- /* @__PURE__ */ h(A, { children: "Status" }),
116
- /* @__PURE__ */ h(A, { children: "Runtime" }),
117
- /* @__PURE__ */ h(A, {
113
+ children: /* @__PURE__ */ g(w, { children: [/* @__PURE__ */ h(O, { children: /* @__PURE__ */ g(k, { children: [
114
+ /* @__PURE__ */ h(D, { children: "Title" }),
115
+ /* @__PURE__ */ h(D, { children: "Status" }),
116
+ /* @__PURE__ */ h(D, { children: "Runtime" }),
117
+ /* @__PURE__ */ h(D, {
118
118
  className: "text-right",
119
119
  children: "Datasets"
120
120
  }),
121
- /* @__PURE__ */ h(A, { children: "Sharing" }),
122
- /* @__PURE__ */ h(A, { children: "Tags" }),
123
- /* @__PURE__ */ h(A, { children: "Updated" }),
124
- /* @__PURE__ */ h(A, {
121
+ /* @__PURE__ */ h(D, { children: "Sharing" }),
122
+ /* @__PURE__ */ h(D, { children: "Tags" }),
123
+ /* @__PURE__ */ h(D, { children: "Updated" }),
124
+ /* @__PURE__ */ h(D, {
125
125
  className: "w-12 text-right",
126
126
  children: "Actions"
127
127
  })
128
- ] }) }), /* @__PURE__ */ h(O, { children: K.map((e) => /* @__PURE__ */ g(M, {
128
+ ] }) }), /* @__PURE__ */ h(T, { children: K.map((e) => /* @__PURE__ */ g(k, {
129
129
  className: "cursor-pointer",
130
130
  onClick: () => I(`notebooks/${e.id}`),
131
131
  children: [
132
- /* @__PURE__ */ h(k, {
132
+ /* @__PURE__ */ h(E, {
133
133
  className: "font-medium text-text-primary",
134
134
  children: e.title
135
135
  }),
136
- /* @__PURE__ */ h(k, { children: /* @__PURE__ */ h(f, { status: e.status }) }),
137
- /* @__PURE__ */ h(k, {
136
+ /* @__PURE__ */ h(E, { children: /* @__PURE__ */ h(f, { status: e.status }) }),
137
+ /* @__PURE__ */ h(E, {
138
138
  className: "text-text-secondary",
139
139
  children: e.runtime ?? "—"
140
140
  }),
141
- /* @__PURE__ */ h(k, {
141
+ /* @__PURE__ */ h(E, {
142
142
  className: "text-right tabular-nums text-text-secondary",
143
143
  children: e.datasetIds.length
144
144
  }),
145
- /* @__PURE__ */ h(k, { children: e.isShared ? /* @__PURE__ */ g(b, {
145
+ /* @__PURE__ */ h(E, { children: e.isShared ? /* @__PURE__ */ g(_, {
146
146
  variant: "secondary",
147
147
  className: "gap-1",
148
- children: [/* @__PURE__ */ h(y, {
148
+ children: [/* @__PURE__ */ h(M, {
149
149
  className: "size-3",
150
150
  "aria-hidden": "true"
151
151
  }), L("cosmicintersection.common.shared", "Shared")]
@@ -153,9 +153,9 @@ function I() {
153
153
  className: "text-text-secondary",
154
154
  children: L("cosmicintersection.common.private", "Private")
155
155
  }) }),
156
- /* @__PURE__ */ h(k, { children: e.tags.length > 0 ? /* @__PURE__ */ g("div", {
156
+ /* @__PURE__ */ h(E, { children: e.tags.length > 0 ? /* @__PURE__ */ g("div", {
157
157
  className: "flex flex-wrap gap-1",
158
- children: [e.tags.slice(0, 3).map((e) => /* @__PURE__ */ h(b, {
158
+ children: [e.tags.slice(0, 3).map((e) => /* @__PURE__ */ h(_, {
159
159
  variant: "outline",
160
160
  children: e
161
161
  }, e)), e.tags.length > 3 ? /* @__PURE__ */ g("span", {
@@ -166,11 +166,11 @@ function I() {
166
166
  className: "text-text-secondary",
167
167
  children: "—"
168
168
  }) }),
169
- /* @__PURE__ */ h(k, {
169
+ /* @__PURE__ */ h(E, {
170
170
  className: "whitespace-nowrap text-text-secondary",
171
171
  children: F(e.updatedAt)
172
172
  }),
173
- /* @__PURE__ */ h(k, {
173
+ /* @__PURE__ */ h(E, {
174
174
  className: "text-right",
175
175
  children: /* @__PURE__ */ h(a, {
176
176
  ariaLabel: `Actions for ${e.title}`,
@@ -215,7 +215,7 @@ function I() {
215
215
  }),
216
216
  e.isShared ? /* @__PURE__ */ g("span", {
217
217
  className: "inline-flex items-center gap-1",
218
- children: [/* @__PURE__ */ h(y, {
218
+ children: [/* @__PURE__ */ h(M, {
219
219
  className: "size-3",
220
220
  "aria-hidden": "true"
221
221
  }), L("cosmicintersection.common.shared", "Shared")]
@@ -225,7 +225,7 @@ function I() {
225
225
  }),
226
226
  e.tags.length > 0 ? /* @__PURE__ */ g("div", {
227
227
  className: "flex flex-wrap gap-1",
228
- children: [e.tags.slice(0, 4).map((e) => /* @__PURE__ */ h(b, {
228
+ children: [e.tags.slice(0, 4).map((e) => /* @__PURE__ */ h(_, {
229
229
  variant: "outline",
230
230
  children: e
231
231
  }, e)), e.tags.length > 4 ? /* @__PURE__ */ g("span", {
@@ -1,6 +1,6 @@
1
1
  import { useCosmicIntersection as e } from "../../context/CosmicIntersectionContext.js";
2
2
  import { notify as t } from "../../lib/toast.js";
3
- import { useCosArchivePipelineMutation as n, useCosPipelineQuery as r, useCosRunStepsQuery as ee, useCosRunsQuery as te, useCosStartRunMutation as i } from "../../api/cosmicApi.js";
3
+ import { useCosArchivePipelineMutation as n, useCosPipelineQuery as r, useCosRunStepsQuery as ee, useCosRunsQuery as i, useCosStartRunMutation as te } from "../../api/cosmicApi.js";
4
4
  import { EmptyState as a } from "../../components/EmptyState.js";
5
5
  import { ErrorState as o } from "../../components/ErrorState.js";
6
6
  import { LoadingState as s } from "../../components/LoadingState.js";
@@ -14,8 +14,8 @@ import { mutationSucceeded as d } from "../../lib/mutationResult.js";
14
14
  import { useMemo as f, useState as p } from "react";
15
15
  import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
16
16
  import { useParams as oe } from "react-router";
17
- import { Archive as se, Clock as ce, Hash as le, Pencil as _, Play as v } from "lucide-react";
18
- import { AlertDialog as ue, AlertDialogAction as de, AlertDialogCancel as fe, AlertDialogContent as pe, AlertDialogDescription as me, AlertDialogFooter as he, AlertDialogHeader as ge, AlertDialogTitle as y, Button as b, Card as x, CardContent as S, CardHeader as C, CardTitle as w, Table as _e, TableBody as ve, TableCell as T, TableHead as E, TableHeader as ye, TableRow as D, buttonVariants as be } from "@burdenoff/fe-libs/ui";
17
+ import { AlertDialog as se, AlertDialogAction as ce, AlertDialogCancel as le, AlertDialogContent as ue, AlertDialogDescription as de, AlertDialogFooter as fe, AlertDialogHeader as pe, AlertDialogTitle as me, Button as _, Card as v, CardContent as y, CardHeader as b, CardTitle as x, Table as S, TableBody as he, TableCell as C, TableHead as w, TableHeader as ge, TableRow as T, buttonVariants as _e } from "@burdenoff/fe-libs/ui";
18
+ import { Archive as ve, Clock as ye, Hash as be, Pencil as E, Play as D } from "lucide-react";
19
19
  //#region src/cosmicintersection/pages/pipelines/PipelineDetailPage.tsx
20
20
  var O = [
21
21
  "INGEST",
@@ -78,7 +78,7 @@ function F() {
78
78
  let { id: O = "" } = oe(), { navigate: k } = e(), { data: F, loading: xe, error: Se, refetch: I } = r(O), L = re({
79
79
  pageSize: 10,
80
80
  resetKey: O
81
- }), { data: R, loading: z, error: Ce, refetch: B } = te({
81
+ }), { data: R, loading: z, error: Ce, refetch: B } = i({
82
82
  pipelineId: O,
83
83
  pagination: {
84
84
  limit: L.limit,
@@ -95,7 +95,7 @@ function F() {
95
95
  kind: e.kind,
96
96
  name: e.name,
97
97
  status: e.status
98
- })), [G]), q = U.length > 0 ? U : K, J = U.length === 0 && K.length > 0, [Te, { loading: Y }] = i(), [Ee, { loading: X }] = n(), [De, Z] = p(!1), Q = async () => {
98
+ })), [G]), q = U.length > 0 ? U : K, J = U.length === 0 && K.length > 0, [Te, { loading: Y }] = te(), [Ee, { loading: X }] = n(), [De, Z] = p(!1), Q = async () => {
99
99
  if (!V) return;
100
100
  let e = await Te({ variables: { input: { pipelineId: V.id } } }), n = e.data?.cosStartRun?.id;
101
101
  d(e, n, "Could not start a run") && (t.success("Run started", "A new run was queued."), await Promise.all([I(), B()]), n && k(`runs/${n}`));
@@ -120,7 +120,7 @@ function F() {
120
120
  children: /* @__PURE__ */ h(a, {
121
121
  title: "Pipeline not found",
122
122
  description: "This pipeline may have been archived or you may not have access to it.",
123
- action: /* @__PURE__ */ h(b, {
123
+ action: /* @__PURE__ */ h(_, {
124
124
  type: "button",
125
125
  variant: "outline",
126
126
  onClick: () => k("pipelines"),
@@ -136,23 +136,23 @@ function F() {
136
136
  actions: /* @__PURE__ */ g("div", {
137
137
  className: "flex flex-wrap items-center gap-2",
138
138
  children: [
139
- /* @__PURE__ */ g(b, {
139
+ /* @__PURE__ */ g(_, {
140
140
  type: "button",
141
141
  onClick: () => void Q(),
142
142
  disabled: Y || $,
143
- children: [/* @__PURE__ */ h(v, { className: "size-4" }), Y ? "Starting…" : "Start run"]
143
+ children: [/* @__PURE__ */ h(D, { className: "size-4" }), Y ? "Starting…" : "Start run"]
144
144
  }),
145
- /* @__PURE__ */ g(b, {
145
+ /* @__PURE__ */ g(_, {
146
146
  type: "button",
147
147
  variant: "outline",
148
148
  onClick: () => k(`pipelines/${V.id}/edit`),
149
- children: [/* @__PURE__ */ h(_, { className: "size-4" }), "Edit"]
149
+ children: [/* @__PURE__ */ h(E, { className: "size-4" }), "Edit"]
150
150
  }),
151
- $ ? null : /* @__PURE__ */ g(b, {
151
+ $ ? null : /* @__PURE__ */ g(_, {
152
152
  type: "button",
153
153
  variant: "outline",
154
154
  onClick: () => Z(!0),
155
- children: [/* @__PURE__ */ h(se, { className: "size-4" }), "Archive"]
155
+ children: [/* @__PURE__ */ h(ve, { className: "size-4" }), "Archive"]
156
156
  })
157
157
  ]
158
158
  }),
@@ -164,7 +164,7 @@ function F() {
164
164
  children: [
165
165
  /* @__PURE__ */ h(l, { status: V.status }),
166
166
  /* @__PURE__ */ h(P, {
167
- icon: ce,
167
+ icon: ye,
168
168
  children: u(V.trigger)
169
169
  }),
170
170
  V.schedule ? /* @__PURE__ */ h(P, { children: /* @__PURE__ */ h("span", {
@@ -172,12 +172,12 @@ function F() {
172
172
  children: V.schedule
173
173
  }) }) : null,
174
174
  /* @__PURE__ */ g(P, {
175
- icon: le,
175
+ icon: be,
176
176
  children: ["v", V.version]
177
177
  })
178
178
  ]
179
179
  }),
180
- /* @__PURE__ */ g(x, { children: [/* @__PURE__ */ h(C, { children: /* @__PURE__ */ h(w, { children: "Overview" }) }), /* @__PURE__ */ g(S, {
180
+ /* @__PURE__ */ g(v, { children: [/* @__PURE__ */ h(b, { children: /* @__PURE__ */ h(x, { children: "Overview" }) }), /* @__PURE__ */ g(y, {
181
181
  className: "space-y-4",
182
182
  children: [
183
183
  /* @__PURE__ */ g("div", {
@@ -195,13 +195,13 @@ function F() {
195
195
  children: [/* @__PURE__ */ h("p", {
196
196
  className: "text-sm text-text-secondary",
197
197
  children: "No steps defined yet. Edit the pipeline to add ingest, calibrate, transform, analyze or export steps."
198
- }), /* @__PURE__ */ g(b, {
198
+ }), /* @__PURE__ */ g(_, {
199
199
  type: "button",
200
200
  variant: "outline",
201
201
  size: "sm",
202
202
  className: "mt-3",
203
203
  onClick: () => k(`pipelines/${V.id}/edit`),
204
- children: [/* @__PURE__ */ h(_, { className: "size-4" }), "Add steps"]
204
+ children: [/* @__PURE__ */ h(E, { className: "size-4" }), "Add steps"]
205
205
  })]
206
206
  }),
207
207
  ke ? /* @__PURE__ */ g("details", {
@@ -219,7 +219,7 @@ function F() {
219
219
  }) : null
220
220
  ]
221
221
  })] }),
222
- /* @__PURE__ */ g(x, { children: [/* @__PURE__ */ h(C, { children: /* @__PURE__ */ h(w, { children: "Details" }) }), /* @__PURE__ */ g(S, { children: [
222
+ /* @__PURE__ */ g(v, { children: [/* @__PURE__ */ h(b, { children: /* @__PURE__ */ h(x, { children: "Details" }) }), /* @__PURE__ */ g(y, { children: [
223
223
  /* @__PURE__ */ h(N, {
224
224
  label: "Status",
225
225
  children: /* @__PURE__ */ h(l, { status: V.status })
@@ -258,7 +258,7 @@ function F() {
258
258
  })
259
259
  })
260
260
  ] })] }),
261
- /* @__PURE__ */ g(x, { children: [/* @__PURE__ */ h(C, { children: /* @__PURE__ */ h(w, { children: "Runs" }) }), /* @__PURE__ */ h(S, { children: z ? /* @__PURE__ */ h(s, {
261
+ /* @__PURE__ */ g(v, { children: [/* @__PURE__ */ h(b, { children: /* @__PURE__ */ h(x, { children: "Runs" }) }), /* @__PURE__ */ h(y, { children: z ? /* @__PURE__ */ h(s, {
262
262
  variant: "rows",
263
263
  rows: 4,
264
264
  label: "Loading runs…"
@@ -266,42 +266,42 @@ function F() {
266
266
  message: "Could not load runs.",
267
267
  onRetry: () => void B()
268
268
  }) : H.length === 0 ? /* @__PURE__ */ h(a, {
269
- icon: v,
269
+ icon: D,
270
270
  title: "No runs yet",
271
271
  description: "Start a run to process data through this pipeline.",
272
- action: /* @__PURE__ */ g(b, {
272
+ action: /* @__PURE__ */ g(_, {
273
273
  type: "button",
274
274
  onClick: () => void Q(),
275
275
  disabled: $,
276
- children: [/* @__PURE__ */ h(v, { className: "size-4" }), "Start run"]
276
+ children: [/* @__PURE__ */ h(D, { className: "size-4" }), "Start run"]
277
277
  })
278
278
  }) : /* @__PURE__ */ g(m, { children: [
279
279
  /* @__PURE__ */ h("div", {
280
280
  className: "hidden rounded-card border border-border-default md:block",
281
- children: /* @__PURE__ */ g(_e, { children: [/* @__PURE__ */ h(ye, { children: /* @__PURE__ */ g(D, { children: [
282
- /* @__PURE__ */ h(E, { children: "Run" }),
283
- /* @__PURE__ */ h(E, { children: "Status" }),
284
- /* @__PURE__ */ h(E, { children: "Started" }),
285
- /* @__PURE__ */ h(E, { children: "Duration" }),
286
- /* @__PURE__ */ h(E, { children: "Triggered by" })
287
- ] }) }), /* @__PURE__ */ h(ve, { children: H.map((e) => /* @__PURE__ */ g(D, {
281
+ children: /* @__PURE__ */ g(S, { children: [/* @__PURE__ */ h(ge, { children: /* @__PURE__ */ g(T, { children: [
282
+ /* @__PURE__ */ h(w, { children: "Run" }),
283
+ /* @__PURE__ */ h(w, { children: "Status" }),
284
+ /* @__PURE__ */ h(w, { children: "Started" }),
285
+ /* @__PURE__ */ h(w, { children: "Duration" }),
286
+ /* @__PURE__ */ h(w, { children: "Triggered by" })
287
+ ] }) }), /* @__PURE__ */ h(he, { children: H.map((e) => /* @__PURE__ */ g(T, {
288
288
  className: "cursor-pointer",
289
289
  onClick: () => k(`runs/${e.id}`),
290
290
  children: [
291
- /* @__PURE__ */ g(T, {
291
+ /* @__PURE__ */ g(C, {
292
292
  className: "font-medium text-text-primary",
293
293
  children: ["#", e.runNumber]
294
294
  }),
295
- /* @__PURE__ */ h(T, { children: /* @__PURE__ */ h(l, { status: e.status }) }),
296
- /* @__PURE__ */ h(T, {
295
+ /* @__PURE__ */ h(C, { children: /* @__PURE__ */ h(l, { status: e.status }) }),
296
+ /* @__PURE__ */ h(C, {
297
297
  className: "whitespace-nowrap text-text-secondary",
298
298
  children: j(e.startedAt)
299
299
  }),
300
- /* @__PURE__ */ h(T, {
300
+ /* @__PURE__ */ h(C, {
301
301
  className: "tabular-nums text-text-secondary",
302
302
  children: M(e.durationMs)
303
303
  }),
304
- /* @__PURE__ */ h(T, {
304
+ /* @__PURE__ */ h(C, {
305
305
  className: "text-text-secondary",
306
306
  children: e.triggeredBy || "—"
307
307
  })
@@ -369,22 +369,22 @@ function F() {
369
369
  })
370
370
  ] }) })] })
371
371
  ]
372
- }), /* @__PURE__ */ h(ue, {
372
+ }), /* @__PURE__ */ h(se, {
373
373
  open: De,
374
374
  onOpenChange: (e) => X ? void 0 : Z(e),
375
- children: /* @__PURE__ */ g(pe, { children: [/* @__PURE__ */ g(ge, { children: [/* @__PURE__ */ g(y, { children: [
375
+ children: /* @__PURE__ */ g(ue, { children: [/* @__PURE__ */ g(pe, { children: [/* @__PURE__ */ g(me, { children: [
376
376
  "Archive “",
377
377
  V.name,
378
378
  "”?"
379
- ] }), /* @__PURE__ */ h(me, { children: "Archiving stops the pipeline from being triggered. Existing runs are kept for reference." })] }), /* @__PURE__ */ g(he, { children: [/* @__PURE__ */ h(fe, {
379
+ ] }), /* @__PURE__ */ h(de, { children: "Archiving stops the pipeline from being triggered. Existing runs are kept for reference." })] }), /* @__PURE__ */ g(fe, { children: [/* @__PURE__ */ h(le, {
380
380
  disabled: X,
381
381
  children: "Cancel"
382
- }), /* @__PURE__ */ h(de, {
382
+ }), /* @__PURE__ */ h(ce, {
383
383
  onClick: (e) => {
384
384
  e.preventDefault(), Oe();
385
385
  },
386
386
  disabled: X,
387
- className: be({ variant: "destructive" }),
387
+ className: _e({ variant: "destructive" }),
388
388
  children: X ? "Archiving…" : "Archive pipeline"
389
389
  })] })] })
390
390
  })]