diff --git a/STATUS.md b/STATUS.md
index fadee80..5d79d9d 100644
--- a/STATUS.md
+++ b/STATUS.md
@@ -13,6 +13,27 @@ caches reported `unchanged`. This run froze its source before D-113, so its
image commits have no size metadata. Publication is not yet confirmed; do not
treat the version change as delivered until the HTTPS/ref check below passes.
+## Build control portal shows real progress (2026-11-14)
+
+The private portal draws one progress bar for the selected run from the same
+phase plan as the stage grid. `phasePlan()` keeps hiding stages that a completed
+instrumented run never entered, and now also cuts an uninstrumented run's plan
+at the stage named by `state`/`failed_phase` instead of claiming that every
+stage ran. The bar counts a phase as completed only once a later phase starts;
+when there is no trace at all it takes the position of the current or failed
+stage. A running or failed run is capped at 99 %, only `complete` reports
+100 %, and the track exposes `aria-valuenow` for assistive technology.
+
+The deployed portal at `/opt/archipelago/control-source/control/` was newer than
+this repository, so the live `app.js`, `index.html`, `style.css`, `server.py` and
+`README.md` were first copied back here and then extended. Verified with
+`node --check` and a stubbed DOM against the real `/api/status` and `/api/run`
+payloads of the in-flight `20261114T133314Z` run (9 of 17 stages, 53 %), a
+synthetic failed-at-Core run (7 of 8, 88 %) and a completed uninstrumented run
+(100 %, "no trace recorded"). `infrastructure/tests/control_portal.py` asserts
+the progress markup and the attribute update; `archipelago-control.service` was
+restarted and serves the new files.
+
## Image size and MIT licence in the software centers (D-113, 2026-11-14)
Every image path now records its size in the published commit. The builder
@@ -42,7 +63,7 @@ licence (`PLUGIN_DBUS_DIFF_DOWNLOAD_STAGE_ERROR_STATES_PASS`); the Discover
adapter compiles against the `2026-11-12` snapshot with no missing libraries.
Measured on the real Core commit `30717394…`: transfer 1 414 614 430 bytes,
installed 2 092 868 303 bytes. Sources are pushed and deployed to the worker
-source tree: `builder 853a88d`, `system df3e312`, `rfc f678845`.
+source tree: `builder 853a88d`, `system bcc32b8`, `rfc f678845`.
The size shown in the running software centers and the D-Bus values on an
installed system remain user-verified only until the next cycle publishes.
diff --git a/control/app.js b/control/app.js
index 85fadd2..ae54e16 100644
--- a/control/app.js
+++ b/control/app.js
@@ -1,13 +1,25 @@
'use strict';
const $ = id => document.getElementById(id);
+// Actual driver phases. The optional marker limits a phase to that build mode so
+// removed acceptance stages and disabled steps never appear in the UI.
const phases = [
- ['preflight','Подготовка'],['freezing-and-compiling-source','Исходники и тесты'],
- ['updating-flatpak-cache','Flatpak / GNOME'],['updating-kde-flatpak-cache','Flatpak / KDE'],
- ['building-software-adapter','GNOME Software'],['building-discover-adapter','Discover'],
- ['building-core','Core / ISO'],['building-gnome-purpose-and-iso','GNOME / ISO'],['building-kde-purpose-and-iso','KDE / ISO'],
- ['core-installed-acceptance','Приёмка Core'],['gnome-installed-acceptance','Приёмка GNOME'],['kde-installed-acceptance','Приёмка KDE'],
- ['archiving-artifacts','Архив и целостность'],['preparing-publication','Подготовка публикации'],
- ['signing-and-publishing','Подпись и публикация'],['verifying-public-endpoints','Проверка HTTPS'],['cleaning-worker','Очистка worker']
+ ['preflight','Подготовка окружения'],
+ ['selecting-repository','Выбор репозитория'],
+ ['freezing-and-compiling-source','Исходники, тесты, CLI'],
+ ['updating-flatpak-cache','Кэш Flatpak · GNOME','iso'],
+ ['updating-kde-flatpak-cache','Кэш Flatpak · KDE','iso'],
+ ['building-software-adapter','Адаптер GNOME Software'],
+ ['building-discover-adapter','Адаптер Discover'],
+ ['building-core','Core'],
+ ['building-gnome-purpose','GNOME'],
+ ['building-kde-purpose','KDE'],
+ ['building-container-runner','Container Runner'],
+ ['archiving-artifacts','Архив артефактов'],
+ ['preparing-publication','Проверка доказательств'],
+ ['signing-and-publishing','Подпись и публикация'],
+ ['verifying-public-endpoints','Проверка HTTPS'],
+ ['publishing-container-runner','Публикация Container Runner'],
+ ['cleaning-worker','Очистка worker']
];
let run = '', log = '', offset = 0, next = 0, size = 0, text = '', data = null, status = null, busy = false, logBusy = false;
let logsKey = '', runsKey = '';
@@ -30,7 +42,7 @@ function drawStatus(s) {
status=s;const active=['active','activating'].includes(s.service.ActiveState);const stopping=s.service.ActiveState==='deactivating';
$('service').textContent=stopping?'Останавливается':active?'Выполняется':'Ожидает запуска';
$('service-detail').textContent=`systemd: ${s.service.ActiveState} / ${s.service.SubState}`;
- $('schedule').textContent=s.timer.ActiveState==='active'?'OSTree: 3 дня · ISO: 30-го':'Приостановлено';
+ $('schedule').textContent=s.timer.ActiveState==='active'?'ISO+OSTree · 1-е число':'Приостановлено';
$('next').textContent='Следующий: '+(s.timer.ActiveState==='active' && s.next_release ? `${s.next_release.date} · ${s.next_release.mode} · ${s.next_release.time}` : '—');
$('start').disabled=active||stopping;$('stop').disabled=!active;$('toggle-schedule').disabled=false;
$('toggle-schedule').textContent=s.timer.ActiveState==='active'?'Ⅱ Приостановить расписание':'↻ Включить расписание';
@@ -41,14 +53,52 @@ function drawStatus(s) {
$('run-count').textContent=s.runs.length;
$('sources').replaceChildren();for(const [name,sha] of Object.entries(s.sources)){const d=node('div','',name+' ');d.append(node('code','',sha.slice(0,12)));$('sources').append(d);}
}
+function phasePlan(s, d, terminal) {
+ const byMode = phases.filter(([id,, mode]) => !mode || s.output_mode === mode);
+ if (d.instrumented && terminal) {
+ // A finished instrumented run shows only the phases it actually executed.
+ return byMode.filter(([id]) => d.events.some(e => e.phase === id));
+ }
+ if (d.instrumented) return byMode;
+ // Without a phase trace the plan may not claim stages that never ran: cut it
+ // after the stage the state names, or after the one that failed.
+ const reached = byMode.findIndex(([id]) => id === (s.failed_phase || s.state));
+ return reached < 0 ? byMode : byMode.slice(0, reached + 1);
+}
+function progressOf(s, d, plan) {
+ const total = plan.length;
+ if (!total) return {done: 0, total: 0, percent: 0};
+ if (s.state === 'complete') return {done: total, total, percent: 100};
+ let done = 0;
+ if (d.instrumented) {
+ // A phase counts once a later phase started; the current one is still running.
+ done = plan.filter(([id]) => {
+ const event = d.events.find(e => e.phase === id);
+ return event && d.events.some(e => e.time > event.time);
+ }).length;
+ } else {
+ done = Math.max(0, plan.findIndex(([id]) => id === (s.failed_phase || s.state)));
+ }
+ return {done, total, percent: Math.min(99, Math.round(done / total * 100))};
+}
function drawRun(d) {
- data=d;const s=d.state;const terminal=['failed','complete'].includes(s.state);
+ data=d;const s=d.state;const terminal=['failed','complete'].includes(s.state);const plan=phasePlan(s,d,terminal);
$('run-name').textContent=s.run;$('run-state').textContent=label(s.state);
- $('run-meta').textContent=`${date(s.started)} · ${elapsed(s.started,terminal?(s.finished||s.updated):null)} · ${s.worker} · ${s.channel}`;
+ $('run-state').className='badge'+(s.state==='failed'?' error':'');
+ $('run-meta').textContent=`${date(s.started)} · ${elapsed(s.started,terminal?(s.finished||s.updated):null)} · ${s.worker} · ${s.channel} · ${s.output_mode||'—'}`;
$('run-error').hidden=!s.error;$('run-error').textContent=s.error_details||s.error||'';
+ const p=progressOf(s,d,plan);const track=$('run-progress-track');
+ track.setAttribute('aria-valuenow',String(p.percent));
+ track.className='progress-track'+(s.state==='failed'?' failed':s.state==='complete'?' complete':'');
+ $('run-progress').style.width=p.percent+'%';
+ $('run-progress-text').textContent=s.state==='complete'
+ ? (d.instrumented?`Готово · ${p.total} этапов · ${elapsed(s.started,s.finished||s.updated)}`:'Завершён · подробная трассировка не записывалась')
+ : s.state==='failed'
+ ? `Остановлено после ${p.done} из ${p.total} этапов · ${p.percent}%`
+ : `${p.done} из ${p.total} этапов · ${p.percent}% · идёт ${elapsed(s.started)}`;
$('phase-summary').textContent=d.instrumented?'Фактические переходы и время':'Исторический прогон · подробная трассировка не записывалась';
$('phases').replaceChildren();
- for(const [id,title] of phases){const event=d.events.find(e=>e.phase===id);const end=event?d.events[d.events.indexOf(event)+1]:null;let state='waiting';if(event)state=end?'succeeded':'active';if(s.state===id)state='active';if(s.failed_phase===id)state='failed';if(!d.instrumented&&s.state==='complete')state='succeeded';const p=node('div','phase '+state);p.append(node('strong','',({waiting:'○ ',active:'◉ ',succeeded:'✓ ',failed:'× '})[state]+title),node('small','',event?elapsed(event.time,end?.time):state==='waiting'?'Не выполнялся / нет данных':id));$('phases').append(p);}
+ for(const [id,title] of plan){const event=d.events.find(e=>e.phase===id);const end=event?d.events[d.events.indexOf(event)+1]:null;let state='waiting';if(event)state=end?'succeeded':'active';if(s.state===id)state='active';if(s.failed_phase===id)state='failed';if(!d.instrumented&&s.state==='complete')state='succeeded';const p=node('div','phase '+state);p.append(node('strong','',({waiting:'○ ',active:'◉ ',succeeded:'✓ ',failed:'× '})[state]+title),node('small','',event?elapsed(event.time,end?.time):state==='waiting'?'Не выполнялся / нет данных':id));$('phases').append(p);}
const opened = new Set([...$('actions').querySelectorAll('details[open]')].map(el=>el.dataset.id));
$('action-count').textContent=`(${d.actions.length})`;$('actions').replaceChildren();
for(const a of d.actions.filter(Boolean)){const el=node('details','action');el.append(node('summary','',`${a.id} · ${label(a.state)} · ${a.phase} · ${a.duration_seconds??'…'} с · exit ${a.returncode??'—'}`),node('pre','',a.command.join(' ')));if(a.error)el.append(node('p','',a.error));const link=node('a','', 'Открыть полный лог →');link.href='#log-content';link.onclick=()=>selectLog('monitor/'+a.log);el.append(link);$('actions').append(el);}
diff --git a/control/index.html b/control/index.html
index b5c7151..0e0cb23 100644
--- a/control/index.html
+++ b/control/index.html
@@ -2,35 +2,111 @@
- Archipelago // Build control
-
+
+
+ Archipelago · Build control
+
+
+
- archipelago_