feat(dashboard): tableau de bord Second Brain configurable avec chargement progressif
All checks were successful
CI / Lint, Unit Tests & Build (push) Successful in 7m3s
CI / Deploy production (on server) (push) Successful in 23s

Briefing granulaire, pistes rapides puis enrichissement async, layout persisté v5,
suggestions agents, intégration Gmail et navigation sidebar alignée sur /home.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Antigravity
2026-07-14 16:50:53 +00:00
parent d38a99586b
commit 30da592ba2
62 changed files with 7741 additions and 335 deletions

View File

@@ -117,17 +117,48 @@ fi
# --- Background cron scheduler ---
(
sleep 60
CRON_SECRET="${CRON_SECRET:-}"
tick=0
while true; do
node -e "
const http = require('http');
const req = http.request('http://localhost:3000/api/cron/agents', { method: 'POST' }, (res) => {
let body = '';
res.on('data', (d) => body += d);
res.on('end', () => console.log('[Scheduler] Cron response:', res.statusCode, body));
});
req.on('error', (e) => console.error('[Scheduler] Cron error:', e.message));
req.end();
" 2>&1 || true
if [ -n "$CRON_SECRET" ]; then
CRON_TICK="$tick" node -e "
const http = require('http');
const secret = process.env.CRON_SECRET || '';
const tick = Number(process.env.CRON_TICK || '0');
const call = (path, method) => new Promise((resolve) => {
const req = http.request({
hostname: 'localhost',
port: 3000,
path,
method: method || 'POST',
headers: { Authorization: 'Bearer ' + secret },
}, (res) => {
let body = '';
res.on('data', (d) => body += d);
res.on('end', () => { console.log('[Scheduler]', path, res.statusCode, body.slice(0, 200)); resolve(); });
});
req.on('error', (e) => { console.error('[Scheduler]', path, e.message); resolve(); });
req.end();
});
(async () => {
await call('/api/cron/agents');
await call('/api/cron/agent-suggestions');
if (tick % 12 === 0) {
await call('/api/cron/reminders');
await call('/api/cron/sync-usage');
}
if (tick % 72 === 0) {
await call('/api/cron/clusters', 'GET');
}
if (tick % 288 === 0) {
await call('/api/cron/gmail');
}
})();
" 2>&1 || true
else
warn "CRON_SECRET unset — scheduled crons disabled"
fi
tick=$((tick + 1))
sleep 300
done
) &