Executions: show runs waiting on a prompt; Automated tab filters on the server (#3, #4)
CI / Lint (eslint) (pull_request) Successful in 29s
CI / Test (jest) (pull_request) Successful in 24s
CI / Security (npm audit) (pull_request) Successful in 12s
CI / Scan (secrets, workflows, shell) (pull_request) Successful in 1m48s
CI / Integration (api) (pull_request) Successful in 2m32s
CI / UI (playwright) (pull_request) Successful in 2m6s
CI / Deploy (pull_request) Skipped
CI / Deploy worker (pull_request) Skipped
CI / Notify (pull_request) Skipped
CI / UI screenshots (before/after) (pull_request) Successful in 2m28s
CI / Lint (eslint) (pull_request) Successful in 29s
CI / Test (jest) (pull_request) Successful in 24s
CI / Security (npm audit) (pull_request) Successful in 12s
CI / Scan (secrets, workflows, shell) (pull_request) Successful in 1m48s
CI / Integration (api) (pull_request) Successful in 2m32s
CI / UI (playwright) (pull_request) Successful in 2m6s
CI / Deploy (pull_request) Skipped
CI / Deploy worker (pull_request) Skipped
CI / Notify (pull_request) Skipped
CI / UI screenshots (before/after) (pull_request) Successful in 2m28s
- #3: the list response includes waiting_for_input for each execution (a running execution blocked on a prompt). The row shows it as 'waiting' (the design system's purple status) and the Waiting status filter, which could never match, now finds it. - #4: new only_internal=true filter (Gandalf and scheduler runs), used by the Automated tab, so it pages and counts on the server like the Manual tab; the client-side filter over one shared page is gone. - Tests: integration for waiting_for_input and both server filters; UI for the waiting status and the filter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9a6a4c0b66
commit
39d28fb9e7
5 files changed
+58
-14
No files matched your search
@@ -45,11 +45,6 @@
|
||||
browser dialogs finds no call sites in this file. */
|
||||
const askConfirm = Pulse.confirm;
|
||||
|
||||
function isAutomatedRun(e) {
|
||||
const by = (e && e.started_by) || '';
|
||||
return by.indexOf('gandalf:') === 0 || by.indexOf('scheduler:') === 0;
|
||||
}
|
||||
|
||||
function execName(e) {
|
||||
return (e && e.workflow_name) || '[Quick Command]';
|
||||
}
|
||||
@@ -81,11 +76,12 @@
|
||||
const offset = append ? st.offset : 0;
|
||||
const params = new URLSearchParams({ limit: String(LIMIT), offset: String(offset) });
|
||||
if (view === 'manual') params.set('hide_internal', 'true');
|
||||
if (view === 'automated') params.set('only_internal', 'true'); // server-side (#4)
|
||||
|
||||
try {
|
||||
const data = await Pulse.api.get('/api/executions?' + params.toString());
|
||||
const raw = (data && data.executions) || [];
|
||||
const rows = view === 'automated' ? raw.filter(isAutomatedRun) : raw;
|
||||
const rows = raw;
|
||||
|
||||
st.rows = append ? st.rows.concat(rows) : rows;
|
||||
st.offset = offset + raw.length; // page over raw server rows
|
||||
@@ -114,7 +110,7 @@
|
||||
const term = searchTerm();
|
||||
const status = statusTerm();
|
||||
return state[view].rows.filter((e) => {
|
||||
if (status && e.status !== status) return false;
|
||||
if (status && displayStatus(e) !== status) return false;
|
||||
if (term) {
|
||||
const name = execName(e).toLowerCase();
|
||||
const id = String(e.id || '').toLowerCase();
|
||||
@@ -127,11 +123,13 @@
|
||||
function countLabel(view) {
|
||||
const st = state[view];
|
||||
if (!st.loaded) return '';
|
||||
/* Manual is a straight server-side filter, so `total` is exact.
|
||||
Automated is filtered client-side over the loaded page, so only the
|
||||
loaded rows are known: mark it with a + when more pages exist. */
|
||||
if (view === 'manual') return '(' + st.total + ')';
|
||||
return '(' + st.rows.length + (st.hasMore ? '+' : '') + ')';
|
||||
// Both tabs filter on the server, so `total` is exact (#4).
|
||||
return '(' + st.total + ')';
|
||||
}
|
||||
|
||||
// 'waiting' when a running execution is blocked on a prompt (#3).
|
||||
function displayStatus(e) {
|
||||
return e.status === 'running' && e.waiting_for_input ? 'waiting' : e.status;
|
||||
}
|
||||
|
||||
function rowHtml(e) {
|
||||
@@ -157,7 +155,7 @@
|
||||
return '<tr class="' + cls.join(' ') + '" data-action="' + action + '"' +
|
||||
' data-execution-id="' + esc(e.id) + '" tabindex="0">' +
|
||||
check +
|
||||
'<td data-label="Status"><span class="' + Pulse.fmt.status(e.status) + '">' + esc(e.status) + '</span></td>' +
|
||||
'<td data-label="Status"><span class="' + Pulse.fmt.status(displayStatus(e)) + '">' + esc(displayStatus(e)) + '</span></td>' +
|
||||
'<td data-label="Name"><strong>' + esc(execName(e)) + '</strong></td>' +
|
||||
'<td data-label="Started by">' + esc(e.started_by || '') + '</td>' +
|
||||
'<td data-label="Started">' + esc(Pulse.fmt.dateTime(e.started_at)) + '</td>' +
|
||||
|
||||
Reference in new issue
Block a user