sort history by exec start time rather than priority

This commit is contained in:
Richard Yu
2025-08-06 15:52:39 -07:00
committed by Jennifer Weber
parent e6d3e94a34
commit c3c59988f4
2 changed files with 194 additions and 1 deletions

View File

@@ -481,7 +481,11 @@ export const useQueueStore = defineStore('queue', () => {
)
historyTasks.value = [...newHistoryItems, ...existingHistoryItems]
.slice(0, maxHistoryItems.value)
.sort((a, b) => b.queueIndex - a.queueIndex)
.sort((a, b) => {
const aTime = a.executionStartTimestamp ?? 0
const bTime = b.executionStartTimestamp ?? 0
return bTime - aTime
})
} finally {
isLoading.value = false
}