@conduction/nextcloud-vue 2.56.0-beta.76 → 2.56.0-beta.77

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.
@@ -2,7 +2,7 @@ import script from './CnRunDetailSidebar.vue2.js';
2
2
  import { render } from './CnRunDetailSidebar.vue3.js';
3
3
 
4
4
  script.render = render;
5
- script.__scopeId = "data-v-9f3603dc";
5
+ script.__scopeId = "data-v-4fc51f96";
6
6
  const __sfc_main = script;
7
7
 
8
8
  export { __sfc_main as default };
@@ -191,6 +191,57 @@ var script = {
191
191
  taskUrl(uuid) {
192
192
  return generateUrl(`/apps/openregister/flow-tasks/${uuid}`)
193
193
  },
194
+
195
+ /**
196
+ * A step's report, as the named blocks `CnFlowStepOutcomes` renders.
197
+ *
198
+ * `step.report` is a map of named summaries (`messaging`, `fetch`,
199
+ * `contract`, `write`, `sweep`, ...) — whatever node(s) on this hop
200
+ * wrote one, keyed per {@see FlowStepReport::put()} on the server. Each
201
+ * value is itself a bucket map (`{count, sample}` per bucket), the
202
+ * shape `CnFlowStepOutcomes` already knows how to draw.
203
+ *
204
+ * @param {object} step The log entry.
205
+ * @return {Array<{key: string, value: object}>} One entry per report key.
206
+ */
207
+ reportBlocks(step) {
208
+ const report = step && step.report;
209
+ if (!report || typeof report !== 'object') {
210
+ return []
211
+ }
212
+
213
+ return Object.keys(report)
214
+ .filter((key) => report[key] && typeof report[key] === 'object')
215
+ .map((key) => ({ key, value: report[key] }))
216
+ },
217
+
218
+ /**
219
+ * What a report block is a tally of, for `CnFlowStepOutcomes`'
220
+ * `label` prop — its visible caption and accessible name.
221
+ *
222
+ * `null` for `messaging`: that block keeps the component's own
223
+ * send-specific default ("Who this step reached") and no caption,
224
+ * since a step writes at most one messaging block, so it needs
225
+ * neither a caption to tell it apart from a sibling nor a different
226
+ * accessible name.
227
+ *
228
+ * @param {string} key The report block's key.
229
+ * @return {string|null} The label, or `null` for `messaging`.
230
+ */
231
+ blockLabel(key) {
232
+ if (key === 'messaging') {
233
+ return null
234
+ }
235
+
236
+ const labels = {
237
+ fetch: this.t('nextcloud-vue', 'Fetch'),
238
+ contract: this.t('nextcloud-vue', 'Decision'),
239
+ write: this.t('nextcloud-vue', 'Write'),
240
+ sweep: this.t('nextcloud-vue', 'Sweep'),
241
+ };
242
+
243
+ return labels[key] || key
244
+ },
194
245
  },
195
246
  };
196
247
 
@@ -1 +1 @@
1
- {"version":3,"file":"CnRunDetailSidebar.vue2.js","sources":["../../../../src/components/CnFlowDetail/CnRunDetailSidebar.vue"],"sourcesContent":["<!--\n CnRunDetailSidebar — one run: what it changed, what it asked a person to do,\n and what it did.\n\n WHY THIS IS A SIDEBAR AND NOT A PANEL INSIDE THE FLOW'S\n -------------------------------------------------------\n It used to be a block nested inside the Runs tab, with a tab strip of its own.\n That put TABS INSIDE A TAB: the flow's strip (Steps, Runs) stayed on screen\n above the run's (Objects, Tasks, Logs), and the two competed for the same\n glance. Worse, the flow's tabs were still live — pressing Steps while reading\n a run swapped the panel and left the canvas painted with that run's badges,\n so the graph and the sidebar were describing different things.\n\n So opening a run REPLACES the flow's sidebar rather than nesting inside it.\n One strip at a time, and the way back is a deliberate act with its own\n control. The canvas keeps the run's replay while this is open, which is now\n consistent rather than accidental: the sidebar and the graph are showing the\n same run because there is no way to make them show anything else.\n\n WHAT IT DOES NOT OWN\n --------------------\n The run's badges on the canvas. Those are the flow detail's animation, driven\n from `store.inspectedRunUuid` and the stored log. This component reads the\n same run; it does not paint.\n\n SPDX-FileCopyrightText: 2026 Conduction B.V. <info@conduction.nl>\n SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<section class=\"cn-run-sidebar\" data-testid=\"run-detail-sidebar\">\n\t\t<!--\n\t\t\tTHE WAY BACK, FIRST AND ALWAYS. A view that replaces another must\n\t\t\tsay what it replaced and how to undo that, or it reads as the\n\t\t\tapplication having navigated somewhere on its own.\n\t\t-->\n\t\t<div class=\"cn-run-sidebar__head\">\n\t\t\t<NcButton variant=\"tertiary\"\n\t\t\t\tdata-testid=\"run-back\"\n\t\t\t\t@click=\"store.closeRun()\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<ArrowLeft :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ t('nextcloud-vue', 'Back to the flow') }}\n\t\t\t</NcButton>\n\t\t</div>\n\n\t\t<h4 class=\"cn-run-sidebar__title\">\n\t\t\t<span :class=\"`cn-run-sidebar__status cn-run-sidebar__status--${outcome}`\"\n\t\t\t\tdata-testid=\"run-status\">{{ outcome || t('nextcloud-vue', 'Run') }}</span>\n\t\t\t<time v-if=\"run?.created\" class=\"cn-run-sidebar__when\" :datetime=\"run.created\">{{ run.created }}</time>\n\t\t</h4>\n\n\t\t<p v-if=\"run?.error\" class=\"cn-run-sidebar__error\" data-testid=\"run-error\">\n\t\t\t{{ run.error }}\n\t\t</p>\n\n\t\t<!--\n\t\t\tTHE STRIP IS NEXTCLOUD'S, NOT OURS.\n\n\t\t\tThese three used to be hand-rolled buttons with a border under the\n\t\t\tactive one. They sat directly inside NcAppSidebar, one element away\n\t\t\tfrom the real thing, so they read as a panel that had been dropped\n\t\t\tinto the sidebar rather than as the sidebar's own tabs: no icons,\n\t\t\tthe wrong size, the wrong active mark, and none of the keyboard\n\t\t\tbehaviour NcAppSidebarTabs brings.\n\n\t\t\tNcAppSidebarTab registers itself with the sidebar through an\n\t\t\tinjection, so the sidebar builds the strip. That also settles which\n\t\t\ttab is open: entering run view leaves `flow-runs` registered by\n\t\t\tnothing, and NcAppSidebarTabs falls back to the first tab it has,\n\t\t\twhich is Objects.\n\n\t\t\t`embedded` (CnFlowEditModal) has no NcAppSidebar to inject that, so\n\t\t\tit keeps a strip of its own. One list of tabs feeds both, so the two\n\t\t\thosts cannot come to offer different ones.\n\t\t-->\n\t\t<div v-if=\"embedded\" class=\"cn-run-sidebar__tabs\" role=\"tablist\">\n\t\t\t<button v-for=\"entry in tabs\"\n\t\t\t\t:key=\"entry.id\"\n\t\t\t\tclass=\"cn-run-sidebar__tab\"\n\t\t\t\t:class=\"{ 'cn-run-sidebar__tab--active': tab === entry.id }\"\n\t\t\t\trole=\"tab\"\n\t\t\t\t:data-testid=\"`flow-run-tab-${entry.id}`\"\n\t\t\t\t:aria-selected=\"tab === entry.id ? 'true' : 'false'\"\n\t\t\t\t@click=\"tab = entry.id\">\n\t\t\t\t{{ entry.label }}\n\t\t\t</button>\n\t\t</div>\n\n\t\t<!-- Objects: what the run is about, and what it changed. -->\n\t\t<component :is=\"embedded ? 'div' : 'NcAppSidebarTab'\"\n\t\t\tv-if=\"!embedded || tab === 'objects'\"\n\t\t\t:id=\"embedded ? undefined : 'run-objects'\"\n\t\t\t:name=\"embedded ? undefined : t('nextcloud-vue', 'Objects')\"\n\t\t\t:order=\"embedded ? undefined : 1\"\n\t\t\tdata-testid=\"flow-run-panel-objects\">\n\t\t\t<template v-if=\"!embedded\" #icon>\n\t\t\t\t<DatabaseOutline :size=\"20\" />\n\t\t\t</template>\n\n\t\t\t<!--\n\t\t\t\tTHE OBJECTS THE RUN IS ABOUT, FIRST.\n\n\t\t\t\t`GET /flow-runs/{uuid}/objects` answers the AUDIT: objects this\n\t\t\t\trun changed. A run that waited on a locked object and then\n\t\t\t\tfailed changed nothing, so that list is empty while the run's\n\t\t\t\town error names the object by uuid — and this panel said \"this\n\t\t\t\trun changed no objects\", which reads as the run having had\n\t\t\t\tnothing to do with it.\n\n\t\t\t\tThe run record knows better. `subjects` is what it was started\n\t\t\t\ton and `placeItems` is what it is holding at a step, so both are\n\t\t\t\tlisted here, and each row says which it is. The changed list\n\t\t\t\tkeeps its own heading below: \"worked on\" and \"changed\" are\n\t\t\t\tdifferent claims and this view exists to keep them apart.\n\t\t\t-->\n\t\t\t<template v-if=\"subjectRows.length\">\n\t\t\t\t<h5 class=\"cn-run-sidebar__group\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Objects this run is about') }}\n\t\t\t\t</h5>\n\t\t\t\t<ul class=\"cn-run-sidebar__touched\" data-testid=\"flow-run-subjects\">\n\t\t\t\t\t<!--\n\t\t\t\t\t\tSEPARATED IN THE TEXT, not only by layout. Three adjacent\n\t\t\t\t\t\tspans render as one run-on string: \"triggerDakkapel\n\t\t\t\t\t\tKerkstraat 122e98a265-...\" was what the live instance\n\t\t\t\t\t\tshowed. A gap would fix the look and leave the text\n\t\t\t\t\t\titself unreadable, which is what anything reading the\n\t\t\t\t\t\tDOM gets, so the separator is a character.\n\t\t\t\t\t-->\n\t\t\t\t\t<li v-for=\"obj in subjectRows\" :key=\"`${obj.role}-${obj.uuid}`\">\n\t\t\t\t\t\t<span class=\"cn-run-sidebar__touched-action\">{{ obj.role }}</span>\n\t\t\t\t\t\t<span v-if=\"obj.title\"> · {{ obj.title }}</span>\n\t\t\t\t\t\t<span class=\"cn-run-sidebar__touched-uuid\"> · {{ obj.uuid }}</span>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</template>\n\n\t\t\t<h5 v-if=\"subjectRows.length\" class=\"cn-run-sidebar__group\">\n\t\t\t\t{{ t('nextcloud-vue', 'Changed by this run') }}\n\t\t\t</h5>\n\t\t\t<p v-if=\"!objectRows.length\" class=\"cn-run-sidebar__hint\">\n\t\t\t\t{{ t('nextcloud-vue', 'This run changed no objects.') }}\n\t\t\t</p>\n\t\t\t<ul v-else class=\"cn-run-sidebar__touched\">\n\t\t\t\t<!-- Same separator as the subject rows above, and for the same\n\t\t\t\t reason: \"create\" and the uuid ran together as \"createobj-1\"\n\t\t\t\t with nothing between them. -->\n\t\t\t\t<li v-for=\"obj in objectRows\" :key=\"obj.auditUuid\">\n\t\t\t\t\t<span class=\"cn-run-sidebar__touched-action\">{{ obj.action }}</span>\n\t\t\t\t\t<span class=\"cn-run-sidebar__touched-uuid\"> · {{ obj.objectUuid }}</span>\n\t\t\t\t\t<span class=\"cn-run-sidebar__hint\"> · {{ obj.node }}</span>\n\t\t\t\t\t<!--\n\t\t\t\t\t\tA change the run's own step history cannot account for.\n\t\t\t\t\t\tIt should normally never appear; when it does, hiding it\n\t\t\t\t\t\twould be the opposite of what this view is for.\n\t\t\t\t\t-->\n\t\t\t\t\t<span v-if=\"obj.unaccounted\"\n\t\t\t\t\t\tclass=\"cn-run-sidebar__error\"\n\t\t\t\t\t\tdata-testid=\"flow-object-unaccounted\">\n\t\t\t\t\t\t{{ t('nextcloud-vue', 'no matching step') }}\n\t\t\t\t\t</span>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</component>\n\n\t\t<!-- Tasks: what the run asked a person to do. -->\n\t\t<component :is=\"embedded ? 'div' : 'NcAppSidebarTab'\"\n\t\t\tv-if=\"!embedded || tab === 'tasks'\"\n\t\t\t:id=\"embedded ? undefined : 'run-tasks'\"\n\t\t\t:name=\"embedded ? undefined : t('nextcloud-vue', 'Tasks')\"\n\t\t\t:order=\"embedded ? undefined : 2\"\n\t\t\tdata-testid=\"flow-run-panel-tasks\">\n\t\t\t<template v-if=\"!embedded\" #icon>\n\t\t\t\t<CheckboxMarkedOutline :size=\"20\" />\n\t\t\t</template>\n\n\t\t\t<p v-if=\"!store.runTasks.length\"\n\t\t\t\tclass=\"cn-run-sidebar__hint\"\n\t\t\t\tdata-testid=\"flow-run-tasks-empty\">\n\t\t\t\t{{ t('nextcloud-vue', 'This run raised no tasks.') }}\n\t\t\t</p>\n\t\t\t<ul v-else class=\"cn-run-sidebar__list\">\n\t\t\t\t<li v-for=\"task in store.runTasks\" :key=\"task.uuid\">\n\t\t\t\t\t<!-- The task's one stable address, the same one the\n\t\t\t\t\t notification buttons and the VTODO already resolve to. -->\n\t\t\t\t\t<a class=\"cn-run-sidebar__row\"\n\t\t\t\t\t\t:href=\"taskUrl(task.uuid)\"\n\t\t\t\t\t\tdata-testid=\"flow-task-link\">\n\t\t\t\t\t\t<span :class=\"`cn-run-sidebar__status cn-run-sidebar__status--${task.state}`\">{{ task.state }}</span>\n\t\t\t\t\t\t<span>{{ task.title || task.uuid }}</span>\n\t\t\t\t\t</a>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</component>\n\n\t\t<!-- Logs: what the engine did, in its own order. -->\n\t\t<component :is=\"embedded ? 'div' : 'NcAppSidebarTab'\"\n\t\t\tv-if=\"!embedded || tab === 'logs'\"\n\t\t\t:id=\"embedded ? undefined : 'run-logs'\"\n\t\t\t:name=\"embedded ? undefined : t('nextcloud-vue', 'Logs')\"\n\t\t\t:order=\"embedded ? undefined : 3\"\n\t\t\tdata-testid=\"flow-run-panel-logs\">\n\t\t\t<template v-if=\"!embedded\" #icon>\n\t\t\t\t<FormatListBulleted :size=\"20\" />\n\t\t\t</template>\n\n\t\t\t<!-- Replay BESIDE the step list, not instead of it: the list stays\n\t\t\t what it is for reading, the replay plays the same stored log\n\t\t\t through the canvas animator. Only on a FINISHED run — a run\n\t\t\t still going is watched live. -->\n\t\t\t<NcButton v-if=\"canReplay\"\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\tdata-testid=\"flow-replay\"\n\t\t\t\t@click=\"store.requestReplay()\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Replay :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ t('nextcloud-vue', 'Replay on the canvas') }}\n\t\t\t</NcButton>\n\n\t\t\t<p v-if=\"!store.steps.length\" class=\"cn-run-sidebar__hint\">\n\t\t\t\t{{ t('nextcloud-vue', 'This run recorded no steps.') }}\n\t\t\t</p>\n\t\t\t<ol v-else class=\"cn-run-sidebar__steps\">\n\t\t\t\t<li v-for=\"(step, i) in store.steps\" :key=\"i\">\n\t\t\t\t\t<strong>{{ step.transition }}</strong>\n\t\t\t\t\t<span class=\"cn-run-sidebar__hint\"> · {{ step.status }}</span>\n\t\t\t\t\t<span v-if=\"step.error\" class=\"cn-run-sidebar__error\"> · {{ step.error }}</span>\n\t\t\t\t\t<!-- A send step's outcome lists, by name: who got it, who\n\t\t\t\t\t opted out, who the opt-out check could not answer for. -->\n\t\t\t\t\t<CnFlowStepOutcomes v-if=\"step.report && step.report.messaging\"\n\t\t\t\t\t\t:report=\"step.report.messaging\" />\n\t\t\t\t</li>\n\t\t\t</ol>\n\t\t</component>\n\t</section>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { generateUrl } from '@nextcloud/router'\nimport { NcAppSidebarTab, NcButton } from '@nextcloud/vue'\nimport ArrowLeft from 'vue-material-design-icons/ArrowLeft.vue'\nimport CheckboxMarkedOutline from 'vue-material-design-icons/CheckboxMarkedOutline.vue'\nimport DatabaseOutline from 'vue-material-design-icons/DatabaseOutline.vue'\nimport FormatListBulleted from 'vue-material-design-icons/FormatListBulleted.vue'\nimport Replay from 'vue-material-design-icons/Replay.vue'\nimport CnFlowStepOutcomes from '../CnFlowStepOutcomes/CnFlowStepOutcomes.vue'\nimport { FLOW_RUN_ACTIVE_STATUSES, useFlowStore } from '../../composables/useFlowStore.js'\nimport { flowRunOutcome } from '../../utils/flowRunStatus.js'\n\nexport default {\n\tname: 'CnRunDetailSidebar',\n\n\tcomponents: {\n\t\tArrowLeft,\n\t\tCheckboxMarkedOutline,\n\t\tCnFlowStepOutcomes,\n\t\tDatabaseOutline,\n\t\tFormatListBulleted,\n\t\tNcAppSidebarTab,\n\t\tNcButton,\n\t\tReplay,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Render the panels without NcAppSidebarTab, for a host that is not\n\t\t * NcAppSidebar. CnFlowEditModal renders this sidebar inside a dialog,\n\t\t * where there is no sidebar to register a tab with, so that host keeps\n\t\t * a strip of its own.\n\t\t */\n\t\tembedded: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tsetup() {\n\t\treturn { store: useFlowStore() }\n\t},\n\n\tdata() {\n\t\treturn { tab: 'objects' }\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * The run being read.\n\t\t *\n\t\t * The run's OWN record first, the history list second. The list is\n\t\t * capped at 25, so a run opened from a `?run=` deep link need not be in\n\t\t * it, and reading only the list left such a run with no status, no time\n\t\t * and no error on screen.\n\t\t *\n\t\t * @return {object|null} The run being read.\n\t\t */\n\t\trun() {\n\t\t\tconst detail = this.store.runDetail\n\t\t\tif (detail && String(detail.uuid || '') === String(this.store.inspectedRunUuid || '')) {\n\t\t\t\treturn detail\n\t\t\t}\n\n\t\t\treturn this.store.runs.find((r) => r.uuid === this.store.inspectedRunUuid) || null\n\t\t},\n\n\t\t/**\n\t\t * The objects the run is ABOUT, as opposed to the ones it changed.\n\t\t *\n\t\t * Two sources, both on the run's own record. `subjects` is what the run\n\t\t * was started on, keyed by the role that supplied it (`trigger` for a\n\t\t * run a trigger started). `placeItems` is what the run is holding at a\n\t\t * step right now, keyed by that step.\n\t\t *\n\t\t * Deduplicated by uuid, because a run's subject is normally also the\n\t\t * item sitting in a place and listing it twice would suggest two\n\t\t * objects. The subject wins the row: it is the more durable fact.\n\t\t *\n\t\t * @return {Array<object>} The rows, subjects first.\n\t\t */\n\t\tsubjectRows() {\n\t\t\tconst run = this.run\n\t\t\tif (!run) {\n\t\t\t\treturn []\n\t\t\t}\n\n\t\t\t// The held items first, because they are the half that carries a\n\t\t\t// TITLE. A subject record is a uuid, a register and a schema; the\n\t\t\t// item sitting in a place is the object itself. Merging the two\n\t\t\t// gives a subject row a name a reader recognises instead of a uuid.\n\t\t\tconst held = new Map()\n\t\t\tfor (const [node, items] of Object.entries(run.placeItems || {})) {\n\t\t\t\tfor (const item of items || []) {\n\t\t\t\t\tconst uuid = String(item?.json?.id || item?.id || '')\n\t\t\t\t\tif (uuid === '' || held.has(uuid)) {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\n\t\t\t\t\theld.set(uuid, {\n\t\t\t\t\t\t// Named by the step that is holding it, because that is\n\t\t\t\t\t\t// the useful half: \"which step is this stuck at\".\n\t\t\t\t\t\trole: this.t('nextcloud-vue', 'at {node}', { node }),\n\t\t\t\t\t\tuuid,\n\t\t\t\t\t\ttitle: item?.json?.title || '',\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst rows = []\n\t\t\tconst seen = new Set()\n\n\t\t\tfor (const [role, subject] of Object.entries(run.subjects || {})) {\n\t\t\t\tconst uuid = String(subject?.uuid || '')\n\t\t\t\tif (uuid === '' || seen.has(uuid)) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\tseen.add(uuid)\n\t\t\t\trows.push({\n\t\t\t\t\trole,\n\t\t\t\t\tuuid,\n\t\t\t\t\ttitle: subject?.title || held.get(uuid)?.title || '',\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tfor (const [uuid, row] of held.entries()) {\n\t\t\t\tif (seen.has(uuid) === false) {\n\t\t\t\t\tseen.add(uuid)\n\t\t\t\t\trows.push(row)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn rows\n\t\t},\n\n\t\t/**\n\t\t * @return {Array<object>} The strip.\n\t\t */\n\t\ttabs() {\n\t\t\treturn [\n\t\t\t\t{ id: 'objects', label: this.t('nextcloud-vue', 'Objects') },\n\t\t\t\t{ id: 'tasks', label: this.t('nextcloud-vue', 'Tasks') },\n\t\t\t\t{ id: 'logs', label: this.t('nextcloud-vue', 'Logs') },\n\t\t\t]\n\t\t},\n\n\t\t/**\n\t\t * Every object the run touched, flattened, each marked with the step\n\t\t * that accounts for it.\n\t\t *\n\t\t * @return {Array<object>} The rows.\n\t\t */\n\t\tobjectRows() {\n\t\t\tconst stepNodes = new Set((this.store.steps || []).map((step) => String(step.transition || '')))\n\n\t\t\treturn (this.store.runObjects || []).flatMap((group) => (group.objects || []).map((obj) => ({\n\t\t\t\t...obj,\n\t\t\t\tnode: group.node,\n\t\t\t\tunaccounted: !stepNodes.has(String(group.node || '')),\n\t\t\t})))\n\t\t},\n\n\t\t/**\n\t\t * @return {string} How the run ended, in the engine's status words.\n\t\t */\n\t\toutcome() {\n\t\t\treturn flowRunOutcome(this.run)\n\t\t},\n\n\t\t/**\n\t\t * @return {boolean} True when Replay is offered.\n\t\t */\n\t\tcanReplay() {\n\t\t\tif (this.store.steps.length === 0) {\n\t\t\t\treturn false\n\t\t\t}\n\n\t\t\tconst status = this.run?.status\n\t\t\treturn status !== undefined && FLOW_RUN_ACTIVE_STATUSES.includes(status) === false\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/**\n\t\t * @param {string} uuid The task uuid.\n\t\t * @return {string} The task's own URL.\n\t\t */\n\t\ttaskUrl(uuid) {\n\t\t\treturn generateUrl(`/apps/openregister/flow-tasks/${uuid}`)\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-run-sidebar {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n\tpadding: 12px;\n}\n\n.cn-run-sidebar__head {\n\tdisplay: flex;\n}\n\n.cn-run-sidebar__title {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tmargin: 0;\n}\n\n.cn-run-sidebar__when {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-weight: normal;\n\tfont-size: 0.9em;\n\tfont-variant-numeric: tabular-nums;\n}\n\n.cn-run-sidebar__error {\n\tcolor: var(--color-error-text, var(--color-error));\n}\n\n.cn-run-sidebar__hint {\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-run-sidebar__group {\n\tmargin: 8px 0 0;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-weight: bold;\n}\n\n.cn-run-sidebar__tabs {\n\tdisplay: flex;\n\tgap: 4px;\n\tborder-block-end: 1px solid var(--color-border);\n}\n\n.cn-run-sidebar__tab {\n\tborder: none;\n\tbackground: none;\n\tpadding: 8px 12px;\n\tcursor: pointer;\n\tcolor: var(--color-main-text);\n\tborder-block-end: 2px solid transparent;\n}\n\n.cn-run-sidebar__tab--active {\n\tborder-block-end-color: var(--color-primary-element);\n\tfont-weight: bold;\n}\n\n.cn-run-sidebar__list,\n.cn-run-sidebar__touched,\n.cn-run-sidebar__steps {\n\tmargin: 0;\n\tpadding-inline-start: 0;\n\tlist-style: none;\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 6px;\n}\n\n.cn-run-sidebar__steps {\n\tlist-style: decimal;\n\tpadding-inline-start: 20px;\n}\n\n.cn-run-sidebar__row {\n\tdisplay: flex;\n\tgap: 8px;\n\talign-items: center;\n\tcolor: inherit;\n\tpadding: 6px 8px;\n\tborder-radius: var(--border-radius-large, 12px);\n\tbackground: var(--color-background-hover);\n}\n\n.cn-run-sidebar__touched-uuid {\n\tfont-family: monospace;\n\tfont-size: 0.9em;\n}\n\n/* A uuid is long and the sidebar is narrow, so a row wraps rather than\n pushing the panel wider. The gap keeps the parts apart on the line the\n separators already keep apart in the text. */\n.cn-run-sidebar__touched li {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: baseline;\n\tgap: 0 4px;\n}\n</style>\n"],"names":["CnFlowStepOutcomes","t"],"mappings":";;;;;;;;;;;;AA2PA,aAAe;CACd,IAAI,EAAE,oBAAoB;;CAE1B,UAAU,EAAE;AACX,EAAA,SAAS;AACT,EAAA,qBAAqB;AACrB,sBAAAA,UAAkB;AAClB,EAAA,eAAe;AACf,EAAA,kBAAkB;AAClB,EAAA,eAAe;AACf,EAAA,QAAQ;AACR,EAAA,MAAM;EACN;;AAED,CAAA,KAAK,EAAE;AACN;;;;AAIC;;AAED,EAAA,QAAQ,EAAE;GACT,IAAI,EAAE,OAAO;GACb,OAAO,EAAE,KAAK;GACd;EACD;;AAED,CAAA,KAAK,GAAG;EACP,OAAO,EAAE,KAAK,EAAE,YAAY,EAAG,EAAA;EAC/B;;AAED,CAAA,IAAI,GAAG;AACN,EAAA,OAAO,EAAE,GAAG,EAAE,SAAU,EAAA;EACxB;;AAED,CAAA,QAAQ,EAAE;AACT;AACC;AACA;;;;AAIA;AACA;AACA;;EAED,GAAG,GAAG;AACL,GAAA,MAAM,MAAK,GAAI,IAAI,CAAC,KAAK,CAAC,UAAQ;AAClC,GAAA,IAAI,MAAO,IAAG,MAAM,CAAC,MAAM,CAAC,IAAK,IAAG,EAAE,CAAE,KAAI,MA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IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAI,IAAK,EAAE,EAAE,GAAG,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,IAAI,CAAC,UAAW,IAAG,EAAE,CAAC,CAAC,EAAA;;AAE/F,GAAA,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC,KAAK,KAAK,CAAC,KAAK,CAAC,WAAW,EAAE,EAAE,GAAG,CAAC,CAAC,GAAG,MAAM;AAC3F,IAAA,GAAG,GAAG;AACN,IAAA,IAAI,EAAE,KAAK,CAAC,IAAI;IAChB,WAAW,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,IAAG,IAAK,EAAE,CAAC,CAAC;AACtD,IAAC,CAAC,CAAC,CAAA;GACH;;AAED;;;AAGA,EAAA,OAAO,GAAG;GACT,OAAO,cAAc,CAAC,IAAI,CAAC,GAAG,CAAA;GAC9B;;AAED;AACC;;EAED,SAAS,GAAG;AACX,GAAA,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,MAAO,KAAI,CAAC,EAAE;IAClC,OAAO,KAAI;AACZ,IAAA;;GAEA,MAAM,MAAK,GAAI,IAAI,CAAC,GAAG,EAAE,OAAK;AAC9B,GAAA,OAAO,MAAO,KAAI,SAAQ,IAAK,wBAAwB,CAAC,QAAQ,CAAC,MAAM,CAAA,KAAM,KAAI;GACjF;EACD;;AAED,CAAA,OAAO,EAAE;KACRC,SAAC;;AAED;AACC;AACA;;EAED,OAAO,CAAC,IAAI,EAAE;GACb,OAAO,WAAW,CAAC,CAAC,8BAA8B,EAAE,IAAI,CAAC,CAAC,CAAA;GAC1D;EACD;AACF;;;;"}
1
+ {"version":3,"file":"CnRunDetailSidebar.vue2.js","sources":["../../../../src/components/CnFlowDetail/CnRunDetailSidebar.vue"],"sourcesContent":["<!--\n CnRunDetailSidebar — one run: what it changed, what it asked a person to do,\n and what it did.\n\n WHY THIS IS A SIDEBAR AND NOT A PANEL INSIDE THE FLOW'S\n -------------------------------------------------------\n It used to be a block nested inside the Runs tab, with a tab strip of its own.\n That put TABS INSIDE A TAB: the flow's strip (Steps, Runs) stayed on screen\n above the run's (Objects, Tasks, Logs), and the two competed for the same\n glance. Worse, the flow's tabs were still live — pressing Steps while reading\n a run swapped the panel and left the canvas painted with that run's badges,\n so the graph and the sidebar were describing different things.\n\n So opening a run REPLACES the flow's sidebar rather than nesting inside it.\n One strip at a time, and the way back is a deliberate act with its own\n control. The canvas keeps the run's replay while this is open, which is now\n consistent rather than accidental: the sidebar and the graph are showing the\n same run because there is no way to make them show anything else.\n\n WHAT IT DOES NOT OWN\n --------------------\n The run's badges on the canvas. Those are the flow detail's animation, driven\n from `store.inspectedRunUuid` and the stored log. This component reads the\n same run; it does not paint.\n\n SPDX-FileCopyrightText: 2026 Conduction B.V. <info@conduction.nl>\n SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<section class=\"cn-run-sidebar\" data-testid=\"run-detail-sidebar\">\n\t\t<!--\n\t\t\tTHE WAY BACK, FIRST AND ALWAYS. A view that replaces another must\n\t\t\tsay what it replaced and how to undo that, or it reads as the\n\t\t\tapplication having navigated somewhere on its own.\n\t\t-->\n\t\t<div class=\"cn-run-sidebar__head\">\n\t\t\t<NcButton variant=\"tertiary\"\n\t\t\t\tdata-testid=\"run-back\"\n\t\t\t\t@click=\"store.closeRun()\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<ArrowLeft :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ t('nextcloud-vue', 'Back to the flow') }}\n\t\t\t</NcButton>\n\t\t</div>\n\n\t\t<h4 class=\"cn-run-sidebar__title\">\n\t\t\t<span :class=\"`cn-run-sidebar__status cn-run-sidebar__status--${outcome}`\"\n\t\t\t\tdata-testid=\"run-status\">{{ outcome || t('nextcloud-vue', 'Run') }}</span>\n\t\t\t<time v-if=\"run?.created\" class=\"cn-run-sidebar__when\" :datetime=\"run.created\">{{ run.created }}</time>\n\t\t</h4>\n\n\t\t<p v-if=\"run?.error\" class=\"cn-run-sidebar__error\" data-testid=\"run-error\">\n\t\t\t{{ run.error }}\n\t\t</p>\n\n\t\t<!--\n\t\t\tTHE STRIP IS NEXTCLOUD'S, NOT OURS.\n\n\t\t\tThese three used to be hand-rolled buttons with a border under the\n\t\t\tactive one. They sat directly inside NcAppSidebar, one element away\n\t\t\tfrom the real thing, so they read as a panel that had been dropped\n\t\t\tinto the sidebar rather than as the sidebar's own tabs: no icons,\n\t\t\tthe wrong size, the wrong active mark, and none of the keyboard\n\t\t\tbehaviour NcAppSidebarTabs brings.\n\n\t\t\tNcAppSidebarTab registers itself with the sidebar through an\n\t\t\tinjection, so the sidebar builds the strip. That also settles which\n\t\t\ttab is open: entering run view leaves `flow-runs` registered by\n\t\t\tnothing, and NcAppSidebarTabs falls back to the first tab it has,\n\t\t\twhich is Objects.\n\n\t\t\t`embedded` (CnFlowEditModal) has no NcAppSidebar to inject that, so\n\t\t\tit keeps a strip of its own. One list of tabs feeds both, so the two\n\t\t\thosts cannot come to offer different ones.\n\t\t-->\n\t\t<div v-if=\"embedded\" class=\"cn-run-sidebar__tabs\" role=\"tablist\">\n\t\t\t<button v-for=\"entry in tabs\"\n\t\t\t\t:key=\"entry.id\"\n\t\t\t\tclass=\"cn-run-sidebar__tab\"\n\t\t\t\t:class=\"{ 'cn-run-sidebar__tab--active': tab === entry.id }\"\n\t\t\t\trole=\"tab\"\n\t\t\t\t:data-testid=\"`flow-run-tab-${entry.id}`\"\n\t\t\t\t:aria-selected=\"tab === entry.id ? 'true' : 'false'\"\n\t\t\t\t@click=\"tab = entry.id\">\n\t\t\t\t{{ entry.label }}\n\t\t\t</button>\n\t\t</div>\n\n\t\t<!-- Objects: what the run is about, and what it changed. -->\n\t\t<component :is=\"embedded ? 'div' : 'NcAppSidebarTab'\"\n\t\t\tv-if=\"!embedded || tab === 'objects'\"\n\t\t\t:id=\"embedded ? undefined : 'run-objects'\"\n\t\t\t:name=\"embedded ? undefined : t('nextcloud-vue', 'Objects')\"\n\t\t\t:order=\"embedded ? undefined : 1\"\n\t\t\tdata-testid=\"flow-run-panel-objects\">\n\t\t\t<template v-if=\"!embedded\" #icon>\n\t\t\t\t<DatabaseOutline :size=\"20\" />\n\t\t\t</template>\n\n\t\t\t<!--\n\t\t\t\tTHE OBJECTS THE RUN IS ABOUT, FIRST.\n\n\t\t\t\t`GET /flow-runs/{uuid}/objects` answers the AUDIT: objects this\n\t\t\t\trun changed. A run that waited on a locked object and then\n\t\t\t\tfailed changed nothing, so that list is empty while the run's\n\t\t\t\town error names the object by uuid — and this panel said \"this\n\t\t\t\trun changed no objects\", which reads as the run having had\n\t\t\t\tnothing to do with it.\n\n\t\t\t\tThe run record knows better. `subjects` is what it was started\n\t\t\t\ton and `placeItems` is what it is holding at a step, so both are\n\t\t\t\tlisted here, and each row says which it is. The changed list\n\t\t\t\tkeeps its own heading below: \"worked on\" and \"changed\" are\n\t\t\t\tdifferent claims and this view exists to keep them apart.\n\t\t\t-->\n\t\t\t<template v-if=\"subjectRows.length\">\n\t\t\t\t<h5 class=\"cn-run-sidebar__group\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Objects this run is about') }}\n\t\t\t\t</h5>\n\t\t\t\t<ul class=\"cn-run-sidebar__touched\" data-testid=\"flow-run-subjects\">\n\t\t\t\t\t<!--\n\t\t\t\t\t\tSEPARATED IN THE TEXT, not only by layout. Three adjacent\n\t\t\t\t\t\tspans render as one run-on string: \"triggerDakkapel\n\t\t\t\t\t\tKerkstraat 122e98a265-...\" was what the live instance\n\t\t\t\t\t\tshowed. A gap would fix the look and leave the text\n\t\t\t\t\t\titself unreadable, which is what anything reading the\n\t\t\t\t\t\tDOM gets, so the separator is a character.\n\t\t\t\t\t-->\n\t\t\t\t\t<li v-for=\"obj in subjectRows\" :key=\"`${obj.role}-${obj.uuid}`\">\n\t\t\t\t\t\t<span class=\"cn-run-sidebar__touched-action\">{{ obj.role }}</span>\n\t\t\t\t\t\t<span v-if=\"obj.title\"> · {{ obj.title }}</span>\n\t\t\t\t\t\t<span class=\"cn-run-sidebar__touched-uuid\"> · {{ obj.uuid }}</span>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</template>\n\n\t\t\t<h5 v-if=\"subjectRows.length\" class=\"cn-run-sidebar__group\">\n\t\t\t\t{{ t('nextcloud-vue', 'Changed by this run') }}\n\t\t\t</h5>\n\t\t\t<p v-if=\"!objectRows.length\" class=\"cn-run-sidebar__hint\">\n\t\t\t\t{{ t('nextcloud-vue', 'This run changed no objects.') }}\n\t\t\t</p>\n\t\t\t<ul v-else class=\"cn-run-sidebar__touched\">\n\t\t\t\t<!-- Same separator as the subject rows above, and for the same\n\t\t\t\t reason: \"create\" and the uuid ran together as \"createobj-1\"\n\t\t\t\t with nothing between them. -->\n\t\t\t\t<li v-for=\"obj in objectRows\" :key=\"obj.auditUuid\">\n\t\t\t\t\t<span class=\"cn-run-sidebar__touched-action\">{{ obj.action }}</span>\n\t\t\t\t\t<span class=\"cn-run-sidebar__touched-uuid\"> · {{ obj.objectUuid }}</span>\n\t\t\t\t\t<span class=\"cn-run-sidebar__hint\"> · {{ obj.node }}</span>\n\t\t\t\t\t<!--\n\t\t\t\t\t\tA change the run's own step history cannot account for.\n\t\t\t\t\t\tIt should normally never appear; when it does, hiding it\n\t\t\t\t\t\twould be the opposite of what this view is for.\n\t\t\t\t\t-->\n\t\t\t\t\t<span v-if=\"obj.unaccounted\"\n\t\t\t\t\t\tclass=\"cn-run-sidebar__error\"\n\t\t\t\t\t\tdata-testid=\"flow-object-unaccounted\">\n\t\t\t\t\t\t{{ t('nextcloud-vue', 'no matching step') }}\n\t\t\t\t\t</span>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</component>\n\n\t\t<!-- Tasks: what the run asked a person to do. -->\n\t\t<component :is=\"embedded ? 'div' : 'NcAppSidebarTab'\"\n\t\t\tv-if=\"!embedded || tab === 'tasks'\"\n\t\t\t:id=\"embedded ? undefined : 'run-tasks'\"\n\t\t\t:name=\"embedded ? undefined : t('nextcloud-vue', 'Tasks')\"\n\t\t\t:order=\"embedded ? undefined : 2\"\n\t\t\tdata-testid=\"flow-run-panel-tasks\">\n\t\t\t<template v-if=\"!embedded\" #icon>\n\t\t\t\t<CheckboxMarkedOutline :size=\"20\" />\n\t\t\t</template>\n\n\t\t\t<p v-if=\"!store.runTasks.length\"\n\t\t\t\tclass=\"cn-run-sidebar__hint\"\n\t\t\t\tdata-testid=\"flow-run-tasks-empty\">\n\t\t\t\t{{ t('nextcloud-vue', 'This run raised no tasks.') }}\n\t\t\t</p>\n\t\t\t<ul v-else class=\"cn-run-sidebar__list\">\n\t\t\t\t<li v-for=\"task in store.runTasks\" :key=\"task.uuid\">\n\t\t\t\t\t<!-- The task's one stable address, the same one the\n\t\t\t\t\t notification buttons and the VTODO already resolve to. -->\n\t\t\t\t\t<a class=\"cn-run-sidebar__row\"\n\t\t\t\t\t\t:href=\"taskUrl(task.uuid)\"\n\t\t\t\t\t\tdata-testid=\"flow-task-link\">\n\t\t\t\t\t\t<span :class=\"`cn-run-sidebar__status cn-run-sidebar__status--${task.state}`\">{{ task.state }}</span>\n\t\t\t\t\t\t<span>{{ task.title || task.uuid }}</span>\n\t\t\t\t\t</a>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</component>\n\n\t\t<!-- Logs: what the engine did, in its own order. -->\n\t\t<component :is=\"embedded ? 'div' : 'NcAppSidebarTab'\"\n\t\t\tv-if=\"!embedded || tab === 'logs'\"\n\t\t\t:id=\"embedded ? undefined : 'run-logs'\"\n\t\t\t:name=\"embedded ? undefined : t('nextcloud-vue', 'Logs')\"\n\t\t\t:order=\"embedded ? undefined : 3\"\n\t\t\tdata-testid=\"flow-run-panel-logs\">\n\t\t\t<template v-if=\"!embedded\" #icon>\n\t\t\t\t<FormatListBulleted :size=\"20\" />\n\t\t\t</template>\n\n\t\t\t<!-- Replay BESIDE the step list, not instead of it: the list stays\n\t\t\t what it is for reading, the replay plays the same stored log\n\t\t\t through the canvas animator. Only on a FINISHED run — a run\n\t\t\t still going is watched live. -->\n\t\t\t<NcButton v-if=\"canReplay\"\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\tdata-testid=\"flow-replay\"\n\t\t\t\t@click=\"store.requestReplay()\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Replay :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ t('nextcloud-vue', 'Replay on the canvas') }}\n\t\t\t</NcButton>\n\n\t\t\t<p v-if=\"!store.steps.length\" class=\"cn-run-sidebar__hint\">\n\t\t\t\t{{ t('nextcloud-vue', 'This run recorded no steps.') }}\n\t\t\t</p>\n\t\t\t<ol v-else class=\"cn-run-sidebar__steps\">\n\t\t\t\t<li v-for=\"(step, i) in store.steps\" :key=\"i\">\n\t\t\t\t\t<strong>{{ step.transition }}</strong>\n\t\t\t\t\t<span class=\"cn-run-sidebar__hint\"> · {{ step.status }}</span>\n\t\t\t\t\t<span v-if=\"step.error\" class=\"cn-run-sidebar__error\"> · {{ step.error }}</span>\n\t\t\t\t\t<!-- Every bucket a node reported on this hop: a send step's\n\t\t\t\t\t `messaging` (who got it, who opted out, ...), a sync\n\t\t\t\t\t step's own tally (`fetch`, `contract`, `write`, `sweep` —\n\t\t\t\t\t objects fetched, create/update/skip/invalid, created/\n\t\t\t\t\t updated, swept). One node writes one key in practice, but\n\t\t\t\t\t nothing here assumes that. -->\n\t\t\t\t\t<CnFlowStepOutcomes v-for=\"block in reportBlocks(step)\"\n\t\t\t\t\t\t:key=\"block.key\"\n\t\t\t\t\t\t:report=\"block.value\"\n\t\t\t\t\t\t:hideZero=\"block.key === 'messaging'\"\n\t\t\t\t\t\t:label=\"blockLabel(block.key)\" />\n\t\t\t\t</li>\n\t\t\t</ol>\n\t\t</component>\n\t</section>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { generateUrl } from '@nextcloud/router'\nimport { NcAppSidebarTab, NcButton } from '@nextcloud/vue'\nimport ArrowLeft from 'vue-material-design-icons/ArrowLeft.vue'\nimport CheckboxMarkedOutline from 'vue-material-design-icons/CheckboxMarkedOutline.vue'\nimport DatabaseOutline from 'vue-material-design-icons/DatabaseOutline.vue'\nimport FormatListBulleted from 'vue-material-design-icons/FormatListBulleted.vue'\nimport Replay from 'vue-material-design-icons/Replay.vue'\nimport CnFlowStepOutcomes from '../CnFlowStepOutcomes/CnFlowStepOutcomes.vue'\nimport { FLOW_RUN_ACTIVE_STATUSES, useFlowStore } from '../../composables/useFlowStore.js'\nimport { flowRunOutcome } from '../../utils/flowRunStatus.js'\n\nexport default {\n\tname: 'CnRunDetailSidebar',\n\n\tcomponents: {\n\t\tArrowLeft,\n\t\tCheckboxMarkedOutline,\n\t\tCnFlowStepOutcomes,\n\t\tDatabaseOutline,\n\t\tFormatListBulleted,\n\t\tNcAppSidebarTab,\n\t\tNcButton,\n\t\tReplay,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Render the panels without NcAppSidebarTab, for a host that is not\n\t\t * NcAppSidebar. CnFlowEditModal renders this sidebar inside a dialog,\n\t\t * where there is no sidebar to register a tab with, so that host keeps\n\t\t * a strip of its own.\n\t\t */\n\t\tembedded: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tsetup() {\n\t\treturn { store: useFlowStore() }\n\t},\n\n\tdata() {\n\t\treturn { tab: 'objects' }\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * The run being read.\n\t\t *\n\t\t * The run's OWN record first, the history list second. The list is\n\t\t * capped at 25, so a run opened from a `?run=` deep link need not be in\n\t\t * it, and reading only the list left such a run with no status, no time\n\t\t * and no error on screen.\n\t\t *\n\t\t * @return {object|null} The run being read.\n\t\t */\n\t\trun() {\n\t\t\tconst detail = this.store.runDetail\n\t\t\tif (detail && String(detail.uuid || '') === String(this.store.inspectedRunUuid || '')) {\n\t\t\t\treturn detail\n\t\t\t}\n\n\t\t\treturn this.store.runs.find((r) => r.uuid === this.store.inspectedRunUuid) || null\n\t\t},\n\n\t\t/**\n\t\t * The objects the run is ABOUT, as opposed to the ones it changed.\n\t\t *\n\t\t * Two sources, both on the run's own record. `subjects` is what the run\n\t\t * was started on, keyed by the role that supplied it (`trigger` for a\n\t\t * run a trigger started). `placeItems` is what the run is holding at a\n\t\t * step right now, keyed by that step.\n\t\t *\n\t\t * Deduplicated by uuid, because a run's subject is normally also the\n\t\t * item sitting in a place and listing it twice would suggest two\n\t\t * objects. The subject wins the row: it is the more durable fact.\n\t\t *\n\t\t * @return {Array<object>} The rows, subjects first.\n\t\t */\n\t\tsubjectRows() {\n\t\t\tconst run = this.run\n\t\t\tif (!run) {\n\t\t\t\treturn []\n\t\t\t}\n\n\t\t\t// The held items first, because they are the half that carries a\n\t\t\t// TITLE. A subject record is a uuid, a register and a schema; the\n\t\t\t// item sitting in a place is the object itself. Merging the two\n\t\t\t// gives a subject row a name a reader recognises instead of a uuid.\n\t\t\tconst held = new Map()\n\t\t\tfor (const [node, items] of Object.entries(run.placeItems || {})) {\n\t\t\t\tfor (const item of items || []) {\n\t\t\t\t\tconst uuid = String(item?.json?.id || item?.id || '')\n\t\t\t\t\tif (uuid === '' || held.has(uuid)) {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\n\t\t\t\t\theld.set(uuid, {\n\t\t\t\t\t\t// Named by the step that is holding it, because that is\n\t\t\t\t\t\t// the useful half: \"which step is this stuck at\".\n\t\t\t\t\t\trole: this.t('nextcloud-vue', 'at {node}', { node }),\n\t\t\t\t\t\tuuid,\n\t\t\t\t\t\ttitle: item?.json?.title || '',\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst rows = []\n\t\t\tconst seen = new Set()\n\n\t\t\tfor (const [role, subject] of Object.entries(run.subjects || {})) {\n\t\t\t\tconst uuid = String(subject?.uuid || '')\n\t\t\t\tif (uuid === '' || seen.has(uuid)) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\tseen.add(uuid)\n\t\t\t\trows.push({\n\t\t\t\t\trole,\n\t\t\t\t\tuuid,\n\t\t\t\t\ttitle: subject?.title || held.get(uuid)?.title || '',\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tfor (const [uuid, row] of held.entries()) {\n\t\t\t\tif (seen.has(uuid) === false) {\n\t\t\t\t\tseen.add(uuid)\n\t\t\t\t\trows.push(row)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn rows\n\t\t},\n\n\t\t/**\n\t\t * @return {Array<object>} The strip.\n\t\t */\n\t\ttabs() {\n\t\t\treturn [\n\t\t\t\t{ id: 'objects', label: this.t('nextcloud-vue', 'Objects') },\n\t\t\t\t{ id: 'tasks', label: this.t('nextcloud-vue', 'Tasks') },\n\t\t\t\t{ id: 'logs', label: this.t('nextcloud-vue', 'Logs') },\n\t\t\t]\n\t\t},\n\n\t\t/**\n\t\t * Every object the run touched, flattened, each marked with the step\n\t\t * that accounts for it.\n\t\t *\n\t\t * @return {Array<object>} The rows.\n\t\t */\n\t\tobjectRows() {\n\t\t\tconst stepNodes = new Set((this.store.steps || []).map((step) => String(step.transition || '')))\n\n\t\t\treturn (this.store.runObjects || []).flatMap((group) => (group.objects || []).map((obj) => ({\n\t\t\t\t...obj,\n\t\t\t\tnode: group.node,\n\t\t\t\tunaccounted: !stepNodes.has(String(group.node || '')),\n\t\t\t})))\n\t\t},\n\n\t\t/**\n\t\t * @return {string} How the run ended, in the engine's status words.\n\t\t */\n\t\toutcome() {\n\t\t\treturn flowRunOutcome(this.run)\n\t\t},\n\n\t\t/**\n\t\t * @return {boolean} True when Replay is offered.\n\t\t */\n\t\tcanReplay() {\n\t\t\tif (this.store.steps.length === 0) {\n\t\t\t\treturn false\n\t\t\t}\n\n\t\t\tconst status = this.run?.status\n\t\t\treturn status !== undefined && FLOW_RUN_ACTIVE_STATUSES.includes(status) === false\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/**\n\t\t * @param {string} uuid The task uuid.\n\t\t * @return {string} The task's own URL.\n\t\t */\n\t\ttaskUrl(uuid) {\n\t\t\treturn generateUrl(`/apps/openregister/flow-tasks/${uuid}`)\n\t\t},\n\n\t\t/**\n\t\t * A step's report, as the named blocks `CnFlowStepOutcomes` renders.\n\t\t *\n\t\t * `step.report` is a map of named summaries (`messaging`, `fetch`,\n\t\t * `contract`, `write`, `sweep`, ...) — whatever node(s) on this hop\n\t\t * wrote one, keyed per {@see FlowStepReport::put()} on the server. Each\n\t\t * value is itself a bucket map (`{count, sample}` per bucket), the\n\t\t * shape `CnFlowStepOutcomes` already knows how to draw.\n\t\t *\n\t\t * @param {object} step The log entry.\n\t\t * @return {Array<{key: string, value: object}>} One entry per report key.\n\t\t */\n\t\treportBlocks(step) {\n\t\t\tconst report = step && step.report\n\t\t\tif (!report || typeof report !== 'object') {\n\t\t\t\treturn []\n\t\t\t}\n\n\t\t\treturn Object.keys(report)\n\t\t\t\t.filter((key) => report[key] && typeof report[key] === 'object')\n\t\t\t\t.map((key) => ({ key, value: report[key] }))\n\t\t},\n\n\t\t/**\n\t\t * What a report block is a tally of, for `CnFlowStepOutcomes`'\n\t\t * `label` prop — its visible caption and accessible name.\n\t\t *\n\t\t * `null` for `messaging`: that block keeps the component's own\n\t\t * send-specific default (\"Who this step reached\") and no caption,\n\t\t * since a step writes at most one messaging block, so it needs\n\t\t * neither a caption to tell it apart from a sibling nor a different\n\t\t * accessible name.\n\t\t *\n\t\t * @param {string} key The report block's key.\n\t\t * @return {string|null} The label, or `null` for `messaging`.\n\t\t */\n\t\tblockLabel(key) {\n\t\t\tif (key === 'messaging') {\n\t\t\t\treturn null\n\t\t\t}\n\n\t\t\tconst labels = {\n\t\t\t\tfetch: this.t('nextcloud-vue', 'Fetch'),\n\t\t\t\tcontract: this.t('nextcloud-vue', 'Decision'),\n\t\t\t\twrite: this.t('nextcloud-vue', 'Write'),\n\t\t\t\tsweep: this.t('nextcloud-vue', 'Sweep'),\n\t\t\t}\n\n\t\t\treturn labels[key] || key\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-run-sidebar {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n\tpadding: 12px;\n}\n\n.cn-run-sidebar__head {\n\tdisplay: flex;\n}\n\n.cn-run-sidebar__title {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tmargin: 0;\n}\n\n.cn-run-sidebar__when {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-weight: normal;\n\tfont-size: 0.9em;\n\tfont-variant-numeric: tabular-nums;\n}\n\n.cn-run-sidebar__error {\n\tcolor: var(--color-error-text, var(--color-error));\n}\n\n.cn-run-sidebar__hint {\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-run-sidebar__group {\n\tmargin: 8px 0 0;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-weight: bold;\n}\n\n.cn-run-sidebar__tabs {\n\tdisplay: flex;\n\tgap: 4px;\n\tborder-block-end: 1px solid var(--color-border);\n}\n\n.cn-run-sidebar__tab {\n\tborder: none;\n\tbackground: none;\n\tpadding: 8px 12px;\n\tcursor: pointer;\n\tcolor: var(--color-main-text);\n\tborder-block-end: 2px solid transparent;\n}\n\n.cn-run-sidebar__tab--active {\n\tborder-block-end-color: var(--color-primary-element);\n\tfont-weight: bold;\n}\n\n.cn-run-sidebar__list,\n.cn-run-sidebar__touched,\n.cn-run-sidebar__steps {\n\tmargin: 0;\n\tpadding-inline-start: 0;\n\tlist-style: none;\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 6px;\n}\n\n.cn-run-sidebar__steps {\n\tlist-style: decimal;\n\tpadding-inline-start: 20px;\n}\n\n.cn-run-sidebar__row {\n\tdisplay: flex;\n\tgap: 8px;\n\talign-items: center;\n\tcolor: inherit;\n\tpadding: 6px 8px;\n\tborder-radius: var(--border-radius-large, 12px);\n\tbackground: var(--color-background-hover);\n}\n\n.cn-run-sidebar__touched-uuid {\n\tfont-family: monospace;\n\tfont-size: 0.9em;\n}\n\n/* A uuid is long and the sidebar is narrow, so a row wraps rather than\n pushing the panel wider. The gap keeps the parts apart on the line the\n separators already keep apart in the text. */\n.cn-run-sidebar__touched li {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: baseline;\n\tgap: 0 4px;\n}\n</style>\n"],"names":["CnFlowStepOutcomes","t"],"mappings":";;;;;;;;;;;;AAkQA,aAAe;CACd,IAAI,EAAE,oBAAoB;;CAE1B,UAAU,EAAE;AACX,EAAA,SAAS;AACT,EAAA,qBAAqB;AACrB,sBAAAA,UAAkB;AAClB,EAAA,eAAe;AACf,EAAA,kBAAkB;AAClB,EAAA,eAAe;AACf,EAAA,QAAQ;AACR,EAAA,MAAM;EACN;;AAED,CAAA,KAAK,EAAE;AACN;;;;AAIC;;AAED,EAAA,QAAQ,EAAE;GACT,IAAI,EAAE,OAAO;GACb,OAAO,EAAE,KAAK;GACd;EACD;;AAED,CAAA,KAAK,GAAG;EACP,OAAO,EAAE,KAAK,EAAE,YAAY,EAAG,EAAA;EAC/B;;AAED,CAAA,IAAI,GAAG;AACN,EAAA,OAAO,EAAE,GAAG,EAAE,SAAU,EAAA;EACxB;;AAED,CAAA,QAAQ,EAAE;AACT;AACC;AACA;;;;AAIA;AACA;AACA;;EAED,GAAG,GAAG;AACL,GAAA,MAAM,MAAK,GAAI,IAAI,CAAC,KAAK,CAAC,UAAQ;AAClC,GAAA,IAAI,MAAO,IAAG,MAAM,CAAC,MAAM,CAAC,IAAK,IAAG,EAAE,CAAE,KAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,oBAAoB,EAAE,CAAC,EAAE;IACtF,OAAO,MAAK;AACb,IAAA;;AAEA,GAAA,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAK,KAAI,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAE,IAAG,IAAG;GACj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CAAC,CAAC,GAAG,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,GAAG,CAAA,EAAG,CAAC,CAAA;GAC5C;;AAED;;;AAGC;;;;;AAKA;AACA;AACA;;;AAGD,EAAA,UAAU,CAAC,GAAG,EAAE;AACf,GAAA,IAAI,GAAI,KAAI,WAAW,EAAE;AACxB,IAAA,OAAO,IAAG;AACX,IAAA;;GAEA,MAAM,MAAK,GAAI;AACd,IAAA,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,eAAe,EAAE,OAAO,CAAC;AACvC,IAAA,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,eAAe,EAAE,UAAU,CAAC;AAC7C,IAAA,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,eAAe,EAAE,OAAO,CAAC;AACvC,IAAA,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,eAAe,EAAE,OAAO,CAAC;AACxC,KAAA;;AAEA,GAAA,OAAO,MAAM,CAAC,GAAG,KAAK,GAAE;GACxB;EACD;AACF;;;;"}
@@ -263,12 +263,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
263
263
  (step.error)
264
264
  ? (openBlock(), createElementBlock("span", _hoisted_26, " · " + toDisplayString(step.error), 1 /* TEXT */))
265
265
  : createCommentVNode("v-if", true),
266
- (step.report && step.report.messaging)
267
- ? (openBlock(), createBlock(_component_CnFlowStepOutcomes, {
268
- key: 1,
269
- report: step.report.messaging
270
- }, null, 8 /* PROPS */, ["report"]))
271
- : createCommentVNode("v-if", true)
266
+ (openBlock(true), createElementBlock(Fragment, null, renderList($options.reportBlocks(step), (block) => {
267
+ return (openBlock(), createBlock(_component_CnFlowStepOutcomes, {
268
+ key: block.key,
269
+ report: block.value,
270
+ hideZero: block.key === 'messaging',
271
+ label: $options.blockLabel(block.key)
272
+ }, null, 8 /* PROPS */, ["report", "hideZero", "label"]))
273
+ }), 128 /* KEYED_FRAGMENT */))
272
274
  ]))
273
275
  }), 128 /* KEYED_FRAGMENT */))
274
276
  ]))
@@ -1 +1 @@
1
- {"version":3,"file":"CnRunDetailSidebar.vue3.js","sources":["../../../../src/components/CnFlowDetail/CnRunDetailSidebar.vue?vue&type=template&id=9f3603dc&lang.js"],"sourcesContent":["<!--\n CnRunDetailSidebar — one run: what it changed, what it asked a person to do,\n and what it did.\n\n WHY THIS IS A SIDEBAR AND NOT A PANEL INSIDE THE FLOW'S\n -------------------------------------------------------\n It used to be a block nested inside the Runs tab, with a tab strip of its own.\n That put TABS INSIDE A TAB: the flow's strip (Steps, Runs) stayed on screen\n above the run's (Objects, Tasks, Logs), and the two competed for the same\n glance. Worse, the flow's tabs were still live — pressing Steps while reading\n a run swapped the panel and left the canvas painted with that run's badges,\n so the graph and the sidebar were describing different things.\n\n So opening a run REPLACES the flow's sidebar rather than nesting inside it.\n One strip at a time, and the way back is a deliberate act with its own\n control. The canvas keeps the run's replay while this is open, which is now\n consistent rather than accidental: the sidebar and the graph are showing the\n same run because there is no way to make them show anything else.\n\n WHAT IT DOES NOT OWN\n --------------------\n The run's badges on the canvas. Those are the flow detail's animation, driven\n from `store.inspectedRunUuid` and the stored log. This component reads the\n same run; it does not paint.\n\n SPDX-FileCopyrightText: 2026 Conduction B.V. <info@conduction.nl>\n SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<section class=\"cn-run-sidebar\" data-testid=\"run-detail-sidebar\">\n\t\t<!--\n\t\t\tTHE WAY BACK, FIRST AND ALWAYS. A view that replaces another must\n\t\t\tsay what it replaced and how to undo that, or it reads as the\n\t\t\tapplication having navigated somewhere on its own.\n\t\t-->\n\t\t<div class=\"cn-run-sidebar__head\">\n\t\t\t<NcButton variant=\"tertiary\"\n\t\t\t\tdata-testid=\"run-back\"\n\t\t\t\t@click=\"store.closeRun()\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<ArrowLeft :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ t('nextcloud-vue', 'Back to the flow') }}\n\t\t\t</NcButton>\n\t\t</div>\n\n\t\t<h4 class=\"cn-run-sidebar__title\">\n\t\t\t<span :class=\"`cn-run-sidebar__status cn-run-sidebar__status--${outcome}`\"\n\t\t\t\tdata-testid=\"run-status\">{{ outcome || t('nextcloud-vue', 'Run') }}</span>\n\t\t\t<time v-if=\"run?.created\" class=\"cn-run-sidebar__when\" :datetime=\"run.created\">{{ run.created }}</time>\n\t\t</h4>\n\n\t\t<p v-if=\"run?.error\" class=\"cn-run-sidebar__error\" data-testid=\"run-error\">\n\t\t\t{{ run.error }}\n\t\t</p>\n\n\t\t<!--\n\t\t\tTHE STRIP IS NEXTCLOUD'S, NOT OURS.\n\n\t\t\tThese three used to be hand-rolled buttons with a border under the\n\t\t\tactive one. They sat directly inside NcAppSidebar, one element away\n\t\t\tfrom the real thing, so they read as a panel that had been dropped\n\t\t\tinto the sidebar rather than as the sidebar's own tabs: no icons,\n\t\t\tthe wrong size, the wrong active mark, and none of the keyboard\n\t\t\tbehaviour NcAppSidebarTabs brings.\n\n\t\t\tNcAppSidebarTab registers itself with the sidebar through an\n\t\t\tinjection, so the sidebar builds the strip. That also settles which\n\t\t\ttab is open: entering run view leaves `flow-runs` registered by\n\t\t\tnothing, and NcAppSidebarTabs falls back to the first tab it has,\n\t\t\twhich is Objects.\n\n\t\t\t`embedded` (CnFlowEditModal) has no NcAppSidebar to inject that, so\n\t\t\tit keeps a strip of its own. One list of tabs feeds both, so the two\n\t\t\thosts cannot come to offer different ones.\n\t\t-->\n\t\t<div v-if=\"embedded\" class=\"cn-run-sidebar__tabs\" role=\"tablist\">\n\t\t\t<button v-for=\"entry in tabs\"\n\t\t\t\t:key=\"entry.id\"\n\t\t\t\tclass=\"cn-run-sidebar__tab\"\n\t\t\t\t:class=\"{ 'cn-run-sidebar__tab--active': tab === entry.id }\"\n\t\t\t\trole=\"tab\"\n\t\t\t\t:data-testid=\"`flow-run-tab-${entry.id}`\"\n\t\t\t\t:aria-selected=\"tab === entry.id ? 'true' : 'false'\"\n\t\t\t\t@click=\"tab = entry.id\">\n\t\t\t\t{{ entry.label }}\n\t\t\t</button>\n\t\t</div>\n\n\t\t<!-- Objects: what the run is about, and what it changed. -->\n\t\t<component :is=\"embedded ? 'div' : 'NcAppSidebarTab'\"\n\t\t\tv-if=\"!embedded || tab === 'objects'\"\n\t\t\t:id=\"embedded ? undefined : 'run-objects'\"\n\t\t\t:name=\"embedded ? undefined : t('nextcloud-vue', 'Objects')\"\n\t\t\t:order=\"embedded ? undefined : 1\"\n\t\t\tdata-testid=\"flow-run-panel-objects\">\n\t\t\t<template v-if=\"!embedded\" #icon>\n\t\t\t\t<DatabaseOutline :size=\"20\" />\n\t\t\t</template>\n\n\t\t\t<!--\n\t\t\t\tTHE OBJECTS THE RUN IS ABOUT, FIRST.\n\n\t\t\t\t`GET /flow-runs/{uuid}/objects` answers the AUDIT: objects this\n\t\t\t\trun changed. A run that waited on a locked object and then\n\t\t\t\tfailed changed nothing, so that list is empty while the run's\n\t\t\t\town error names the object by uuid — and this panel said \"this\n\t\t\t\trun changed no objects\", which reads as the run having had\n\t\t\t\tnothing to do with it.\n\n\t\t\t\tThe run record knows better. `subjects` is what it was started\n\t\t\t\ton and `placeItems` is what it is holding at a step, so both are\n\t\t\t\tlisted here, and each row says which it is. The changed list\n\t\t\t\tkeeps its own heading below: \"worked on\" and \"changed\" are\n\t\t\t\tdifferent claims and this view exists to keep them apart.\n\t\t\t-->\n\t\t\t<template v-if=\"subjectRows.length\">\n\t\t\t\t<h5 class=\"cn-run-sidebar__group\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Objects this run is about') }}\n\t\t\t\t</h5>\n\t\t\t\t<ul class=\"cn-run-sidebar__touched\" data-testid=\"flow-run-subjects\">\n\t\t\t\t\t<!--\n\t\t\t\t\t\tSEPARATED IN THE TEXT, not only by layout. Three adjacent\n\t\t\t\t\t\tspans render as one run-on string: \"triggerDakkapel\n\t\t\t\t\t\tKerkstraat 122e98a265-...\" was what the live instance\n\t\t\t\t\t\tshowed. A gap would fix the look and leave the text\n\t\t\t\t\t\titself unreadable, which is what anything reading the\n\t\t\t\t\t\tDOM gets, so the separator is a character.\n\t\t\t\t\t-->\n\t\t\t\t\t<li v-for=\"obj in subjectRows\" :key=\"`${obj.role}-${obj.uuid}`\">\n\t\t\t\t\t\t<span class=\"cn-run-sidebar__touched-action\">{{ obj.role }}</span>\n\t\t\t\t\t\t<span v-if=\"obj.title\"> · {{ obj.title }}</span>\n\t\t\t\t\t\t<span class=\"cn-run-sidebar__touched-uuid\"> · {{ obj.uuid }}</span>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</template>\n\n\t\t\t<h5 v-if=\"subjectRows.length\" class=\"cn-run-sidebar__group\">\n\t\t\t\t{{ t('nextcloud-vue', 'Changed by this run') }}\n\t\t\t</h5>\n\t\t\t<p v-if=\"!objectRows.length\" class=\"cn-run-sidebar__hint\">\n\t\t\t\t{{ t('nextcloud-vue', 'This run changed no objects.') }}\n\t\t\t</p>\n\t\t\t<ul v-else class=\"cn-run-sidebar__touched\">\n\t\t\t\t<!-- Same separator as the subject rows above, and for the same\n\t\t\t\t reason: \"create\" and the uuid ran together as \"createobj-1\"\n\t\t\t\t with nothing between them. -->\n\t\t\t\t<li v-for=\"obj in objectRows\" :key=\"obj.auditUuid\">\n\t\t\t\t\t<span class=\"cn-run-sidebar__touched-action\">{{ obj.action }}</span>\n\t\t\t\t\t<span class=\"cn-run-sidebar__touched-uuid\"> · {{ obj.objectUuid }}</span>\n\t\t\t\t\t<span class=\"cn-run-sidebar__hint\"> · {{ obj.node }}</span>\n\t\t\t\t\t<!--\n\t\t\t\t\t\tA change the run's own step history cannot account for.\n\t\t\t\t\t\tIt should normally never appear; when it does, hiding it\n\t\t\t\t\t\twould be the opposite of what this view is for.\n\t\t\t\t\t-->\n\t\t\t\t\t<span v-if=\"obj.unaccounted\"\n\t\t\t\t\t\tclass=\"cn-run-sidebar__error\"\n\t\t\t\t\t\tdata-testid=\"flow-object-unaccounted\">\n\t\t\t\t\t\t{{ t('nextcloud-vue', 'no matching step') }}\n\t\t\t\t\t</span>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</component>\n\n\t\t<!-- Tasks: what the run asked a person to do. -->\n\t\t<component :is=\"embedded ? 'div' : 'NcAppSidebarTab'\"\n\t\t\tv-if=\"!embedded || tab === 'tasks'\"\n\t\t\t:id=\"embedded ? undefined : 'run-tasks'\"\n\t\t\t:name=\"embedded ? undefined : t('nextcloud-vue', 'Tasks')\"\n\t\t\t:order=\"embedded ? undefined : 2\"\n\t\t\tdata-testid=\"flow-run-panel-tasks\">\n\t\t\t<template v-if=\"!embedded\" #icon>\n\t\t\t\t<CheckboxMarkedOutline :size=\"20\" />\n\t\t\t</template>\n\n\t\t\t<p v-if=\"!store.runTasks.length\"\n\t\t\t\tclass=\"cn-run-sidebar__hint\"\n\t\t\t\tdata-testid=\"flow-run-tasks-empty\">\n\t\t\t\t{{ t('nextcloud-vue', 'This run raised no tasks.') }}\n\t\t\t</p>\n\t\t\t<ul v-else class=\"cn-run-sidebar__list\">\n\t\t\t\t<li v-for=\"task in store.runTasks\" :key=\"task.uuid\">\n\t\t\t\t\t<!-- The task's one stable address, the same one the\n\t\t\t\t\t notification buttons and the VTODO already resolve to. -->\n\t\t\t\t\t<a class=\"cn-run-sidebar__row\"\n\t\t\t\t\t\t:href=\"taskUrl(task.uuid)\"\n\t\t\t\t\t\tdata-testid=\"flow-task-link\">\n\t\t\t\t\t\t<span :class=\"`cn-run-sidebar__status cn-run-sidebar__status--${task.state}`\">{{ task.state }}</span>\n\t\t\t\t\t\t<span>{{ task.title || task.uuid }}</span>\n\t\t\t\t\t</a>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</component>\n\n\t\t<!-- Logs: what the engine did, in its own order. -->\n\t\t<component :is=\"embedded ? 'div' : 'NcAppSidebarTab'\"\n\t\t\tv-if=\"!embedded || tab === 'logs'\"\n\t\t\t:id=\"embedded ? undefined : 'run-logs'\"\n\t\t\t:name=\"embedded ? undefined : t('nextcloud-vue', 'Logs')\"\n\t\t\t:order=\"embedded ? undefined : 3\"\n\t\t\tdata-testid=\"flow-run-panel-logs\">\n\t\t\t<template v-if=\"!embedded\" #icon>\n\t\t\t\t<FormatListBulleted :size=\"20\" />\n\t\t\t</template>\n\n\t\t\t<!-- Replay BESIDE the step list, not instead of it: the list stays\n\t\t\t what it is for reading, the replay plays the same stored log\n\t\t\t through the canvas animator. Only on a FINISHED run — a run\n\t\t\t still going is watched live. -->\n\t\t\t<NcButton v-if=\"canReplay\"\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\tdata-testid=\"flow-replay\"\n\t\t\t\t@click=\"store.requestReplay()\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Replay :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ t('nextcloud-vue', 'Replay on the canvas') }}\n\t\t\t</NcButton>\n\n\t\t\t<p v-if=\"!store.steps.length\" class=\"cn-run-sidebar__hint\">\n\t\t\t\t{{ t('nextcloud-vue', 'This run recorded no steps.') }}\n\t\t\t</p>\n\t\t\t<ol v-else class=\"cn-run-sidebar__steps\">\n\t\t\t\t<li v-for=\"(step, i) in store.steps\" :key=\"i\">\n\t\t\t\t\t<strong>{{ step.transition }}</strong>\n\t\t\t\t\t<span class=\"cn-run-sidebar__hint\"> · {{ step.status }}</span>\n\t\t\t\t\t<span v-if=\"step.error\" class=\"cn-run-sidebar__error\"> · {{ step.error }}</span>\n\t\t\t\t\t<!-- A send step's outcome lists, by name: who got it, who\n\t\t\t\t\t opted out, who the opt-out check could not answer for. -->\n\t\t\t\t\t<CnFlowStepOutcomes v-if=\"step.report && step.report.messaging\"\n\t\t\t\t\t\t:report=\"step.report.messaging\" />\n\t\t\t\t</li>\n\t\t\t</ol>\n\t\t</component>\n\t</section>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { generateUrl } from '@nextcloud/router'\nimport { NcAppSidebarTab, NcButton } from '@nextcloud/vue'\nimport ArrowLeft from 'vue-material-design-icons/ArrowLeft.vue'\nimport CheckboxMarkedOutline from 'vue-material-design-icons/CheckboxMarkedOutline.vue'\nimport DatabaseOutline from 'vue-material-design-icons/DatabaseOutline.vue'\nimport FormatListBulleted from 'vue-material-design-icons/FormatListBulleted.vue'\nimport Replay from 'vue-material-design-icons/Replay.vue'\nimport CnFlowStepOutcomes from '../CnFlowStepOutcomes/CnFlowStepOutcomes.vue'\nimport { FLOW_RUN_ACTIVE_STATUSES, useFlowStore } from '../../composables/useFlowStore.js'\nimport { flowRunOutcome } from '../../utils/flowRunStatus.js'\n\nexport default {\n\tname: 'CnRunDetailSidebar',\n\n\tcomponents: {\n\t\tArrowLeft,\n\t\tCheckboxMarkedOutline,\n\t\tCnFlowStepOutcomes,\n\t\tDatabaseOutline,\n\t\tFormatListBulleted,\n\t\tNcAppSidebarTab,\n\t\tNcButton,\n\t\tReplay,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Render the panels without NcAppSidebarTab, for a host that is not\n\t\t * NcAppSidebar. CnFlowEditModal renders this sidebar inside a dialog,\n\t\t * where there is no sidebar to register a tab with, so that host keeps\n\t\t * a strip of its own.\n\t\t */\n\t\tembedded: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tsetup() {\n\t\treturn { store: useFlowStore() }\n\t},\n\n\tdata() {\n\t\treturn { tab: 'objects' }\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * The run being read.\n\t\t *\n\t\t * The run's OWN record first, the history list second. The list is\n\t\t * capped at 25, so a run opened from a `?run=` deep link need not be in\n\t\t * it, and reading only the list left such a run with no status, no time\n\t\t * and no error on screen.\n\t\t *\n\t\t * @return {object|null} The run being read.\n\t\t */\n\t\trun() {\n\t\t\tconst detail = this.store.runDetail\n\t\t\tif (detail && String(detail.uuid || '') === String(this.store.inspectedRunUuid || '')) {\n\t\t\t\treturn detail\n\t\t\t}\n\n\t\t\treturn this.store.runs.find((r) => r.uuid === this.store.inspectedRunUuid) || null\n\t\t},\n\n\t\t/**\n\t\t * The objects the run is ABOUT, as opposed to the ones it changed.\n\t\t *\n\t\t * Two sources, both on the run's own record. `subjects` is what the run\n\t\t * was started on, keyed by the role that supplied it (`trigger` for a\n\t\t * run a trigger started). `placeItems` is what the run is holding at a\n\t\t * step right now, keyed by that step.\n\t\t *\n\t\t * Deduplicated by uuid, because a run's subject is normally also the\n\t\t * item sitting in a place and listing it twice would suggest two\n\t\t * objects. The subject wins the row: it is the more durable fact.\n\t\t *\n\t\t * @return {Array<object>} The rows, subjects first.\n\t\t */\n\t\tsubjectRows() {\n\t\t\tconst run = this.run\n\t\t\tif (!run) {\n\t\t\t\treturn []\n\t\t\t}\n\n\t\t\t// The held items first, because they are the half that carries a\n\t\t\t// TITLE. A subject record is a uuid, a register and a schema; the\n\t\t\t// item sitting in a place is the object itself. Merging the two\n\t\t\t// gives a subject row a name a reader recognises instead of a uuid.\n\t\t\tconst held = new Map()\n\t\t\tfor (const [node, items] of Object.entries(run.placeItems || {})) {\n\t\t\t\tfor (const item of items || []) {\n\t\t\t\t\tconst uuid = String(item?.json?.id || item?.id || '')\n\t\t\t\t\tif (uuid === '' || held.has(uuid)) {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\n\t\t\t\t\theld.set(uuid, {\n\t\t\t\t\t\t// Named by the step that is holding it, because that is\n\t\t\t\t\t\t// the useful half: \"which step is this stuck at\".\n\t\t\t\t\t\trole: this.t('nextcloud-vue', 'at {node}', { node }),\n\t\t\t\t\t\tuuid,\n\t\t\t\t\t\ttitle: item?.json?.title || '',\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst rows = []\n\t\t\tconst seen = new Set()\n\n\t\t\tfor (const [role, subject] of Object.entries(run.subjects || {})) {\n\t\t\t\tconst uuid = String(subject?.uuid || '')\n\t\t\t\tif (uuid === '' || seen.has(uuid)) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\tseen.add(uuid)\n\t\t\t\trows.push({\n\t\t\t\t\trole,\n\t\t\t\t\tuuid,\n\t\t\t\t\ttitle: subject?.title || held.get(uuid)?.title || '',\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tfor (const [uuid, row] of held.entries()) {\n\t\t\t\tif (seen.has(uuid) === false) {\n\t\t\t\t\tseen.add(uuid)\n\t\t\t\t\trows.push(row)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn rows\n\t\t},\n\n\t\t/**\n\t\t * @return {Array<object>} The strip.\n\t\t */\n\t\ttabs() {\n\t\t\treturn [\n\t\t\t\t{ id: 'objects', label: this.t('nextcloud-vue', 'Objects') },\n\t\t\t\t{ id: 'tasks', label: this.t('nextcloud-vue', 'Tasks') },\n\t\t\t\t{ id: 'logs', label: this.t('nextcloud-vue', 'Logs') },\n\t\t\t]\n\t\t},\n\n\t\t/**\n\t\t * Every object the run touched, flattened, each marked with the step\n\t\t * that accounts for it.\n\t\t *\n\t\t * @return {Array<object>} The rows.\n\t\t */\n\t\tobjectRows() {\n\t\t\tconst stepNodes = new Set((this.store.steps || []).map((step) => String(step.transition || '')))\n\n\t\t\treturn (this.store.runObjects || []).flatMap((group) => (group.objects || []).map((obj) => ({\n\t\t\t\t...obj,\n\t\t\t\tnode: group.node,\n\t\t\t\tunaccounted: !stepNodes.has(String(group.node || '')),\n\t\t\t})))\n\t\t},\n\n\t\t/**\n\t\t * @return {string} How the run ended, in the engine's status words.\n\t\t */\n\t\toutcome() {\n\t\t\treturn flowRunOutcome(this.run)\n\t\t},\n\n\t\t/**\n\t\t * @return {boolean} True when Replay is offered.\n\t\t */\n\t\tcanReplay() {\n\t\t\tif (this.store.steps.length === 0) {\n\t\t\t\treturn false\n\t\t\t}\n\n\t\t\tconst status = this.run?.status\n\t\t\treturn status !== undefined && FLOW_RUN_ACTIVE_STATUSES.includes(status) === false\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/**\n\t\t * @param {string} uuid The task uuid.\n\t\t * @return {string} The task's own URL.\n\t\t */\n\t\ttaskUrl(uuid) {\n\t\t\treturn generateUrl(`/apps/openregister/flow-tasks/${uuid}`)\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-run-sidebar {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n\tpadding: 12px;\n}\n\n.cn-run-sidebar__head {\n\tdisplay: flex;\n}\n\n.cn-run-sidebar__title {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tmargin: 0;\n}\n\n.cn-run-sidebar__when {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-weight: normal;\n\tfont-size: 0.9em;\n\tfont-variant-numeric: tabular-nums;\n}\n\n.cn-run-sidebar__error {\n\tcolor: var(--color-error-text, var(--color-error));\n}\n\n.cn-run-sidebar__hint {\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-run-sidebar__group {\n\tmargin: 8px 0 0;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-weight: bold;\n}\n\n.cn-run-sidebar__tabs {\n\tdisplay: flex;\n\tgap: 4px;\n\tborder-block-end: 1px solid var(--color-border);\n}\n\n.cn-run-sidebar__tab {\n\tborder: none;\n\tbackground: none;\n\tpadding: 8px 12px;\n\tcursor: pointer;\n\tcolor: var(--color-main-text);\n\tborder-block-end: 2px solid transparent;\n}\n\n.cn-run-sidebar__tab--active {\n\tborder-block-end-color: var(--color-primary-element);\n\tfont-weight: bold;\n}\n\n.cn-run-sidebar__list,\n.cn-run-sidebar__touched,\n.cn-run-sidebar__steps {\n\tmargin: 0;\n\tpadding-inline-start: 0;\n\tlist-style: none;\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 6px;\n}\n\n.cn-run-sidebar__steps {\n\tlist-style: decimal;\n\tpadding-inline-start: 20px;\n}\n\n.cn-run-sidebar__row {\n\tdisplay: flex;\n\tgap: 8px;\n\talign-items: center;\n\tcolor: inherit;\n\tpadding: 6px 8px;\n\tborder-radius: var(--border-radius-large, 12px);\n\tbackground: var(--color-background-hover);\n}\n\n.cn-run-sidebar__touched-uuid {\n\tfont-family: monospace;\n\tfont-size: 0.9em;\n}\n\n/* A uuid is long and the sidebar is narrow, so a row wraps rather than\n pushing the panel wider. The gap keeps the parts apart on the line the\n separators already keep apart in the text. */\n.cn-run-sidebar__touched li {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: baseline;\n\tgap: 0 4px;\n}\n</style>\n"],"names":["_createVNode","_createTextVNode","_createElementVNode","_toDisplayString","_createElementBlock","_Fragment","_renderList","_openBlock","_createBlock","_resolveDynamicComponent","_normalizeClass"],"mappings":";;;AAyDU,EAAA,KAAI,EAAE,gBAAiB;AAAA,EAAA,aAAI,EAAA,oBAAA;;AAM9B,MAAA,UAAA,GAAA,EAAA,KAAI,EAAE,sBAAuB,GAAA;AAW9B,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,uBAAuB,GAAA;;;;AAMZ,EAAA,KAAK,EAAC,uBAAwB;AAAA,EAAA,aAAU,EAAA,WAAA;;;;AAwBxC,EAAA,KAAK,EAAC,sBAAsB;AAAC,EAAA,IAAI,EAAE,SAAG;;;0BAyChD,EAAC,uBAAuB,GAAA;;AAG7B,EAAA,KAAK,EAAC,yBAAyB;AAAC,EAAA,aAAW,EAAA,mBAAoB;;AAU3D,MAAA,WAAA,GAAA,EAAA,KAAK,EAAC,gCAAyB,GAAA;;AAEhC,MAAA,WAAA,GAAA,EAAA,KAAA,EAAA,8BAAA,GAAA;;;AAKsB,EAAA,KAAK,EAAC,uBAAY;;;;AAGnB,EAAA,KAAK,EAAC,sBAAI;;;;AAG5B,EAAA,KAAK,EAAC,yBAAiB;;AAK1B,MAAA,WAAA,GAAA,EAAA,KAAK,EAAC,gCAAiB,GAAA;AACvB,MAAA,WAAA,GAAA,EAAA,KAAK,EAAC,8BAAc,GAAA;AACpB,MAAA,WAAA,GAAA,EAAA,KAAK,EAAC,sBAAqB,GAAA;;;AAOhC,EAAA,KAAK,EAAC,uBAAsB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sBAAG,MAAI;4BAC7B;kBAAAR,6CAAmB,IAAI,EAAE,EAAE,EAAA,CAAA;;;;;;;;;;;;"}
1
+ {"version":3,"file":"CnRunDetailSidebar.vue3.js","sources":["../../../../src/components/CnFlowDetail/CnRunDetailSidebar.vue?vue&type=template&id=4fc51f96&lang.js"],"sourcesContent":["<!--\n CnRunDetailSidebar — one run: what it changed, what it asked a person to do,\n and what it did.\n\n WHY THIS IS A SIDEBAR AND NOT A PANEL INSIDE THE FLOW'S\n -------------------------------------------------------\n It used to be a block nested inside the Runs tab, with a tab strip of its own.\n That put TABS INSIDE A TAB: the flow's strip (Steps, Runs) stayed on screen\n above the run's (Objects, Tasks, Logs), and the two competed for the same\n glance. Worse, the flow's tabs were still live — pressing Steps while reading\n a run swapped the panel and left the canvas painted with that run's badges,\n so the graph and the sidebar were describing different things.\n\n So opening a run REPLACES the flow's sidebar rather than nesting inside it.\n One strip at a time, and the way back is a deliberate act with its own\n control. The canvas keeps the run's replay while this is open, which is now\n consistent rather than accidental: the sidebar and the graph are showing the\n same run because there is no way to make them show anything else.\n\n WHAT IT DOES NOT OWN\n --------------------\n The run's badges on the canvas. Those are the flow detail's animation, driven\n from `store.inspectedRunUuid` and the stored log. This component reads the\n same run; it does not paint.\n\n SPDX-FileCopyrightText: 2026 Conduction B.V. <info@conduction.nl>\n SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<section class=\"cn-run-sidebar\" data-testid=\"run-detail-sidebar\">\n\t\t<!--\n\t\t\tTHE WAY BACK, FIRST AND ALWAYS. A view that replaces another must\n\t\t\tsay what it replaced and how to undo that, or it reads as the\n\t\t\tapplication having navigated somewhere on its own.\n\t\t-->\n\t\t<div class=\"cn-run-sidebar__head\">\n\t\t\t<NcButton variant=\"tertiary\"\n\t\t\t\tdata-testid=\"run-back\"\n\t\t\t\t@click=\"store.closeRun()\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<ArrowLeft :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ t('nextcloud-vue', 'Back to the flow') }}\n\t\t\t</NcButton>\n\t\t</div>\n\n\t\t<h4 class=\"cn-run-sidebar__title\">\n\t\t\t<span :class=\"`cn-run-sidebar__status cn-run-sidebar__status--${outcome}`\"\n\t\t\t\tdata-testid=\"run-status\">{{ outcome || t('nextcloud-vue', 'Run') }}</span>\n\t\t\t<time v-if=\"run?.created\" class=\"cn-run-sidebar__when\" :datetime=\"run.created\">{{ run.created }}</time>\n\t\t</h4>\n\n\t\t<p v-if=\"run?.error\" class=\"cn-run-sidebar__error\" data-testid=\"run-error\">\n\t\t\t{{ run.error }}\n\t\t</p>\n\n\t\t<!--\n\t\t\tTHE STRIP IS NEXTCLOUD'S, NOT OURS.\n\n\t\t\tThese three used to be hand-rolled buttons with a border under the\n\t\t\tactive one. They sat directly inside NcAppSidebar, one element away\n\t\t\tfrom the real thing, so they read as a panel that had been dropped\n\t\t\tinto the sidebar rather than as the sidebar's own tabs: no icons,\n\t\t\tthe wrong size, the wrong active mark, and none of the keyboard\n\t\t\tbehaviour NcAppSidebarTabs brings.\n\n\t\t\tNcAppSidebarTab registers itself with the sidebar through an\n\t\t\tinjection, so the sidebar builds the strip. That also settles which\n\t\t\ttab is open: entering run view leaves `flow-runs` registered by\n\t\t\tnothing, and NcAppSidebarTabs falls back to the first tab it has,\n\t\t\twhich is Objects.\n\n\t\t\t`embedded` (CnFlowEditModal) has no NcAppSidebar to inject that, so\n\t\t\tit keeps a strip of its own. One list of tabs feeds both, so the two\n\t\t\thosts cannot come to offer different ones.\n\t\t-->\n\t\t<div v-if=\"embedded\" class=\"cn-run-sidebar__tabs\" role=\"tablist\">\n\t\t\t<button v-for=\"entry in tabs\"\n\t\t\t\t:key=\"entry.id\"\n\t\t\t\tclass=\"cn-run-sidebar__tab\"\n\t\t\t\t:class=\"{ 'cn-run-sidebar__tab--active': tab === entry.id }\"\n\t\t\t\trole=\"tab\"\n\t\t\t\t:data-testid=\"`flow-run-tab-${entry.id}`\"\n\t\t\t\t:aria-selected=\"tab === entry.id ? 'true' : 'false'\"\n\t\t\t\t@click=\"tab = entry.id\">\n\t\t\t\t{{ entry.label }}\n\t\t\t</button>\n\t\t</div>\n\n\t\t<!-- Objects: what the run is about, and what it changed. -->\n\t\t<component :is=\"embedded ? 'div' : 'NcAppSidebarTab'\"\n\t\t\tv-if=\"!embedded || tab === 'objects'\"\n\t\t\t:id=\"embedded ? undefined : 'run-objects'\"\n\t\t\t:name=\"embedded ? undefined : t('nextcloud-vue', 'Objects')\"\n\t\t\t:order=\"embedded ? undefined : 1\"\n\t\t\tdata-testid=\"flow-run-panel-objects\">\n\t\t\t<template v-if=\"!embedded\" #icon>\n\t\t\t\t<DatabaseOutline :size=\"20\" />\n\t\t\t</template>\n\n\t\t\t<!--\n\t\t\t\tTHE OBJECTS THE RUN IS ABOUT, FIRST.\n\n\t\t\t\t`GET /flow-runs/{uuid}/objects` answers the AUDIT: objects this\n\t\t\t\trun changed. A run that waited on a locked object and then\n\t\t\t\tfailed changed nothing, so that list is empty while the run's\n\t\t\t\town error names the object by uuid — and this panel said \"this\n\t\t\t\trun changed no objects\", which reads as the run having had\n\t\t\t\tnothing to do with it.\n\n\t\t\t\tThe run record knows better. `subjects` is what it was started\n\t\t\t\ton and `placeItems` is what it is holding at a step, so both are\n\t\t\t\tlisted here, and each row says which it is. The changed list\n\t\t\t\tkeeps its own heading below: \"worked on\" and \"changed\" are\n\t\t\t\tdifferent claims and this view exists to keep them apart.\n\t\t\t-->\n\t\t\t<template v-if=\"subjectRows.length\">\n\t\t\t\t<h5 class=\"cn-run-sidebar__group\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Objects this run is about') }}\n\t\t\t\t</h5>\n\t\t\t\t<ul class=\"cn-run-sidebar__touched\" data-testid=\"flow-run-subjects\">\n\t\t\t\t\t<!--\n\t\t\t\t\t\tSEPARATED IN THE TEXT, not only by layout. Three adjacent\n\t\t\t\t\t\tspans render as one run-on string: \"triggerDakkapel\n\t\t\t\t\t\tKerkstraat 122e98a265-...\" was what the live instance\n\t\t\t\t\t\tshowed. A gap would fix the look and leave the text\n\t\t\t\t\t\titself unreadable, which is what anything reading the\n\t\t\t\t\t\tDOM gets, so the separator is a character.\n\t\t\t\t\t-->\n\t\t\t\t\t<li v-for=\"obj in subjectRows\" :key=\"`${obj.role}-${obj.uuid}`\">\n\t\t\t\t\t\t<span class=\"cn-run-sidebar__touched-action\">{{ obj.role }}</span>\n\t\t\t\t\t\t<span v-if=\"obj.title\"> · {{ obj.title }}</span>\n\t\t\t\t\t\t<span class=\"cn-run-sidebar__touched-uuid\"> · {{ obj.uuid }}</span>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</template>\n\n\t\t\t<h5 v-if=\"subjectRows.length\" class=\"cn-run-sidebar__group\">\n\t\t\t\t{{ t('nextcloud-vue', 'Changed by this run') }}\n\t\t\t</h5>\n\t\t\t<p v-if=\"!objectRows.length\" class=\"cn-run-sidebar__hint\">\n\t\t\t\t{{ t('nextcloud-vue', 'This run changed no objects.') }}\n\t\t\t</p>\n\t\t\t<ul v-else class=\"cn-run-sidebar__touched\">\n\t\t\t\t<!-- Same separator as the subject rows above, and for the same\n\t\t\t\t reason: \"create\" and the uuid ran together as \"createobj-1\"\n\t\t\t\t with nothing between them. -->\n\t\t\t\t<li v-for=\"obj in objectRows\" :key=\"obj.auditUuid\">\n\t\t\t\t\t<span class=\"cn-run-sidebar__touched-action\">{{ obj.action }}</span>\n\t\t\t\t\t<span class=\"cn-run-sidebar__touched-uuid\"> · {{ obj.objectUuid }}</span>\n\t\t\t\t\t<span class=\"cn-run-sidebar__hint\"> · {{ obj.node }}</span>\n\t\t\t\t\t<!--\n\t\t\t\t\t\tA change the run's own step history cannot account for.\n\t\t\t\t\t\tIt should normally never appear; when it does, hiding it\n\t\t\t\t\t\twould be the opposite of what this view is for.\n\t\t\t\t\t-->\n\t\t\t\t\t<span v-if=\"obj.unaccounted\"\n\t\t\t\t\t\tclass=\"cn-run-sidebar__error\"\n\t\t\t\t\t\tdata-testid=\"flow-object-unaccounted\">\n\t\t\t\t\t\t{{ t('nextcloud-vue', 'no matching step') }}\n\t\t\t\t\t</span>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</component>\n\n\t\t<!-- Tasks: what the run asked a person to do. -->\n\t\t<component :is=\"embedded ? 'div' : 'NcAppSidebarTab'\"\n\t\t\tv-if=\"!embedded || tab === 'tasks'\"\n\t\t\t:id=\"embedded ? undefined : 'run-tasks'\"\n\t\t\t:name=\"embedded ? undefined : t('nextcloud-vue', 'Tasks')\"\n\t\t\t:order=\"embedded ? undefined : 2\"\n\t\t\tdata-testid=\"flow-run-panel-tasks\">\n\t\t\t<template v-if=\"!embedded\" #icon>\n\t\t\t\t<CheckboxMarkedOutline :size=\"20\" />\n\t\t\t</template>\n\n\t\t\t<p v-if=\"!store.runTasks.length\"\n\t\t\t\tclass=\"cn-run-sidebar__hint\"\n\t\t\t\tdata-testid=\"flow-run-tasks-empty\">\n\t\t\t\t{{ t('nextcloud-vue', 'This run raised no tasks.') }}\n\t\t\t</p>\n\t\t\t<ul v-else class=\"cn-run-sidebar__list\">\n\t\t\t\t<li v-for=\"task in store.runTasks\" :key=\"task.uuid\">\n\t\t\t\t\t<!-- The task's one stable address, the same one the\n\t\t\t\t\t notification buttons and the VTODO already resolve to. -->\n\t\t\t\t\t<a class=\"cn-run-sidebar__row\"\n\t\t\t\t\t\t:href=\"taskUrl(task.uuid)\"\n\t\t\t\t\t\tdata-testid=\"flow-task-link\">\n\t\t\t\t\t\t<span :class=\"`cn-run-sidebar__status cn-run-sidebar__status--${task.state}`\">{{ task.state }}</span>\n\t\t\t\t\t\t<span>{{ task.title || task.uuid }}</span>\n\t\t\t\t\t</a>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</component>\n\n\t\t<!-- Logs: what the engine did, in its own order. -->\n\t\t<component :is=\"embedded ? 'div' : 'NcAppSidebarTab'\"\n\t\t\tv-if=\"!embedded || tab === 'logs'\"\n\t\t\t:id=\"embedded ? undefined : 'run-logs'\"\n\t\t\t:name=\"embedded ? undefined : t('nextcloud-vue', 'Logs')\"\n\t\t\t:order=\"embedded ? undefined : 3\"\n\t\t\tdata-testid=\"flow-run-panel-logs\">\n\t\t\t<template v-if=\"!embedded\" #icon>\n\t\t\t\t<FormatListBulleted :size=\"20\" />\n\t\t\t</template>\n\n\t\t\t<!-- Replay BESIDE the step list, not instead of it: the list stays\n\t\t\t what it is for reading, the replay plays the same stored log\n\t\t\t through the canvas animator. Only on a FINISHED run — a run\n\t\t\t still going is watched live. -->\n\t\t\t<NcButton v-if=\"canReplay\"\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\tdata-testid=\"flow-replay\"\n\t\t\t\t@click=\"store.requestReplay()\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Replay :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ t('nextcloud-vue', 'Replay on the canvas') }}\n\t\t\t</NcButton>\n\n\t\t\t<p v-if=\"!store.steps.length\" class=\"cn-run-sidebar__hint\">\n\t\t\t\t{{ t('nextcloud-vue', 'This run recorded no steps.') }}\n\t\t\t</p>\n\t\t\t<ol v-else class=\"cn-run-sidebar__steps\">\n\t\t\t\t<li v-for=\"(step, i) in store.steps\" :key=\"i\">\n\t\t\t\t\t<strong>{{ step.transition }}</strong>\n\t\t\t\t\t<span class=\"cn-run-sidebar__hint\"> · {{ step.status }}</span>\n\t\t\t\t\t<span v-if=\"step.error\" class=\"cn-run-sidebar__error\"> · {{ step.error }}</span>\n\t\t\t\t\t<!-- Every bucket a node reported on this hop: a send step's\n\t\t\t\t\t `messaging` (who got it, who opted out, ...), a sync\n\t\t\t\t\t step's own tally (`fetch`, `contract`, `write`, `sweep` —\n\t\t\t\t\t objects fetched, create/update/skip/invalid, created/\n\t\t\t\t\t updated, swept). One node writes one key in practice, but\n\t\t\t\t\t nothing here assumes that. -->\n\t\t\t\t\t<CnFlowStepOutcomes v-for=\"block in reportBlocks(step)\"\n\t\t\t\t\t\t:key=\"block.key\"\n\t\t\t\t\t\t:report=\"block.value\"\n\t\t\t\t\t\t:hideZero=\"block.key === 'messaging'\"\n\t\t\t\t\t\t:label=\"blockLabel(block.key)\" />\n\t\t\t\t</li>\n\t\t\t</ol>\n\t\t</component>\n\t</section>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { generateUrl } from '@nextcloud/router'\nimport { NcAppSidebarTab, NcButton } from '@nextcloud/vue'\nimport ArrowLeft from 'vue-material-design-icons/ArrowLeft.vue'\nimport CheckboxMarkedOutline from 'vue-material-design-icons/CheckboxMarkedOutline.vue'\nimport DatabaseOutline from 'vue-material-design-icons/DatabaseOutline.vue'\nimport FormatListBulleted from 'vue-material-design-icons/FormatListBulleted.vue'\nimport Replay from 'vue-material-design-icons/Replay.vue'\nimport CnFlowStepOutcomes from '../CnFlowStepOutcomes/CnFlowStepOutcomes.vue'\nimport { FLOW_RUN_ACTIVE_STATUSES, useFlowStore } from '../../composables/useFlowStore.js'\nimport { flowRunOutcome } from '../../utils/flowRunStatus.js'\n\nexport default {\n\tname: 'CnRunDetailSidebar',\n\n\tcomponents: {\n\t\tArrowLeft,\n\t\tCheckboxMarkedOutline,\n\t\tCnFlowStepOutcomes,\n\t\tDatabaseOutline,\n\t\tFormatListBulleted,\n\t\tNcAppSidebarTab,\n\t\tNcButton,\n\t\tReplay,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Render the panels without NcAppSidebarTab, for a host that is not\n\t\t * NcAppSidebar. CnFlowEditModal renders this sidebar inside a dialog,\n\t\t * where there is no sidebar to register a tab with, so that host keeps\n\t\t * a strip of its own.\n\t\t */\n\t\tembedded: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tsetup() {\n\t\treturn { store: useFlowStore() }\n\t},\n\n\tdata() {\n\t\treturn { tab: 'objects' }\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * The run being read.\n\t\t *\n\t\t * The run's OWN record first, the history list second. The list is\n\t\t * capped at 25, so a run opened from a `?run=` deep link need not be in\n\t\t * it, and reading only the list left such a run with no status, no time\n\t\t * and no error on screen.\n\t\t *\n\t\t * @return {object|null} The run being read.\n\t\t */\n\t\trun() {\n\t\t\tconst detail = this.store.runDetail\n\t\t\tif (detail && String(detail.uuid || '') === String(this.store.inspectedRunUuid || '')) {\n\t\t\t\treturn detail\n\t\t\t}\n\n\t\t\treturn this.store.runs.find((r) => r.uuid === this.store.inspectedRunUuid) || null\n\t\t},\n\n\t\t/**\n\t\t * The objects the run is ABOUT, as opposed to the ones it changed.\n\t\t *\n\t\t * Two sources, both on the run's own record. `subjects` is what the run\n\t\t * was started on, keyed by the role that supplied it (`trigger` for a\n\t\t * run a trigger started). `placeItems` is what the run is holding at a\n\t\t * step right now, keyed by that step.\n\t\t *\n\t\t * Deduplicated by uuid, because a run's subject is normally also the\n\t\t * item sitting in a place and listing it twice would suggest two\n\t\t * objects. The subject wins the row: it is the more durable fact.\n\t\t *\n\t\t * @return {Array<object>} The rows, subjects first.\n\t\t */\n\t\tsubjectRows() {\n\t\t\tconst run = this.run\n\t\t\tif (!run) {\n\t\t\t\treturn []\n\t\t\t}\n\n\t\t\t// The held items first, because they are the half that carries a\n\t\t\t// TITLE. A subject record is a uuid, a register and a schema; the\n\t\t\t// item sitting in a place is the object itself. Merging the two\n\t\t\t// gives a subject row a name a reader recognises instead of a uuid.\n\t\t\tconst held = new Map()\n\t\t\tfor (const [node, items] of Object.entries(run.placeItems || {})) {\n\t\t\t\tfor (const item of items || []) {\n\t\t\t\t\tconst uuid = String(item?.json?.id || item?.id || '')\n\t\t\t\t\tif (uuid === '' || held.has(uuid)) {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\n\t\t\t\t\theld.set(uuid, {\n\t\t\t\t\t\t// Named by the step that is holding it, because that is\n\t\t\t\t\t\t// the useful half: \"which step is this stuck at\".\n\t\t\t\t\t\trole: this.t('nextcloud-vue', 'at {node}', { node }),\n\t\t\t\t\t\tuuid,\n\t\t\t\t\t\ttitle: item?.json?.title || '',\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst rows = []\n\t\t\tconst seen = new Set()\n\n\t\t\tfor (const [role, subject] of Object.entries(run.subjects || {})) {\n\t\t\t\tconst uuid = String(subject?.uuid || '')\n\t\t\t\tif (uuid === '' || seen.has(uuid)) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\tseen.add(uuid)\n\t\t\t\trows.push({\n\t\t\t\t\trole,\n\t\t\t\t\tuuid,\n\t\t\t\t\ttitle: subject?.title || held.get(uuid)?.title || '',\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tfor (const [uuid, row] of held.entries()) {\n\t\t\t\tif (seen.has(uuid) === false) {\n\t\t\t\t\tseen.add(uuid)\n\t\t\t\t\trows.push(row)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn rows\n\t\t},\n\n\t\t/**\n\t\t * @return {Array<object>} The strip.\n\t\t */\n\t\ttabs() {\n\t\t\treturn [\n\t\t\t\t{ id: 'objects', label: this.t('nextcloud-vue', 'Objects') },\n\t\t\t\t{ id: 'tasks', label: this.t('nextcloud-vue', 'Tasks') },\n\t\t\t\t{ id: 'logs', label: this.t('nextcloud-vue', 'Logs') },\n\t\t\t]\n\t\t},\n\n\t\t/**\n\t\t * Every object the run touched, flattened, each marked with the step\n\t\t * that accounts for it.\n\t\t *\n\t\t * @return {Array<object>} The rows.\n\t\t */\n\t\tobjectRows() {\n\t\t\tconst stepNodes = new Set((this.store.steps || []).map((step) => String(step.transition || '')))\n\n\t\t\treturn (this.store.runObjects || []).flatMap((group) => (group.objects || []).map((obj) => ({\n\t\t\t\t...obj,\n\t\t\t\tnode: group.node,\n\t\t\t\tunaccounted: !stepNodes.has(String(group.node || '')),\n\t\t\t})))\n\t\t},\n\n\t\t/**\n\t\t * @return {string} How the run ended, in the engine's status words.\n\t\t */\n\t\toutcome() {\n\t\t\treturn flowRunOutcome(this.run)\n\t\t},\n\n\t\t/**\n\t\t * @return {boolean} True when Replay is offered.\n\t\t */\n\t\tcanReplay() {\n\t\t\tif (this.store.steps.length === 0) {\n\t\t\t\treturn false\n\t\t\t}\n\n\t\t\tconst status = this.run?.status\n\t\t\treturn status !== undefined && FLOW_RUN_ACTIVE_STATUSES.includes(status) === false\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/**\n\t\t * @param {string} uuid The task uuid.\n\t\t * @return {string} The task's own URL.\n\t\t */\n\t\ttaskUrl(uuid) {\n\t\t\treturn generateUrl(`/apps/openregister/flow-tasks/${uuid}`)\n\t\t},\n\n\t\t/**\n\t\t * A step's report, as the named blocks `CnFlowStepOutcomes` renders.\n\t\t *\n\t\t * `step.report` is a map of named summaries (`messaging`, `fetch`,\n\t\t * `contract`, `write`, `sweep`, ...) — whatever node(s) on this hop\n\t\t * wrote one, keyed per {@see FlowStepReport::put()} on the server. Each\n\t\t * value is itself a bucket map (`{count, sample}` per bucket), the\n\t\t * shape `CnFlowStepOutcomes` already knows how to draw.\n\t\t *\n\t\t * @param {object} step The log entry.\n\t\t * @return {Array<{key: string, value: object}>} One entry per report key.\n\t\t */\n\t\treportBlocks(step) {\n\t\t\tconst report = step && step.report\n\t\t\tif (!report || typeof report !== 'object') {\n\t\t\t\treturn []\n\t\t\t}\n\n\t\t\treturn Object.keys(report)\n\t\t\t\t.filter((key) => report[key] && typeof report[key] === 'object')\n\t\t\t\t.map((key) => ({ key, value: report[key] }))\n\t\t},\n\n\t\t/**\n\t\t * What a report block is a tally of, for `CnFlowStepOutcomes`'\n\t\t * `label` prop — its visible caption and accessible name.\n\t\t *\n\t\t * `null` for `messaging`: that block keeps the component's own\n\t\t * send-specific default (\"Who this step reached\") and no caption,\n\t\t * since a step writes at most one messaging block, so it needs\n\t\t * neither a caption to tell it apart from a sibling nor a different\n\t\t * accessible name.\n\t\t *\n\t\t * @param {string} key The report block's key.\n\t\t * @return {string|null} The label, or `null` for `messaging`.\n\t\t */\n\t\tblockLabel(key) {\n\t\t\tif (key === 'messaging') {\n\t\t\t\treturn null\n\t\t\t}\n\n\t\t\tconst labels = {\n\t\t\t\tfetch: this.t('nextcloud-vue', 'Fetch'),\n\t\t\t\tcontract: this.t('nextcloud-vue', 'Decision'),\n\t\t\t\twrite: this.t('nextcloud-vue', 'Write'),\n\t\t\t\tsweep: this.t('nextcloud-vue', 'Sweep'),\n\t\t\t}\n\n\t\t\treturn labels[key] || key\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-run-sidebar {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n\tpadding: 12px;\n}\n\n.cn-run-sidebar__head {\n\tdisplay: flex;\n}\n\n.cn-run-sidebar__title {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tmargin: 0;\n}\n\n.cn-run-sidebar__when {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-weight: normal;\n\tfont-size: 0.9em;\n\tfont-variant-numeric: tabular-nums;\n}\n\n.cn-run-sidebar__error {\n\tcolor: var(--color-error-text, var(--color-error));\n}\n\n.cn-run-sidebar__hint {\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-run-sidebar__group {\n\tmargin: 8px 0 0;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-weight: bold;\n}\n\n.cn-run-sidebar__tabs {\n\tdisplay: flex;\n\tgap: 4px;\n\tborder-block-end: 1px solid var(--color-border);\n}\n\n.cn-run-sidebar__tab {\n\tborder: none;\n\tbackground: none;\n\tpadding: 8px 12px;\n\tcursor: pointer;\n\tcolor: var(--color-main-text);\n\tborder-block-end: 2px solid transparent;\n}\n\n.cn-run-sidebar__tab--active {\n\tborder-block-end-color: var(--color-primary-element);\n\tfont-weight: bold;\n}\n\n.cn-run-sidebar__list,\n.cn-run-sidebar__touched,\n.cn-run-sidebar__steps {\n\tmargin: 0;\n\tpadding-inline-start: 0;\n\tlist-style: none;\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 6px;\n}\n\n.cn-run-sidebar__steps {\n\tlist-style: decimal;\n\tpadding-inline-start: 20px;\n}\n\n.cn-run-sidebar__row {\n\tdisplay: flex;\n\tgap: 8px;\n\talign-items: center;\n\tcolor: inherit;\n\tpadding: 6px 8px;\n\tborder-radius: var(--border-radius-large, 12px);\n\tbackground: var(--color-background-hover);\n}\n\n.cn-run-sidebar__touched-uuid {\n\tfont-family: monospace;\n\tfont-size: 0.9em;\n}\n\n/* A uuid is long and the sidebar is narrow, so a row wraps rather than\n pushing the panel wider. The gap keeps the parts apart on the line the\n separators already keep apart in the text. */\n.cn-run-sidebar__touched li {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: baseline;\n\tgap: 0 4px;\n}\n</style>\n"],"names":["_createVNode","_createTextVNode","_createElementVNode","_toDisplayString","_createElementBlock","_Fragment","_renderList","_openBlock","_createBlock","_resolveDynamicComponent","_normalizeClass"],"mappings":";;;AAyDU,EAAA,KAAI,EAAE,gBAAiB;AAAA,EAAA,aAAI,EAAA,oBAAA;;AAM9B,MAAA,UAAA,GAAA,EAAA,KAAI,EAAE,sBAAuB,GAAA;AAW9B,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,uBAAuB,GAAA;;;;AAMZ,EAAA,KAAK,EAAC,uBAAwB;AAAA,EAAA,aAAU,EAAA,WAAA;;;;AAwBxC,EAAA,KAAK,EAAC,sBAAsB;AAAC,EAAA,IAAI,EAAE,SAAG;;;0BAyChD,EAAC,uBAAuB,GAAA;;AAG7B,EAAA,KAAK,EAAC,yBAAyB;AAAC,EAAA,aAAW,EAAA,mBAAoB;;AAU3D,MAAA,WAAA,GAAA,EAAA,KAAK,EAAC,gCAAyB,GAAA;;AAEhC,MAAA,WAAA,GAAA,EAAA,KAAA,EAAA,8BAAA,GAAA;;;AAKsB,EAAA,KAAK,EAAC,uBAAY;;;;AAGnB,EAAA,KAAK,EAAC,sBAAI;;;;AAG5B,EAAA,KAAK,EAAC,yBAAiB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S,GAAG,QAAC,CAAA,CAAA,CAAA,eAAA,EAAA,MAAA,CAAA;eACxB,EAAC,MAAQ,CAAA,QAAA,YAAY,GAAA,CAAA;AACrB,UAAA,aAAI,EAAC,qBAAqB;;2BAS9B;aAAa,QAAS,CAAA,SAAA;8BAAtBA;;AACF,kBAAA,OAAI,EAAA,WAAA;AACJ,kBAAA,aAAG,EAAA,aAAA;kBACF,OAAK,EAAA,MAAA,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAA,MAAA,KAAE,MAAC,CAAA,KAAA,CAAA,aAAA,EAAA,CAAA,CAAA;;AACH,kBAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAZkB,CAAA,QAAA;;sBAAG,MAAI;kCACE;6BAAA,CAAA,6BAAA,EAAA,EAAZ,IAAI,EAAE,EAAE,EAAA,CAAA;;;;;;;;;;;;"}
@@ -2,7 +2,7 @@ import script from './CnFlowStepOutcomes.vue2.js';
2
2
  import { render } from './CnFlowStepOutcomes.vue3.js';
3
3
 
4
4
  script.render = render;
5
- script.__scopeId = "data-v-1b31a476";
5
+ script.__scopeId = "data-v-b8932606";
6
6
  const __sfc_main = script;
7
7
 
8
8
  export { __sfc_main as default };
@@ -14,6 +14,14 @@ const KNOWN_BUCKETS = [
14
14
  { key: 'refusedRecipients', tone: 'warning' },
15
15
  { key: 'unknownRecipients', tone: 'warning' },
16
16
  { key: 'failed', tone: 'error' },
17
+ // A sync step's own tally (`report.fetch`/`contract`/`write`/`sweep`):
18
+ // create/update/skip/invalid per item, then created/updated/swept counts.
19
+ { key: 'fetched', tone: 'neutral' },
20
+ { key: 'created', tone: 'success' },
21
+ { key: 'updated', tone: 'success' },
22
+ { key: 'skipped', tone: 'neutral' },
23
+ { key: 'invalid', tone: 'warning' },
24
+ { key: 'swept', tone: 'neutral' },
17
25
  ];
18
26
 
19
27
  /** Report keys that are facts about the send, not outcome buckets. */
@@ -24,9 +32,10 @@ var script = {
24
32
 
25
33
  props: {
26
34
  /**
27
- * A step's messaging report: the run-log entry's `report.messaging`.
28
- * Each outcome bucket is `{count, sample}`; a `refusedRecipients`
29
- * sample entry is `{recipient, reason}`. `null` renders nothing.
35
+ * One named block of a step's run-log report, e.g. `report.messaging`
36
+ * or a sync step's `report.write`. Each outcome bucket is
37
+ * `{count, sample}`; a `refusedRecipients` sample entry is
38
+ * `{recipient, reason}`. `null` renders nothing.
30
39
  */
31
40
  report: {
32
41
  type: Object,
@@ -41,6 +50,31 @@ var script = {
41
50
  type: Object,
42
51
  default: () => ({}),
43
52
  },
53
+
54
+ /**
55
+ * Drop a bucket whose count is zero. True for messaging (a long,
56
+ * mostly-zero outcome list is noise); false for a step whose buckets
57
+ * are the whole point of reading it, where zero is itself the answer.
58
+ */
59
+ hideZero: {
60
+ type: Boolean,
61
+ default: true,
62
+ },
63
+
64
+ /**
65
+ * What this list is a tally of, e.g. "Write" for a `report.write`
66
+ * block. Used as the visible caption above the list AND the list's
67
+ * accessible name, replacing the default "Who this step reached" —
68
+ * which is wrong for anything that is not a send, and leaves two
69
+ * adjacent blocks on one step (`fetch` + `write`) unlabelled and
70
+ * indistinguishable to a screen reader. `null` (the default, and what
71
+ * a messaging block passes) keeps the original behaviour: no caption,
72
+ * the send-specific accessible name.
73
+ */
74
+ label: {
75
+ type: String,
76
+ default: null,
77
+ },
44
78
  },
45
79
 
46
80
  computed: {
@@ -65,12 +99,12 @@ var script = {
65
99
 
66
100
  return ordered
67
101
  .map(({ key, tone }) => ({ key, tone, bucket: report[key] }))
68
- .filter(({ bucket }) => bucket && typeof bucket === 'object' && Number(bucket.count) > 0)
102
+ .filter(({ bucket }) => bucket && typeof bucket === 'object' && (this.hideZero === false || Number(bucket.count) > 0))
69
103
  .map(({ key, tone, bucket }) => ({
70
104
  key,
71
105
  tone,
72
106
  label: this.labelFor(key),
73
- count: Number(bucket.count),
107
+ count: Number(bucket.count) || 0,
74
108
  sample: (Array.isArray(bucket.sample) ? bucket.sample : []).map((entry) => this.describeEntry(entry)),
75
109
  }))
76
110
  },
@@ -101,6 +135,12 @@ var script = {
101
135
  refusedRecipients: translate('nextcloud-vue', 'Refused by the step’s address rule'),
102
136
  unknownRecipients: translate('nextcloud-vue', 'Not a known user or group'),
103
137
  failed: translate('nextcloud-vue', 'Failed'),
138
+ fetched: translate('nextcloud-vue', 'Fetched'),
139
+ created: translate('nextcloud-vue', 'Created'),
140
+ updated: translate('nextcloud-vue', 'Updated'),
141
+ skipped: translate('nextcloud-vue', 'Skipped'),
142
+ invalid: translate('nextcloud-vue', 'Invalid'),
143
+ swept: translate('nextcloud-vue', 'Swept'),
104
144
  };
105
145
  if (builtIn[key]) {
106
146
  return builtIn[key]
@@ -1 +1 @@
1
- {"version":3,"file":"CnFlowStepOutcomes.vue2.js","sources":["../../../../src/components/CnFlowStepOutcomes/CnFlowStepOutcomes.vue"],"sourcesContent":["<!--\n CnFlowStepOutcomes: who a send step reached, and who it did not, by name.\n\n A messaging step (send email, send notification, post to Talk) writes its\n per-recipient outcome onto its run-log entry as `report.messaging`: one\n bucket per outcome, each `{count, sample}`. Nothing rendered it, so the run\n log could not show that a person was skipped because they opted out, or\n because the opt-out check did not answer.\n\n Only buckets with someone in them are listed. A bucket this component does\n not know is still shown, under its own key made readable, so a new outcome\n on the server is never hidden by an older library.\n\n SPDX-FileCopyrightText: 2026 Conduction B.V. <info@conduction.nl>\n SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<div v-if=\"rows.length\" class=\"cn-flow-step-outcomes\" data-testid=\"flow-step-outcomes\">\n\t\t<dl class=\"cn-flow-step-outcomes__list\" :aria-label=\"t('nextcloud-vue', 'Who this step reached')\">\n\t\t\t<div v-for=\"row in rows\"\n\t\t\t\t:key=\"row.key\"\n\t\t\t\tclass=\"cn-flow-step-outcomes__row\"\n\t\t\t\t:class=\"`cn-flow-step-outcomes__row--${row.tone}`\"\n\t\t\t\t:data-testid=\"`flow-step-outcome-${row.key}`\">\n\t\t\t\t<dt class=\"cn-flow-step-outcomes__name\">\n\t\t\t\t\t{{ row.label }}\n\t\t\t\t</dt>\n\t\t\t\t<dd class=\"cn-flow-step-outcomes__value\">\n\t\t\t\t\t<span class=\"cn-flow-step-outcomes__count\">{{ row.count }}</span>\n\t\t\t\t\t<span v-if=\"row.sample.length\" class=\"cn-flow-step-outcomes__sample\"> · {{ row.sample.join(', ') }}</span>\n\t\t\t\t</dd>\n\t\t\t</div>\n\t\t</dl>\n\t\t<p v-if=\"report && report.truncated\"\n\t\t\tclass=\"cn-flow-step-outcomes__truncated\"\n\t\t\tdata-testid=\"flow-step-outcomes-truncated\">\n\t\t\t{{ t('nextcloud-vue', 'Each list shows its first entries only.') }}\n\t\t</p>\n\t</div>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\n\n/**\n * The buckets a messaging report carries, in reading order: who got it first,\n * then each reason someone did not. `tone` marks the row for styling only.\n */\nconst KNOWN_BUCKETS = [\n\t{ key: 'delivered', tone: 'success' },\n\t{ key: 'optedOut', tone: 'neutral' },\n\t{ key: 'authorityUnavailable', tone: 'warning' },\n\t{ key: 'skippedByPreference', tone: 'neutral' },\n\t{ key: 'skippedByKillSwitch', tone: 'neutral' },\n\t{ key: 'rateLimited', tone: 'warning' },\n\t{ key: 'refusedRecipients', tone: 'warning' },\n\t{ key: 'unknownRecipients', tone: 'warning' },\n\t{ key: 'failed', tone: 'error' },\n]\n\n/** Report keys that are facts about the send, not outcome buckets. */\nconst NOT_BUCKETS = ['channel', 'actor', 'recipients', 'truncated']\n\nexport default {\n\tname: 'CnFlowStepOutcomes',\n\n\tprops: {\n\t\t/**\n\t\t * A step's messaging report: the run-log entry's `report.messaging`.\n\t\t * Each outcome bucket is `{count, sample}`; a `refusedRecipients`\n\t\t * sample entry is `{recipient, reason}`. `null` renders nothing.\n\t\t */\n\t\treport: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Names to use instead of the built-in ones, keyed by bucket\n\t\t * (`{ optedOut: 'Unsubscribed' }`). Pass already-translated text.\n\t\t */\n\t\tlabels: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * The non-empty buckets, known ones first in reading order, then any\n\t\t * bucket the server added that this component does not know.\n\t\t *\n\t\t * @return {Array<object>} One row per bucket: key, label, count, sample, tone.\n\t\t */\n\t\trows() {\n\t\t\tconst report = this.report\n\t\t\tif (!report || typeof report !== 'object') {\n\t\t\t\treturn []\n\t\t\t}\n\n\t\t\tconst known = KNOWN_BUCKETS.map((bucket) => bucket.key)\n\t\t\tconst extra = Object.keys(report).filter((key) => !known.includes(key) && !NOT_BUCKETS.includes(key))\n\t\t\tconst ordered = [\n\t\t\t\t...KNOWN_BUCKETS,\n\t\t\t\t...extra.map((key) => ({ key, tone: 'neutral' })),\n\t\t\t]\n\n\t\t\treturn ordered\n\t\t\t\t.map(({ key, tone }) => ({ key, tone, bucket: report[key] }))\n\t\t\t\t.filter(({ bucket }) => bucket && typeof bucket === 'object' && Number(bucket.count) > 0)\n\t\t\t\t.map(({ key, tone, bucket }) => ({\n\t\t\t\t\tkey,\n\t\t\t\t\ttone,\n\t\t\t\t\tlabel: this.labelFor(key),\n\t\t\t\t\tcount: Number(bucket.count),\n\t\t\t\t\tsample: (Array.isArray(bucket.sample) ? bucket.sample : []).map((entry) => this.describeEntry(entry)),\n\t\t\t\t}))\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/**\n\t\t * The readable name of a bucket: the host's, then the built-in one,\n\t\t * then the key itself (`heldForReview` reads \"Held for review\").\n\t\t *\n\t\t * @param {string} key The bucket key.\n\t\t * @return {string} The name.\n\t\t */\n\t\tlabelFor(key) {\n\t\t\tif (this.labels && this.labels[key]) {\n\t\t\t\treturn String(this.labels[key])\n\t\t\t}\n\n\t\t\tconst builtIn = {\n\t\t\t\tdelivered: t('nextcloud-vue', 'Delivered'),\n\t\t\t\toptedOut: t('nextcloud-vue', 'Opted out'),\n\t\t\t\tauthorityUnavailable: t('nextcloud-vue', 'Not sent, the opt-out check did not answer'),\n\t\t\t\tskippedByPreference: t('nextcloud-vue', 'Skipped by their notification settings'),\n\t\t\t\tskippedByKillSwitch: t('nextcloud-vue', 'Skipped, sending is switched off'),\n\t\t\t\trateLimited: t('nextcloud-vue', 'Held back by the send limit'),\n\t\t\t\trefusedRecipients: t('nextcloud-vue', 'Refused by the step’s address rule'),\n\t\t\t\tunknownRecipients: t('nextcloud-vue', 'Not a known user or group'),\n\t\t\t\tfailed: t('nextcloud-vue', 'Failed'),\n\t\t\t}\n\t\t\tif (builtIn[key]) {\n\t\t\t\treturn builtIn[key]\n\t\t\t}\n\n\t\t\tconst words = String(key).replace(/([a-z0-9])([A-Z])/g, '$1 $2').replace(/[-_]+/g, ' ').trim().toLowerCase()\n\n\t\t\treturn words.charAt(0).toUpperCase() + words.slice(1)\n\t\t},\n\n\t\t/**\n\t\t * One sample entry as text. A refused address carries its reason.\n\t\t *\n\t\t * @param {string|object} entry The sample entry.\n\t\t * @return {string} The text.\n\t\t */\n\t\tdescribeEntry(entry) {\n\t\t\tif (entry && typeof entry === 'object') {\n\t\t\t\tconst who = String(entry.recipient ?? entry.id ?? '')\n\t\t\t\tconst reason = this.reasonFor(entry.reason)\n\n\t\t\t\treturn reason ? `${who} (${reason})` : who\n\t\t\t}\n\n\t\t\treturn String(entry)\n\t\t},\n\n\t\t/**\n\t\t * Why the step's address rule refused an address, in words.\n\t\t *\n\t\t * @param {string} [code] The refusal code.\n\t\t * @return {string} The reason, or the code when it is not known.\n\t\t */\n\t\treasonFor(code) {\n\t\t\tconst reasons = {\n\t\t\t\t'external-recipients-off': t('nextcloud-vue', 'external recipients are off'),\n\t\t\t\t'not-on-item': t('nextcloud-vue', 'not on the item'),\n\t\t\t\t'invalid-address': t('nextcloud-vue', 'not a valid address'),\n\t\t\t}\n\n\t\t\treturn code ? (reasons[code] || String(code)) : ''\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-flow-step-outcomes {\n\tmargin: 4px 0 0;\n\tfont-size: 0.9em;\n}\n\n.cn-flow-step-outcomes__list {\n\tmargin: 0;\n\tpadding: 0;\n}\n\n/* Stacked, name over value: the run sidebar is narrow, and a side-by-side\n row wrapped mid-list. The host's dt/dd margins and alignment are reset. */\n.cn-flow-step-outcomes__row {\n\tdisplay: block;\n\tmargin-block: 4px;\n\tpadding-block: 2px;\n\tpadding-inline-start: 8px;\n\tborder-inline-start: 3px solid var(--color-border);\n\ttext-align: start;\n}\n\n.cn-flow-step-outcomes__row--success {\n\tborder-inline-start-color: var(--color-success);\n}\n\n.cn-flow-step-outcomes__row--warning {\n\tborder-inline-start-color: var(--color-warning);\n}\n\n.cn-flow-step-outcomes__row--error {\n\tborder-inline-start-color: var(--color-error);\n}\n\n.cn-flow-step-outcomes__name {\n\tdisplay: block;\n\twhite-space: normal;\n\toverflow-wrap: anywhere;\n\tmargin: 0;\n\tpadding: 0;\n\tfont-weight: bold;\n\ttext-align: start;\n}\n\n.cn-flow-step-outcomes__value {\n\tdisplay: block;\n\twhite-space: normal;\n\tmargin: 0;\n\tpadding: 0;\n\ttext-align: start;\n\tcolor: var(--color-main-text);\n\toverflow-wrap: anywhere;\n}\n\n.cn-flow-step-outcomes__truncated {\n\tmargin: 4px 0 0;\n\tcolor: var(--color-text-maxcontrast);\n}\n</style>\n"],"names":["t"],"mappings":";;AA4CA;AACC;;;AAGD,MAAM,gBAAgB;AACrB,CAAA,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW;AACrC,CAAA,EAAE,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,WAAW;AACpC,CAAA,EAAE,GAAG,EAAE,sBAAsB,EAAE,IAAI,EAAE,WAAW;AAChD,CAAA,EAAE,GAAG,EAAE,qBAAqB,EAAE,IAAI,EAAE,WAAW;AAC/C,CAAA,EAAE,GAAG,EAAE,qBAAqB,EAAE,IAAI,EAAE,WAAW;AAC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K,CAAA;GACnB;;AAED;;AAEC;AACA;;;AAGD,EAAA,SAAS,CAAC,IAAI,EAAE;GACf,MAAM,OAAM,GAAI;AACf,IAAA,yBAAyB,EAAEA,SAAC,CAAC,eAAe,EAAE,6BAA6B,CAAC;IAC5E,aAAa,EAAEA,SAAC,CAAC,eAAe,EAAE,iBAAiB,CAAC;IACpD,iBAAiB,EAAEA,SAAC,CAAC,eAAe,EAAE,qBAAqB,CAAC;AAC7D,KAAA;;AAEA,GAAA,OAAO,IAAG,IAAK,OAAO,CAAC,IAAI,CAAE,IAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAC;GACjD;EACD;AACF;;;;"}
1
+ {"version":3,"file":"CnFlowStepOutcomes.vue2.js","sources":["../../../../src/components/CnFlowStepOutcomes/CnFlowStepOutcomes.vue"],"sourcesContent":["<!--\n CnFlowStepOutcomes: a step's own tally, by named bucket.\n\n A messaging step (send email, send notification, post to Talk) writes its\n per-recipient outcome onto its run-log entry as `report.messaging`: one\n bucket per outcome, each `{count, sample}`. Nothing rendered it, so the run\n log could not show that a person was skipped because they opted out, or\n because the opt-out check did not answer. A sync pipeline's steps write the\n same shape for their own counts (`report.fetch`, `report.contract`,\n `report.write`, `report.sweep` — objects fetched, create/update/skip/invalid,\n created/updated, swept).\n\n Only buckets with someone in them are listed, UNLESS `hideZero` is false.\n Messaging wants zero-suppression: \"delivered: 0, optedOut: 0, failed: 0\" on\n every ordinary send is noise nobody reads. A count step does not: \"swept: 0\"\n is the answer, not a blank where a row should be, and hiding it would read\n as \"this step reported nothing\" when it reported zero. A bucket this\n component does not know is still shown, under its own key made readable, so\n a new outcome on the server is never hidden by an older library.\n\n SPDX-FileCopyrightText: 2026 Conduction B.V. <info@conduction.nl>\n SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<div v-if=\"rows.length\" class=\"cn-flow-step-outcomes\" data-testid=\"flow-step-outcomes\">\n\t\t<p v-if=\"label\"\n\t\t\tclass=\"cn-flow-step-outcomes__title\"\n\t\t\tdata-testid=\"flow-step-outcomes-title\">\n\t\t\t{{ label }}\n\t\t</p>\n\t\t<dl class=\"cn-flow-step-outcomes__list\" :aria-label=\"label || t('nextcloud-vue', 'Who this step reached')\">\n\t\t\t<div v-for=\"row in rows\"\n\t\t\t\t:key=\"row.key\"\n\t\t\t\tclass=\"cn-flow-step-outcomes__row\"\n\t\t\t\t:class=\"`cn-flow-step-outcomes__row--${row.tone}`\"\n\t\t\t\t:data-testid=\"`flow-step-outcome-${row.key}`\">\n\t\t\t\t<dt class=\"cn-flow-step-outcomes__name\">\n\t\t\t\t\t{{ row.label }}\n\t\t\t\t</dt>\n\t\t\t\t<dd class=\"cn-flow-step-outcomes__value\">\n\t\t\t\t\t<span class=\"cn-flow-step-outcomes__count\">{{ row.count }}</span>\n\t\t\t\t\t<span v-if=\"row.sample.length\" class=\"cn-flow-step-outcomes__sample\"> · {{ row.sample.join(', ') }}</span>\n\t\t\t\t</dd>\n\t\t\t</div>\n\t\t</dl>\n\t\t<p v-if=\"report && report.truncated\"\n\t\t\tclass=\"cn-flow-step-outcomes__truncated\"\n\t\t\tdata-testid=\"flow-step-outcomes-truncated\">\n\t\t\t{{ t('nextcloud-vue', 'Each list shows its first entries only.') }}\n\t\t</p>\n\t</div>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\n\n/**\n * The buckets a messaging report carries, in reading order: who got it first,\n * then each reason someone did not. `tone` marks the row for styling only.\n */\nconst KNOWN_BUCKETS = [\n\t{ key: 'delivered', tone: 'success' },\n\t{ key: 'optedOut', tone: 'neutral' },\n\t{ key: 'authorityUnavailable', tone: 'warning' },\n\t{ key: 'skippedByPreference', tone: 'neutral' },\n\t{ key: 'skippedByKillSwitch', tone: 'neutral' },\n\t{ key: 'rateLimited', tone: 'warning' },\n\t{ key: 'refusedRecipients', tone: 'warning' },\n\t{ key: 'unknownRecipients', tone: 'warning' },\n\t{ key: 'failed', tone: 'error' },\n\t// A sync step's own tally (`report.fetch`/`contract`/`write`/`sweep`):\n\t// create/update/skip/invalid per item, then created/updated/swept counts.\n\t{ key: 'fetched', tone: 'neutral' },\n\t{ key: 'created', tone: 'success' },\n\t{ key: 'updated', tone: 'success' },\n\t{ key: 'skipped', tone: 'neutral' },\n\t{ key: 'invalid', tone: 'warning' },\n\t{ key: 'swept', tone: 'neutral' },\n]\n\n/** Report keys that are facts about the send, not outcome buckets. */\nconst NOT_BUCKETS = ['channel', 'actor', 'recipients', 'truncated']\n\nexport default {\n\tname: 'CnFlowStepOutcomes',\n\n\tprops: {\n\t\t/**\n\t\t * One named block of a step's run-log report, e.g. `report.messaging`\n\t\t * or a sync step's `report.write`. Each outcome bucket is\n\t\t * `{count, sample}`; a `refusedRecipients` sample entry is\n\t\t * `{recipient, reason}`. `null` renders nothing.\n\t\t */\n\t\treport: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Names to use instead of the built-in ones, keyed by bucket\n\t\t * (`{ optedOut: 'Unsubscribed' }`). Pass already-translated text.\n\t\t */\n\t\tlabels: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/**\n\t\t * Drop a bucket whose count is zero. True for messaging (a long,\n\t\t * mostly-zero outcome list is noise); false for a step whose buckets\n\t\t * are the whole point of reading it, where zero is itself the answer.\n\t\t */\n\t\thideZero: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * What this list is a tally of, e.g. \"Write\" for a `report.write`\n\t\t * block. Used as the visible caption above the list AND the list's\n\t\t * accessible name, replacing the default \"Who this step reached\" —\n\t\t * which is wrong for anything that is not a send, and leaves two\n\t\t * adjacent blocks on one step (`fetch` + `write`) unlabelled and\n\t\t * indistinguishable to a screen reader. `null` (the default, and what\n\t\t * a messaging block passes) keeps the original behaviour: no caption,\n\t\t * the send-specific accessible name.\n\t\t */\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * The non-empty buckets, known ones first in reading order, then any\n\t\t * bucket the server added that this component does not know.\n\t\t *\n\t\t * @return {Array<object>} One row per bucket: key, label, count, sample, tone.\n\t\t */\n\t\trows() {\n\t\t\tconst report = this.report\n\t\t\tif (!report || typeof report !== 'object') {\n\t\t\t\treturn []\n\t\t\t}\n\n\t\t\tconst known = KNOWN_BUCKETS.map((bucket) => bucket.key)\n\t\t\tconst extra = Object.keys(report).filter((key) => !known.includes(key) && !NOT_BUCKETS.includes(key))\n\t\t\tconst ordered = [\n\t\t\t\t...KNOWN_BUCKETS,\n\t\t\t\t...extra.map((key) => ({ key, tone: 'neutral' })),\n\t\t\t]\n\n\t\t\treturn ordered\n\t\t\t\t.map(({ key, tone }) => ({ key, tone, bucket: report[key] }))\n\t\t\t\t.filter(({ bucket }) => bucket && typeof bucket === 'object' && (this.hideZero === false || Number(bucket.count) > 0))\n\t\t\t\t.map(({ key, tone, bucket }) => ({\n\t\t\t\t\tkey,\n\t\t\t\t\ttone,\n\t\t\t\t\tlabel: this.labelFor(key),\n\t\t\t\t\tcount: Number(bucket.count) || 0,\n\t\t\t\t\tsample: (Array.isArray(bucket.sample) ? bucket.sample : []).map((entry) => this.describeEntry(entry)),\n\t\t\t\t}))\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/**\n\t\t * The readable name of a bucket: the host's, then the built-in one,\n\t\t * then the key itself (`heldForReview` reads \"Held for review\").\n\t\t *\n\t\t * @param {string} key The bucket key.\n\t\t * @return {string} The name.\n\t\t */\n\t\tlabelFor(key) {\n\t\t\tif (this.labels && this.labels[key]) {\n\t\t\t\treturn String(this.labels[key])\n\t\t\t}\n\n\t\t\tconst builtIn = {\n\t\t\t\tdelivered: t('nextcloud-vue', 'Delivered'),\n\t\t\t\toptedOut: t('nextcloud-vue', 'Opted out'),\n\t\t\t\tauthorityUnavailable: t('nextcloud-vue', 'Not sent, the opt-out check did not answer'),\n\t\t\t\tskippedByPreference: t('nextcloud-vue', 'Skipped by their notification settings'),\n\t\t\t\tskippedByKillSwitch: t('nextcloud-vue', 'Skipped, sending is switched off'),\n\t\t\t\trateLimited: t('nextcloud-vue', 'Held back by the send limit'),\n\t\t\t\trefusedRecipients: t('nextcloud-vue', 'Refused by the step’s address rule'),\n\t\t\t\tunknownRecipients: t('nextcloud-vue', 'Not a known user or group'),\n\t\t\t\tfailed: t('nextcloud-vue', 'Failed'),\n\t\t\t\tfetched: t('nextcloud-vue', 'Fetched'),\n\t\t\t\tcreated: t('nextcloud-vue', 'Created'),\n\t\t\t\tupdated: t('nextcloud-vue', 'Updated'),\n\t\t\t\tskipped: t('nextcloud-vue', 'Skipped'),\n\t\t\t\tinvalid: t('nextcloud-vue', 'Invalid'),\n\t\t\t\tswept: t('nextcloud-vue', 'Swept'),\n\t\t\t}\n\t\t\tif (builtIn[key]) {\n\t\t\t\treturn builtIn[key]\n\t\t\t}\n\n\t\t\tconst words = String(key).replace(/([a-z0-9])([A-Z])/g, '$1 $2').replace(/[-_]+/g, ' ').trim().toLowerCase()\n\n\t\t\treturn words.charAt(0).toUpperCase() + words.slice(1)\n\t\t},\n\n\t\t/**\n\t\t * One sample entry as text. A refused address carries its reason.\n\t\t *\n\t\t * @param {string|object} entry The sample entry.\n\t\t * @return {string} The text.\n\t\t */\n\t\tdescribeEntry(entry) {\n\t\t\tif (entry && typeof entry === 'object') {\n\t\t\t\tconst who = String(entry.recipient ?? entry.id ?? '')\n\t\t\t\tconst reason = this.reasonFor(entry.reason)\n\n\t\t\t\treturn reason ? `${who} (${reason})` : who\n\t\t\t}\n\n\t\t\treturn String(entry)\n\t\t},\n\n\t\t/**\n\t\t * Why the step's address rule refused an address, in words.\n\t\t *\n\t\t * @param {string} [code] The refusal code.\n\t\t * @return {string} The reason, or the code when it is not known.\n\t\t */\n\t\treasonFor(code) {\n\t\t\tconst reasons = {\n\t\t\t\t'external-recipients-off': t('nextcloud-vue', 'external recipients are off'),\n\t\t\t\t'not-on-item': t('nextcloud-vue', 'not on the item'),\n\t\t\t\t'invalid-address': t('nextcloud-vue', 'not a valid address'),\n\t\t\t}\n\n\t\t\treturn code ? (reasons[code] || String(code)) : ''\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-flow-step-outcomes {\n\tmargin: 4px 0 0;\n\tfont-size: 0.9em;\n}\n\n.cn-flow-step-outcomes__title {\n\tmargin: 4px 0 0;\n\tfont-weight: bold;\n\ttext-transform: uppercase;\n\tfont-size: 0.85em;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-flow-step-outcomes__list {\n\tmargin: 0;\n\tpadding: 0;\n}\n\n/* Stacked, name over value: the run sidebar is narrow, and a side-by-side\n row wrapped mid-list. The host's dt/dd margins and alignment are reset. */\n.cn-flow-step-outcomes__row {\n\tdisplay: block;\n\tmargin-block: 4px;\n\tpadding-block: 2px;\n\tpadding-inline-start: 8px;\n\tborder-inline-start: 3px solid var(--color-border);\n\ttext-align: start;\n}\n\n.cn-flow-step-outcomes__row--success {\n\tborder-inline-start-color: var(--color-success);\n}\n\n.cn-flow-step-outcomes__row--warning {\n\tborder-inline-start-color: var(--color-warning);\n}\n\n.cn-flow-step-outcomes__row--error {\n\tborder-inline-start-color: var(--color-error);\n}\n\n.cn-flow-step-outcomes__name {\n\tdisplay: block;\n\twhite-space: normal;\n\toverflow-wrap: anywhere;\n\tmargin: 0;\n\tpadding: 0;\n\tfont-weight: bold;\n\ttext-align: start;\n}\n\n.cn-flow-step-outcomes__value {\n\tdisplay: block;\n\twhite-space: normal;\n\tmargin: 0;\n\tpadding: 0;\n\ttext-align: start;\n\tcolor: var(--color-main-text);\n\toverflow-wrap: anywhere;\n}\n\n.cn-flow-step-outcomes__truncated {\n\tmargin: 4px 0 0;\n\tcolor: var(--color-text-maxcontrast);\n}\n</style>\n"],"names":["t"],"mappings":";;AAwDA;AACC;;;AAGD,MAAM,gBAAgB;AACrB,CAAA,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI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C,IAAA;;AAEA,GAAA,OAAO,MAAM,CAAC,KAAK,CAAA;GACnB;;AAED;;AAEC;AACA;;;AAGD,EAAA,SAAS,CAAC,IAAI,EAAE;GACf,MAAM,OAAM,GAAI;AACf,IAAA,yBAAyB,EAAEA,SAAC,CAAC,eAAe,EAAE,6BAA6B,CAAC;IAC5E,aAAa,EAAEA,SAAC,CAAC,eAAe,EAAE,iBAAiB,CAAC;IACpD,iBAAiB,EAAEA,SAAC,CAAC,eAAe,EAAE,qBAAqB,CAAC;AAC7D,KAAA;;AAEA,GAAA,OAAO,IAAG,IAAK,OAAO,CAAC,IAAI,CAAE,IAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAC;GACjD;EACD;AACF;;;;"}
@@ -1,21 +1,26 @@
1
- import { openBlock, createElementBlock, createElementVNode, Fragment, renderList, normalizeClass, toDisplayString, createCommentVNode } from 'vue';
1
+ import { openBlock, createElementBlock, toDisplayString, createCommentVNode, createElementVNode, Fragment, renderList, normalizeClass } from 'vue';
2
2
 
3
3
  const _hoisted_1 = {
4
4
  key: 0,
5
5
  class: "cn-flow-step-outcomes",
6
6
  "data-testid": "flow-step-outcomes"
7
7
  };
8
- const _hoisted_2 = ["aria-label"];
9
- const _hoisted_3 = ["data-testid"];
10
- const _hoisted_4 = { class: "cn-flow-step-outcomes__name" };
11
- const _hoisted_5 = { class: "cn-flow-step-outcomes__value" };
12
- const _hoisted_6 = { class: "cn-flow-step-outcomes__count" };
13
- const _hoisted_7 = {
8
+ const _hoisted_2 = {
14
9
  key: 0,
15
- class: "cn-flow-step-outcomes__sample"
10
+ class: "cn-flow-step-outcomes__title",
11
+ "data-testid": "flow-step-outcomes-title"
16
12
  };
13
+ const _hoisted_3 = ["aria-label"];
14
+ const _hoisted_4 = ["data-testid"];
15
+ const _hoisted_5 = { class: "cn-flow-step-outcomes__name" };
16
+ const _hoisted_6 = { class: "cn-flow-step-outcomes__value" };
17
+ const _hoisted_7 = { class: "cn-flow-step-outcomes__count" };
17
18
  const _hoisted_8 = {
18
19
  key: 0,
20
+ class: "cn-flow-step-outcomes__sample"
21
+ };
22
+ const _hoisted_9 = {
23
+ key: 1,
19
24
  class: "cn-flow-step-outcomes__truncated",
20
25
  "data-testid": "flow-step-outcomes-truncated"
21
26
  };
@@ -23,9 +28,12 @@ const _hoisted_8 = {
23
28
  function render(_ctx, _cache, $props, $setup, $data, $options) {
24
29
  return ($options.rows.length)
25
30
  ? (openBlock(), createElementBlock("div", _hoisted_1, [
31
+ ($props.label)
32
+ ? (openBlock(), createElementBlock("p", _hoisted_2, toDisplayString($props.label), 1 /* TEXT */))
33
+ : createCommentVNode("v-if", true),
26
34
  createElementVNode("dl", {
27
35
  class: "cn-flow-step-outcomes__list",
28
- "aria-label": $options.t('nextcloud-vue', 'Who this step reached')
36
+ "aria-label": $props.label || $options.t('nextcloud-vue', 'Who this step reached')
29
37
  }, [
30
38
  (openBlock(true), createElementBlock(Fragment, null, renderList($options.rows, (row) => {
31
39
  return (openBlock(), createElementBlock("div", {
@@ -33,18 +41,18 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
33
41
  class: normalizeClass(["cn-flow-step-outcomes__row", `cn-flow-step-outcomes__row--${row.tone}`]),
34
42
  "data-testid": `flow-step-outcome-${row.key}`
35
43
  }, [
36
- createElementVNode("dt", _hoisted_4, toDisplayString(row.label), 1 /* TEXT */),
37
- createElementVNode("dd", _hoisted_5, [
38
- createElementVNode("span", _hoisted_6, toDisplayString(row.count), 1 /* TEXT */),
44
+ createElementVNode("dt", _hoisted_5, toDisplayString(row.label), 1 /* TEXT */),
45
+ createElementVNode("dd", _hoisted_6, [
46
+ createElementVNode("span", _hoisted_7, toDisplayString(row.count), 1 /* TEXT */),
39
47
  (row.sample.length)
40
- ? (openBlock(), createElementBlock("span", _hoisted_7, " · " + toDisplayString(row.sample.join(', ')), 1 /* TEXT */))
48
+ ? (openBlock(), createElementBlock("span", _hoisted_8, " · " + toDisplayString(row.sample.join(', ')), 1 /* TEXT */))
41
49
  : createCommentVNode("v-if", true)
42
50
  ])
43
- ], 10 /* CLASS, PROPS */, _hoisted_3))
51
+ ], 10 /* CLASS, PROPS */, _hoisted_4))
44
52
  }), 128 /* KEYED_FRAGMENT */))
45
- ], 8 /* PROPS */, _hoisted_2),
53
+ ], 8 /* PROPS */, _hoisted_3),
46
54
  ($props.report && $props.report.truncated)
47
- ? (openBlock(), createElementBlock("p", _hoisted_8, toDisplayString($options.t('nextcloud-vue', 'Each list shows its first entries only.')), 1 /* TEXT */))
55
+ ? (openBlock(), createElementBlock("p", _hoisted_9, toDisplayString($options.t('nextcloud-vue', 'Each list shows its first entries only.')), 1 /* TEXT */))
48
56
  : createCommentVNode("v-if", true)
49
57
  ]))
50
58
  : createCommentVNode("v-if", true)