Skip to content

Commit bdc1b14

Browse files
committed
fix(dashboard): fetch 20 session stats to survive subagent filtering
When subagents are hidden, the previous limit of 5 could yield 0 visible cards if all recent sessions were subagent sessions. Now fetches 20 and slices to 5 after filtering.
1 parent 655c4a3 commit bdc1b14

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

packages/dashboard/src/components/CacheDiagnostics/CacheDiagnostics.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default function CacheDiagnostics() {
1717
try {
1818
const [eventsData, statsData, sessions] = await Promise.all([
1919
getCacheEvents(2000),
20-
getSessionCacheStats(5),
20+
getSessionCacheStats(20),
2121
getSessions(),
2222
]);
2323
setEvents(eventsData);
@@ -50,7 +50,8 @@ export default function CacheDiagnostics() {
5050

5151
const filteredStats = () => {
5252
const stats = sessionStats();
53-
return hideSubagents() ? stats.filter(s => !isSubagent(s.session_id)) : stats;
53+
const filtered = hideSubagents() ? stats.filter(s => !isSubagent(s.session_id)) : stats;
54+
return filtered.slice(0, 5);
5455
};
5556

5657
const filteredEvents = () => {

0 commit comments

Comments
 (0)