fix: session count label distinguishes visible vs total
Show "X visible (Y total)" when the history list is filtered or limited, and "X sessions total" only when every session is actually displayed. Made-with: Cursor
This commit is contained in:
@@ -67,7 +67,10 @@ router.get('/', (req, res) => {
|
||||
return { ...session, has_notes, notes_preview };
|
||||
});
|
||||
|
||||
const absoluteTotal = db.prepare('SELECT COUNT(*) as total FROM sessions').get();
|
||||
|
||||
res.set('X-Total-Count', String(countRow.total));
|
||||
res.set('X-Absolute-Total', String(absoluteTotal.total));
|
||||
res.json(result);
|
||||
} catch (error) {
|
||||
res.status(500).json({ error: error.message });
|
||||
|
||||
Reference in New Issue
Block a user