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:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user