@antelopejs/dms-automation 0.5.1 → 0.7.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 (113) hide show
  1. package/README.md +3 -3
  2. package/dist/data/procedures-table.d.ts +11 -6
  3. package/dist/data/procedures-table.js +13 -6
  4. package/dist/data/procedures-table.js.map +1 -1
  5. package/dist/data/runs-table.js +0 -5
  6. package/dist/data/runs-table.js.map +1 -1
  7. package/dist/db/tables/procedure.table.d.ts +0 -1
  8. package/dist/db/tables/procedure.table.js +0 -4
  9. package/dist/db/tables/procedure.table.js.map +1 -1
  10. package/dist/frontend-module.d.ts +2 -0
  11. package/dist/frontend-module.js +19 -0
  12. package/dist/frontend-module.js.map +1 -0
  13. package/dist/index.js +2 -12
  14. package/dist/index.js.map +1 -1
  15. package/dist/pages/overview.d.ts +1 -2
  16. package/dist/pages/overview.js +14 -15
  17. package/dist/pages/overview.js.map +1 -1
  18. package/dist/pages/procedures.d.ts +1 -0
  19. package/dist/pages/procedures.js +9 -0
  20. package/dist/pages/procedures.js.map +1 -1
  21. package/dist/pages/runs.d.ts +1 -2
  22. package/dist/pages/runs.js +10 -7
  23. package/dist/pages/runs.js.map +1 -1
  24. package/dist/pages/shared.d.ts +9 -2
  25. package/dist/pages/shared.js +31 -22
  26. package/dist/pages/shared.js.map +1 -1
  27. package/dist/routes/procedureSchemas.d.ts +12 -2
  28. package/dist/routes/procedureSchemas.js +3 -1
  29. package/dist/routes/procedureSchemas.js.map +1 -1
  30. package/dist/routes/procedures.d.ts +3 -2
  31. package/dist/routes/procedures.js +22 -0
  32. package/dist/routes/procedures.js.map +1 -1
  33. package/dist/routes/runs.d.ts +1 -1
  34. package/dist/routes/runs.js +22 -3
  35. package/dist/routes/runs.js.map +1 -1
  36. package/dist/routes/stats.d.ts +4 -3
  37. package/dist/routes/stats.js +24 -9
  38. package/dist/routes/stats.js.map +1 -1
  39. package/dist/runtime/builtins/actions/log.js +1 -0
  40. package/dist/runtime/builtins/actions/log.js.map +1 -1
  41. package/dist/runtime/builtins/nodes/action.d.ts +2 -1
  42. package/dist/runtime/builtins/nodes/action.js +14 -2
  43. package/dist/runtime/builtins/nodes/action.js.map +1 -1
  44. package/dist/runtime/builtins/nodes/data.js +1 -1
  45. package/dist/runtime/builtins/nodes/data.js.map +1 -1
  46. package/dist/runtime/builtins/nodes/delay.js +1 -1
  47. package/dist/runtime/builtins/nodes/delay.js.map +1 -1
  48. package/dist/runtime/builtins/nodes/forRange.js +1 -1
  49. package/dist/runtime/builtins/nodes/forRange.js.map +1 -1
  50. package/dist/runtime/builtins/nodes/foreach.js +1 -1
  51. package/dist/runtime/builtins/nodes/foreach.js.map +1 -1
  52. package/dist/runtime/builtins/nodes/if.js +1 -1
  53. package/dist/runtime/builtins/nodes/if.js.map +1 -1
  54. package/dist/runtime/builtins/nodes/parallel.js +1 -1
  55. package/dist/runtime/builtins/nodes/parallel.js.map +1 -1
  56. package/dist/runtime/builtins/nodes/retry.js +1 -3
  57. package/dist/runtime/builtins/nodes/retry.js.map +1 -1
  58. package/dist/runtime/builtins/nodes/setVariable.js +1 -1
  59. package/dist/runtime/builtins/nodes/setVariable.js.map +1 -1
  60. package/dist/runtime/builtins/nodes/switch.js +1 -1
  61. package/dist/runtime/builtins/nodes/switch.js.map +1 -1
  62. package/dist/runtime/builtins/nodes/trigger.js +1 -1
  63. package/dist/runtime/builtins/nodes/trigger.js.map +1 -1
  64. package/dist/runtime/builtins/nodes/tryCatch.js +1 -3
  65. package/dist/runtime/builtins/nodes/tryCatch.js.map +1 -1
  66. package/dist/runtime/declaredProcedures.js +14 -90
  67. package/dist/runtime/declaredProcedures.js.map +1 -1
  68. package/dist/runtime/executionResult.d.ts +1 -1
  69. package/dist/runtime/executor.d.ts +1 -0
  70. package/dist/runtime/executor.js +4 -31
  71. package/dist/runtime/executor.js.map +1 -1
  72. package/dist/runtime/nodeKinds.d.ts +1 -0
  73. package/dist/runtime/nodeKinds.js.map +1 -1
  74. package/dist/runtime/registry.d.ts +0 -7
  75. package/dist/runtime/registry.js +3 -24
  76. package/dist/runtime/registry.js.map +1 -1
  77. package/dist/runtime/runProcedure.js +1 -0
  78. package/dist/runtime/runProcedure.js.map +1 -1
  79. package/dist/runtime/sideEffects.d.ts +9 -0
  80. package/dist/runtime/sideEffects.js +36 -0
  81. package/dist/runtime/sideEffects.js.map +1 -0
  82. package/dist/runtime/subscriptions.d.ts +2 -0
  83. package/dist/runtime/subscriptions.js +4 -3
  84. package/dist/runtime/subscriptions.js.map +1 -1
  85. package/dist/runtime/triggerHandles.js +0 -3
  86. package/dist/runtime/triggerHandles.js.map +1 -1
  87. package/dist/stats/health.js +2 -3
  88. package/dist/stats/health.js.map +1 -1
  89. package/dist/stats/overview.d.ts +12 -5
  90. package/dist/stats/overview.js +31 -3
  91. package/dist/stats/overview.js.map +1 -1
  92. package/frontend-vue/app/components/AttentionList.vue +16 -4
  93. package/frontend-vue/app/components/Editor/BottomDock.vue +0 -3
  94. package/frontend-vue/app/components/Editor/BuilderPalette.vue +2 -1
  95. package/frontend-vue/app/components/Editor/GraphCanvas.vue +3 -1
  96. package/frontend-vue/app/components/Editor/NodeInspector.vue +1 -1
  97. package/frontend-vue/app/components/Editor/nodes/GenericNode.vue +7 -3
  98. package/frontend-vue/app/components/Editor.vue +41 -11
  99. package/frontend-vue/app/components/Run/RunWaterfall.vue +6 -3
  100. package/frontend-vue/app/components/RunPeek.vue +20 -10
  101. package/frontend-vue/app/composables/useAutomationNodeKinds.ts +2 -0
  102. package/frontend-vue/app/composables/useAutomationRuns.ts +2 -2
  103. package/frontend-vue/app/composables/useRunActions.ts +1 -1
  104. package/frontend-vue/app/utils/describe.ts +16 -0
  105. package/frontend-vue/i18n/locales/dms-automation-en-GB.json +30 -11
  106. package/frontend-vue/i18n/locales/dms-automation-fr-FR.json +30 -11
  107. package/frontend-vue/package.json +3 -3
  108. package/frontend-vue/pnpm-lock.yaml +59 -113
  109. package/package.json +9 -8
  110. package/skills/dms-automation/SKILL.md +4 -2
  111. package/dist/runtime/departed.d.ts +0 -6
  112. package/dist/runtime/departed.js +0 -38
  113. package/dist/runtime/departed.js.map +0 -1
@@ -62,6 +62,10 @@ const busy = ref<string | null>(null)
62
62
 
63
63
  const TONES = { failing: 'error', degraded: 'warning', paused: 'neutral' } as const
64
64
 
65
+ // Two rows are as tall as the empty state (161 and 156 px): the card keeps its
66
+ // height whether the list loads empty or with the usual one or two rows.
67
+ const SKELETON_ROWS = 2
68
+
65
69
  function reason(row: AttentionRow): string {
66
70
  const f = row.lastFailure
67
71
  const step = stepTitle(f?.step, processI18n)
@@ -170,9 +174,16 @@ function dismiss(row: AttentionRow) {
170
174
  </UButton>
171
175
  </template>
172
176
 
173
- <div v-if="isLoading && data === null" class="flex flex-col gap-3 p-4">
174
- <USkeleton v-for="i in 3" :key="i" class="h-12 w-full" />
175
- </div>
177
+ <!-- Rows the size of loaded ones: a name, two lines of reason. -->
178
+ <ul v-if="isLoading && data === null" class="divide-y divide-default" aria-busy="true">
179
+ <li v-for="i in SKELETON_ROWS" :key="i" class="flex flex-col gap-1 px-4 py-3">
180
+ <USkeleton class="my-1 h-3 w-1/2" />
181
+ <div>
182
+ <USkeleton class="my-0.5 h-3 w-4/5" />
183
+ <USkeleton class="my-0.5 h-3 w-3/5" />
184
+ </div>
185
+ </li>
186
+ </ul>
176
187
  <div v-else-if="hasError" class="p-4" :title="errorDetail">
177
188
  <DmsEmptyState
178
189
  variant="error"
@@ -182,7 +193,8 @@ function dismiss(row: AttentionRow) {
182
193
  :actions="[{ label: $t('dms_automation.common.retry'), icon: 'i-ph-arrow-clockwise', onClick: refresh }]"
183
194
  />
184
195
  </div>
185
- <div v-else-if="rows.length === 0" class="p-4">
196
+ <div v-else-if="rows.length === 0">
197
+ <!-- The empty state has its own padding: no taller than the skeleton. -->
186
198
  <DmsEmptyState
187
199
  size="sm"
188
200
  icon="i-ph-check-circle"
@@ -79,15 +79,12 @@ function durationOf(run: DockRun): number | null {
79
79
  return run.endedAt ? new Date(run.endedAt).getTime() - new Date(run.startedAt).getTime() : null
80
80
  }
81
81
 
82
- // A run cancelled by a module going away is neither a failure nor a success.
83
82
  function runIcon(run: DockRun): { name: string; class: string } {
84
83
  if (run.status === 'failed') return { name: 'i-ph-x-circle', class: 'text-error' }
85
- if (run.status === 'cancelled') return { name: 'i-ph-prohibit', class: 'text-warning' }
86
84
  return { name: 'i-ph-check-circle', class: 'text-success' }
87
85
  }
88
86
 
89
87
  function runLine(run: DockRun): string {
90
- if (run.status === 'cancelled') return `${processI18n('$dms_automation.runs.status.cancelled')} · ${run.errorMessage ?? ''}`
91
88
  if (run.status !== 'failed') return processI18n('$dms_automation.feed.completedPlain')
92
89
  const step = stepTitle(run.failedStep, processI18n)
93
90
  return step ? `${step} · ${run.errorMessage ?? ''}` : (run.errorMessage ?? '')
@@ -165,7 +165,8 @@ const groups = computed<PaletteGroup[]>(() => {
165
165
  }
166
166
  } else {
167
167
  // Plain node kinds (flow / helpers) are built into this module.
168
- push(BUILTIN_BUCKET, { key: k.kind, label: ui.label, icon: ui.icon ?? groupIcon, kind: k.kind, keywords: keywordsOf(ui.label, k.kind) })
168
+ const label = processI18n(ui.label)
169
+ push(BUILTIN_BUCKET, { key: k.kind, label, icon: ui.icon ?? groupIcon, kind: k.kind, keywords: keywordsOf(label, k.kind) })
169
170
  }
170
171
  }
171
172
 
@@ -173,6 +173,7 @@ function propsOf(schema: JsonSchema | undefined) {
173
173
  return Object.entries(schema.properties).map(([name, p]) => ({
174
174
  name,
175
175
  type: Array.isArray(p?.type) ? p?.type[0] : p?.type,
176
+ title: p?.title,
176
177
  }))
177
178
  }
178
179
 
@@ -222,7 +223,8 @@ function issueOf(id: string): NodeIssue | null {
222
223
  function dataFor(node: AppGraphNode) {
223
224
  const spec = nodeKindUiByKind.value.get(node.kind)
224
225
  if (spec) {
225
- let label = spec.label
226
+ // Kind labels may be `$`-prefixed i18n keys too.
227
+ let label = processI18n(spec.label)
226
228
  let icon = spec.icon
227
229
  let category: string | undefined
228
230
  let dataIns = [...spec.staticDataIns]
@@ -274,7 +274,7 @@ const nodeTypeLabel = computed<string>(() => {
274
274
  if (n.kind === 'action') return typeName(props.actionType) ?? n.typeId ?? 'Action'
275
275
  if (n.kind === 'data') return typeName(dataNodeType.value) ?? n.typeId ?? 'Data'
276
276
  if (n.kind === 'group') return t('dms_automation.nodes.role.group')
277
- return kindUi.value?.label ?? n.kind
277
+ return kindUi.value?.label ? processI18n(kindUi.value.label) : n.kind
278
278
  })
279
279
 
280
280
  // A field is named by its schema title when that is a translation key, by
@@ -2,7 +2,7 @@
2
2
  import { computed } from 'vue'
3
3
  import { Handle, Position } from '@vue-flow/core'
4
4
  import { dataStyle, triggerStyle } from './styles'
5
- import { describeDuration, type NodeRole } from '../../../utils/describe'
5
+ import { describeDuration, portLabel, type NodeRole } from '../../../utils/describe'
6
6
  import type { PortRef } from '../../../composables/useAutomationNodeKinds'
7
7
 
8
8
  // One node of the procedure graph. Its header names it (the label the builder
@@ -81,6 +81,10 @@ const categoryLabel = computed(() => {
81
81
 
82
82
  // The eyebrow names the type when the node has a label of its own, and the
83
83
  // node's role otherwise, so a bare node does not read its type twice.
84
+ // A port reads as its field's title; the key it wires by stays on hover.
85
+ const portText = (port: PortRef) => portLabel(port, processI18n)
86
+ const portHint = (port: PortRef) => (portText(port) === port.name ? undefined : port.name)
87
+
84
88
  const eyebrow = computed(() => {
85
89
  const d = props.data
86
90
  if (d?.label && d.label !== d.typeName) return d.typeName
@@ -139,7 +143,7 @@ const rows = computed<BodyRow[]>(() => {
139
143
  <div class="flex flex-1 items-center gap-1 pl-3">
140
144
  <template v-if="row.leftDataIn">
141
145
  <Handle :id="`data-in-${row.leftDataIn.name}`" type="target" :position="Position.Left" :style="dataStyle" />
142
- <span>{{ row.leftDataIn.name }}</span>
146
+ <span :title="portHint(row.leftDataIn)">{{ portText(row.leftDataIn) }}</span>
143
147
  </template>
144
148
  </div>
145
149
  <div class="flex flex-1 items-center justify-end gap-1 pr-3">
@@ -148,7 +152,7 @@ const rows = computed<BodyRow[]>(() => {
148
152
  <Handle :id="`trigger-out-${row.rightTriggerOut}`" type="source" :position="Position.Right" :style="triggerStyle" />
149
153
  </template>
150
154
  <template v-else-if="row.rightDataOut">
151
- <span>{{ row.rightDataOut.name }}</span>
155
+ <span :title="portHint(row.rightDataOut)">{{ portText(row.rightDataOut) }}</span>
152
156
  <Handle :id="`data-out-${row.rightDataOut.name}`" type="source" :position="Position.Right" :style="dataStyle" />
153
157
  </template>
154
158
  </div>
@@ -1855,7 +1855,7 @@ async function onDelete() {
1855
1855
  if (!current) return
1856
1856
  const name = savedName.value
1857
1857
  // The server words the dialog, as the procedures table's delete does.
1858
- await confirmFrom(`${props.apiUrl}/procedures/{id}/delete-confirm`, {
1858
+ await confirmFrom(`${props.apiUrl}/procedures/{{row.id}}/delete-confirm`, {
1859
1859
  params: { id: current._id },
1860
1860
  onConfirm: async () => {
1861
1861
  await $authFetch(`${props.apiUrl}/procedures/${current._id}`, { method: 'DELETE' })
@@ -2816,7 +2816,6 @@ const overlaySummary = computed(() => {
2816
2816
  const run = overlayRun.value
2817
2817
  if (!run) return ''
2818
2818
  const duration = describeDuration(run.durationMs, locale.value)
2819
- if (run.status === 'cancelled') return t('dms_automation.editor.debug.cancelled', { duration })
2820
2819
  if (run.status === 'failed') {
2821
2820
  const step = stepTitle(run.failedStep, processI18n)
2822
2821
  return step
@@ -2830,7 +2829,6 @@ const overlaySummary = computed(() => {
2830
2829
  const overlayLook = computed(() => {
2831
2830
  const status = overlayRun.value?.status
2832
2831
  if (status === 'failed') return { tone: 'error', icon: 'i-ph-bug' } as const
2833
- if (status === 'cancelled') return { tone: 'warning', icon: 'i-ph-prohibit' } as const
2834
2832
  return { tone: 'success', icon: 'i-ph-check-circle' } as const
2835
2833
  })
2836
2834
 
@@ -2881,6 +2879,39 @@ function exitDebug() {
2881
2879
  if (queryValue('run')) void router.replace(`${builderPath()}?selected=${selectedId.value}`)
2882
2880
  }
2883
2881
 
2882
+ /** A step a test runs for real, as `POST /procedures/:id/test-effects` lists it. */
2883
+ interface RealEffectStep {
2884
+ nodeId: string
2885
+ typeId: string
2886
+ typeName: string
2887
+ label?: string
2888
+ }
2889
+
2890
+ /**
2891
+ * Asks before a test that acts for real: the steps that would (actions that
2892
+ * cannot simulate) are listed. Resolves `true` at once when there are none.
2893
+ */
2894
+ async function confirmRealEffects(procedureId: string, graph: unknown): Promise<boolean> {
2895
+ const { realEffects } = await $authFetch<{ realEffects: RealEffectStep[] }>(`${props.apiUrl}/procedures/${procedureId}/test-effects`, {
2896
+ method: 'POST',
2897
+ body: { graph },
2898
+ })
2899
+ if (realEffects.length === 0) return true
2900
+ return await confirm({
2901
+ title: t('dms_automation.editor.testEffects.title'),
2902
+ description: t('dms_automation.editor.testEffects.description', { count: realEffects.length }),
2903
+ color: 'warning',
2904
+ icon: 'i-ph-flask',
2905
+ confirmLabel: t('dms_automation.editor.testEffects.confirm'),
2906
+ initialFocus: 'cancel',
2907
+ impact: realEffects.map((step) => ({
2908
+ icon: 'i-ph-lightning',
2909
+ label: processI18n(step.typeName),
2910
+ ...(step.label ? { count: step.label } : {}),
2911
+ })),
2912
+ })
2913
+ }
2914
+
2884
2915
  async function onTestRun() {
2885
2916
  const current = selected.value
2886
2917
  // One test at a time: Ctrl+Enter pressed again waits for it.
@@ -2895,13 +2926,16 @@ async function onTestRun() {
2895
2926
  return
2896
2927
  }
2897
2928
  testing.value = true
2898
- // The previous result leaves the canvas while this test runs.
2899
- overlayRun.value = null
2900
- overlayIsTest.value = false
2901
2929
  try {
2930
+ // Steps that act for real (an e-mail sent, a record written) are named
2931
+ // before the test runs, never after: closing the question runs nothing.
2932
+ if (!(await confirmRealEffects(current._id, current.graph))) return
2933
+ // The previous result leaves the canvas while this test runs.
2934
+ overlayRun.value = null
2935
+ overlayIsTest.value = false
2902
2936
  const res = await $authFetch<{ runId: string }>(`${props.apiUrl}/procedures/${current._id}/test`, {
2903
2937
  method: 'POST',
2904
- body: { graph: current.graph, payload, triggerNodeId: testTriggerNodeId.value },
2938
+ body: { graph: current.graph, payload, triggerNodeId: testTriggerNodeId.value, confirmRealEffects: true },
2905
2939
  })
2906
2940
  await showRun(res.runId)
2907
2941
  dockTab.value = 'test'
@@ -2957,10 +2991,6 @@ async function onRunStarted(runId: string) {
2957
2991
  toast.add({ title: t('dms_automation.editor.runStarted', { name }), color: 'neutral', icon: 'i-ph-play-circle', actions: [trace] })
2958
2992
  return
2959
2993
  }
2960
- if (run.status === 'cancelled') {
2961
- toast.add({ title: t('dms_automation.editor.runCancelled', { name }), description: run.errorMessage, color: 'warning', icon: 'i-ph-prohibit', actions: [trace] })
2962
- return
2963
- }
2964
2994
  const step = stepTitle(run.failedStep, processI18n)
2965
2995
  const failed = run.status === 'failed'
2966
2996
  toast.add({
@@ -244,10 +244,13 @@ const ticks = computed(() => {
244
244
  })
245
245
 
246
246
  // The row layout: the name and the time on one line and the bar under them
247
- // in a narrow column (a phone, the side panel); name, bar and time side by
247
+ // in a narrow column (a phone, the run drawer); name, bar and time side by
248
248
  // side when there is room.
249
249
  const ROW_GRID = 'grid grid-cols-[minmax(0,1fr)_4.5rem] items-center gap-x-3 gap-y-1.5 @xl:grid-cols-[minmax(0,2fr)_minmax(0,3fr)_4.5rem]'
250
250
  const BAR_CELL = 'order-last col-span-2 @xl:order-none @xl:col-span-1'
251
+ // A step's name wraps while its bar takes a line of its own (a phone, a narrow
252
+ // drawer); beside the bar it keeps to one line.
253
+ const NAME_CLASS = 'break-words @xl:truncate'
251
254
  </script>
252
255
 
253
256
  <template>
@@ -310,7 +313,7 @@ const BAR_CELL = 'order-last col-span-2 @xl:order-none @xl:col-span-1'
310
313
  />
311
314
  <span class="flex min-w-0 flex-col">
312
315
  <span class="flex min-w-0 items-center gap-1.5">
313
- <span class="truncate text-sm text-highlighted">{{ stepTitle(row.step.name, processI18n) }}</span>
316
+ <span :class="NAME_CLASS" class="text-sm text-highlighted">{{ stepTitle(row.step.name, processI18n) }}</span>
314
317
  <UBadge v-if="row.tag" color="neutral" variant="soft" size="sm" class="shrink-0 font-mono">{{ row.tag }}</UBadge>
315
318
  <UBadge v-if="row.step.handled" color="warning" variant="subtle" size="sm" class="shrink-0">
316
319
  {{ $t('dms_automation.trace.handled') }}
@@ -356,7 +359,7 @@ const BAR_CELL = 'order-last col-span-2 @xl:order-none @xl:col-span-1'
356
359
  <span class="flex min-w-0 items-center gap-2">
357
360
  <UIcon name="i-ph-circle-dashed" class="size-4 shrink-0 text-muted" />
358
361
  <span class="flex min-w-0 flex-col">
359
- <span class="truncate text-sm text-muted">{{ stepTitle(step.name, processI18n) }}</span>
362
+ <span :class="NAME_CLASS" class="text-sm text-muted">{{ stepTitle(step.name, processI18n) }}</span>
360
363
  <span class="truncate font-mono text-[11px] text-muted">
361
364
  {{ step.reason === 'stopped' ? $t('dms_automation.trace.notReached') : $t('dms_automation.trace.branchNotTaken') }}
362
365
  </span>
@@ -4,9 +4,12 @@ import { builderRunUrl, opensInBuilder, type RunDetail, useAutomationRuns } from
4
4
  import { useRunActions } from '../composables/useRunActions'
5
5
  import { describeDateTime, describeDuration } from '../utils/describe'
6
6
 
7
- // The quick look at a run, in the run history's side panel: what it did, where
8
- // it failed, the path it took and its payload, with the next actions. The DMS
9
- // panel draws the header, "Run x of y" and the J / K navigation.
7
+ // The quick look at a run, in the run history's drawer: what it did, where it
8
+ // failed, the path it took and its payload, with the next actions. The DMS
9
+ // drawer draws the row header (the procedure's name, "Run x of y" and the
10
+ // J / K navigation): the body does not name the run again. Its root grows to
11
+ // the drawer's height (the drawer body is a flex column), so the DMS footer
12
+ // sits at the bottom while the run is short.
10
13
 
11
14
  const props = defineProps<{
12
15
  rowData?: { _id?: string }
@@ -50,7 +53,7 @@ function go(url: string) {
50
53
  </script>
51
54
 
52
55
  <template>
53
- <div class="flex flex-col gap-4">
56
+ <div class="flex flex-1 flex-col gap-4">
54
57
  <div v-if="loading && !run" class="flex flex-col gap-3">
55
58
  <USkeleton class="h-6 w-60" />
56
59
  <USkeleton class="h-24 w-full" />
@@ -62,7 +65,6 @@ function go(url: string) {
62
65
  <template v-else-if="run">
63
66
  <div class="flex flex-col gap-1">
64
67
  <div class="flex flex-wrap items-center gap-2">
65
- <h3 class="text-base font-semibold text-highlighted">{{ procedureName }}</h3>
66
68
  <DmsStatusPill
67
69
  :tone="failed ? 'error' : 'success'"
68
70
  :label="failed ? $t('dms_automation.runs.status.failed') : $t('dms_automation.runs.status.ok')"
@@ -92,8 +94,10 @@ function go(url: string) {
92
94
  <DmsAutomationRunPayload v-else-if="section === 'payload'" :raw="run.triggerPayload" :kept="run.payloadKept" />
93
95
  <DmsAutomationRunLogList v-else :api-url="apiUrl" :run-id="run._id" :log="run.logs" :names="names" />
94
96
 
95
- <!-- One line in a narrow panel: Re-run as an icon, its name in a tooltip. -->
96
- <div class="sticky bottom-0 flex items-center gap-2 border-t border-default bg-default pt-3">
97
+ <!-- The DMS footer of a drawer's body. Labels stay on one line: a
98
+ narrow drawer wraps the buttons instead, Re-run being an icon with its
99
+ name in a tooltip. -->
100
+ <DmsContainerFooter justify="start">
97
101
  <UTooltip v-if="run.procedure && run.payloadKept" :text="$t('dms_automation.runs.rerunWithPayload')">
98
102
  <UButton
99
103
  color="neutral"
@@ -104,17 +108,23 @@ function go(url: string) {
104
108
  @click="rerun(run._id, procedureName)"
105
109
  />
106
110
  </UTooltip>
107
- <UButton color="neutral" variant="outline" icon="i-ph-path" @click="go(`${traceUrl}?run=${encodeURIComponent(run._id)}`)">
111
+ <UButton
112
+ color="neutral"
113
+ variant="outline"
114
+ icon="i-ph-path"
115
+ class="whitespace-nowrap"
116
+ @click="go(`${traceUrl}?run=${encodeURIComponent(run._id)}`)"
117
+ >
108
118
  {{ $t('dms_automation.runs.trace') }}
109
119
  </UButton>
110
120
  <UTooltip v-if="run.procedure" :text="opensInBuilder(run) ? '' : $t('dms_automation.trace.builderDraftHint')" :disabled="opensInBuilder(run)">
111
121
  <span class="ml-auto inline-flex">
112
- <UButton color="primary" icon="i-ph-bug" :disabled="!opensInBuilder(run)" @click="go(builderRunUrl(builderUrl, run))">
122
+ <UButton color="primary" icon="i-ph-bug" class="whitespace-nowrap" :disabled="!opensInBuilder(run)" @click="go(builderRunUrl(builderUrl, run))">
113
123
  {{ $t('dms_automation.trace.debugInBuilder') }}
114
124
  </UButton>
115
125
  </span>
116
126
  </UTooltip>
117
- </div>
127
+ </DmsContainerFooter>
118
128
  </template>
119
129
  </div>
120
130
  </template>
@@ -3,6 +3,8 @@ import type { GroupPort, JsonSchema } from "./useGraphConnect";
3
3
  export interface PortRef {
4
4
  name: string;
5
5
  type?: string;
6
+ /** The field's title, shown on the canvas in place of the key. */
7
+ title?: string;
6
8
  }
7
9
 
8
10
  export interface NodeKindUI {
@@ -109,7 +109,7 @@ export interface RunDetail {
109
109
  procedureId: string;
110
110
  startedAt: string;
111
111
  endedAt?: string | null;
112
- status: "ok" | "failed" | "cancelled";
112
+ status: "ok" | "failed";
113
113
  errorMessage?: string | null;
114
114
  triggerNodeId: string;
115
115
  triggerPayload?: string;
@@ -156,7 +156,7 @@ export interface RunDetail {
156
156
  /** What `POST /runs/:id/rerun` answers: the new run and how it ended. */
157
157
  export interface RerunResult {
158
158
  runId: string;
159
- status?: "ok" | "failed" | "cancelled";
159
+ status?: "ok" | "failed";
160
160
  /** An i18n key (with `$`) to show when the new run failed. */
161
161
  warning?: string;
162
162
  }
@@ -26,7 +26,7 @@ export function useRunActions(options: { apiUrl: string; traceUrl: string }) {
26
26
  asking = true;
27
27
  let result: RerunResult | undefined;
28
28
  try {
29
- await confirmFrom(`${options.apiUrl}/runs/{id}/rerun-confirm`, {
29
+ await confirmFrom(`${options.apiUrl}/runs/{{row.id}}/rerun-confirm`, {
30
30
  params: { id: runId, name: procedureName },
31
31
  fallback: { color: "warning", icon: "i-ph-arrow-clockwise" },
32
32
  onConfirm: async () => {
@@ -48,6 +48,22 @@ export function stepTitle(
48
48
  return step.nodeId;
49
49
  }
50
50
 
51
+ /** A data port of a node: the schema property it wires by, and its title. */
52
+ export interface PortName {
53
+ name: string;
54
+ /** The property's `title`, plain text or a `$`-prefixed DMS i18n key. */
55
+ title?: string;
56
+ }
57
+
58
+ /**
59
+ * The words a port reads as on the canvas: its field's title when one is
60
+ * declared, else its key. Edges and handles keep wiring by the key.
61
+ */
62
+ export function portLabel(port: PortName, t: Translate): string {
63
+ const title = port.title?.trim();
64
+ return title ? t(title) : port.name;
65
+ }
66
+
51
67
  const MS_PER_SECOND = 1000;
52
68
  const SECONDS_PER_MINUTE = 60;
53
69
 
@@ -25,7 +25,8 @@
25
25
  "thu": "Thursdays at {time}",
26
26
  "tue": "Tuesdays at {time}",
27
27
  "wed": "Wednesdays at {time}"
28
- }
28
+ },
29
+ "testNeedsConfirm": "Some steps of this draft act for real: confirm them before testing."
29
30
  },
30
31
  "attention": {
31
32
  "degradedInPeriod": "{failed} of {runs} runs failed in this period · last at {when}, none since",
@@ -107,7 +108,6 @@
107
108
  "nameRequired": "Give it a name to save it.",
108
109
  "runFailed": "{name} failed",
109
110
  "runFailedAt": "{name} failed at {step}",
110
- "runCancelled": "{name} was cancelled",
111
111
  "runSucceeded": "{name} ran successfully",
112
112
  "showBlocks": "Show blocks",
113
113
  "stale": {
@@ -158,7 +158,6 @@
158
158
  "testingHint": "Its steps show here when the test ends.",
159
159
  "again": "Run again",
160
160
  "exit": "Exit debug",
161
- "cancelled": "Cancelled · {duration}",
162
161
  "failed": "Failed · {duration}",
163
162
  "failedAt": "Failed at {step} · {duration}",
164
163
  "passed": "Succeeded · {duration}",
@@ -183,7 +182,7 @@
183
182
  "problems": "Problems",
184
183
  "recentRuns": "Recent runs",
185
184
  "selectNode": "Select node",
186
- "sideEffects": "Side effects are real: point HTTP steps at a sandbox to dry-run.",
185
+ "sideEffects": "Steps that can simulate were simulated; the others acted for real.",
187
186
  "testRun": "Test run",
188
187
  "toggle": "Show or hide the dock"
189
188
  },
@@ -408,6 +407,11 @@
408
407
  "wiredField": {
409
408
  "from": "From",
410
409
  "unwire": "Unwire"
410
+ },
411
+ "testEffects": {
412
+ "title": "Test with real effects?",
413
+ "description": "This test acts for real: {count} step below changes something outside the run (sends, writes, calls a service) and can’t be simulated. Steps that can simulate are simulated. | This test acts for real: {count} steps below change something outside the run (send, write, call a service) and can’t be simulated. Steps that can simulate are simulated.",
414
+ "confirm": "Test for real"
411
415
  }
412
416
  },
413
417
  "feed": {
@@ -460,7 +464,7 @@
460
464
  "failed": "Failed",
461
465
  "runs": "Runs",
462
466
  "success-rate": "Success rate",
463
- "vsPrevious": "vs previous period"
467
+ "vsCompared": "vs compared period"
464
468
  },
465
469
  "library": {
466
470
  "webhookBaseError": "Couldn’t get the server’s address, so the full URL can’t be shown.",
@@ -587,11 +591,24 @@
587
591
  "group": "Group",
588
592
  "helper": "Helper",
589
593
  "trigger": "Trigger"
594
+ },
595
+ "kinds": {
596
+ "action": "Action",
597
+ "data": "Data",
598
+ "delay": "Delay",
599
+ "foreach": "For each",
600
+ "forRange": "For range",
601
+ "if": "If",
602
+ "parallel": "Parallel",
603
+ "retry": "Retry",
604
+ "setVariable": "Set variable",
605
+ "switch": "Switch",
606
+ "trigger": "Trigger",
607
+ "tryCatch": "Try / Catch"
590
608
  }
591
609
  },
592
610
  "overview": {
593
611
  "proceduresWeek": "Procedures · last 7 days",
594
- "runsPerDayLegend": "Succeeded runs in green, failed runs in red",
595
612
  "allRuns": "Run history",
596
613
  "byTrigger": "By trigger",
597
614
  "byTriggerHint": "How many procedures each trigger starts",
@@ -609,14 +626,16 @@
609
626
  "noRunsHint": "Runs show up here as soon as a procedure fires.",
610
627
  "noTriggers": "No trigger placed yet",
611
628
  "recentRuns": "Recent runs",
629
+ "comparedRuns": "Runs, compared period",
612
630
  "runsPerDay": "Runs",
631
+ "runsPerDayHint": "Runs in the period",
613
632
  "succeeded": "Succeeded",
614
633
  "title": "Overview"
615
634
  },
616
635
  "permissions": {
617
636
  "live": {
618
- "description": "The Live / Pause switch and how long ago the page was read.",
619
- "name": "Live updates"
637
+ "description": "The bar above the page: how long ago it was read, its Live / Pause and, where the page has one, its period.",
638
+ "name": "Page toolbar"
620
639
  },
621
640
  "liveTopics": {
622
641
  "description": "Refreshes the page when a run ends or a procedure changes.",
@@ -653,7 +672,7 @@
653
672
  "name": "New procedure dialog"
654
673
  },
655
674
  "period": {
656
- "description": "The 24 h / 7 d / 30 d window of the figures",
675
+ "description": "The 24 h / 7 d / 30 d window of the figures and what they are compared with",
657
676
  "name": "Period switch"
658
677
  },
659
678
  "runPeek": {
@@ -768,7 +787,7 @@
768
787
  "retentionConfigured": "Older runs are deleted after the retention period set for this project",
769
788
  "retentionForever": "Runs are kept forever",
770
789
  "retest": "Run the test again",
771
- "retestConfirmDescription": "Runs the draft this test ran, from the same trigger, with the same payload. It is stored as a test and doesn’t count in the figures. Side effects are real.",
790
+ "retestConfirmDescription": "Runs the draft this test ran, from the same trigger, with the same payload. It is stored as a test and doesn’t count in the figures. Steps that can simulate are simulated; the ones listed act for real.",
772
791
  "retestConfirmTitle": "Run this test again?",
773
792
  "scopedTo": "Runs of {name}",
774
793
  "searchRuns": "Search procedures, errors, steps, paths or run ids…",
@@ -802,6 +821,7 @@
802
821
  "listTitle": "Runs",
803
822
  "peek": "Quick look",
804
823
  "peekPosition": "Run {index} of {total}",
824
+ "peekHeading": "{procedureName}",
805
825
  "peekNotFound": "This run is no longer kept",
806
826
  "peekNotFoundHint": "The run retention may have deleted it, or the link is wrong.",
807
827
  "rowMenu": "Actions for this run of {procedureName}",
@@ -814,7 +834,6 @@
814
834
  "rerunWithPayload": "Re-run with this payload",
815
835
  "retentionHint": "Runs are kept 30 days",
816
836
  "status": {
817
- "cancelled": "Cancelled",
818
837
  "failed": "Failed",
819
838
  "ok": "Succeeded"
820
839
  },