@shipfox/client-workflows 20.0.0 → 21.0.0

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 (105) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/CHANGELOG.md +29 -0
  3. package/dist/components/job-detail/job-detail-view.d.ts.map +1 -1
  4. package/dist/components/job-detail/job-detail-view.js +231 -42
  5. package/dist/components/job-detail/job-detail-view.js.map +1 -1
  6. package/dist/components/job-detail/step-attempt-log-panel.d.ts +7 -1
  7. package/dist/components/job-detail/step-attempt-log-panel.d.ts.map +1 -1
  8. package/dist/components/job-detail/step-attempt-log-panel.js +37 -10
  9. package/dist/components/job-detail/step-attempt-log-panel.js.map +1 -1
  10. package/dist/components/step-list/step-list-model.d.ts +1 -0
  11. package/dist/components/step-list/step-list-model.d.ts.map +1 -1
  12. package/dist/components/step-list/step-list-model.js +1 -1
  13. package/dist/components/step-list/step-list-model.js.map +1 -1
  14. package/dist/components/step-list/step-list.d.ts +2 -1
  15. package/dist/components/step-list/step-list.d.ts.map +1 -1
  16. package/dist/components/step-list/step-list.js +24 -7
  17. package/dist/components/step-list/step-list.js.map +1 -1
  18. package/dist/components/workflow-run-list/job-status-strip.d.ts +9 -1
  19. package/dist/components/workflow-run-list/job-status-strip.d.ts.map +1 -1
  20. package/dist/components/workflow-run-list/job-status-strip.js +22 -11
  21. package/dist/components/workflow-run-list/job-status-strip.js.map +1 -1
  22. package/dist/components/workflow-run-list/workflow-run-filters.js +1 -1
  23. package/dist/components/workflow-run-list/workflow-run-filters.js.map +1 -1
  24. package/dist/components/workflow-run-list/workflow-run-list-states.js +2 -2
  25. package/dist/components/workflow-run-list/workflow-run-list-states.js.map +1 -1
  26. package/dist/components/workflow-run-list/workflow-run-list-view.d.ts.map +1 -1
  27. package/dist/components/workflow-run-list/workflow-run-list-view.js +34 -22
  28. package/dist/components/workflow-run-list/workflow-run-list-view.js.map +1 -1
  29. package/dist/components/workflow-run-list/workflow-run-row.d.ts +3 -3
  30. package/dist/components/workflow-run-list/workflow-run-row.d.ts.map +1 -1
  31. package/dist/components/workflow-run-list/workflow-run-row.js +13 -10
  32. package/dist/components/workflow-run-list/workflow-run-row.js.map +1 -1
  33. package/dist/components/workflow-run-summary/workflow-run-summary.d.ts.map +1 -1
  34. package/dist/components/workflow-run-summary/workflow-run-summary.js +1 -1
  35. package/dist/components/workflow-run-summary/workflow-run-summary.js.map +1 -1
  36. package/dist/components/workflow-run-view/run-workspace-nav.js +1 -1
  37. package/dist/components/workflow-run-view/run-workspace-nav.js.map +1 -1
  38. package/dist/components/workflow-run-view/workflow-run-states.d.ts.map +1 -1
  39. package/dist/components/workflow-run-view/workflow-run-states.js +1 -1
  40. package/dist/components/workflow-run-view/workflow-run-states.js.map +1 -1
  41. package/dist/components/workflow-run-view/workflow-run-view.d.ts.map +1 -1
  42. package/dist/components/workflow-run-view/workflow-run-view.js +43 -36
  43. package/dist/components/workflow-run-view/workflow-run-view.js.map +1 -1
  44. package/dist/components/workflow-source-panel/workflow-source-content.js +1 -1
  45. package/dist/components/workflow-source-panel/workflow-source-content.js.map +1 -1
  46. package/dist/pages/project-workflows-page.d.ts.map +1 -1
  47. package/dist/pages/project-workflows-page.js +3 -2
  48. package/dist/pages/project-workflows-page.js.map +1 -1
  49. package/dist/pages/workflow-job-detail-page.d.ts.map +1 -1
  50. package/dist/pages/workflow-job-detail-page.js +3 -2
  51. package/dist/pages/workflow-job-detail-page.js.map +1 -1
  52. package/dist/pages/workflow-run-detail-page.js +2 -1
  53. package/dist/pages/workflow-run-detail-page.js.map +1 -1
  54. package/dist/pages/workflow-run-list-page.d.ts.map +1 -1
  55. package/dist/pages/workflow-run-list-page.js +9 -11
  56. package/dist/pages/workflow-run-list-page.js.map +1 -1
  57. package/dist/routes/job-detail.d.ts +1 -1
  58. package/dist/routes/job-detail.js +1 -1
  59. package/dist/routes/job-detail.js.map +1 -1
  60. package/dist/routes/run-detail.d.ts +1 -1
  61. package/dist/routes/run-detail.js +1 -1
  62. package/dist/routes/run-detail.js.map +1 -1
  63. package/dist/routes/runs.d.ts +1 -1
  64. package/dist/routes/runs.js +1 -1
  65. package/dist/routes/runs.js.map +1 -1
  66. package/dist/routes/workflows.d.ts +3 -0
  67. package/dist/routes/workflows.js +3 -0
  68. package/dist/routes/workflows.js.map +1 -1
  69. package/dist/tsconfig.test.tsbuildinfo +1 -1
  70. package/package.json +7 -7
  71. package/src/components/job-detail/job-detail-view.tsx +263 -47
  72. package/src/components/job-detail/step-attempt-log-panel.test.tsx +30 -12
  73. package/src/components/job-detail/step-attempt-log-panel.tsx +68 -10
  74. package/src/components/job-graph/job-graph.stories.tsx +1 -1
  75. package/src/components/job-graph/job-node.stories.tsx +1 -1
  76. package/src/components/step-list/step-list-model.ts +1 -1
  77. package/src/components/step-list/step-list.test.tsx +29 -1
  78. package/src/components/step-list/step-list.tsx +28 -9
  79. package/src/components/workflow-run-list/job-status-strip.tsx +25 -12
  80. package/src/components/workflow-run-list/workflow-run-filters.tsx +1 -1
  81. package/src/components/workflow-run-list/workflow-run-list-states.tsx +2 -2
  82. package/src/components/workflow-run-list/workflow-run-list-view.test.tsx +53 -4
  83. package/src/components/workflow-run-list/workflow-run-list-view.tsx +28 -22
  84. package/src/components/workflow-run-list/workflow-run-list.stories.tsx +9 -20
  85. package/src/components/workflow-run-list/workflow-run-row.tsx +17 -13
  86. package/src/components/workflow-run-summary/workflow-run-summary.stories.tsx +2 -2
  87. package/src/components/workflow-run-summary/workflow-run-summary.test.tsx +2 -1
  88. package/src/components/workflow-run-summary/workflow-run-summary.tsx +1 -4
  89. package/src/components/workflow-run-view/run-workspace-nav.tsx +1 -1
  90. package/src/components/workflow-run-view/workflow-run-states.tsx +1 -4
  91. package/src/components/workflow-run-view/workflow-run-view.stories.tsx +140 -0
  92. package/src/components/workflow-run-view/workflow-run-view.test.tsx +38 -7
  93. package/src/components/workflow-run-view/workflow-run-view.tsx +45 -37
  94. package/src/components/workflow-source-panel/workflow-source-content.tsx +2 -2
  95. package/src/pages/project-workflows-page.tsx +3 -2
  96. package/src/pages/workflow-job-detail-page.test.tsx +32 -0
  97. package/src/pages/workflow-job-detail-page.tsx +5 -1
  98. package/src/pages/workflow-run-detail-page.tsx +1 -1
  99. package/src/pages/workflow-run-list-page.tsx +9 -11
  100. package/src/pages/workflow-run-pages.test.tsx +26 -0
  101. package/src/routes/job-detail.tsx +1 -1
  102. package/src/routes/run-detail.tsx +1 -1
  103. package/src/routes/runs.tsx +1 -1
  104. package/src/routes/workflows.tsx +1 -0
  105. package/tsconfig.build.tsbuildinfo +1 -1
@@ -1,19 +1,16 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { WORKFLOW_RUN_JOB_PREVIEW_LIMIT } from '@shipfox/api-workflows-dto';
2
3
  import { Tooltip, TooltipContent, TooltipTrigger } from '@shipfox/react-ui/tooltip';
3
4
  import { Code, Text } from '@shipfox/react-ui/typography';
4
5
  import { cn } from '@shipfox/react-ui/utils';
6
+ import { memo } from 'react';
5
7
  import { getWorkflowStatusVisual } from '#components/workflow-status/status-visuals.js';
6
8
  import { WorkflowStatusIcon } from '#components/workflow-status/workflow-status-icon.js';
7
9
  import { deriveJobDisplayStatus } from '#core/entities/job.js';
8
- /**
9
- * How many glyphs fit the strip's column before it starts costing the run name width.
10
- *
11
- * Sized so the widest case still fits the row's 160px strip column: seven 12px glyphs with
12
- * 3px gaps is 102px, and the overflow indicator adds a glyph plus a count of at most five
13
- * monospace characters, about 56px. Overshooting does not wrap, it paints over the duration
14
- * column. This sits under the API's preview bound, so resizing the strip is a change here.
15
- */ const MAX_VISIBLE_JOBS = 7;
16
10
  const GLYPH_SIZE = 12;
11
+ const GLYPH_GAP = 3;
12
+ const OVERFLOW_GAP = 2;
13
+ const OVERFLOW_LABEL_WIDTH = 40;
17
14
  const MAX_TOOLTIP_JOB_NAMES = 6;
18
15
  /**
19
16
  * Above this the overflow count is abbreviated.
@@ -27,6 +24,17 @@ const COMPACT_COUNT_FORMAT = new Intl.NumberFormat('en', {
27
24
  notation: 'compact',
28
25
  maximumFractionDigits: 1
29
26
  });
27
+ /**
28
+ * Reserves one full API preview and its overflow marker in a run row.
29
+ *
30
+ * Keep this derived from the API preview bound so the row reservation grows with the payload
31
+ * contract instead of silently drifting into the duration and timestamp columns.
32
+ */ export function jobStatusStripWidthForPreview(previewLimit) {
33
+ const previewWidth = previewLimit * GLYPH_SIZE + Math.max(previewLimit - 1, 0) * GLYPH_GAP;
34
+ const overflowWidth = GLYPH_GAP + GLYPH_SIZE + OVERFLOW_GAP + OVERFLOW_LABEL_WIDTH;
35
+ return previewWidth + overflowWidth;
36
+ }
37
+ export const JOB_STATUS_STRIP_WIDTH = jobStatusStripWidthForPreview(WORKFLOW_RUN_JOB_PREVIEW_LIMIT);
30
38
  // Worst-first, so the overflow glyph reports the most alarming thing it is standing in for.
31
39
  // A strip that hides a failure behind eight green discs would be worse than no strip at all.
32
40
  const STATUS_SEVERITY = {
@@ -53,9 +61,12 @@ const NOTABLE_STATUSES = [
53
61
  * What it draws comes from the preview; what it says comes from the counts, which cover every
54
62
  * job including those the server never sent. That split is what lets the overflow glyph
55
63
  * report a failure sitting past the preview instead of quietly dropping it.
56
- */ export function JobStatusStrip({ jobs, className }) {
64
+ */ export const JobStatusStrip = /*#__PURE__*/ memo(function JobStatusStrip({ jobs, className }) {
57
65
  if (jobs.total === 0) return null;
58
- const visible = jobs.preview.slice(0, MAX_VISIBLE_JOBS);
66
+ // The data frame gives the row enough room for the whole API preview. Only jobs beyond that
67
+ // server-side preview need an overflow marker; the old seven-glyph cap belonged to the
68
+ // previous 1120px page width.
69
+ const visible = jobs.preview;
59
70
  const hiddenCount = jobs.total - visible.length;
60
71
  const overflowStatus = worstHiddenStatus(jobs, visible);
61
72
  const summary = jobStatusSummary(jobs);
@@ -111,7 +122,7 @@ const NOTABLE_STATUSES = [
111
122
  })
112
123
  ]
113
124
  });
114
- }
125
+ });
115
126
  function JobStatusStripTooltip({ jobs, summary }) {
116
127
  // Naming the jobs that need attention is the whole point of hovering; succeeded jobs are
117
128
  // left to the counts so the tooltip stays a glance rather than a list. Only previewed jobs
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/workflow-run-list/job-status-strip.tsx"],"sourcesContent":["import {Tooltip, TooltipContent, TooltipTrigger} from '@shipfox/react-ui/tooltip';\nimport {Code, Text} from '@shipfox/react-ui/typography';\nimport {cn} from '@shipfox/react-ui/utils';\nimport {getWorkflowStatusVisual} from '#components/workflow-status/status-visuals.js';\nimport {WorkflowStatusIcon} from '#components/workflow-status/workflow-status-icon.js';\nimport {deriveJobDisplayStatus, type JobDisplayStatus} from '#core/entities/job.js';\nimport type {WorkflowRunJobSummary, WorkflowRunJobs} from '#core/workflow-run.js';\n\n/**\n * How many glyphs fit the strip's column before it starts costing the run name width.\n *\n * Sized so the widest case still fits the row's 160px strip column: seven 12px glyphs with\n * 3px gaps is 102px, and the overflow indicator adds a glyph plus a count of at most five\n * monospace characters, about 56px. Overshooting does not wrap, it paints over the duration\n * column. This sits under the API's preview bound, so resizing the strip is a change here.\n */\nconst MAX_VISIBLE_JOBS = 7;\nconst GLYPH_SIZE = 12;\nconst MAX_TOOLTIP_JOB_NAMES = 6;\n\n/**\n * Above this the overflow count is abbreviated.\n *\n * Nothing caps a workflow's job count, so an exact count is unbounded in width and would\n * eventually push the strip over its column. Abbreviating keeps the label at most five\n * characters for any magnitude, and the exact figure stays in the tooltip and the strip's\n * accessible name, which is where a precise number is actually read.\n */\nconst MAX_EXACT_OVERFLOW_COUNT = 999;\nconst COMPACT_COUNT_FORMAT = new Intl.NumberFormat('en', {\n notation: 'compact',\n maximumFractionDigits: 1,\n});\n\n// Worst-first, so the overflow glyph reports the most alarming thing it is standing in for.\n// A strip that hides a failure behind eight green discs would be worse than no strip at all.\nconst STATUS_SEVERITY: Record<JobDisplayStatus, number> = {\n failed: 5,\n running: 4,\n listening: 4,\n pending: 3,\n cancelled: 2,\n skipped: 1,\n succeeded: 0,\n};\n\nconst NOTABLE_STATUSES: readonly JobDisplayStatus[] = ['failed', 'running', 'listening'];\n\nexport interface JobStatusStripProps {\n jobs: WorkflowRunJobs;\n className?: string | undefined;\n}\n\n/**\n * A run's jobs as a row of status glyphs, in graph order.\n *\n * This is the reason the list is worth its width: it answers \"where did this run fail\"\n * without opening the run. Glyphs are silent to assistive tech and carry no tooltip of their\n * own; the strip speaks once, as a summary, so a 40-job run does not read out 40 labels.\n *\n * What it draws comes from the preview; what it says comes from the counts, which cover every\n * job including those the server never sent. That split is what lets the overflow glyph\n * report a failure sitting past the preview instead of quietly dropping it.\n */\nexport function JobStatusStrip({jobs, className}: JobStatusStripProps) {\n if (jobs.total === 0) return null;\n\n const visible = jobs.preview.slice(0, MAX_VISIBLE_JOBS);\n const hiddenCount = jobs.total - visible.length;\n const overflowStatus = worstHiddenStatus(jobs, visible);\n const summary = jobStatusSummary(jobs);\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>\n <span\n role=\"img\"\n aria-label={summary}\n className={cn('inline-flex items-center gap-[3px]', className)}\n >\n <span aria-hidden=\"true\" className=\"inline-flex items-center gap-[3px]\">\n {visible.map((job) => (\n <WorkflowStatusIcon\n key={job.id}\n status={displayStatus(job)}\n size={GLYPH_SIZE}\n // One ripple per running job, on every row, would turn a calm list into a\n // field of pulses. The run's own glyph already carries the live edge.\n ripple={false}\n tooltip={false}\n />\n ))}\n {hiddenCount > 0 && overflowStatus ? (\n <span className=\"inline-flex items-center gap-[2px]\">\n <WorkflowStatusIcon\n status={overflowStatus}\n size={GLYPH_SIZE}\n ripple={false}\n tooltip={false}\n />\n <Code\n as=\"span\"\n variant=\"label\"\n className=\"tabular-nums text-foreground-neutral-muted\"\n >\n +{overflowCountLabel(hiddenCount)}\n </Code>\n </span>\n ) : null}\n </span>\n </span>\n </TooltipTrigger>\n <TooltipContent>\n <JobStatusStripTooltip jobs={jobs} summary={summary} />\n </TooltipContent>\n </Tooltip>\n );\n}\n\nfunction JobStatusStripTooltip({jobs, summary}: {jobs: WorkflowRunJobs; summary: string}) {\n // Naming the jobs that need attention is the whole point of hovering; succeeded jobs are\n // left to the counts so the tooltip stays a glance rather than a list. Only previewed jobs\n // can be named, but the count of those left over is read off the totals, so a failure past\n // the preview is still accounted for rather than silently missing.\n const named = jobs.preview\n .filter((job) => NOTABLE_STATUSES.includes(displayStatus(job)))\n .slice(0, MAX_TOOLTIP_JOB_NAMES);\n const notableTotal = NOTABLE_STATUSES.reduce((total, status) => total + countOf(jobs, status), 0);\n const remaining = notableTotal - named.length;\n\n return (\n <span className=\"flex max-w-[280px] flex-col gap-tight\">\n <Text as=\"span\" size=\"xs\" className=\"block\">\n {summary}\n </Text>\n {named.map((job) => (\n <Code as=\"span\" variant=\"label\" key={job.id} className=\"block truncate\">\n {getWorkflowStatusVisual(displayStatus(job)).label.toLowerCase()} · {job.name ?? job.key}\n </Code>\n ))}\n {remaining > 0 ? (\n <Text as=\"span\" size=\"xs\" className=\"block text-foreground-neutral-muted\">\n and {remaining} more\n </Text>\n ) : null}\n </span>\n );\n}\n\n/** \"12 jobs: 9 succeeded, 2 failed, 1 running\" — a count is not an accessible name on its own. */\nexport function jobStatusSummary(jobs: WorkflowRunJobs): string {\n const breakdown = [...jobs.statusCounts]\n .sort((left, right) => STATUS_SEVERITY[right.status] - STATUS_SEVERITY[left.status])\n .map(({status, count}) => `${count} ${getWorkflowStatusVisual(status).label.toLowerCase()}`)\n .join(', ');\n\n return `${jobs.total} ${jobs.total === 1 ? 'job' : 'jobs'}: ${breakdown}`;\n}\n\n/**\n * The worst status among the jobs the strip is not drawing, found by subtracting what it\n * draws from the run's totals rather than by inspecting jobs it was never sent.\n */\nfunction worstHiddenStatus(\n jobs: WorkflowRunJobs,\n visible: readonly WorkflowRunJobSummary[],\n): JobDisplayStatus | null {\n const hidden = new Map(jobs.statusCounts.map(({status, count}) => [status, count]));\n for (const job of visible) {\n const status = displayStatus(job);\n const remaining = (hidden.get(status) ?? 0) - 1;\n if (remaining > 0) hidden.set(status, remaining);\n else hidden.delete(status);\n }\n\n let worst: JobDisplayStatus | null = null;\n for (const [status, count] of hidden) {\n if (count <= 0) continue;\n if (worst === null || STATUS_SEVERITY[status] > STATUS_SEVERITY[worst]) worst = status;\n }\n return worst;\n}\n\nexport function overflowCountLabel(hiddenCount: number): string {\n return hiddenCount <= MAX_EXACT_OVERFLOW_COUNT\n ? String(hiddenCount)\n : COMPACT_COUNT_FORMAT.format(hiddenCount);\n}\n\nfunction countOf(jobs: WorkflowRunJobs, status: JobDisplayStatus): number {\n return jobs.statusCounts.find((entry) => entry.status === status)?.count ?? 0;\n}\n\nfunction displayStatus(job: WorkflowRunJobSummary): JobDisplayStatus {\n return deriveJobDisplayStatus({\n mode: job.mode,\n status: job.status,\n listenerStatus: job.listenerStatus,\n executionStatus: job.executionStatus,\n jobExecutions: [],\n });\n}\n"],"names":["Tooltip","TooltipContent","TooltipTrigger","Code","Text","cn","getWorkflowStatusVisual","WorkflowStatusIcon","deriveJobDisplayStatus","MAX_VISIBLE_JOBS","GLYPH_SIZE","MAX_TOOLTIP_JOB_NAMES","MAX_EXACT_OVERFLOW_COUNT","COMPACT_COUNT_FORMAT","Intl","NumberFormat","notation","maximumFractionDigits","STATUS_SEVERITY","failed","running","listening","pending","cancelled","skipped","succeeded","NOTABLE_STATUSES","JobStatusStrip","jobs","className","total","visible","preview","slice","hiddenCount","length","overflowStatus","worstHiddenStatus","summary","jobStatusSummary","asChild","span","role","aria-label","aria-hidden","map","job","status","displayStatus","size","ripple","tooltip","id","as","variant","overflowCountLabel","JobStatusStripTooltip","named","filter","includes","notableTotal","reduce","countOf","remaining","label","toLowerCase","name","key","breakdown","statusCounts","sort","left","right","count","join","hidden","Map","get","set","delete","worst","String","format","find","entry","mode","listenerStatus","executionStatus","jobExecutions"],"mappings":";AAAA,SAAQA,OAAO,EAAEC,cAAc,EAAEC,cAAc,QAAO,4BAA4B;AAClF,SAAQC,IAAI,EAAEC,IAAI,QAAO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,IAAI,CAAC,CAACC,QAAUA,MAAMrC,MAAM,KAAKA,SAAS0B,SAAS;AAC9E;AAEA,SAASzB,cAAcF,GAA0B;IAC/C,OAAOtC,uBAAuB;QAC5B6E,MAAMvC,IAAIuC,IAAI;QACdtC,QAAQD,IAAIC,MAAM;QAClBuC,gBAAgBxC,IAAIwC,cAAc;QAClCC,iBAAiBzC,IAAIyC,eAAe;QACpCC,eAAe,EAAE;IACnB;AACF"}
1
+ {"version":3,"sources":["../../../src/components/workflow-run-list/job-status-strip.tsx"],"sourcesContent":["import {WORKFLOW_RUN_JOB_PREVIEW_LIMIT} from '@shipfox/api-workflows-dto';\nimport {Tooltip, TooltipContent, TooltipTrigger} from '@shipfox/react-ui/tooltip';\nimport {Code, Text} from '@shipfox/react-ui/typography';\nimport {cn} from '@shipfox/react-ui/utils';\nimport {memo} from 'react';\nimport {getWorkflowStatusVisual} from '#components/workflow-status/status-visuals.js';\nimport {WorkflowStatusIcon} from '#components/workflow-status/workflow-status-icon.js';\nimport {deriveJobDisplayStatus, type JobDisplayStatus} from '#core/entities/job.js';\nimport type {WorkflowRunJobSummary, WorkflowRunJobs} from '#core/workflow-run.js';\n\nconst GLYPH_SIZE = 12;\nconst GLYPH_GAP = 3;\nconst OVERFLOW_GAP = 2;\nconst OVERFLOW_LABEL_WIDTH = 40;\nconst MAX_TOOLTIP_JOB_NAMES = 6;\n\n/**\n * Above this the overflow count is abbreviated.\n *\n * Nothing caps a workflow's job count, so an exact count is unbounded in width and would\n * eventually push the strip over its column. Abbreviating keeps the label at most five\n * characters for any magnitude, and the exact figure stays in the tooltip and the strip's\n * accessible name, which is where a precise number is actually read.\n */\nconst MAX_EXACT_OVERFLOW_COUNT = 999;\nconst COMPACT_COUNT_FORMAT = new Intl.NumberFormat('en', {\n notation: 'compact',\n maximumFractionDigits: 1,\n});\n\n/**\n * Reserves one full API preview and its overflow marker in a run row.\n *\n * Keep this derived from the API preview bound so the row reservation grows with the payload\n * contract instead of silently drifting into the duration and timestamp columns.\n */\nexport function jobStatusStripWidthForPreview(previewLimit: number): number {\n const previewWidth = previewLimit * GLYPH_SIZE + Math.max(previewLimit - 1, 0) * GLYPH_GAP;\n const overflowWidth = GLYPH_GAP + GLYPH_SIZE + OVERFLOW_GAP + OVERFLOW_LABEL_WIDTH;\n return previewWidth + overflowWidth;\n}\n\nexport const JOB_STATUS_STRIP_WIDTH = jobStatusStripWidthForPreview(WORKFLOW_RUN_JOB_PREVIEW_LIMIT);\n\n// Worst-first, so the overflow glyph reports the most alarming thing it is standing in for.\n// A strip that hides a failure behind eight green discs would be worse than no strip at all.\nconst STATUS_SEVERITY: Record<JobDisplayStatus, number> = {\n failed: 5,\n running: 4,\n listening: 4,\n pending: 3,\n cancelled: 2,\n skipped: 1,\n succeeded: 0,\n};\n\nconst NOTABLE_STATUSES: readonly JobDisplayStatus[] = ['failed', 'running', 'listening'];\n\nexport interface JobStatusStripProps {\n jobs: WorkflowRunJobs;\n className?: string | undefined;\n}\n\n/**\n * A run's jobs as a row of status glyphs, in graph order.\n *\n * This is the reason the list is worth its width: it answers \"where did this run fail\"\n * without opening the run. Glyphs are silent to assistive tech and carry no tooltip of their\n * own; the strip speaks once, as a summary, so a 40-job run does not read out 40 labels.\n *\n * What it draws comes from the preview; what it says comes from the counts, which cover every\n * job including those the server never sent. That split is what lets the overflow glyph\n * report a failure sitting past the preview instead of quietly dropping it.\n */\nexport const JobStatusStrip = memo(function JobStatusStrip({jobs, className}: JobStatusStripProps) {\n if (jobs.total === 0) return null;\n\n // The data frame gives the row enough room for the whole API preview. Only jobs beyond that\n // server-side preview need an overflow marker; the old seven-glyph cap belonged to the\n // previous 1120px page width.\n const visible = jobs.preview;\n const hiddenCount = jobs.total - visible.length;\n const overflowStatus = worstHiddenStatus(jobs, visible);\n const summary = jobStatusSummary(jobs);\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>\n <span\n role=\"img\"\n aria-label={summary}\n className={cn('inline-flex items-center gap-[3px]', className)}\n >\n <span aria-hidden=\"true\" className=\"inline-flex items-center gap-[3px]\">\n {visible.map((job) => (\n <WorkflowStatusIcon\n key={job.id}\n status={displayStatus(job)}\n size={GLYPH_SIZE}\n // One ripple per running job, on every row, would turn a calm list into a\n // field of pulses. The run's own glyph already carries the live edge.\n ripple={false}\n tooltip={false}\n />\n ))}\n {hiddenCount > 0 && overflowStatus ? (\n <span className=\"inline-flex items-center gap-[2px]\">\n <WorkflowStatusIcon\n status={overflowStatus}\n size={GLYPH_SIZE}\n ripple={false}\n tooltip={false}\n />\n <Code\n as=\"span\"\n variant=\"label\"\n className=\"tabular-nums text-foreground-neutral-muted\"\n >\n +{overflowCountLabel(hiddenCount)}\n </Code>\n </span>\n ) : null}\n </span>\n </span>\n </TooltipTrigger>\n <TooltipContent>\n <JobStatusStripTooltip jobs={jobs} summary={summary} />\n </TooltipContent>\n </Tooltip>\n );\n});\n\nfunction JobStatusStripTooltip({jobs, summary}: {jobs: WorkflowRunJobs; summary: string}) {\n // Naming the jobs that need attention is the whole point of hovering; succeeded jobs are\n // left to the counts so the tooltip stays a glance rather than a list. Only previewed jobs\n // can be named, but the count of those left over is read off the totals, so a failure past\n // the preview is still accounted for rather than silently missing.\n const named = jobs.preview\n .filter((job) => NOTABLE_STATUSES.includes(displayStatus(job)))\n .slice(0, MAX_TOOLTIP_JOB_NAMES);\n const notableTotal = NOTABLE_STATUSES.reduce((total, status) => total + countOf(jobs, status), 0);\n const remaining = notableTotal - named.length;\n\n return (\n <span className=\"flex max-w-[280px] flex-col gap-tight\">\n <Text as=\"span\" size=\"xs\" className=\"block\">\n {summary}\n </Text>\n {named.map((job) => (\n <Code as=\"span\" variant=\"label\" key={job.id} className=\"block truncate\">\n {getWorkflowStatusVisual(displayStatus(job)).label.toLowerCase()} · {job.name ?? job.key}\n </Code>\n ))}\n {remaining > 0 ? (\n <Text as=\"span\" size=\"xs\" className=\"block text-foreground-neutral-muted\">\n and {remaining} more\n </Text>\n ) : null}\n </span>\n );\n}\n\n/** \"12 jobs: 9 succeeded, 2 failed, 1 running\" — a count is not an accessible name on its own. */\nexport function jobStatusSummary(jobs: WorkflowRunJobs): string {\n const breakdown = [...jobs.statusCounts]\n .sort((left, right) => STATUS_SEVERITY[right.status] - STATUS_SEVERITY[left.status])\n .map(({status, count}) => `${count} ${getWorkflowStatusVisual(status).label.toLowerCase()}`)\n .join(', ');\n\n return `${jobs.total} ${jobs.total === 1 ? 'job' : 'jobs'}: ${breakdown}`;\n}\n\n/**\n * The worst status among the jobs the strip is not drawing, found by subtracting what it\n * draws from the run's totals rather than by inspecting jobs it was never sent.\n */\nfunction worstHiddenStatus(\n jobs: WorkflowRunJobs,\n visible: readonly WorkflowRunJobSummary[],\n): JobDisplayStatus | null {\n const hidden = new Map(jobs.statusCounts.map(({status, count}) => [status, count]));\n for (const job of visible) {\n const status = displayStatus(job);\n const remaining = (hidden.get(status) ?? 0) - 1;\n if (remaining > 0) hidden.set(status, remaining);\n else hidden.delete(status);\n }\n\n let worst: JobDisplayStatus | null = null;\n for (const [status, count] of hidden) {\n if (count <= 0) continue;\n if (worst === null || STATUS_SEVERITY[status] > STATUS_SEVERITY[worst]) worst = status;\n }\n return worst;\n}\n\nexport function overflowCountLabel(hiddenCount: number): string {\n return hiddenCount <= MAX_EXACT_OVERFLOW_COUNT\n ? String(hiddenCount)\n : COMPACT_COUNT_FORMAT.format(hiddenCount);\n}\n\nfunction countOf(jobs: WorkflowRunJobs, status: JobDisplayStatus): number {\n return jobs.statusCounts.find((entry) => entry.status === status)?.count ?? 0;\n}\n\nfunction displayStatus(job: WorkflowRunJobSummary): JobDisplayStatus {\n return deriveJobDisplayStatus({\n mode: job.mode,\n status: job.status,\n listenerStatus: job.listenerStatus,\n executionStatus: job.executionStatus,\n jobExecutions: [],\n });\n}\n"],"names":["WORKFLOW_RUN_JOB_PREVIEW_LIMIT","Tooltip","TooltipContent","TooltipTrigger","Code","Text","cn","memo","getWorkflowStatusVisual","WorkflowStatusIcon","deriveJobDisplayStatus","GLYPH_SIZE","GLYPH_GAP","OVERFLOW_GAP","OVERFLOW_LABEL_WIDTH","MAX_TOOLTIP_JOB_NAMES","MAX_EXACT_OVERFLOW_COUNT","COMPACT_COUNT_FORMAT","Intl","NumberFormat","notation","maximumFractionDigits","jobStatusStripWidthForPreview","previewLimit","previewWidth","Math","max","overflowWidth","JOB_STATUS_STRIP_WIDTH","STATUS_SEVERITY","failed","running","listening","pending","cancelled","skipped","succeeded","NOTABLE_STATUSES","JobStatusStrip","jobs","className","total","visible","preview","hiddenCount","length","overflowStatus","worstHiddenStatus","summary","jobStatusSummary","asChild","span","role","aria-label","aria-hidden","map","job","status","displayStatus","size","ripple","tooltip","id","as","variant","overflowCountLabel","JobStatusStripTooltip","named","filter","includes","slice","notableTotal","reduce","countOf","remaining","label","toLowerCase","name","key","breakdown","statusCounts","sort","left","right","count","join","hidden","Map","get","set","delete","worst","String","format","find","entry","mode","listenerStatus","executionStatus","jobExecutions"],"mappings":";AAAA,SAAQA,8BAA8B,QAAO,6BAA6B;AAC1E,SAAQC,OAAO,EAAEC,cAAc,EAAEC,cAAc,QAAO,4BAA4B;AAClF,SAAQC,IAAI,EAAEC,IAAI,QAAO,+BAA+B;AACxD,SAAQC,EAAE,QAAO,0BAA0B;AAC3C,SAAQC,IAAI,QAAO,QAAQ;AAC3B,SAAQC,uBAAuB,QAAO,gDAAgD;AACtF,SAAQC,kBAAkB,QAAO,sDAAsD;AACvF,SAAQC,sBAAsB,QAA8B,wBAAwB;AAGpF,MAAMC,aAAa;AACnB,MAAMC,YAAY;AAClB,MAAMC,eAAe;AACrB,MAAMC,uBAAuB;AAC7B,MAAMC,wBAAwB;AAE9B;;;;;;;CAOC,GACD,MAAMC,2BAA2B;AACjC,MAAMC,uBAAuB,IAAIC,KAAKC,YAAY,CAAC,MAAM;IACvDC,UAAU;IACVC,uBAAuB;AACzB;AAEA;;;;;CAKC,GACD,OAAO,SAASC,8BAA8BC,YAAoB;IAChE,MAAMC,eAAeD,eAAeZ,aAAac,K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AI;QACdvC,QAAQD,IAAIC,MAAM;QAClBwC,gBAAgBzC,IAAIyC,cAAc;QAClCC,iBAAiB1C,IAAI0C,eAAe;QACpCC,eAAe,EAAE;IACnB;AACF"}
@@ -22,7 +22,7 @@ const STATUS_OPTIONS = WORKFLOW_RUN_LIST_STATUSES.map((status)=>({
22
22
  */ export function WorkflowRunFilters({ search, facets, onChange, onClear, hasActiveFilters }) {
23
23
  const [sheetOpen, setSheetOpen] = useState(false);
24
24
  return /*#__PURE__*/ _jsxs("div", {
25
- className: "flex flex-wrap items-center gap-inline",
25
+ className: "flex w-full flex-wrap items-center gap-inline",
26
26
  children: [
27
27
  /*#__PURE__*/ _jsx(Input, {
28
28
  value: search.search ?? '',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/workflow-run-list/workflow-run-filters.tsx"],"sourcesContent":["import {Button} from '@shipfox/react-ui/button';\nimport {DateRangePicker} from '@shipfox/react-ui/date-range-picker';\nimport {Icon} from '@shipfox/react-ui/icon';\nimport {Input} from '@shipfox/react-ui/input';\nimport {Label} from '@shipfox/react-ui/label';\nimport {\n Sheet,\n SheetBody,\n SheetContent,\n SheetFooter,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from '@shipfox/react-ui/sheet';\nimport {useState} from 'react';\nimport {getWorkflowStatusVisual} from '#components/workflow-status/status-visuals.js';\nimport {\n WORKFLOW_RUN_LIST_STATUSES,\n type WorkflowRunFilterPatch,\n type WorkflowRunListStatus,\n type WorkflowRunsSearch,\n} from '#routes/inputs.js';\nimport type {WorkflowRunFacets} from './run-display.js';\nimport {WorkflowRunFilterMenu, type WorkflowRunFilterOption} from './workflow-run-filter-menu.js';\n\nconst STATUS_OPTIONS: WorkflowRunFilterOption[] = WORKFLOW_RUN_LIST_STATUSES.map((status) => ({\n value: status,\n label: getWorkflowStatusVisual(status).label,\n}));\n\nexport interface WorkflowRunFiltersProps {\n search: WorkflowRunsSearch;\n facets: WorkflowRunFacets;\n onChange: (patch: WorkflowRunFilterPatch) => void;\n onClear: () => void;\n hasActiveFilters: boolean;\n}\n\n/**\n * The run list filter row.\n *\n * Inline from `md` up, and behind a sheet below it, where a five-control toolbar would eat\n * the viewport the list is supposed to fill. Both layouts render the same controls, so the\n * narrow surface is the full filter set rather than a reduced one.\n */\nexport function WorkflowRunFilters({\n search,\n facets,\n onChange,\n onClear,\n hasActiveFilters,\n}: WorkflowRunFiltersProps) {\n const [sheetOpen, setSheetOpen] = useState(false);\n\n return (\n <div className=\"flex flex-wrap items-center gap-inline\">\n <Input\n value={search.search ?? ''}\n onChange={(event) => onChange({search: event.target.value})}\n placeholder=\"Search runs by name, number, branch, or commit\"\n aria-label=\"Search runs\"\n size=\"small\"\n className=\"min-w-[240px] flex-1\"\n iconLeft={<Icon name=\"searchLine\" className=\"size-14 text-foreground-neutral-muted\" />}\n />\n\n <div className=\"hidden flex-wrap items-center gap-inline md:flex\">\n <WorkflowRunFilterControls search={search} facets={facets} onChange={onChange} />\n {hasActiveFilters ? <ClearFiltersButton onClear={onClear} /> : null}\n </div>\n\n <Sheet open={sheetOpen} onOpenChange={setSheetOpen}>\n <SheetTrigger asChild>\n <Button\n type=\"button\"\n variant=\"secondary\"\n size=\"sm\"\n iconLeft=\"filterLine\"\n className=\"md:hidden\"\n >\n Filters\n </Button>\n </SheetTrigger>\n <SheetContent side=\"bottom\" aria-describedby={undefined}>\n <SheetHeader>\n <SheetTitle>Filter runs</SheetTitle>\n </SheetHeader>\n <SheetBody className=\"flex flex-col gap-cluster\">\n <WorkflowRunFilterControls\n search={search}\n facets={facets}\n onChange={onChange}\n stacked\n />\n </SheetBody>\n <SheetFooter>\n <Button\n type=\"button\"\n variant=\"secondary\"\n size=\"sm\"\n disabled={!hasActiveFilters}\n onClick={onClear}\n >\n Clear filters\n </Button>\n <Button type=\"button\" variant=\"primary\" size=\"sm\" onClick={() => setSheetOpen(false)}>\n Show runs\n </Button>\n </SheetFooter>\n </SheetContent>\n </Sheet>\n </div>\n );\n}\n\nfunction WorkflowRunFilterControls({\n search,\n facets,\n onChange,\n stacked = false,\n}: {\n search: WorkflowRunsSearch;\n facets: WorkflowRunFacets;\n onChange: (patch: WorkflowRunFilterPatch) => void;\n stacked?: boolean;\n}) {\n const controlClassName = stacked ? 'w-full max-w-none' : undefined;\n\n return (\n <>\n <WorkflowRunFilterMenu\n label=\"Status\"\n options={STATUS_OPTIONS}\n selected={search.status ?? []}\n onChange={(next) => onChange({status: next as WorkflowRunListStatus[]})}\n emptyMessage=\"No statuses available.\"\n className={controlClassName}\n />\n <WorkflowRunFilterMenu\n label=\"Branch\"\n options={toOptions(facets.branch)}\n selected={search.branch ?? []}\n onChange={(branch) => onChange({branch})}\n emptyMessage=\"No branches in the loaded runs.\"\n className={controlClassName}\n />\n <WorkflowRunFilterMenu\n label=\"Actor\"\n options={toOptions(facets.actor)}\n selected={search.actor ?? []}\n onChange={(actor) => onChange({actor})}\n emptyMessage=\"No actors in the loaded runs.\"\n className={controlClassName}\n />\n <WorkflowRunFilterMenu\n label=\"Event\"\n options={toOptions(facets.event)}\n selected={search.event ?? []}\n onChange={(event) => onChange({event})}\n emptyMessage=\"No events in the loaded runs.\"\n className={controlClassName}\n />\n {stacked ? (\n <div className=\"flex flex-col gap-inline\">\n <Label>Created between</Label>\n <RunDateRangeFilter search={search} onChange={onChange} />\n </div>\n ) : (\n <RunDateRangeFilter search={search} onChange={onChange} />\n )}\n </>\n );\n}\n\nfunction RunDateRangeFilter({\n search,\n onChange,\n}: {\n search: WorkflowRunsSearch;\n onChange: (patch: WorkflowRunFilterPatch) => void;\n}) {\n return (\n <DateRangePicker\n size=\"small\"\n aria-label=\"Filter runs by creation date\"\n // The shared picker renders a value only when both bounds are set, so a one-sided filter\n // would otherwise read as unset. Naming the active bound keeps it visible without\n // inventing the bound the user did not choose.\n placeholder={partialDateLabel(search) ?? 'Any date'}\n dateRange={{\n ...(search.after ? {start: fromCalendarDate(search.after)} : {}),\n ...(search.before ? {end: fromCalendarDate(search.before)} : {}),\n }}\n onDateRangeSelect={(range) =>\n onChange({\n after: range?.start ? toCalendarDate(range.start) : undefined,\n before: range?.end ? toCalendarDate(range.end) : undefined,\n })\n }\n onClear={() => onChange({after: undefined, before: undefined})}\n />\n );\n}\n\nfunction ClearFiltersButton({onClear}: {onClear: () => void}) {\n return (\n <Button\n type=\"button\"\n variant=\"transparentMuted\"\n size=\"sm\"\n iconLeft=\"closeLine\"\n onClick={onClear}\n >\n Clear filters\n </Button>\n );\n}\n\n/** Describes a bound the picker cannot display on its own, or nothing when it can. */\nfunction partialDateLabel(search: WorkflowRunsSearch): string | undefined {\n if (search.after && search.before) return undefined;\n if (search.after) return `From ${search.after}`;\n if (search.before) return `Until ${search.before}`;\n return undefined;\n}\n\nfunction toOptions(values: readonly string[]): WorkflowRunFilterOption[] {\n return values.map((value) => ({value, label: value}));\n}\n\n// The bounds are local calendar dates, matching how each row's date reads, so the picker and\n// the URL agree with what the list shows rather than with UTC.\nfunction toCalendarDate(date: Date): string {\n const month = String(date.getMonth() + 1).padStart(2, '0');\n const day = String(date.getDate()).padStart(2, '0');\n return `${date.getFullYear()}-${month}-${day}`;\n}\n\nfunction fromCalendarDate(value: string): Date | undefined {\n const [year, month, day] = value.split('-').map(Number) as [number, number, number];\n const date = new Date(year, month - 1, day);\n return Number.isNaN(date.getTime()) ? undefined : date;\n}\n"],"names":["Button","DateRangePicker","Icon","Input","Label","Sheet","SheetBody","SheetContent","SheetFooter","SheetHeader","SheetTitle","SheetTrigger","useState","getWorkflowStatusVisual","WORKFLOW_RUN_LIST_STATUSES","WorkflowRunFilterMenu","STATUS_OPTIONS","map","status","value","label","WorkflowRunFilters","search","facets","onChange","onClear","hasActiveFilters","sheetOpen","setSheetOpen","div","className","event","target","placeholder","aria-label","size","iconLeft","name","WorkflowRunFilterControls","ClearFiltersButton","open","onOpenChange","asChild","type","variant","side","aria-describedby","undefined","stacked","disabled","onClick","controlClassName","options","selected","next","emptyMessage","toOptions","branch","actor","RunDateRangeFilter","partialDateLabel","dateRange","after","start","fromCalendarDate","before","end","onDateRangeSelect","range","toCalendarDate","values","date","month","String","getMonth","padStart","day","getDate","getFullYear","year","split","Number","Date","isNaN","getTime"],"mappings":";AAAA,SAAQA,MAAM,QAAO,2BAA2B;AAChD,SAAQC,eAAe,QAAO,sCAAsC;AACpE,SAAQC,IAAI,QAAO,yBAAyB;AAC5C,SAAQC,KAAK,QAAO,0BAA0B;AAC9C,SAAQC,KAAK,QAAO,0BAA0B;AAC9C,SACEC,KAAK,EACLC,SAAS,EACTC,YAAY,EACZC,WAAW,EACXC,WAAW,EACXC,UAAU,EACVC,YAAY,QACP,0BAA0B;AACjC,SAAQC,QAAQ,QAAO,QAAQ;AAC/B,SAAQC,uBAAuB,QAAO,gDAAgD;AACtF,SACEC,0BAA0B,QAIrB,oBAAoB;AAE3B,SAAQC,qBAAqB,QAAqC,gCAAgC;AAElG,MAAMC,iBAA4CF,2BAA2BG,GAAG,CAAC,CAACC,SAAY,CAAA;QAC5FC,OAAOD;QACPE,OAAOP,wBAAwBK,QAAQE,KAAK;IAC9C,CAAA;AAUA;;;;;;CAMC,GACD,OAAO,SAASC,mBAAmB,EACjCC,MAAM,EACNC,MAAM,EACNC,QAAQ,EACRC,OAAO,EACPC,gBAAgB,EACQ;IACxB,MAAM,CAACC,WAAWC,aAAa,GAAGhB,SAAS;IAE3C,qBACE,MAACiB;QAAIC,WAAU;;0BACb,KAAC3B;gBACCgB,OAAOG,OAAOA,MAAM,IAAI;gBACxBE,UAAU,CAACO,QAAUP,SAAS;wBAACF,QAAQS,MAAMC,MAAM,CAACb,KAAK;oBAAA;gBACzDc,aAAY;gBACZC,cAAW;gBACXC,MAAK;gBACLL,WAAU;gBACVM,wBAAU,KAAClC;oBAAKmC,MAAK;oBAAaP,WAAU;;;0BAG9C,MAACD;gBAAIC,WAAU;;kCACb,KAACQ;wBAA0BhB,QAAQA;wBAAQC,QAAQA;wBAAQC,UAAUA;;oBACpEE,iCAAmB,KAACa;wBAAmBd,SAASA;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GACpF,SAASmC,iBAAiBtC,MAA0B;IAClD,IAAIA,OAAOwC,KAAK,IAAIxC,OAAO2C,MAAM,EAAE,OAAOlB;IAC1C,IAAIzB,OAAOwC,KAAK,EAAE,OAAO,CAAC,KAAK,EAAExC,OAAOwC,KAAK,EAAE;IAC/C,IAAIxC,OAAO2C,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE3C,OAAO2C,MAAM,EAAE;IAClD,OAAOlB;AACT;AAEA,SAASS,UAAUc,MAAyB;IAC1C,OAAOA,OAAOrD,GAAG,CAAC,CAACE,QAAW,CAAA;YAACA;YAAOC,OAAOD;QAAK,CAAA;AACpD;AAEA,6FAA6F;AAC7F,+DAA+D;AAC/D,SAASkD,eAAeE,IAAU;IAChC,MAAMC,QAAQC,OAAOF,KAAKG,QAAQ,KAAK,GAAGC,QAAQ,CAAC,GAAG;IACtD,MAAMC,MAAMH,OAAOF,KAAKM,OAAO,IAAIF,QAAQ,CAAC,GAAG;IAC/C,OAAO,GAAGJ,KAAKO,WAAW,GAAG,CAAC,EAAEN,MAAM,CAAC,EAAEI,KAAK;AAChD;AAEA,SAASZ,iBAAiB7C,KAAa;IACrC,MAAM,CAAC4D,MAAMP,OAAOI,IAAI,GAAGzD,MAAM6D,KAAK,CAAC,KAAK/D,GAAG,CAACgE;IAChD,MAAMV,OAAO,IAAIW,KAAKH,MAAMP,QAAQ,GAAGI;IACvC,OAAOK,OAAOE,KAAK,CAACZ,KAAKa,OAAO,MAAMrC,YAAYwB;AACpD"}
1
+ {"version":3,"sources":["../../../src/components/workflow-run-list/workflow-run-filters.tsx"],"sourcesContent":["import {Button} from '@shipfox/react-ui/button';\nimport {DateRangePicker} from '@shipfox/react-ui/date-range-picker';\nimport {Icon} from '@shipfox/react-ui/icon';\nimport {Input} from '@shipfox/react-ui/input';\nimport {Label} from '@shipfox/react-ui/label';\nimport {\n Sheet,\n SheetBody,\n SheetContent,\n SheetFooter,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from '@shipfox/react-ui/sheet';\nimport {useState} from 'react';\nimport {getWorkflowStatusVisual} from '#components/workflow-status/status-visuals.js';\nimport {\n WORKFLOW_RUN_LIST_STATUSES,\n type WorkflowRunFilterPatch,\n type WorkflowRunListStatus,\n type WorkflowRunsSearch,\n} from '#routes/inputs.js';\nimport type {WorkflowRunFacets} from './run-display.js';\nimport {WorkflowRunFilterMenu, type WorkflowRunFilterOption} from './workflow-run-filter-menu.js';\n\nconst STATUS_OPTIONS: WorkflowRunFilterOption[] = WORKFLOW_RUN_LIST_STATUSES.map((status) => ({\n value: status,\n label: getWorkflowStatusVisual(status).label,\n}));\n\nexport interface WorkflowRunFiltersProps {\n search: WorkflowRunsSearch;\n facets: WorkflowRunFacets;\n onChange: (patch: WorkflowRunFilterPatch) => void;\n onClear: () => void;\n hasActiveFilters: boolean;\n}\n\n/**\n * The run list filter row.\n *\n * Inline from `md` up, and behind a sheet below it, where a five-control toolbar would eat\n * the viewport the list is supposed to fill. Both layouts render the same controls, so the\n * narrow surface is the full filter set rather than a reduced one.\n */\nexport function WorkflowRunFilters({\n search,\n facets,\n onChange,\n onClear,\n hasActiveFilters,\n}: WorkflowRunFiltersProps) {\n const [sheetOpen, setSheetOpen] = useState(false);\n\n return (\n <div className=\"flex w-full flex-wrap items-center gap-inline\">\n <Input\n value={search.search ?? ''}\n onChange={(event) => onChange({search: event.target.value})}\n placeholder=\"Search runs by name, number, branch, or commit\"\n aria-label=\"Search runs\"\n size=\"small\"\n className=\"min-w-[240px] flex-1\"\n iconLeft={<Icon name=\"searchLine\" className=\"size-14 text-foreground-neutral-muted\" />}\n />\n\n <div className=\"hidden flex-wrap items-center gap-inline md:flex\">\n <WorkflowRunFilterControls search={search} facets={facets} onChange={onChange} />\n {hasActiveFilters ? <ClearFiltersButton onClear={onClear} /> : null}\n </div>\n\n <Sheet open={sheetOpen} onOpenChange={setSheetOpen}>\n <SheetTrigger asChild>\n <Button\n type=\"button\"\n variant=\"secondary\"\n size=\"sm\"\n iconLeft=\"filterLine\"\n className=\"md:hidden\"\n >\n Filters\n </Button>\n </SheetTrigger>\n <SheetContent side=\"bottom\" aria-describedby={undefined}>\n <SheetHeader>\n <SheetTitle>Filter runs</SheetTitle>\n </SheetHeader>\n <SheetBody className=\"flex flex-col gap-cluster\">\n <WorkflowRunFilterControls\n search={search}\n facets={facets}\n onChange={onChange}\n stacked\n />\n </SheetBody>\n <SheetFooter>\n <Button\n type=\"button\"\n variant=\"secondary\"\n size=\"sm\"\n disabled={!hasActiveFilters}\n onClick={onClear}\n >\n Clear filters\n </Button>\n <Button type=\"button\" variant=\"primary\" size=\"sm\" onClick={() => setSheetOpen(false)}>\n Show runs\n </Button>\n </SheetFooter>\n </SheetContent>\n </Sheet>\n </div>\n );\n}\n\nfunction WorkflowRunFilterControls({\n search,\n facets,\n onChange,\n stacked = false,\n}: {\n search: WorkflowRunsSearch;\n facets: WorkflowRunFacets;\n onChange: (patch: WorkflowRunFilterPatch) => void;\n stacked?: boolean;\n}) {\n const controlClassName = stacked ? 'w-full max-w-none' : undefined;\n\n return (\n <>\n <WorkflowRunFilterMenu\n label=\"Status\"\n options={STATUS_OPTIONS}\n selected={search.status ?? []}\n onChange={(next) => onChange({status: next as WorkflowRunListStatus[]})}\n emptyMessage=\"No statuses available.\"\n className={controlClassName}\n />\n <WorkflowRunFilterMenu\n label=\"Branch\"\n options={toOptions(facets.branch)}\n selected={search.branch ?? []}\n onChange={(branch) => onChange({branch})}\n emptyMessage=\"No branches in the loaded runs.\"\n className={controlClassName}\n />\n <WorkflowRunFilterMenu\n label=\"Actor\"\n options={toOptions(facets.actor)}\n selected={search.actor ?? []}\n onChange={(actor) => onChange({actor})}\n emptyMessage=\"No actors in the loaded runs.\"\n className={controlClassName}\n />\n <WorkflowRunFilterMenu\n label=\"Event\"\n options={toOptions(facets.event)}\n selected={search.event ?? []}\n onChange={(event) => onChange({event})}\n emptyMessage=\"No events in the loaded runs.\"\n className={controlClassName}\n />\n {stacked ? (\n <div className=\"flex flex-col gap-inline\">\n <Label>Created between</Label>\n <RunDateRangeFilter search={search} onChange={onChange} />\n </div>\n ) : (\n <RunDateRangeFilter search={search} onChange={onChange} />\n )}\n </>\n );\n}\n\nfunction RunDateRangeFilter({\n search,\n onChange,\n}: {\n search: WorkflowRunsSearch;\n onChange: (patch: WorkflowRunFilterPatch) => void;\n}) {\n return (\n <DateRangePicker\n size=\"small\"\n aria-label=\"Filter runs by creation date\"\n // The shared picker renders a value only when both bounds are set, so a one-sided filter\n // would otherwise read as unset. Naming the active bound keeps it visible without\n // inventing the bound the user did not choose.\n placeholder={partialDateLabel(search) ?? 'Any date'}\n dateRange={{\n ...(search.after ? {start: fromCalendarDate(search.after)} : {}),\n ...(search.before ? {end: fromCalendarDate(search.before)} : {}),\n }}\n onDateRangeSelect={(range) =>\n onChange({\n after: range?.start ? toCalendarDate(range.start) : undefined,\n before: range?.end ? toCalendarDate(range.end) : undefined,\n })\n }\n onClear={() => onChange({after: undefined, before: undefined})}\n />\n );\n}\n\nfunction ClearFiltersButton({onClear}: {onClear: () => void}) {\n return (\n <Button\n type=\"button\"\n variant=\"transparentMuted\"\n size=\"sm\"\n iconLeft=\"closeLine\"\n onClick={onClear}\n >\n Clear filters\n </Button>\n );\n}\n\n/** Describes a bound the picker cannot display on its own, or nothing when it can. */\nfunction partialDateLabel(search: WorkflowRunsSearch): string | undefined {\n if (search.after && search.before) return undefined;\n if (search.after) return `From ${search.after}`;\n if (search.before) return `Until ${search.before}`;\n return undefined;\n}\n\nfunction toOptions(values: readonly string[]): WorkflowRunFilterOption[] {\n return values.map((value) => ({value, label: value}));\n}\n\n// The bounds are local calendar dates, matching how each row's date reads, so the picker and\n// the URL agree with what the list shows rather than with UTC.\nfunction toCalendarDate(date: Date): string {\n const month = String(date.getMonth() + 1).padStart(2, '0');\n const day = String(date.getDate()).padStart(2, '0');\n return `${date.getFullYear()}-${month}-${day}`;\n}\n\nfunction fromCalendarDate(value: string): Date | undefined {\n const [year, month, day] = value.split('-').map(Number) as [number, number, number];\n const date = new Date(year, month - 1, day);\n return Number.isNaN(date.getTime()) ? undefined : date;\n}\n"],"names":["Button","DateRangePicker","Icon","Input","Label","Sheet","SheetBody","SheetContent","SheetFooter","SheetHeader","SheetTitle","SheetTrigger","useState","getWorkflowStatusVisual","WORKFLOW_RUN_LIST_STATUSES","WorkflowRunFilterMenu","STATUS_OPTIONS","map","status","value","label","WorkflowRunFilters","search","facets","onChange","onClear","hasActiveFilters","sheetOpen","setSheetOpen","div","className","event","target","placeholder","aria-label","size","iconLeft","name","WorkflowRunFilterControls","ClearFiltersButton","open","onOpenChange","asChild","type","variant","side","aria-describedby","undefined","stacked","disabled","onClick","controlClassName","options","selected","next","emptyMessage","toOptions","branch","actor","RunDateRangeFilter","partialDateLabel","dateRange","after","start","fromCalendarDate","before","end","onDateRangeSelect","range","toCalendarDate","values","date","month","String","getMonth","padStart","day","getDate","getFullYear","year","split","Number","Date","isNaN","getTime"],"mappings":";AAAA,SAAQA,MAAM,QAAO,2BAA2B;AAChD,SAAQC,eAAe,QAAO,sCAAsC;AACpE,SAAQC,IAAI,QAAO,yBAAyB;AAC5C,SAAQC,KAAK,QAAO,0BAA0B;AAC9C,SAAQC,KAAK,QAAO,0BAA0B;AAC9C,SACEC,KAAK,EACLC,SAAS,EACTC,YAAY,EACZC,WAAW,EACXC,WAAW,EACXC,UAAU,EACVC,YAAY,QACP,0BAA0B;AACjC,SAAQC,QAAQ,QAAO,QAAQ;AAC/B,SAAQC,uBAAuB,QAAO,gDAAgD;AACtF,SACEC,0BAA0B,QAIrB,oBAAoB;AAE3B,SAAQC,qBAAqB,QAAqC,gCAAgC;AAElG,MAAMC,iBAA4CF,2BAA2BG,GAAG,CAAC,CAACC,SAAY,CAAA;QAC5FC,OAAOD;QACPE,OAAOP,wBAAwBK,QAAQE,KAAK;IAC9C,CAAA;AAUA;;;;;;CAMC,GACD,OAAO,SAASC,mBAAmB,EACjCC,MAAM,EACNC,MAAM,EACNC,QAAQ,EACRC,OA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AGzD,MAAM6D,KAAK,CAAC,KAAK/D,GAAG,CAACgE;IAChD,MAAMV,OAAO,IAAIW,KAAKH,MAAMP,QAAQ,GAAGI;IACvC,OAAOK,OAAOE,KAAK,CAACZ,KAAKa,OAAO,MAAMrC,YAAYwB;AACpD"}
@@ -12,7 +12,7 @@ const SKELETON_ROW_COUNT = 8;
12
12
  * per the design system's rule against animating frequently-updating data.
13
13
  */ export function WorkflowRunListSkeleton() {
14
14
  return /*#__PURE__*/ _jsx("div", {
15
- className: "@container divide-y divide-border-neutral-base border-t border-border-neutral-base",
15
+ className: "@container divide-y divide-border-neutral-base",
16
16
  role: "status",
17
17
  "aria-label": "Loading runs",
18
18
  children: Array.from({
@@ -27,7 +27,7 @@ const SKELETON_ROW_COUNT = 8;
27
27
  className: "h-12 w-[220px] max-w-[40%]"
28
28
  }),
29
29
  /*#__PURE__*/ _jsx(Skeleton, {
30
- className: "ml-auto hidden h-12 w-96 @min-[1040px]:block"
30
+ className: "ml-auto hidden h-12 w-96 @min-[1200px]:block"
31
31
  }),
32
32
  /*#__PURE__*/ _jsx(Skeleton, {
33
33
  className: "h-12 w-48"
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/workflow-run-list/workflow-run-list-states.tsx"],"sourcesContent":["import type {QueryLoadErrorQuery} from '@shipfox/client-ui';\nimport {Button} from '@shipfox/react-ui/button';\nimport {Callout} from '@shipfox/react-ui/callout';\nimport {EmptyState} from '@shipfox/react-ui/empty-state';\nimport {Skeleton} from '@shipfox/react-ui/skeleton';\nimport {Text} from '@shipfox/react-ui/typography';\nimport {Link} from '@tanstack/react-router';\n\nconst SKELETON_ROW_COUNT = 8;\n\n/**\n * Placeholder rows at the real row height, so the list does not resize under the cursor when\n * the first page lands. Only the initial load renders these: a refetch keeps the rows it has,\n * per the design system's rule against animating frequently-updating data.\n */\nexport function WorkflowRunListSkeleton() {\n return (\n <div\n className=\"@container divide-y divide-border-neutral-base border-t border-border-neutral-base\"\n role=\"status\"\n aria-label=\"Loading runs\"\n >\n {Array.from({length: SKELETON_ROW_COUNT}).map((_, index) => (\n <div\n // biome-ignore lint/suspicious/noArrayIndexKey: skeleton row, stable position\n key={index}\n className=\"flex items-center gap-inline px-row py-row @min-[976px]:h-44 @min-[976px]:py-0\"\n >\n <Skeleton className=\"size-14 shrink-0 rounded-full\" />\n <Skeleton className=\"h-12 w-[220px] max-w-[40%]\" />\n <Skeleton className=\"ml-auto hidden h-12 w-96 @min-[1040px]:block\" />\n <Skeleton className=\"h-12 w-48\" />\n <Skeleton className=\"h-12 w-48\" />\n </div>\n ))}\n </div>\n );\n}\n\n/**\n * Slim non-blocking banner shown when a background refetch fails after a prior success,\n * so the already-loaded rows stay on screen with the retry inline rather than being\n * replaced by a full-placeholder error.\n */\nexport function WorkflowRunListStaleError({query}: {query: QueryLoadErrorQuery}) {\n return (\n <div className=\"pb-[8px]\">\n <Callout role=\"alert\" type=\"error\">\n <div className=\"flex items-center justify-between gap-inline\">\n <Text size=\"xs\">Could not refresh workflow runs.</Text>\n <Button\n type=\"button\"\n size=\"2xs\"\n variant=\"secondary\"\n isLoading={query.isFetching}\n onClick={() => {\n void query.refetch();\n }}\n >\n Retry\n </Button>\n </div>\n </Callout>\n </div>\n );\n}\n\nexport function WorkflowRunListEmpty({\n workspaceSlug,\n projectSlug,\n}: {\n workspaceSlug?: string | undefined;\n projectSlug?: string | undefined;\n}) {\n return (\n <EmptyState\n icon=\"pulseLine\"\n title=\"No runs yet\"\n description=\"Runs from this project's workflows appear here the moment one is launched.\"\n action={\n workspaceSlug && projectSlug ? (\n <Button asChild type=\"button\" size=\"sm\" variant=\"primary\">\n <Link\n to=\"/w/$workspaceSlug/p/$projectSlug/workflows\"\n params={{workspaceSlug, projectSlug}}\n >\n View workflows\n </Link>\n </Button>\n ) : null\n }\n />\n );\n}\n\n/**\n * The filtered-empty state, deliberately distinct from the unfiltered one: someone who\n * filtered their way to nothing needs a way back out, not an onboarding call to action.\n *\n * Its reset is worded as its outcome rather than repeating the toolbar's \"Clear filters\"\n * verbatim, so the two controls on screen read as one action offered twice rather than two\n * different ones. It is also the only reset within reach below `md`, where the toolbar's\n * lives inside the filter sheet.\n */\nexport function WorkflowRunListNoMatches({\n onClear,\n hasNextPage,\n isFetchingNextPage,\n isFetchNextPageError,\n onLoadMore,\n}: {\n onClear: () => void;\n hasNextPage: boolean;\n isFetchingNextPage: boolean;\n isFetchNextPageError: boolean;\n onLoadMore?: () => void;\n}) {\n return (\n <div className=\"flex flex-col gap-inline\">\n {isFetchNextPageError ? (\n <Callout role=\"alert\" type=\"error\">\n Could not load more workflow runs. Try again to continue searching older runs.\n </Callout>\n ) : null}\n <EmptyState\n icon=\"filterOffLine\"\n title={hasNextPage ? 'No matches in loaded history' : 'No matching runs'}\n description={\n hasNextPage\n ? 'No loaded run matches these filters. Load more to search further back.'\n : 'No run matches these filters.'\n }\n action={\n <div className=\"flex flex-wrap justify-center gap-inline\">\n {hasNextPage && onLoadMore ? (\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"primary\"\n isLoading={isFetchingNextPage}\n onClick={onLoadMore}\n >\n Load more runs\n </Button>\n ) : null}\n <Button type=\"button\" size=\"sm\" variant=\"secondary\" onClick={onClear}>\n Show all runs\n </Button>\n </div>\n }\n />\n </div>\n );\n}\n\nexport function WorkflowRunListLoadMore({\n hasNextPage,\n isFetchingNextPage,\n isFetchNextPageError,\n onLoadMore,\n}: {\n hasNextPage: boolean;\n isFetchingNextPage: boolean;\n isFetchNextPageError: boolean;\n onLoadMore?: () => void;\n}) {\n if (!hasNextPage || !onLoadMore) return null;\n\n return (\n <div className=\"flex flex-col items-center gap-inline border-t border-border-neutral-base py-row\">\n {isFetchNextPageError ? (\n <Callout role=\"alert\" type=\"error\">\n Could not load more workflow runs. Try again.\n </Callout>\n ) : null}\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"secondary\"\n isLoading={isFetchingNextPage}\n onClick={onLoadMore}\n >\n Load more runs\n </Button>\n </div>\n );\n}\n"],"names":["Button","Callout","EmptyState","Skeleton","Text","Link","SKELETON_ROW_COUNT","WorkflowRunListSkeleton","div","className","role","aria-label","Array","from","length","map","_","index","WorkflowRunListStaleError","query","type","size","variant","isLoading","isFetching","onClick","refetch","WorkflowRunListEmpty","workspaceSlug","projectSlug","icon","title","description","action","asChild","to","params","WorkflowRunListNoMatches","onClear","hasNextPage","isFetchingNextPage","isFetchNextPageError","onLoadMore","WorkflowRunListLoadMore"],"mappings":";AACA,SAAQA,MAAM,QAAO,2BAA2B;AAChD,SAAQC,OAAO,QAAO,4BAA4B;AAClD,SAAQC,UAAU,QAAO,gCAAgC;AACzD,SAAQC,QAAQ,QAAO,6BAA6B;AACpD,SAAQC,IAAI,QAAO,+BAA+B;AAClD,SAAQC,IAAI,QAAO,yBAAyB;AAE5C,MAAMC,qBAAqB;AAE3B;;;;CAIC,GACD,OAAO,SAASC;IACd,qBACE,KAACC;QACCC,WAAU;QACVC,MAAK;QACLC,cAAW;kBAEVC,MAAMC,IAAI,CAAC;YAACC,QAAQR;QAAkB,GAAGS,GAAG,CAAC,CAACC,GAAGC,sBAChD,MAACT;gBAGCC,WAAU;;kCAEV,KAACN;wBAASM,WAAU;;kCACpB,KAACN;wBAASM,WAAU;;kCACpB,KAACN;wBAASM,WAAU;;kCACpB,KAACN;wBAASM,WAAU;;kCACpB,KAACN;wBAASM,WAAU;;;eAPfQ;;AAYf;AAEA;;;;CAIC,GACD,OAAO,SAASC,0BAA0B,EAACC,KAAK,EAA+B;IAC7E,qBACE,KAACX;QAAIC,WAAU;kBACb,cAAA,KAACR;YAAQS,MAAK;YAAQU,MAAK;sBACzB,cAAA,MAACZ;gBAAIC,WAAU;;kCACb,KAACL;wBAAKiB,MAAK;kCAAK;;kCAChB,KAACrB;wBACCoB,MAAK;wBACLC,MAAK;wBACLC,SAAQ;wBACRC,WAAWJ,MAAMK,UAAU;wBAC3BC,SAAS;4BACP,KAAKN,MAAMO,OAAO;wBACpB;kCACD;;;;;;AAOX;AAEA,OAAO,SAASC,qBAAqB,EACnCC,aAAa,EACbC,WAAW,EAIZ;IACC,qBACE,KAAC3B;QACC4B,MAAK;QACLC,OAAM;QACNC,aAAY;QACZC,QACEL,iBAAiBC,4BACf,KAAC7B;YAAOkC,OAAO;YAACd,MAAK;YAASC,MAAK;YAAKC,SAAQ;sBAC9C,cAAA,KAACjB;gBACC8B,IAAG;gBACHC,QAAQ;oBAACR;oBAAeC;gBAAW;0BACpC;;aAID;;AAIZ;AAEA;;;;;;;;CAQC,GACD,OAAO,SAASQ,yBAAyB,EACvCC,OAAO,EACPC,WAAW,EACXC,kBAAkB,EAClBC,oBAAoB,EACpBC,UAAU,EAOX;IACC,qBACE,MAAClC;QAAIC,WAAU;;YACZgC,qCACC,KAACxC;gBAAQS,MAAK;gBAAQU,MAAK;0BAAQ;iBAGjC;0BACJ,KAAClB;gBACC4B,MAAK;gBACLC,OAAOQ,cAAc,iCAAiC;gBACtDP,aACEO,cACI,2EACA;gBAENN,sBACE,MAACzB;oBAAIC,WAAU;;wBACZ8B,eAAeG,2BACd,KAAC1C;4BACCoB,MAAK;4BACLC,MAAK;4BACLC,SAAQ;4BACRC,WAAWiB;4BACXf,SAASiB;sCACV;6BAGC;sCACJ,KAAC1C;4BAAOoB,MAAK;4BAASC,MAAK;4BAAKC,SAAQ;4BAAYG,SAASa;sCAAS;;;;;;;AAQlF;AAEA,OAAO,SAASK,wBAAwB,EACtCJ,WAAW,EACXC,kBAAkB,EAClBC,oBAAoB,EACpBC,UAAU,EAMX;IACC,IAAI,CAACH,eAAe,CAACG,YAAY,OAAO;IAExC,qBACE,MAAClC;QAAIC,WAAU;;YACZgC,qCACC,KAACxC;gBAAQS,MAAK;gBAAQU,MAAK;0BAAQ;iBAGjC;0BACJ,KAACpB;gBACCoB,MAAK;gBACLC,MAAK;gBACLC,SAAQ;gBACRC,WAAWiB;gBACXf,SAASiB;0BACV;;;;AAKP"}
1
+ {"version":3,"sources":["../../../src/components/workflow-run-list/workflow-run-list-states.tsx"],"sourcesContent":["import type {QueryLoadErrorQuery} from '@shipfox/client-ui';\nimport {Button} from '@shipfox/react-ui/button';\nimport {Callout} from '@shipfox/react-ui/callout';\nimport {EmptyState} from '@shipfox/react-ui/empty-state';\nimport {Skeleton} from '@shipfox/react-ui/skeleton';\nimport {Text} from '@shipfox/react-ui/typography';\nimport {Link} from '@tanstack/react-router';\n\nconst SKELETON_ROW_COUNT = 8;\n\n/**\n * Placeholder rows at the real row height, so the list does not resize under the cursor when\n * the first page lands. Only the initial load renders these: a refetch keeps the rows it has,\n * per the design system's rule against animating frequently-updating data.\n */\nexport function WorkflowRunListSkeleton() {\n return (\n <div\n className=\"@container divide-y divide-border-neutral-base\"\n role=\"status\"\n aria-label=\"Loading runs\"\n >\n {Array.from({length: SKELETON_ROW_COUNT}).map((_, index) => (\n <div\n // biome-ignore lint/suspicious/noArrayIndexKey: skeleton row, stable position\n key={index}\n className=\"flex items-center gap-inline px-row py-row @min-[976px]:h-44 @min-[976px]:py-0\"\n >\n <Skeleton className=\"size-14 shrink-0 rounded-full\" />\n <Skeleton className=\"h-12 w-[220px] max-w-[40%]\" />\n <Skeleton className=\"ml-auto hidden h-12 w-96 @min-[1200px]:block\" />\n <Skeleton className=\"h-12 w-48\" />\n <Skeleton className=\"h-12 w-48\" />\n </div>\n ))}\n </div>\n );\n}\n\n/**\n * Slim non-blocking banner shown when a background refetch fails after a prior success,\n * so the already-loaded rows stay on screen with the retry inline rather than being\n * replaced by a full-placeholder error.\n */\nexport function WorkflowRunListStaleError({query}: {query: QueryLoadErrorQuery}) {\n return (\n <div className=\"pb-[8px]\">\n <Callout role=\"alert\" type=\"error\">\n <div className=\"flex items-center justify-between gap-inline\">\n <Text size=\"xs\">Could not refresh workflow runs.</Text>\n <Button\n type=\"button\"\n size=\"2xs\"\n variant=\"secondary\"\n isLoading={query.isFetching}\n onClick={() => {\n void query.refetch();\n }}\n >\n Retry\n </Button>\n </div>\n </Callout>\n </div>\n );\n}\n\nexport function WorkflowRunListEmpty({\n workspaceSlug,\n projectSlug,\n}: {\n workspaceSlug?: string | undefined;\n projectSlug?: string | undefined;\n}) {\n return (\n <EmptyState\n icon=\"pulseLine\"\n title=\"No runs yet\"\n description=\"Runs from this project's workflows appear here the moment one is launched.\"\n action={\n workspaceSlug && projectSlug ? (\n <Button asChild type=\"button\" size=\"sm\" variant=\"primary\">\n <Link\n to=\"/w/$workspaceSlug/p/$projectSlug/workflows\"\n params={{workspaceSlug, projectSlug}}\n >\n View workflows\n </Link>\n </Button>\n ) : null\n }\n />\n );\n}\n\n/**\n * The filtered-empty state, deliberately distinct from the unfiltered one: someone who\n * filtered their way to nothing needs a way back out, not an onboarding call to action.\n *\n * Its reset is worded as its outcome rather than repeating the toolbar's \"Clear filters\"\n * verbatim, so the two controls on screen read as one action offered twice rather than two\n * different ones. It is also the only reset within reach below `md`, where the toolbar's\n * lives inside the filter sheet.\n */\nexport function WorkflowRunListNoMatches({\n onClear,\n hasNextPage,\n isFetchingNextPage,\n isFetchNextPageError,\n onLoadMore,\n}: {\n onClear: () => void;\n hasNextPage: boolean;\n isFetchingNextPage: boolean;\n isFetchNextPageError: boolean;\n onLoadMore?: () => void;\n}) {\n return (\n <div className=\"flex flex-col gap-inline\">\n {isFetchNextPageError ? (\n <Callout role=\"alert\" type=\"error\">\n Could not load more workflow runs. Try again to continue searching older runs.\n </Callout>\n ) : null}\n <EmptyState\n icon=\"filterOffLine\"\n title={hasNextPage ? 'No matches in loaded history' : 'No matching runs'}\n description={\n hasNextPage\n ? 'No loaded run matches these filters. Load more to search further back.'\n : 'No run matches these filters.'\n }\n action={\n <div className=\"flex flex-wrap justify-center gap-inline\">\n {hasNextPage && onLoadMore ? (\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"primary\"\n isLoading={isFetchingNextPage}\n onClick={onLoadMore}\n >\n Load more runs\n </Button>\n ) : null}\n <Button type=\"button\" size=\"sm\" variant=\"secondary\" onClick={onClear}>\n Show all runs\n </Button>\n </div>\n }\n />\n </div>\n );\n}\n\nexport function WorkflowRunListLoadMore({\n hasNextPage,\n isFetchingNextPage,\n isFetchNextPageError,\n onLoadMore,\n}: {\n hasNextPage: boolean;\n isFetchingNextPage: boolean;\n isFetchNextPageError: boolean;\n onLoadMore?: () => void;\n}) {\n if (!hasNextPage || !onLoadMore) return null;\n\n return (\n <div className=\"flex flex-col items-center gap-inline border-t border-border-neutral-base py-row\">\n {isFetchNextPageError ? (\n <Callout role=\"alert\" type=\"error\">\n Could not load more workflow runs. Try again.\n </Callout>\n ) : null}\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"secondary\"\n isLoading={isFetchingNextPage}\n onClick={onLoadMore}\n >\n Load more runs\n </Button>\n </div>\n );\n}\n"],"names":["Button","Callout","EmptyState","Skeleton","Text","Link","SKELETON_ROW_COUNT","WorkflowRunListSkeleton","div","className","role","aria-label","Array","from","length","map","_","index","WorkflowRunListStaleError","query","type","size","variant","isLoading","isFetching","onClick","refetch","WorkflowRunListEmpty","workspaceSlug","projectSlug","icon","title","description","action","asChild","to","params","WorkflowRunListNoMatches","onClear","hasNextPage","isFetchingNextPage","isFetchNextPageError","onLoadMore","WorkflowRunListLoadMore"],"mappings":";AACA,SAAQA,MAAM,QAAO,2BAA2B;AAChD,SAAQC,OAAO,QAAO,4BAA4B;AAClD,SAAQC,UAAU,QAAO,gCAAgC;AACzD,SAAQC,QAAQ,QAAO,6BAA6B;AACpD,SAAQC,IAAI,QAAO,+BAA+B;AAClD,SAAQC,IAAI,QAAO,yBAAyB;AAE5C,MAAMC,qBAAqB;AAE3B;;;;CAIC,GACD,OAAO,SAASC;IACd,qBACE,KAACC;QACCC,WAAU;QACVC,MAAK;QACLC,cAAW;kBAEVC,MAAMC,IAAI,CAAC;YAACC,QAAQR;QAAkB,GAAGS,GAAG,CAAC,CAACC,GAAGC,sBAChD,MAACT;gBAGCC,WAAU;;kCAEV,KAACN;wBAASM,WAAU;;kCACpB,KAACN;wBAASM,WAAU;;kCACpB,KAACN;wBAASM,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AASC,MAAK;4BAAKC,SAAQ;4BAAYG,SAASa;sCAAS;;;;;;;AAQlF;AAEA,OAAO,SAASK,wBAAwB,EACtCJ,WAAW,EACXC,kBAAkB,EAClBC,oBAAoB,EACpBC,UAAU,EAMX;IACC,IAAI,CAACH,eAAe,CAACG,YAAY,OAAO;IAExC,qBACE,MAAClC;QAAIC,WAAU;;YACZgC,qCACC,KAACxC;gBAAQS,MAAK;gBAAQU,MAAK;0BAAQ;iBAGjC;0BACJ,KAACpB;gBACCoB,MAAK;gBACLC,MAAK;gBACLC,SAAQ;gBACRC,WAAWiB;gBACXf,SAASiB;0BACV;;;;AAKP"}
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-run-list-view.d.ts","sourceRoot":"","sources":["../../../src/components/workflow-run-list/workflow-run-list-view.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAC,wBAAwB,EAAC,MAAM,YAAY,CAAC;AAMzD,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,KAAK,EACL,aAAa,EACb,WAAW,EACX,SAAS,EACT,MAAqB,EACrB,eAAe,EACf,cAAc,EACd,WAAmB,EACnB,kBAA0B,EAC1B,oBAA4B,EAC5B,UAAU,GACX,EAAE,wBAAwB,+BA6D1B"}
1
+ {"version":3,"file":"workflow-run-list-view.d.ts","sourceRoot":"","sources":["../../../src/components/workflow-run-list/workflow-run-list-view.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAC,wBAAwB,EAAC,MAAM,YAAY,CAAC;AAMzD,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,KAAK,EACL,aAAa,EACb,WAAW,EACX,SAAS,EACT,MAAqB,EACrB,eAAe,EACf,cAAc,EACd,WAAmB,EACnB,kBAA0B,EAC1B,oBAA4B,EAC5B,UAAU,GACX,EAAE,wBAAwB,+BAkE1B"}
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Panel, PanelBody, PanelHeader } from '@shipfox/react-ui/panel';
2
3
  import { TimeTickerProvider } from '@shipfox/react-ui/time-ticker';
3
4
  import { Header } from '@shipfox/react-ui/typography';
4
5
  import { cn } from '@shipfox/react-ui/utils';
@@ -37,7 +38,7 @@ export function WorkflowRunListView({ runs, query, workspaceSlug, projectSlug, c
37
38
  reducedMotionIntervalMs: 10_000,
38
39
  children: /*#__PURE__*/ _jsxs("section", {
39
40
  "aria-labelledby": headingId,
40
- className: cn('flex min-h-0 min-w-0 flex-1 flex-col gap-cluster', className),
41
+ className: cn('flex min-h-0 min-w-0 flex-1 flex-col', className),
41
42
  children: [
42
43
  /*#__PURE__*/ _jsx(Header, {
43
44
  id: headingId,
@@ -45,27 +46,38 @@ export function WorkflowRunListView({ runs, query, workspaceSlug, projectSlug, c
45
46
  className: "sr-only",
46
47
  children: "Workflow runs"
47
48
  }),
48
- /*#__PURE__*/ _jsx(WorkflowRunFilters, {
49
- search: currentSearch,
50
- facets: facets,
51
- onChange: handleFiltersChange,
52
- onClear: handleClearFilters,
53
- hasActiveFilters: hasActiveFilters
54
- }),
55
- /*#__PURE__*/ _jsx(WorkflowRunListContent, {
56
- query: query,
57
- totalRuns: runs.length,
58
- runs: filteredRuns,
59
- workspaceSlug: workspaceSlug,
60
- projectSlug: projectSlug,
61
- hasActiveFilters: hasActiveFilters,
62
- onClearFilters: handleClearFilters,
63
- hasNextPage: hasNextPage,
64
- isFetchingNextPage: isFetchingNextPage,
65
- isFetchNextPageError: isFetchNextPageError,
66
- ...onLoadMore ? {
67
- onLoadMore
68
- } : {}
49
+ /*#__PURE__*/ _jsxs(Panel, {
50
+ className: "min-h-0 flex-1",
51
+ children: [
52
+ /*#__PURE__*/ _jsx(PanelHeader, {
53
+ className: "flex-wrap",
54
+ children: /*#__PURE__*/ _jsx(WorkflowRunFilters, {
55
+ search: currentSearch,
56
+ facets: facets,
57
+ onChange: handleFiltersChange,
58
+ onClear: handleClearFilters,
59
+ hasActiveFilters: hasActiveFilters
60
+ })
61
+ }),
62
+ /*#__PURE__*/ _jsx(PanelBody, {
63
+ className: "min-h-0 flex-1",
64
+ children: /*#__PURE__*/ _jsx(WorkflowRunListContent, {
65
+ query: query,
66
+ totalRuns: runs.length,
67
+ runs: filteredRuns,
68
+ workspaceSlug: workspaceSlug,
69
+ projectSlug: projectSlug,
70
+ hasActiveFilters: hasActiveFilters,
71
+ onClearFilters: handleClearFilters,
72
+ hasNextPage: hasNextPage,
73
+ isFetchingNextPage: isFetchingNextPage,
74
+ isFetchNextPageError: isFetchNextPageError,
75
+ ...onLoadMore ? {
76
+ onLoadMore
77
+ } : {}
78
+ })
79
+ })
80
+ ]
69
81
  })
70
82
  ]
71
83
  })
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/workflow-run-list/workflow-run-list-view.tsx"],"sourcesContent":["import {TimeTickerProvider} from '@shipfox/react-ui/time-ticker';\nimport {Header} from '@shipfox/react-ui/typography';\nimport {cn} from '@shipfox/react-ui/utils';\nimport {useId, useMemo, useState} from 'react';\nimport {\n applyWorkflowRunFilterPatch,\n clearWorkflowRunFilters,\n hasWorkflowRunFilters,\n type WorkflowRunFilterPatch,\n type WorkflowRunsSearch,\n} from '#routes/inputs.js';\nimport {runMatchesFilters, workflowRunFacets} from './run-display.js';\nimport type {WorkflowRunListViewProps} from './types.js';\nimport {WorkflowRunFilters} from './workflow-run-filters.js';\nimport {WorkflowRunListContent} from './workflow-run-list-content.js';\n\nconst EMPTY_SEARCH: WorkflowRunsSearch = {};\n\nexport function WorkflowRunListView({\n runs,\n query,\n workspaceSlug,\n projectSlug,\n className,\n search = EMPTY_SEARCH,\n onFiltersChange,\n onClearFilters,\n hasNextPage = false,\n isFetchingNextPage = false,\n isFetchNextPageError = false,\n onLoadMore,\n}: WorkflowRunListViewProps) {\n const headingId = useId();\n const [localSearch, setLocalSearch] = useState<WorkflowRunsSearch>(search);\n const currentSearch = onFiltersChange ? search : localSearch;\n\n const filteredRuns = useMemo(\n () => runs.filter((run) => runMatchesFilters(run, currentSearch)),\n [runs, currentSearch],\n );\n const facets = useMemo(() => workflowRunFacets(runs, currentSearch), [runs, currentSearch]);\n const hasActiveFilters = hasWorkflowRunFilters(currentSearch);\n\n function handleFiltersChange(patch: WorkflowRunFilterPatch) {\n if (onFiltersChange) onFiltersChange(patch);\n else setLocalSearch((previous) => applyWorkflowRunFilterPatch(previous, patch));\n }\n\n function handleClearFilters() {\n // Uncontrolled, the view owns the filters, so it clears them itself and still reports the\n // change; a caller that passes only `onClearFilters` would otherwise see nothing happen.\n if (!onFiltersChange) setLocalSearch(clearWorkflowRunFilters);\n else if (!onClearFilters) onFiltersChange(CLEAR_ALL_FILTERS);\n onClearFilters?.();\n }\n\n return (\n <TimeTickerProvider intervalMs={1000} reducedMotionIntervalMs={10_000}>\n <section\n aria-labelledby={headingId}\n className={cn('flex min-h-0 min-w-0 flex-1 flex-col gap-cluster', className)}\n >\n {/* The tab strip above already reads \"Runs\", so the page heading is for structure and\n assistive tech rather than a second visible title competing with it. */}\n <Header id={headingId} variant=\"h1\" className=\"sr-only\">\n Workflow runs\n </Header>\n\n <WorkflowRunFilters\n search={currentSearch}\n facets={facets}\n onChange={handleFiltersChange}\n onClear={handleClearFilters}\n hasActiveFilters={hasActiveFilters}\n />\n\n <WorkflowRunListContent\n query={query}\n totalRuns={runs.length}\n runs={filteredRuns}\n workspaceSlug={workspaceSlug}\n projectSlug={projectSlug}\n hasActiveFilters={hasActiveFilters}\n onClearFilters={handleClearFilters}\n hasNextPage={hasNextPage}\n isFetchingNextPage={isFetchingNextPage}\n isFetchNextPageError={isFetchNextPageError}\n {...(onLoadMore ? {onLoadMore} : {})}\n />\n </section>\n </TimeTickerProvider>\n );\n}\n\nconst CLEAR_ALL_FILTERS: WorkflowRunFilterPatch = {\n search: undefined,\n status: undefined,\n branch: undefined,\n actor: undefined,\n event: undefined,\n after: undefined,\n before: undefined,\n};\n"],"names":["TimeTickerProvider","Header","cn","useId","useMemo","useState","applyWorkflowRunFilterPatch","clearWorkflowRunFilters","hasWorkflowRunFilters","runMatchesFilters","workflowRunFacets","WorkflowRunFilters","WorkflowRunListContent","EMPTY_SEARCH","WorkflowRunListView","runs","query","workspaceSlug","projectSlug","className","search","onFiltersChange","onClearFilters","hasNextPage","isFetchingNextPage","isFetchNextPageError","onLoadMore","headingId","localSearch","setLocalSearch","currentSearch","filteredRuns","filter","run","facets","hasActiveFilters","handleFiltersChange","patch","previous","handleClearFilters","CLEAR_ALL_FILTERS","intervalMs","reducedMotionIntervalMs","section","aria-labelledby","id","variant","onChange","onClear","totalRuns","length","undefined","status","branch","actor","event","after","before"],"mappings":";AAAA,SAAQA,kBAAkB,QAAO,gCAAgC;AACjE,SAAQC,MAAM,QAAO,+BAA+B;AACpD,SAAQC,EAAE,QAAO,0BAA0B;AAC3C,SAAQC,KAAK,EAAEC,OAAO,EAAEC,QAAQ,QAAO,QAAQ;AAC/C,SACEC,2BAA2B,EAC3BC,uBAAuB,EACvBC,qBAAqB,QAGhB,oBAAoB;AAC3B,SAAQC,iBAAiB,EAAEC,iBAAiB,QAAO,mBAAmB;AAEtE,SAAQC,kBAAkB,QAAO,4BAA4B;AAC7D,SAAQC,sBAAsB,QAAO,iCAAiC;AAEtE,MAAMC,eAAmC,CAAC;AAE1C,OAAO,SAASC,oBAAoB,EAClCC,IAAI,EACJC,KAAK,EACLC,aAAa,EACbC,WAAW,EACXC,SAAS,EACTC,SAASP,YAAY,EACrBQ,eAAe,EACfC,cAAc,EACdC,cAAc,KAAK,EACnBC,qBAAqB,KAAK,EAC1BC,uBAAuB,KAAK,EAC5BC,UAAU,EACe;IACzB,MAAMC,YAAYxB;IAClB,MAAM,CAACyB,aAAaC,eAAe,GAAGxB,SAA6Be;IACnE,MAAMU,gBAAgBT,kBAAkBD,SAASQ;IAEjD,MAAMG,eAAe3B,QACnB,IAAMW,KAAKiB,MAAM,CAAC,CAACC,MAAQxB,kBAAkBwB,KAAKH,iBAClD;QAACf;QAAMe;KAAc;IAEvB,MAAMI,SAAS9B,QAAQ,IAAMM,kBAAkBK,MAAMe,gBAAgB;QAACf;QAAMe;KAAc;IAC1F,MAAMK,mBAAmB3B,sBAAsBsB;IAE/C,SAASM,oBAAoBC,KAA6B;QACxD,IAAIhB,iBAAiBA,gBAAgBgB;aAChCR,eAAe,CAACS,WAAahC,4BAA4BgC,UAAUD;IAC1E;IAEA,SAASE;QACP,0FAA0F;QAC1F,yFAAyF;QACzF,IAAI,CAAClB,iBAAiBQ,eAAetB;aAChC,IAAI,CAACe,gBAAgBD,gBAAgBmB;QAC1ClB;IACF;IAEA,qBACE,KAACtB;QAAmByC,YAAY;QAAMC,yBAAyB;kBAC7D,cAAA,MAACC;YACCC,mBAAiBjB;YACjBR,WAAWjB,GAAG,oDAAoDiB;;8BAIlE,KAAClB;oBAAO4C,IAAIlB;oBAAWmB,SAAQ;oBAAK3B,WAAU;8BAAU;;8BAIxD,KAACR;oBACCS,QAAQU;oBACRI,QAAQA;oBACRa,UAAUX;oBACVY,SAAST;oBACTJ,kBAAkBA;;8BAGpB,KAACvB;oBACCI,OAAOA;oBACPiC,WAAWlC,KAAKmC,MAAM;oBACtBnC,MAAMgB;oBACNd,eAAeA;oBACfC,aAAaA;oBACbiB,kBAAkBA;oBAClBb,gBAAgBiB;oBAChBhB,aAAaA;oBACbC,oBAAoBA;oBACpBC,sBAAsBA;oBACrB,GAAIC,aAAa;wBAACA;oBAAU,IAAI,CAAC,CAAC;;;;;AAK7C;AAEA,MAAMc,oBAA4C;IAChDpB,QAAQ+B;IACRC,QAAQD;IACRE,QAAQF;IACRG,OAAOH;IACPI,OAAOJ;IACPK,OAAOL;IACPM,QAAQN;AACV"}
1
+ {"version":3,"sources":["../../../src/components/workflow-run-list/workflow-run-list-view.tsx"],"sourcesContent":["import {Panel, PanelBody, PanelHeader} from '@shipfox/react-ui/panel';\nimport {TimeTickerProvider} from '@shipfox/react-ui/time-ticker';\nimport {Header} from '@shipfox/react-ui/typography';\nimport {cn} from '@shipfox/react-ui/utils';\nimport {useId, useMemo, useState} from 'react';\nimport {\n applyWorkflowRunFilterPatch,\n clearWorkflowRunFilters,\n hasWorkflowRunFilters,\n type WorkflowRunFilterPatch,\n type WorkflowRunsSearch,\n} from '#routes/inputs.js';\nimport {runMatchesFilters, workflowRunFacets} from './run-display.js';\nimport type {WorkflowRunListViewProps} from './types.js';\nimport {WorkflowRunFilters} from './workflow-run-filters.js';\nimport {WorkflowRunListContent} from './workflow-run-list-content.js';\n\nconst EMPTY_SEARCH: WorkflowRunsSearch = {};\n\nexport function WorkflowRunListView({\n runs,\n query,\n workspaceSlug,\n projectSlug,\n className,\n search = EMPTY_SEARCH,\n onFiltersChange,\n onClearFilters,\n hasNextPage = false,\n isFetchingNextPage = false,\n isFetchNextPageError = false,\n onLoadMore,\n}: WorkflowRunListViewProps) {\n const headingId = useId();\n const [localSearch, setLocalSearch] = useState<WorkflowRunsSearch>(search);\n const currentSearch = onFiltersChange ? search : localSearch;\n\n const filteredRuns = useMemo(\n () => runs.filter((run) => runMatchesFilters(run, currentSearch)),\n [runs, currentSearch],\n );\n const facets = useMemo(() => workflowRunFacets(runs, currentSearch), [runs, currentSearch]);\n const hasActiveFilters = hasWorkflowRunFilters(currentSearch);\n\n function handleFiltersChange(patch: WorkflowRunFilterPatch) {\n if (onFiltersChange) onFiltersChange(patch);\n else setLocalSearch((previous) => applyWorkflowRunFilterPatch(previous, patch));\n }\n\n function handleClearFilters() {\n // Uncontrolled, the view owns the filters, so it clears them itself and still reports the\n // change; a caller that passes only `onClearFilters` would otherwise see nothing happen.\n if (!onFiltersChange) setLocalSearch(clearWorkflowRunFilters);\n else if (!onClearFilters) onFiltersChange(CLEAR_ALL_FILTERS);\n onClearFilters?.();\n }\n\n return (\n <TimeTickerProvider intervalMs={1000} reducedMotionIntervalMs={10_000}>\n <section\n aria-labelledby={headingId}\n className={cn('flex min-h-0 min-w-0 flex-1 flex-col', className)}\n >\n {/* The tab strip above already reads \"Runs\", so the page heading is for structure and\n assistive tech rather than a second visible title competing with it. */}\n <Header id={headingId} variant=\"h1\" className=\"sr-only\">\n Workflow runs\n </Header>\n\n <Panel className=\"min-h-0 flex-1\">\n <PanelHeader className=\"flex-wrap\">\n <WorkflowRunFilters\n search={currentSearch}\n facets={facets}\n onChange={handleFiltersChange}\n onClear={handleClearFilters}\n hasActiveFilters={hasActiveFilters}\n />\n </PanelHeader>\n <PanelBody className=\"min-h-0 flex-1\">\n <WorkflowRunListContent\n query={query}\n totalRuns={runs.length}\n runs={filteredRuns}\n workspaceSlug={workspaceSlug}\n projectSlug={projectSlug}\n hasActiveFilters={hasActiveFilters}\n onClearFilters={handleClearFilters}\n hasNextPage={hasNextPage}\n isFetchingNextPage={isFetchingNextPage}\n isFetchNextPageError={isFetchNextPageError}\n {...(onLoadMore ? {onLoadMore} : {})}\n />\n </PanelBody>\n </Panel>\n </section>\n </TimeTickerProvider>\n );\n}\n\nconst CLEAR_ALL_FILTERS: WorkflowRunFilterPatch = {\n search: undefined,\n status: undefined,\n branch: undefined,\n actor: undefined,\n event: undefined,\n after: undefined,\n before: undefined,\n};\n"],"names":["Panel","PanelBody","PanelHeader","TimeTickerProvider","Header","cn","useId","useMemo","useState","applyWorkflowRunFilterPatch","clearWorkflowRunFilters","hasWorkflowRunFilters","runMatchesFilters","workflowRunFacets","WorkflowRunFilters","WorkflowRunListContent","EMPTY_SEARCH","WorkflowRunListView","runs","query","workspaceSlug","projectSlug","className","search","onFiltersChange","onClearFilters","hasNextPage","isFetchingNextPage","isFetchNextPageError","onLoadMore","headingId","localSearch","setLocalSearch","currentSearch","filteredRuns","filter","run","facets","hasActiveFilters","handleFiltersChange","patch","previous","handleClearFilters","CLEAR_ALL_FILTERS","intervalMs","reducedMotionIntervalMs","section","aria-labelledby","id","variant","onChange","onClear","totalRuns","length","undefined","status","branch","actor","event","after","before"],"mappings":";AAAA,SAAQA,KAAK,EAAEC,SAAS,EAAEC,WAAW,QAAO,0BAA0B;AACtE,SAAQC,kBAAkB,QAAO,gCAAgC;AACjE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mBAAiBjB;YACjBR,WAAWjB,GAAG,wCAAwCiB;;8BAItD,KAAClB;oBAAO4C,IAAIlB;oBAAWmB,SAAQ;oBAAK3B,WAAU;8BAAU;;8BAIxD,MAACtB;oBAAMsB,WAAU;;sCACf,KAACpB;4BAAYoB,WAAU;sCACrB,cAAA,KAACR;gCACCS,QAAQU;gCACRI,QAAQA;gCACRa,UAAUX;gCACVY,SAAST;gCACTJ,kBAAkBA;;;sCAGtB,KAACrC;4BAAUqB,WAAU;sCACnB,cAAA,KAACP;gCACCI,OAAOA;gCACPiC,WAAWlC,KAAKmC,MAAM;gCACtBnC,MAAMgB;gCACNd,eAAeA;gCACfC,aAAaA;gCACbiB,kBAAkBA;gCAClBb,gBAAgBiB;gCAChBhB,aAAaA;gCACbC,oBAAoBA;gCACpBC,sBAAsBA;gCACrB,GAAIC,aAAa;oCAACA;gCAAU,IAAI,CAAC,CAAC;;;;;;;;AAOjD;AAEA,MAAMc,oBAA4C;IAChDpB,QAAQ+B;IACRC,QAAQD;IACRE,QAAQF;IACRG,OAAOH;IACPI,OAAOJ;IACPK,OAAOL;IACPM,QAAQN;AACV"}
@@ -12,9 +12,9 @@ export declare function WorkflowRunRowList({ runs, workspaceSlug, projectSlug, }
12
12
  * drops beneath. The numeric columns are fixed-width so duration and time form real columns
13
13
  * down the list rather than tracking each row's name length.
14
14
  *
15
- * The thresholds are the container widths the spec's viewport breakpoints produce, given a
16
- * column capped at 1120px with 24px of page padding on each side: a 1280px viewport leaves
17
- * the row 1072px, and a 1024px viewport leaves it 976px.
15
+ * The 976px threshold keeps identity and provenance on one line; below it, provenance drops
16
+ * beneath the identity. The 1200px threshold keeps the full job preview and numeric columns
17
+ * readable together; below it, the strip is hidden so the numeric columns remain aligned.
18
18
  */
19
19
  export declare function WorkflowRunRow({ run, workspaceSlug, projectSlug, }: {
20
20
  run: WorkflowRunListItem;
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-run-row.d.ts","sourceRoot":"","sources":["../../../src/components/workflow-run-list/workflow-run-row.tsx"],"names":[],"mappings":"AAiBA,OAAO,EACL,KAAK,mBAAmB,EAIzB,MAAM,uBAAuB,CAAC;AAI/B,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,aAAa,EACb,WAAW,GACZ,EAAE;IACD,IAAI,EAAE,mBAAmB,EAAE,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC,+BAaA;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,EAC7B,GAAG,EACH,aAAa,EACb,WAAW,GACZ,EAAE;IACD,GAAG,EAAE,mBAAmB,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC,+BA4FA"}
1
+ {"version":3,"file":"workflow-run-row.d.ts","sourceRoot":"","sources":["../../../src/components/workflow-run-list/workflow-run-row.tsx"],"names":[],"mappings":"AAiBA,OAAO,EACL,KAAK,mBAAmB,EAIzB,MAAM,uBAAuB,CAAC;AAI/B,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,aAAa,EACb,WAAW,GACZ,EAAE;IACD,IAAI,EAAE,mBAAmB,EAAE,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC,+BAaA;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,EAC7B,GAAG,EACH,aAAa,EACb,WAAW,GACZ,EAAE;IACD,GAAG,EAAE,mBAAmB,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC,+BAgGA"}
@@ -12,13 +12,13 @@ import { getWorkflowStatusVisual } from '#components/workflow-status/status-visu
12
12
  import { WorkflowStatusIcon } from '#components/workflow-status/workflow-status-icon.js';
13
13
  import { workflowRunActor, workflowRunBranchLabel, workflowRunCommitLabel } from '#core/workflow-run.js';
14
14
  import { withoutWorkflowRunSelectionSearch } from '#core/workflow-run-url-state.js';
15
- import { JobStatusStrip, jobStatusSummary } from './job-status-strip.js';
15
+ import { JOB_STATUS_STRIP_WIDTH, JobStatusStrip, jobStatusSummary } from './job-status-strip.js';
16
16
  export function WorkflowRunRowList({ runs, workspaceSlug, projectSlug }) {
17
- return(// A container, not the viewport, drives the row's breakpoints. The list is capped at
18
- // 1120px inside a wider page, so what a row can afford is its own width; keying off the
19
- // viewport would keep the job strip hidden on a wide screen or crush it on a narrow one.
17
+ return(// A container, not the viewport, drives the row's breakpoints. What a row can afford is its
18
+ // own width; keying off the viewport would keep the job strip hidden on a wide screen or
19
+ // crush it on a narrow one.
20
20
  /*#__PURE__*/ _jsx("ul", {
21
- className: "@container divide-y divide-border-neutral-base border-t border-border-neutral-base",
21
+ className: "@container divide-y divide-border-neutral-base",
22
22
  children: runs.map((run)=>/*#__PURE__*/ _jsx("li", {
23
23
  children: /*#__PURE__*/ _jsx(WorkflowRunRow, {
24
24
  run: run,
@@ -36,9 +36,9 @@ export function WorkflowRunRowList({ runs, workspaceSlug, projectSlug }) {
36
36
  * drops beneath. The numeric columns are fixed-width so duration and time form real columns
37
37
  * down the list rather than tracking each row's name length.
38
38
  *
39
- * The thresholds are the container widths the spec's viewport breakpoints produce, given a
40
- * column capped at 1120px with 24px of page padding on each side: a 1280px viewport leaves
41
- * the row 1072px, and a 1024px viewport leaves it 976px.
39
+ * The 976px threshold keeps identity and provenance on one line; below it, provenance drops
40
+ * beneath the identity. The 1200px threshold keeps the full job preview and numeric columns
41
+ * readable together; below it, the strip is hidden so the numeric columns remain aligned.
42
42
  */ export function WorkflowRunRow({ run, workspaceSlug, projectSlug }) {
43
43
  const duration = run.runAttempt.displayDuration;
44
44
  const hasStarted = run.jobs.hasStartedJobExecution;
@@ -97,7 +97,10 @@ export function WorkflowRunRowList({ runs, workspaceSlug, projectSlug }) {
97
97
  className: "flex shrink-0 items-center gap-cluster",
98
98
  children: [
99
99
  /*#__PURE__*/ _jsx("span", {
100
- className: "hidden w-160 @min-[1040px]:flex",
100
+ className: "hidden w-max shrink-0 @min-[1200px]:flex",
101
+ style: {
102
+ minWidth: JOB_STATUS_STRIP_WIDTH
103
+ },
101
104
  children: /*#__PURE__*/ _jsx(JobStatusStrip, {
102
105
  jobs: run.jobs
103
106
  })
@@ -122,7 +125,7 @@ export function WorkflowRunRowList({ runs, workspaceSlug, projectSlug }) {
122
125
  });
123
126
  // Rows run edge to edge inside the list's scroll container, which would clip the standard
124
127
  // outset focus ring, so this one is inset per the design system's focus-ring rule.
125
- const rowClassName = 'flex w-full min-w-0 items-center gap-inline px-row py-row text-left transition-colors hover:bg-background-components-hover focus-visible:shadow-[inset_0_0_0_2px_var(--color-primary-500)] focus-visible:outline-none @min-[976px]:h-44 @min-[976px]:py-0';
128
+ const rowClassName = 'flex w-full min-w-0 items-center gap-inline px-row py-row text-left transition-colors hover:bg-background-neutral-hover focus-visible:shadow-[inset_0_0_0_2px_var(--color-primary-500)] focus-visible:outline-none @min-[976px]:h-44 @min-[976px]:py-0';
126
129
  // Optimistic manual runs (temp-<uuid>) have no detail page until the canonical row
127
130
  // replaces them on the next poll, so they render non-interactively instead of as a link
128
131
  // that would navigate to a workflow run id the detail route rejects.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/workflow-run-list/workflow-run-row.tsx"],"sourcesContent":["import {TriggerSourceIcon} from '@shipfox/client-triggers';\nimport {Icon, type IconName} from '@shipfox/react-ui/icon';\nimport {RelativeTime} from '@shipfox/react-ui/relative-time';\nimport {Tooltip, TooltipContent, TooltipTrigger} from '@shipfox/react-ui/tooltip';\nimport {Code, Text} from '@shipfox/react-ui/typography';\nimport {cn} from '@shipfox/react-ui/utils';\nimport {Link} from '@tanstack/react-router';\nimport {\n useWorkflowRunDurationAccessibleLabel,\n WorkflowRunDurationLabel,\n} from '#components/workflow-run-duration-label.js';\nimport {\n formatWorkflowRunNumberLabel,\n WorkflowRunNumberLabel,\n} from '#components/workflow-run-number-label.js';\nimport {getWorkflowStatusVisual} from '#components/workflow-status/status-visuals.js';\nimport {WorkflowStatusIcon} from '#components/workflow-status/workflow-status-icon.js';\nimport {\n type WorkflowRunListItem,\n workflowRunActor,\n workflowRunBranchLabel,\n workflowRunCommitLabel,\n} from '#core/workflow-run.js';\nimport {withoutWorkflowRunSelectionSearch} from '#core/workflow-run-url-state.js';\nimport {JobStatusStrip, jobStatusSummary} from './job-status-strip.js';\n\nexport function WorkflowRunRowList({\n runs,\n workspaceSlug,\n projectSlug,\n}: {\n runs: WorkflowRunListItem[];\n workspaceSlug?: string | undefined;\n projectSlug?: string | undefined;\n}) {\n return (\n // A container, not the viewport, drives the row's breakpoints. The list is capped at\n // 1120px inside a wider page, so what a row can afford is its own width; keying off the\n // viewport would keep the job strip hidden on a wide screen or crush it on a narrow one.\n <ul className=\"@container divide-y divide-border-neutral-base border-t border-border-neutral-base\">\n {runs.map((run) => (\n <li key={run.id}>\n <WorkflowRunRow run={run} workspaceSlug={workspaceSlug} projectSlug={projectSlug} />\n </li>\n ))}\n </ul>\n );\n}\n\n/**\n * One run at full width.\n *\n * A single 44px line once the list is at least 976px wide, reflowing to two lines below that:\n * the identity and the numerics keep their places on line one, and the provenance metadata\n * drops beneath. The numeric columns are fixed-width so duration and time form real columns\n * down the list rather than tracking each row's name length.\n *\n * The thresholds are the container widths the spec's viewport breakpoints produce, given a\n * column capped at 1120px with 24px of page padding on each side: a 1280px viewport leaves\n * the row 1072px, and a 1024px viewport leaves it 976px.\n */\nexport function WorkflowRunRow({\n run,\n workspaceSlug,\n projectSlug,\n}: {\n run: WorkflowRunListItem;\n workspaceSlug?: string | undefined;\n projectSlug?: string | undefined;\n}) {\n const duration = run.runAttempt.displayDuration;\n const hasStarted = run.jobs.hasStartedJobExecution;\n const durationLabel = useWorkflowRunDurationAccessibleLabel(duration, hasStarted);\n const status = run.runAttempt.status;\n const statusLabel = getWorkflowStatusVisual(status).label;\n const runNumberLabel = formatWorkflowRunNumberLabel(run);\n const branch = workflowRunBranchLabel(run);\n const commit = workflowRunCommitLabel(run);\n const actor = workflowRunActor(run);\n\n const body = (\n <>\n <WorkflowStatusIcon status={status} size={14} className=\"shrink-0\" />\n\n <div className=\"flex min-w-0 flex-1 flex-col gap-tight @min-[976px]:flex-row @min-[976px]:items-center @min-[976px]:gap-cluster\">\n <span className=\"flex min-w-0 items-center gap-inline @min-[976px]:flex-1\">\n <Code variant=\"label\" bold className=\"truncate text-foreground-neutral-base\">\n {run.name}\n </Code>\n {run.number !== null ? <WorkflowRunNumberLabel run={run} /> : null}\n </span>\n\n <span className=\"flex min-w-0 flex-wrap items-center gap-inline text-foreground-neutral-subtle @min-[976px]:flex-nowrap @min-[976px]:shrink-0\">\n {run.triggerDisplayLabel ? <TriggerLabel run={run} /> : null}\n {branch ? <BranchLabel branch={branch} isPullRequest={branch.startsWith('#')} /> : null}\n {commit ? <CommitLabel commit={commit} /> : null}\n {actor ? <ActorLabel actor={actor} /> : null}\n </span>\n </div>\n\n <span className=\"flex shrink-0 items-center gap-cluster\">\n {/* Fixed at the strip's worst case (see MAX_VISIBLE_JOBS) so the overflow count cannot\n paint over the duration, and kept even when a run has no jobs planned yet, so the\n numerics stay in line down the list instead of stepping in and out. */}\n <span className=\"hidden w-160 @min-[1040px]:flex\">\n <JobStatusStrip jobs={run.jobs} />\n </span>\n <span className=\"flex w-64 justify-end\">\n <WorkflowRunDurationLabel duration={duration} hasStarted={hasStarted} />\n </span>\n <Code\n variant=\"label\"\n className=\"w-64 shrink-0 text-right tabular-nums text-foreground-neutral-muted\"\n >\n <RelativeTime value={run.createdAt} />\n </Code>\n </span>\n </>\n );\n\n // Rows run edge to edge inside the list's scroll container, which would clip the standard\n // outset focus ring, so this one is inset per the design system's focus-ring rule.\n const rowClassName =\n 'flex w-full min-w-0 items-center gap-inline px-row py-row text-left transition-colors hover:bg-background-components-hover focus-visible:shadow-[inset_0_0_0_2px_var(--color-primary-500)] focus-visible:outline-none @min-[976px]:h-44 @min-[976px]:py-0';\n\n // Optimistic manual runs (temp-<uuid>) have no detail page until the canonical row\n // replaces them on the next poll, so they render non-interactively instead of as a link\n // that would navigate to a workflow run id the detail route rejects.\n if (run.isTemporary || !workspaceSlug || !projectSlug) {\n return <div className={rowClassName}>{body}</div>;\n }\n\n return (\n <Link\n to=\"/w/$workspaceSlug/p/$projectSlug/runs/$workflowRunId\"\n params={{workspaceSlug, projectSlug, workflowRunId: run.id}}\n search={\n ((previous: Record<string, unknown>) =>\n withoutWorkflowRunSelectionSearch(previous)) as never\n }\n // An aria-label is the link's whole accessible name, so anything inside the row that\n // carries its own label (the status glyph, the job strip) goes unspoken unless it is\n // curated in here. The job breakdown is the reason this list is worth its width, so it\n // belongs in what a tabbing user hears, not only in browse mode.\n aria-label={[\n run.name,\n runNumberLabel,\n statusLabel,\n durationLabel,\n run.triggerLabel,\n branch ? `branch ${branch}` : undefined,\n actor ? `by ${actor}` : undefined,\n run.jobs.total > 0 ? jobStatusSummary(run.jobs) : undefined,\n ]\n .filter((part): part is string => Boolean(part))\n .join(', ')}\n className={rowClassName}\n >\n {body}\n </Link>\n );\n}\n\nfunction TriggerLabel({run}: {run: WorkflowRunListItem}) {\n return (\n <Tooltip>\n <TooltipTrigger asChild>\n <span className=\"flex min-w-0 max-w-[140px] items-center gap-tight outline-none\">\n <TriggerSourceIcon\n provider={run.triggerProvider}\n source={run.triggerSource}\n aria-hidden=\"true\"\n className=\"size-12 shrink-0 text-foreground-neutral-muted\"\n />\n <Text as=\"span\" size=\"xs\" className=\"min-w-0 truncate\">\n {run.triggerDisplayLabel}\n </Text>\n </span>\n </TooltipTrigger>\n <TooltipContent>\n <Text as=\"span\" size=\"xs\" className=\"block max-w-[360px] break-words\">\n {run.triggerLabel}\n </Text>\n </TooltipContent>\n </Tooltip>\n );\n}\n\nfunction BranchLabel({branch, isPullRequest}: {branch: string; isPullRequest: boolean}) {\n return (\n <MetadataChip\n icon={isPullRequest ? 'gitPullRequestLine' : 'gitBranchLine'}\n title={isPullRequest ? `Pull request ${branch}` : `Branch ${branch}`}\n className=\"max-w-[180px]\"\n >\n {branch}\n </MetadataChip>\n );\n}\n\nfunction CommitLabel({commit}: {commit: string}) {\n return (\n <MetadataChip icon=\"gitCommitLine\" title={`Commit ${commit}`}>\n {commit}\n </MetadataChip>\n );\n}\n\nfunction ActorLabel({actor}: {actor: string}) {\n return (\n <MetadataChip\n icon=\"userLine\"\n title={`Triggered by ${actor}`}\n // Dropped once the row is two lines, where the provenance line has to stay readable on\n // a phone.\n className=\"hidden max-w-[120px] @min-[976px]:flex\"\n >\n {actor}\n </MetadataChip>\n );\n}\n\n/**\n * A ref, SHA, or handle: monospace because it is content a user copies or pattern-matches,\n * with the icon carrying the kind so the value itself never needs a written label.\n */\nfunction MetadataChip({\n icon,\n title,\n className,\n children,\n}: {\n icon: IconName;\n title: string;\n className?: string | undefined;\n children: string;\n}) {\n return (\n <span className={cn('flex min-w-0 shrink-0 items-center gap-tight', className)} title={title}>\n <Icon name={icon} className=\"size-12 shrink-0 text-foreground-neutral-muted\" aria-hidden />\n <Code as=\"span\" variant=\"label\" className=\"min-w-0 truncate\">\n {children}\n </Code>\n </span>\n );\n}\n"],"names":["TriggerSourceIcon","Icon","RelativeTime","Tooltip","TooltipContent","TooltipTrigger","Code","Text","cn","Link","useWorkflowRunDurationAccessibleLabel","WorkflowRunDurationLabel","formatWorkflowRunNumberLabel","WorkflowRunNumberLabel","getWorkflowStatusVisual","WorkflowStatusIcon","workflowRunActor","workflowRunBranchLabel","workflowRunCommitLabel","withoutWorkflowRunSelectionSearch","JobStatusStrip","jobStatusSummary","WorkflowRunRowList","runs","workspaceSlug","projectSlug","ul","className","map","run","li","WorkflowRunRow","id","duration","runAttempt","displayDuration","hasStarted","jobs","hasStartedJobExecution","durationLabel","status","statusLabel","label","runNumberLabel","branch","commit","actor","body","size","div","span","variant","bold","name","number","triggerDisplayLabel","TriggerLabel","BranchLabel","isPullRequest","startsWith","CommitLabel","ActorLabel","value","createdAt","rowClassName","isTemporary","to","params","workflowRunId","search","previous","aria-label","triggerLabel","undefined","total","filter","part","Boolean","join","asChild","provider","triggerProvider","source","triggerSource","aria-hidden","as","MetadataChip","icon","title","children"],"mappings":";AAAA,SAAQA,iBAAiB,QAAO,2BAA2B;AAC3D,SAAQC,IAAI,QAAsB,yBAAyB;AAC3D,SAAQC,YAAY,QAAO,kCAAkC;AAC7D,SAAQC,OAAO,EAAEC,cAAc,EAAEC,cAAc,QAAO,4BAA4B;AAClF,SAAQC,IAAI,EAAEC,IAAI,QAAO,+BAA+B;AACxD,SAAQC,EAAE,QAAO,0BAA0B;AAC3C,SAAQC,IAAI,QAAO,yBAAyB;AAC5C,SACEC,qCAAqC,EACrCC,wBAAwB,QACnB,6CAA6C;AACpD,SACEC,4BAA4B,EAC5BC,sBAAsB,QACjB,2CAA2C;AAClD,SAAQC,uBAAuB,QAAO,gDAAgD;AACtF,SAAQC,kBAAkB,QAAO,sDAAsD;AACvF,SAEEC,gBAAgB,EAChBC,sBAAsB,EACtBC,sBAAsB,QACjB,wBAAwB;AAC/B,SAAQC,iCAAiC,QAAO,kCAAkC;AAClF,SAAQC,cAAc,EAAEC,gBAAgB,QAAO,wBAAwB;AAEvE,OAAO,SAASC,mBAAmB,EACjCC,IAAI,EACJC,aAAa,EACbC,WAAW,EAKZ;IACC,OACE,qFAAqF;IACrF,wFAAwF;IACxF,yFAAyF;kBACzF,KAACC;QAAGC,WAAU;kBACXJ,KAAKK,GAAG,CAAC,CAACC,oBACT,KAACC;0BACC,cAAA,KAACC;oBAAeF,KAAKA;oBAAKL,eAAeA;oBAAeC,aAAaA;;eAD9DI,IAAIG,EAAE;;AAMvB;AAEA;;;;;;;;;;;CAWC,GACD,OAAO,SAASD,eAAe,EAC7BF,GAAG,EACHL,aAAa,E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f,YAAY,EAACb,MAAM,EAAEc,aAAa,EAA2C;IACpF,qBACE,KAAC4B;QACCC,MAAM7B,gBAAgB,uBAAuB;QAC7C8B,OAAO9B,gBAAgB,CAAC,aAAa,EAAEd,QAAQ,GAAG,CAAC,OAAO,EAAEA,QAAQ;QACpEjB,WAAU;kBAETiB;;AAGP;AAEA,SAASgB,YAAY,EAACf,MAAM,EAAmB;IAC7C,qBACE,KAACyC;QAAaC,MAAK;QAAgBC,OAAO,CAAC,OAAO,EAAE3C,QAAQ;kBACzDA;;AAGP;AAEA,SAASgB,WAAW,EAACf,KAAK,EAAkB;IAC1C,qBACE,KAACwC;QACCC,MAAK;QACLC,OAAO,CAAC,aAAa,EAAE1C,OAAO;QAC9B,uFAAuF;QACvF,WAAW;QACXnB,WAAU;kBAETmB;;AAGP;AAEA;;;CAGC,GACD,SAASwC,aAAa,EACpBC,IAAI,EACJC,KAAK,EACL7D,SAAS,EACT8D,QAAQ,EAMT;IACC,qBACE,MAACvC;QAAKvB,WAAWnB,GAAG,gDAAgDmB;QAAY6D,OAAOA;;0BACrF,KAACvF;gBAAKoD,MAAMkC;gBAAM5D,WAAU;gBAAiDyD,aAAW;;0BACxF,KAAC9E;gBAAK+E,IAAG;gBAAOlC,SAAQ;gBAAQxB,WAAU;0BACvC8D;;;;AAIT"}
1
+ {"version":3,"sources":["../../../src/components/workflow-run-list/workflow-run-row.tsx"],"sourcesContent":["import {TriggerSourceIcon} from '@shipfox/client-triggers';\nimport {Icon, type IconName} from '@shipfox/react-ui/icon';\nimport {RelativeTime} from '@shipfox/react-ui/relative-time';\nimport {Tooltip, TooltipContent, TooltipTrigger} from '@shipfox/react-ui/tooltip';\nimport {Code, Text} from '@shipfox/react-ui/typography';\nimport {cn} from '@shipfox/react-ui/utils';\nimport {Link} from '@tanstack/react-router';\nimport {\n useWorkflowRunDurationAccessibleLabel,\n WorkflowRunDurationLabel,\n} from '#components/workflow-run-duration-label.js';\nimport {\n formatWorkflowRunNumberLabel,\n WorkflowRunNumberLabel,\n} from '#components/workflow-run-number-label.js';\nimport {getWorkflowStatusVisual} from '#components/workflow-status/status-visuals.js';\nimport {WorkflowStatusIcon} from '#components/workflow-status/workflow-status-icon.js';\nimport {\n type WorkflowRunListItem,\n workflowRunActor,\n workflowRunBranchLabel,\n workflowRunCommitLabel,\n} from '#core/workflow-run.js';\nimport {withoutWorkflowRunSelectionSearch} from '#core/workflow-run-url-state.js';\nimport {JOB_STATUS_STRIP_WIDTH, JobStatusStrip, jobStatusSummary} from './job-status-strip.js';\n\nexport function WorkflowRunRowList({\n runs,\n workspaceSlug,\n projectSlug,\n}: {\n runs: WorkflowRunListItem[];\n workspaceSlug?: string | undefined;\n projectSlug?: string | undefined;\n}) {\n return (\n // A container, not the viewport, drives the row's breakpoints. What a row can afford is its\n // own width; keying off the viewport would keep the job strip hidden on a wide screen or\n // crush it on a narrow one.\n <ul className=\"@container divide-y divide-border-neutral-base\">\n {runs.map((run) => (\n <li key={run.id}>\n <WorkflowRunRow run={run} workspaceSlug={workspaceSlug} projectSlug={projectSlug} />\n </li>\n ))}\n </ul>\n );\n}\n\n/**\n * One run at full width.\n *\n * A single 44px line once the list is at least 976px wide, reflowing to two lines below that:\n * the identity and the numerics keep their places on line one, and the provenance metadata\n * drops beneath. The numeric columns are fixed-width so duration and time form real columns\n * down the list rather than tracking each row's name length.\n *\n * The 976px threshold keeps identity and provenance on one line; below it, provenance drops\n * beneath the identity. The 1200px threshold keeps the full job preview and numeric columns\n * readable together; below it, the strip is hidden so the numeric columns remain aligned.\n */\nexport function WorkflowRunRow({\n run,\n workspaceSlug,\n projectSlug,\n}: {\n run: WorkflowRunListItem;\n workspaceSlug?: string | undefined;\n projectSlug?: string | undefined;\n}) {\n const duration = run.runAttempt.displayDuration;\n const hasStarted = run.jobs.hasStartedJobExecution;\n const durationLabel = useWorkflowRunDurationAccessibleLabel(duration, hasStarted);\n const status = run.runAttempt.status;\n const statusLabel = getWorkflowStatusVisual(status).label;\n const runNumberLabel = formatWorkflowRunNumberLabel(run);\n const branch = workflowRunBranchLabel(run);\n const commit = workflowRunCommitLabel(run);\n const actor = workflowRunActor(run);\n\n const body = (\n <>\n <WorkflowStatusIcon status={status} size={14} className=\"shrink-0\" />\n\n <div className=\"flex min-w-0 flex-1 flex-col gap-tight @min-[976px]:flex-row @min-[976px]:items-center @min-[976px]:gap-cluster\">\n <span className=\"flex min-w-0 items-center gap-inline @min-[976px]:flex-1\">\n <Code variant=\"label\" bold className=\"truncate text-foreground-neutral-base\">\n {run.name}\n </Code>\n {run.number !== null ? <WorkflowRunNumberLabel run={run} /> : null}\n </span>\n\n <span className=\"flex min-w-0 flex-wrap items-center gap-inline text-foreground-neutral-subtle @min-[976px]:flex-nowrap @min-[976px]:shrink-0\">\n {run.triggerDisplayLabel ? <TriggerLabel run={run} /> : null}\n {branch ? <BranchLabel branch={branch} isPullRequest={branch.startsWith('#')} /> : null}\n {commit ? <CommitLabel commit={commit} /> : null}\n {actor ? <ActorLabel actor={actor} /> : null}\n </span>\n </div>\n\n <span className=\"flex shrink-0 items-center gap-cluster\">\n {/* Reserve the API preview's full width so the overflow count cannot paint over the\n duration, and keep it even when a run has no jobs planned yet so the numerics stay in\n line down the list instead of stepping in and out. The max-content width expands if\n the payload ever exceeds the current API preview bound. */}\n <span\n className=\"hidden w-max shrink-0 @min-[1200px]:flex\"\n style={{minWidth: JOB_STATUS_STRIP_WIDTH}}\n >\n <JobStatusStrip jobs={run.jobs} />\n </span>\n <span className=\"flex w-64 justify-end\">\n <WorkflowRunDurationLabel duration={duration} hasStarted={hasStarted} />\n </span>\n <Code\n variant=\"label\"\n className=\"w-64 shrink-0 text-right tabular-nums text-foreground-neutral-muted\"\n >\n <RelativeTime value={run.createdAt} />\n </Code>\n </span>\n </>\n );\n\n // Rows run edge to edge inside the list's scroll container, which would clip the standard\n // outset focus ring, so this one is inset per the design system's focus-ring rule.\n const rowClassName =\n 'flex w-full min-w-0 items-center gap-inline px-row py-row text-left transition-colors hover:bg-background-neutral-hover focus-visible:shadow-[inset_0_0_0_2px_var(--color-primary-500)] focus-visible:outline-none @min-[976px]:h-44 @min-[976px]:py-0';\n\n // Optimistic manual runs (temp-<uuid>) have no detail page until the canonical row\n // replaces them on the next poll, so they render non-interactively instead of as a link\n // that would navigate to a workflow run id the detail route rejects.\n if (run.isTemporary || !workspaceSlug || !projectSlug) {\n return <div className={rowClassName}>{body}</div>;\n }\n\n return (\n <Link\n to=\"/w/$workspaceSlug/p/$projectSlug/runs/$workflowRunId\"\n params={{workspaceSlug, projectSlug, workflowRunId: run.id}}\n search={\n ((previous: Record<string, unknown>) =>\n withoutWorkflowRunSelectionSearch(previous)) as never\n }\n // An aria-label is the link's whole accessible name, so anything inside the row that\n // carries its own label (the status glyph, the job strip) goes unspoken unless it is\n // curated in here. The job breakdown is the reason this list is worth its width, so it\n // belongs in what a tabbing user hears, not only in browse mode.\n aria-label={[\n run.name,\n runNumberLabel,\n statusLabel,\n durationLabel,\n run.triggerLabel,\n branch ? `branch ${branch}` : undefined,\n actor ? `by ${actor}` : undefined,\n run.jobs.total > 0 ? jobStatusSummary(run.jobs) : undefined,\n ]\n .filter((part): part is string => Boolean(part))\n .join(', ')}\n className={rowClassName}\n >\n {body}\n </Link>\n );\n}\n\nfunction TriggerLabel({run}: {run: WorkflowRunListItem}) {\n return (\n <Tooltip>\n <TooltipTrigger asChild>\n <span className=\"flex min-w-0 max-w-[140px] items-center gap-tight outline-none\">\n <TriggerSourceIcon\n provider={run.triggerProvider}\n source={run.triggerSource}\n aria-hidden=\"true\"\n className=\"size-12 shrink-0 text-foreground-neutral-muted\"\n />\n <Text as=\"span\" size=\"xs\" className=\"min-w-0 truncate\">\n {run.triggerDisplayLabel}\n </Text>\n </span>\n </TooltipTrigger>\n <TooltipContent>\n <Text as=\"span\" size=\"xs\" className=\"block max-w-[360px] break-words\">\n {run.triggerLabel}\n </Text>\n </TooltipContent>\n </Tooltip>\n );\n}\n\nfunction BranchLabel({branch, isPullRequest}: {branch: string; isPullRequest: boolean}) {\n return (\n <MetadataChip\n icon={isPullRequest ? 'gitPullRequestLine' : 'gitBranchLine'}\n title={isPullRequest ? `Pull request ${branch}` : `Branch ${branch}`}\n className=\"max-w-[180px]\"\n >\n {branch}\n </MetadataChip>\n );\n}\n\nfunction CommitLabel({commit}: {commit: string}) {\n return (\n <MetadataChip icon=\"gitCommitLine\" title={`Commit ${commit}`}>\n {commit}\n </MetadataChip>\n );\n}\n\nfunction ActorLabel({actor}: {actor: string}) {\n return (\n <MetadataChip\n icon=\"userLine\"\n title={`Triggered by ${actor}`}\n // Dropped once the row is two lines, where the provenance line has to stay readable on\n // a phone.\n className=\"hidden max-w-[120px] @min-[976px]:flex\"\n >\n {actor}\n </MetadataChip>\n );\n}\n\n/**\n * A ref, SHA, or handle: monospace because it is content a user copies or pattern-matches,\n * with the icon carrying the kind so the value itself never needs a written label.\n */\nfunction MetadataChip({\n icon,\n title,\n className,\n children,\n}: {\n icon: IconName;\n title: string;\n className?: string | undefined;\n children: string;\n}) {\n return (\n <span className={cn('flex min-w-0 shrink-0 items-center gap-tight', className)} title={title}>\n <Icon name={icon} className=\"size-12 shrink-0 text-foreground-neutral-muted\" aria-hidden />\n <Code as=\"span\" variant=\"label\" className=\"min-w-0 truncate\">\n {children}\n </Code>\n </span>\n );\n}\n"],"names":["TriggerSourceIcon","Icon","RelativeTime","Tooltip","TooltipContent","TooltipTrigger","Code","Text","cn","Link","useWorkflowRunDurationAccessibleLabel","WorkflowRunDurationLabel","formatWorkflowRunNumberLabel","WorkflowRunNumberLabel","getWorkflowStatusVisual","WorkflowStatusIcon","workflowRunActor","workflowRunBranchLabel","workflowRunCommitLabel","withoutWorkflowRunSelectionSearch","JOB_STATUS_STRIP_WIDTH","JobStatusStrip","jobStatusSummary","WorkflowRunRowList","runs","workspaceSlug","projectSlug","ul","className","map","run","li","WorkflowRunRow","id","duration","runAttempt","displayDuration","hasStarted","jobs","hasStartedJobExecution","durationLabel","status","statusLabel","label","runNumberLabel","branch","commit","actor","body","size","div","span","variant","bold","name","number","triggerDisplayLabel","TriggerLabel","BranchLabel","isPullRequest","startsWith","CommitLabel","ActorLabel","style","minWidth","value","createdAt","rowClassName","isTemporary","to","params","workflowRunId","search","previous","aria-label","triggerLabel","undefined","total","filter","part","Boolean","join","asChild","provider","triggerProvider","source","triggerSource","aria-hidden","as","MetadataChip","icon","title","children"],"mappings":";AAAA,SAAQA,iBAAiB,QAAO,2BAA2B;AAC3D,SAAQC,IAAI,QAAsB,yBAAyB;AAC3D,SAAQC,YAAY,QAAO,kCAAkC;AAC7D,SAAQC,OAAO,EAAEC,cAAc,EAAEC,cAAc,QAAO,4BAA4B;AAClF,SAAQC,IAAI,EAAEC,IAAI,QAAO,+BAA+B;AACxD,SAAQC,EAAE,QAAO,0BAA0B;AAC3C,SAAQC,IAAI,QAAO,yBAAyB;AAC5C,SACEC,qCAAqC,EACrCC,wBAAwB,QACnB,6CAA6C;AACpD,SACEC,4BAA4B,EAC5BC,sBAAsB,QACjB,2CAA2C;AAClD,SAAQC,uBAAuB,QAAO,gDAAgD;AACtF,SAAQC,kBAAkB,QAAO,sDAAsD;AACvF,SAEEC,gBAAgB,EAChBC,sBAAsB,EACtBC,sBAAsB,QACjB,wBAAwB;AAC/B,SAAQC,iCAAiC,QAAO,kCAAkC;AAClF,SAAQC,sBAAsB,EAAEC,cAAc,EAAEC,gBAAgB,QAAO,wBAAwB;AAE/F,OAAO,SAASC,mBAAmB,EACjCC,IAAI,EACJC,aAAa,EACbC,WAAW,EAKZ;IACC,OACE,4FAA4F;IAC5F,yFAAyF;IACzF,4BAA4B;kBAC5B,KAACC;QAAGC,WAAU;kBACXJ,KAAKK,GAAG,CAAC,CAACC,oBACT,KAACC;0BACC,cAAA,KAACC;oBAAeF,KAAKA;oBAAKL,eAAeA;oBAAeC,aAAaA;;eAD9DI,IAAIG,EAAE;;AAMvB;AAEA;;;;;;;;;;;CAWC,GACD,OAAO,SAASD,eAAe,EAC7BF,GAAG,EACHL,a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B,WAAU;8BACjCE,IAAI6C,YAAY;;;;;AAK3B;AAEA,SAASjB,YAAY,EAACb,MAAM,EAAEc,aAAa,EAA2C;IACpF,qBACE,KAAC8B;QACCC,MAAM/B,gBAAgB,uBAAuB;QAC7CgC,OAAOhC,gBAAgB,CAAC,aAAa,EAAEd,QAAQ,GAAG,CAAC,OAAO,EAAEA,QAAQ;QACpEjB,WAAU;kBAETiB;;AAGP;AAEA,SAASgB,YAAY,EAACf,MAAM,EAAmB;IAC7C,qBACE,KAAC2C;QAAaC,MAAK;QAAgBC,OAAO,CAAC,OAAO,EAAE7C,QAAQ;kBACzDA;;AAGP;AAEA,SAASgB,WAAW,EAACf,KAAK,EAAkB;IAC1C,qBACE,KAAC0C;QACCC,MAAK;QACLC,OAAO,CAAC,aAAa,EAAE5C,OAAO;QAC9B,uFAAuF;QACvF,WAAW;QACXnB,WAAU;kBAETmB;;AAGP;AAEA;;;CAGC,GACD,SAAS0C,aAAa,EACpBC,IAAI,EACJC,KAAK,EACL/D,SAAS,EACTgE,QAAQ,EAMT;IACC,qBACE,MAACzC;QAAKvB,WAAWpB,GAAG,gDAAgDoB;QAAY+D,OAAOA;;0BACrF,KAAC1F;gBAAKqD,MAAMoC;gBAAM9D,WAAU;gBAAiD2D,aAAW;;0BACxF,KAACjF;gBAAKkF,IAAG;gBAAOpC,SAAQ;gBAAQxB,WAAU;0BACvCgE;;;;AAIT"}
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-run-summary.d.ts","sourceRoot":"","sources":["../../../src/components/workflow-run-summary/workflow-run-summary.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAIL,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EAC1B,MAAM,uBAAuB,CAAC;AAa/B,MAAM,WAAW,uBAAuB;IACtC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,GAAG,EAAE,iBAAiB,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACjC,QAAQ,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;IACpC,YAAY,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACnC,OAAO,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,oBAAoB,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC7D,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC;AAED,wBAAgB,kBAAkB,CAAC,EACjC,aAAa,EACb,WAAW,EACX,GAAG,EACH,UAAkB,EAClB,QAAQ,EACR,YAAoB,EACpB,OAAO,EACP,aAAa,GACd,EAAE,uBAAuB,+BAoIzB"}
1
+ {"version":3,"file":"workflow-run-summary.d.ts","sourceRoot":"","sources":["../../../src/components/workflow-run-summary/workflow-run-summary.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAIL,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EAC1B,MAAM,uBAAuB,CAAC;AAa/B,MAAM,WAAW,uBAAuB;IACtC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,GAAG,EAAE,iBAAiB,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACjC,QAAQ,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;IACpC,YAAY,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACnC,OAAO,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,oBAAoB,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC7D,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC;AAED,wBAAgB,kBAAkB,CAAC,EACjC,aAAa,EACb,WAAW,EACX,GAAG,EACH,UAAkB,EAClB,QAAQ,EACR,YAAoB,EACpB,OAAO,EACP,aAAa,GACd,EAAE,uBAAuB,+BAiIzB"}
@@ -35,7 +35,7 @@ export function WorkflowRunSummary({ workspaceSlug, projectSlug, run, cancelling
35
35
  reducedMotionIntervalMs: 10_000,
36
36
  children: /*#__PURE__*/ _jsx("section", {
37
37
  "aria-labelledby": headingId,
38
- className: "bg-background-neutral-background px-row py-row",
38
+ className: "px-row py-row",
39
39
  children: /*#__PURE__*/ _jsxs("div", {
40
40
  className: "grid min-w-0 grid-cols-[minmax(0,1fr)_auto] items-center gap-x-cluster gap-y-inline overflow-hidden max-[480px]:grid-cols-1",
41
41
  children: [