web: sessions list shows active pi only; close-pi button in chat header (agent sessions); tests to 154, coverage ≥95 all metrics

This commit is contained in:
Raphael Westphal
2026-08-18 17:56:31 +02:00
parent 71ab821abd
commit a67efdb5ec
8 changed files with 198 additions and 18 deletions
+7 -3
View File
@@ -30,12 +30,16 @@ export default function SessionsView({ sessions, onChanged, pushToast }: Props)
}
};
const sorted = [...sessions].sort((a, b) => (b.lastEventAt ?? b.startedAt) - (a.lastEventAt ?? a.startedAt));
// Only active (online) pi sessions are shown; offline transcripts stay
// reachable by direct URL and are dropped from the default list.
const sorted = [...sessions]
.filter((s) => s.online)
.sort((a, b) => (b.lastEventAt ?? b.startedAt) - (a.lastEventAt ?? a.startedAt));
return (
<div className="page">
<h1>Sessions</h1>
{sorted.length === 0 && <p className="empty">No sessions yet. Spawn one from the sidebar.</p>}
<h1>Active sessions</h1>
{sorted.length === 0 && <p className="empty">No active sessions. Spawn one from the sidebar.</p>}
{sorted.map((s) => (
<div
key={s.id}