0.12.0-13 Job Log fix

This commit is contained in:
2026-03-23 09:06:35 +00:00
parent 56f8133589
commit 27d8ff6098
7 changed files with 17 additions and 21 deletions
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "ripster-frontend",
"version": "0.12.0-12",
"version": "0.12.0-13",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "ripster-frontend",
"version": "0.12.0-12",
"version": "0.12.0-13",
"dependencies": {
"primeicons": "^7.0.0",
"primereact": "^10.9.2",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "ripster-frontend",
"version": "0.12.0-12",
"version": "0.12.0-13",
"private": true,
"type": "module",
"scripts": {
+8 -12
View File
@@ -960,19 +960,15 @@ export default function DashboardPage({
const state = String(pipeline?.state || 'IDLE').trim().toUpperCase();
const currentPipelineJobId = normalizeJobId(pipeline?.activeJobId || pipeline?.context?.jobId);
const isProcessing = processingStates.includes(state);
// When the pipeline transitions to METADATA_SELECTION for a new job while another job
// is still encoding in the background, isProcessing becomes false and the log clears.
// Track the background encoding job so its live log keeps polling.
const backgroundProcessingJobId = useMemo(() => {
if (isProcessing) return null;
const bg = dashboardJobs.find((job) => {
const s = normalizeStatus(job?.status);
return processingStates.includes(s);
});
// Always prefer the ENCODING job from dashboardJobs for the live log.
// When a second job enters ANALYZING, isProcessing becomes true (ANALYZING is a processingState)
// and currentPipelineJobId switches to job2 — but job1 is still ENCODING and its log must stay visible.
const encodingJobId = useMemo(() => {
const bg = dashboardJobs.find((job) => normalizeStatus(job?.status) === 'ENCODING');
return bg ? normalizeJobId(bg.id) : null;
}, [isProcessing, dashboardJobs]);
const liveLogJobId = backgroundProcessingJobId || currentPipelineJobId;
const liveLogActive = isProcessing || Boolean(backgroundProcessingJobId);
}, [dashboardJobs]);
const liveLogJobId = encodingJobId || currentPipelineJobId;
const liveLogActive = isProcessing || Boolean(encodingJobId);
const monitoringState = useMemo(
() => normalizeHardwareMonitoringPayload(hardwareMonitoring),
[hardwareMonitoring]