Commit Graph

6 Commits

Author SHA1 Message Date
39c705592a feat: robust automatic DB migration for Docker deployments
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 44s
Backup before migration (pg_dump/SQLite copy), DB connection wait with
retries, idempotent prisma migrate deploy, old backup cleanup (keep 5),
and server refuses to start if migration fails.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 21:30:45 +02:00
1b4c6123c2 fix: use node http for cron scheduler + add toast notifications
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 40s
- Replace wget with node http.request in entrypoint (guaranteed
  available, better error handling)
- Add 30s polling in agents page to detect new agent executions
- Show toast notification when an agent finishes (success or failure)
- Add logging in scheduler for visibility in docker logs

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-26 12:39:09 +02:00
17e4a58da2 feat: auto-trigger scheduled agents + fix stale nextRun display
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 41s
- Add background scheduler in entrypoint: calls /api/cron/agents every
  5 minutes to trigger due agents automatically
- Recalculate stale nextRun (past dates) in getAgents() so the display
  always shows a future time
- Agent card shows "En attente de déclenchement" instead of "il y a X"
  when nextRun is in the past

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-26 12:28:38 +02:00
102ccd13d4 fix: revert entrypoint to migrate deploy, add proper migration file
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m1s
Create migration 20260426130000_add_agent_schedule_fields with the 3 new
Agent columns (scheduledTime, scheduledDay, timezone). Reverts entrypoint
back to prisma migrate deploy. Removes redundant migration step from
deploy.yaml.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-26 11:12:23 +02:00
434bb3ad71 fix: use prisma db push in entrypoint instead of migrate deploy
Some checks failed
Deploy to Production / Build and Deploy (push) Has been cancelled
The app uses db push (no migration files), so migrate deploy was a no-op.
Also removes the redundant migration step from deploy.yaml since the
entrypoint now handles schema sync on every container start.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-26 11:06:07 +02:00
986d438738 fix: resolve React Error #310 and refactor admin section
Some checks failed
Deploy to Production / Build and Deploy (push) Has been cancelled
- Fix React bug #33580: remove Suspense boundaries co-located with Link components
- Delete settings/loading.tsx and admin/loading.tsx (root cause of race condition)
- Convert all admin navigation from Next.js Link to anchor tags
- Move admin pages to dedicated (admin) route group
- Add AdminHeader matching main header visual design
- Add AdminSidebar with anchor-based navigation
- Add /api/admin/models route handler (replaces server actions for GET)
- Add /api/debug/client-error for server-side browser error reporting
- Add useNoteRefreshOptional() to fix crash in AdminHeader
- Hide Admin Dashboard menu for non-admin users
- Change app icons from yellow to blue (#3A7CA5) matching brand primary
- Fix admin search bar width to match main header

Made-with: Cursor
2026-04-25 20:46:10 +02:00