- Expand NotificationRepository (unread list paginated, count, markRead
ownership-scoped); new ActivityLogRepository (create, findByProject
paginated) with deterministic created_at+id ordering
- NotificationService (notifyOnEvent, resolveTargets for 8 event types,
injectable SseBroadcaster for M8) + ActivityLogService (logActivity,
listByProject)
- NotificationEvent/SseEvent/SseBroadcaster types in lib/types
- APIs: GET /api/notifications, POST /api/notifications/:id/read,
GET /api/projects/:projectId/activity
- Screens: notifications list + MarkReadButton, NotificationBadge in
Header, project activity page + ProjectNav link
- Unit tests for both repositories and services (28 new)
- Add SqliteDatabase.exec() using better-sqlite3 exec() so the migrator
can run multi-statement SQL files (prepare() rejected 001_initial.sql)
- Migrator now uses exec() for migration file content
- Fix tests/helpers/db.ts: replace CJS require() with ESM import
- Add unit tests for SqliteDatabase (query/get/execute/transaction/exec,
WAL & foreign_keys pragmas) and Migrator (ordering, idempotency,
rollback, real 001_initial.sql applies)
- Restore .gitignore steering exclusion; remove stale steering files