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:
bircni
2026-09-26 10:01:41 +02:00
committed by GitHub
parent 5a56e118e4
commit 3875db1974
30 changed files with 928 additions and 95 deletions
+31 -1
View File
@@ -2,7 +2,7 @@ import {
createElementFromAttrs, createElementFromHTML,
queryElemChildren, querySingleVisibleElem,
protectMorphElements, recoverMorphElements,
toggleElem,
toggleElem, morphElementWithProtection,
} from './dom.ts';
test('createElementFromHTML', () => {
@@ -70,3 +70,33 @@ test('protectMorphElements', () => {
recoverMorphElements(el, protectedElems);
expect(el.outerHTML).toEqual('<div><span data-morph-protect="">foo</span></div>');
});
describe('morphElementWithProtection', () => {
const newElHtml = '<div><div><span>new</span><div class="ui dropdown">changed</div></div></div>';
it('morph normal', () => {
const el = createElementFromHTML('<div><div><span>old</span><div class="ui dropdown active"></div></div></div>');
const newEl = createElementFromHTML(newElHtml);
morphElementWithProtection(el, newEl, {morphStyle: 'outerHTML'});
// span is changed, but dropdown is skipped because it is active
expect(el.outerHTML).toEqual('<div><div><span>new</span><div class="ui dropdown active"></div></div></div>');
});
it('morph whole', () => {
const el = createElementFromHTML('<div><div data-morph-whole><span>old</span><div class="ui dropdown active"></div></div></div>');
const newEl = createElementFromHTML(newElHtml);
morphElementWithProtection(el, newEl, {morphStyle: 'outerHTML'});
// span is not changed, because the parent div is marked as data-morph-whole and there is an active dropdown, so it is skipped
expect(el.outerHTML).toEqual('<div><div data-morph-whole=""><span>old</span><div class="ui dropdown active"></div></div></div>');
});
it('morph protection', () => {
const el = createElementFromHTML('<div><span></span><div class="ui dropdown"></div></div>');
const newEl = createElementFromHTML('<div><span>new</span><div class="ui dropdown">changed</div></div>');
const elSpanOld = el.querySelector('span');
const elDropdownOld = el.querySelector('.ui.dropdown');
const morphedEl = morphElementWithProtection(el, newEl, {morphStyle: 'outerHTML'});
expect(el.outerHTML).toEqual('<div><span>new</span><div class="ui dropdown">changed</div></div>');
const elSpanNew = morphedEl.querySelector('span');
const elDropdownNew = morphedEl.querySelector('.ui.dropdown');
expect(elSpanNew).toBe(elSpanOld); // span is morphed in place, so it is the same element
expect(elDropdownNew).not.toBe(elDropdownOld); // dropdown is protected and fully replaced, so it is a new element
});
});