Skip to content

Commit e82ba92

Browse files
Fill in empty states for run detail Arguments, Output, and History sections
The run-detail page always renders Arguments, Output (when closed), and History even when those sections have no data to show. Previously they rendered as an empty vue-json-pretty "null" node or an empty history viewport with just tab buttons, leaving operators to guess whether the run genuinely has nothing or whether the page failed to load something. This replaces the silent blanks with explicit, operator-facing messages: - Arguments: "This run was started without arguments." when the decoded payload is null/empty/empty collection. - Output: "This run completed without returning a value." when a closed run has no output payload. - History: "No history events have been recorded for this run yet." when the run has no timeline events, displayed in place of the empty virtual-scroll timeline or the empty event-list table. A new hasPayload() helper decodes the raw argument/output value through the existing unserialize() path, then treats null, undefined, empty string, empty array, and empty object as "no payload". Sections that are already gated on their own length (Activities, Tasks, Waits, Timers, Commands, Signals, Updates, Linked Intakes, Exceptions) keep their existing behaviour — those cards stay hidden when empty.
1 parent f5acc73 commit e82ba92

3 files changed

Lines changed: 43 additions & 7 deletions

File tree

public/app.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/mix-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"/app.js": "/app.js?id=147cf2116110d73e68bbbf8ca6b4562d",
2+
"/app.js": "/app.js?id=86372e1a1c7bb44d2caa2bc89cf0c13f",
33
"/app-dark.css": "/app-dark.css?id=64d24ee96944ffdb4b26a9be1658c1e3",
44
"/app.css": "/app.css?id=d525454610dfd3c5a581fc49676f8a37",
55
"/img/favicon.png": "/img/favicon.png?id=7c006241b093796d6abfa3049df93a59",

resources/js/screens/flows/flow.vue

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div>
33
<div class="card">
44
<div class="card-header d-flex align-items-center justify-content-between">
5-
<h5 v-if="!ready">Run Detail</h5>
5+
<h5 v-if="!ready">Flow Preview</h5>
66
<h5 v-if="ready">{{ flow.class }}</h5>
77

88
<div class="d-flex align-items-center">
@@ -81,7 +81,7 @@
8181
class="d-flex flex-column align-items-center justify-content-center text-center card-bg-secondary p-5 bottom-radius"
8282
role="alert"
8383
aria-live="assertive">
84-
<strong>Run detail unavailable</strong>
84+
<strong>Flow preview unavailable</strong>
8585
<span class="text-muted mt-2">{{ loadingError }}</span>
8686
<button class="btn btn-outline-primary btn-sm mt-3" @click="retryFlowLoad">
8787
Retry
@@ -499,7 +499,10 @@
499499
</div>
500500

501501
<div class="card-body code-bg text-white collapse show" id="collapseArguments">
502-
<vue-json-pretty :data="unserialize(flow.arguments)"></vue-json-pretty>
502+
<vue-json-pretty v-if="hasPayload(flow.arguments)" :data="unserialize(flow.arguments)"></vue-json-pretty>
503+
<div v-else class="text-muted small">
504+
This run was started without arguments.
505+
</div>
503506
</div>
504507
</div>
505508

@@ -514,7 +517,10 @@
514517
</div>
515518

516519
<div class="card-body code-bg text-white collapse show" id="collapseOutput">
517-
<vue-json-pretty :data="unserialize(flow.output)"></vue-json-pretty>
520+
<vue-json-pretty v-if="hasPayload(flow.output)" :data="unserialize(flow.output)"></vue-json-pretty>
521+
<div v-else class="text-muted small">
522+
This run completed without returning a value.
523+
</div>
518524
</div>
519525
</div>
520526

@@ -648,8 +654,12 @@
648654
</div>
649655
</div>
650656

657+
<div v-if="!timelineRows().length" class="text-muted small">
658+
No history events have been recorded for this run yet.
659+
</div>
660+
651661
<div
652-
v-if="runDetailTab() === 'timeline'"
662+
v-else-if="runDetailTab() === 'timeline'"
653663
class="timeline-events timeline-events-virtual"
654664
:style="{ height: historyViewportHeight + 'px' }"
655665
@scroll="onHistoryScroll"
@@ -2143,6 +2153,32 @@ export default {
21432153
return value !== null && value !== undefined && value !== ''
21442154
},
21452155
2156+
hasPayload(raw) {
2157+
if (raw === null || raw === undefined || raw === '') {
2158+
return false
2159+
}
2160+
2161+
const decoded = this.unserialize(raw)
2162+
2163+
if (decoded === null || decoded === undefined) {
2164+
return false
2165+
}
2166+
2167+
if (typeof decoded === 'string') {
2168+
return decoded !== ''
2169+
}
2170+
2171+
if (Array.isArray(decoded)) {
2172+
return decoded.length > 0
2173+
}
2174+
2175+
if (typeof decoded === 'object') {
2176+
return Object.keys(decoded).length > 0
2177+
}
2178+
2179+
return true
2180+
},
2181+
21462182
hasObjectEntries(value) {
21472183
return value !== null
21482184
&& value !== undefined

0 commit comments

Comments
 (0)