`).join("")+
``}
// Read the label -> person inputs and save them (/speaker_map).
@@ -156,9 +156,9 @@ return `
${txt?txt+" — ":
// Progress panel for a recording: boot, queued, or running pipeline.
function progPanel(row){const prog=row.prog,stop=`${row.flow_run_id?`prefect`:""}`;
// Pipeline starting: the Python environment can take minutes on the first run.
-if(!prog&&row.running)return `
…Avvio della pipeline— preparazione dell'ambiente Python (la prima volta scarica le dipendenze: qualche minuto)${stop}
${E(row.boot||"in avvio…")}
`;
+if(!prog&&row.running)return `
…Avvio della pipeline— preparazione dell'ambiente Python (la prima volta scarica le dipendenze: qualche minuto)${stop}
${E(row.boot||"in avvio…")}
`;
// Queued behind another run, or nothing to show.
-if(!prog)return row.status==="queued"?`
In codaparte appena finisce l'elaborazione in corso ${stop}
`:"";
+if(!prog)return row.status==="queued"?`
In codaparte appena finisce l'elaborazione in corso ${stop}
`:"";
// Overall percent (null if unknown) and the running step.
const pct=prog.pct!=null?Math.round(prog.pct*100):null,cur=prog.plan.find(stage=>stage.state==="run");
// Step chips: skipped / done with duration / running with fraction / pending with estimate.
@@ -166,7 +166,7 @@ const chips=prog.plan.map(stage=>stage.state==="skip"?`
@@ -203,6 +203,10 @@ addEventListener("drop",event=>{event.preventDefault();document.body.classList.r
// Meetings per page and current page index (0-based); goPg changes page and re-renders.
const PS=100;let pg_=0;
function goPg(delta){pg_+=delta;tick()}
+// Sort by processing date (updated_at): 0 = default (newest name first), -1 = newest first, 1 = oldest first.
+let srt=0;function sortDt(){srt=srt<0?1:-1;pg_=0;tick()}
+// SQLite UTC "YYYY-MM-DD HH:MM:SS" shown in local time.
+const dt=value=>value?new Date(value.replace(" ","T")+"Z").toLocaleString("it-IT",{dateStyle:"short",timeStyle:"short"}):"";
// Refresh the whole UI from /status: header, LLM pickers, table.
async function tick(){try{const data=await (await fetch("/status")).json();ab.disabled=data.ask_blocked;ab.title=data.ask_blocked?"pipeline in corso":"";
// Browser tab title shows the progress of the first running pipeline.
@@ -218,16 +222,18 @@ qs.textContent=data.queue?`rielaborazione: ${data.queue} da completare`:"";
// Remember step-select values so they survive the re-render.
document.querySelectorAll("select[id^=f-]").forEach(select=>sel[select.id]=select.value);
// Table header.
-let html="
riunione
stato
durata
speaker
dimensione
azioni
";
+let html=`
riunione
stato
elaborazione ${srt<0?"▼":srt>0?"▲":"↕"}
durata
speaker
dimensione
azioni
`;
+// Apply the date sort before paging (ISO strings sort lexicographically).
+const recs=srt?[...data.recs].sort((a,b)=>srt*(a.updated_at||"").localeCompare(b.updated_at||"")):data.recs;
// Pagination: PS meetings per page; clamp the page if recordings were removed, then draw the pager.
const pages=Math.max(1,Math.ceil(data.recs.length/PS));if(pg_>=pages)pg_=pages-1;
pgr.innerHTML=pages>1?`pagina ${pg_+1} di ${pages} (${data.recs.length} riunioni)`:"";
// One tbody per recording on the current page; "running" when the status is done but the process is still alive.
-for(const row of data.recs.slice(pg_*PS,(pg_+1)*PS)){
+for(const row of recs.slice(pg_*PS,(pg_+1)*PS)){
// Display title, falling back to the upload name.
const nm=row.title||row.upload,act=!!(row.prog||row.running||row.status==="queued");
// Main row: checkbox, title and rename buttons; status badge with error text and time since last data.
-html+=`