feat(actions): add build queue view (#38585)

Adds a read-only Actions job queue: running jobs first, then waiting
jobs in the order a runner picks them up. It is shown instance-wide in
the admin Actions section with owner, repository and status filters, and
per repository in the Actions tab. Both lists refresh in place.

Pending work is currently only visible per repository and newest-first,
so nothing shows what is queued, in which order, or what occupies the
runners. Reordering the queue will be proposed separately.

A migration adds indexes for the runner pickup query and
repository-scoped status lookups.

* Fix #34198

<img width="1345" height="451" alt="image"
src="https://github.com/user-attachments/assets/7d52ff76-81b4-44e8-b583-d7d89c9dffcd"
/>
<img width="1809" height="1134" alt="image"
src="https://github.com/user-attachments/assets/4d56c0cb-bae7-4ce2-8f3c-75163b2bc7f4"
/>

---------

Co-authored-by: Zettat123 <zettat123@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
authored and GitHub committed 2026-09-26 08:01:41 +00:00
1 parent 5a56e118e4
commit 3875db1974
30 files changed
+928 -95

No files matched your search

+32 -1
View File
@@ -1,6 +1,7 @@
import {debounce} from './func.ts';
import type {Promisable} from '../types.ts';
import type $ from 'jquery';
import {Idiomorph} from 'idiomorph';
type ArrayLikeIterable<T> = ArrayLike<T> & Iterable<T>; // for NodeListOf and Array
type ElementArg = Element | string | ArrayLikeIterable<Element> | ReturnType<typeof $>;
@@ -424,6 +425,36 @@ export function recoverMorphElements(el: Element, protectedElems: ProtectedMorph
for (const [id, html] of Object.entries(protectedElems)) {
const it = el.querySelector(`[data-morph-protect="${CSS.escape(id)}"]`);
if (!it) continue;
it.outerHTML = html;
it.replaceWith(createElementFromHTML(html));
}
}
export type MorphElementOptions = {
morphStyle: 'innerHTML' | 'outerHTML';
};
export function morphElementWithProtection(el: Element, newEl: Element, opts: MorphElementOptions): Element {
const protectedElems = protectMorphElements(newEl);
const selectorSkipElems = '.ui.dropdown.active';
const nodes = Idiomorph.morph(el, newEl, {
morphStyle: opts.morphStyle,
callbacks: {
beforeNodeMorphed: (oldNode /* , newNode */) => {
if (!(oldNode instanceof Element)) return true;
// If the end user is operating a row, then don't refresh its content.
// Otherwise, there will be more edge cases and inconsistencies, e.g.: dropdown still shows old items but the icon has changed.
const oldNodeMorphWholeAndSkipChild = oldNode.matches('[data-morph-whole]') && oldNode.querySelector(selectorSkipElems);
// If the element should be skipped, don't morph it
const oldNodeShouldSkip = oldNode.matches(selectorSkipElems);
const shouldSkip = oldNodeMorphWholeAndSkipChild || oldNodeShouldSkip;
return !shouldSkip;
},
},
});
const morphedElem = nodes[0] as Element;
recoverMorphElements(morphedElem, protectedElems);
return morphedElem;
}