feat: notification center backend core (PR-1)

- Add notifications table with Alembic migration
- Notification model with user-scoped indexing and partial index on unread
- NotificationService singleton with create/list/count/mark-read/dismiss
- FastAPI router: GET /notifications, GET /unread, PATCH /{id}/read,
  POST /mark-all-read, DELETE /{id}
- Mute categories filtering from UserConfig
- 13 unit tests for NotificationService
- 10 integration tests for API endpoints
- Updated test_models.py with new table registration

Quality gates: pytest 23 new passed, ruff clean
This commit is contained in:
2026-05-29 12:05:31 +02:00
parent 4a0d38384f
commit cbaebcf649
18 changed files with 4161 additions and 9 deletions
+2
View File
@@ -3,6 +3,7 @@ from src.models.config_profile import ConfigProfile, ConfigProfileInclude
from src.models.git_repository import GitRepository
from src.models.health_check import HealthCheck
from src.models.instance_event import InstanceEvent
from src.models.notification import Notification
from src.models.project import Project
from src.models.ssh_key import SSHKey
from src.models.terminal_session import TerminalSessionModel
@@ -19,6 +20,7 @@ __all__ = [
"GitRepository",
"HealthCheck",
"InstanceEvent",
"Notification",
"Project",
"SSHKey",
"TerminalSessionModel",