Files
Pulse/tests/integration/package.json
rcourtman 54fc259221 fix(ai): improve AI settings UX with validation and smart fallbacks
Backend:
- Add smart provider fallback when selected model's provider isn't configured
- Automatically switch to a model from a configured provider instead of failing
- Log warning when fallback occurs for visibility

Frontend (AISettings.tsx):
- Add helper functions to check if model's provider is configured
- Group model dropdown: configured providers first, unconfigured marked with ⚠️
- Add inline warning when selecting model from unconfigured provider
- Validate on save that model's provider is configured (or being added)
- Warn before clearing last configured provider (would disable AI)
- Warn before clearing provider that current model uses
- Add patrol interval validation (must be 0 or >= 10 minutes)
- Show red border + inline error for invalid patrol intervals 1-9
- Update patrol interval hint: '(0=off, 10+ to enable)'

These changes prevent confusing '500 Internal Server Error' and
'AI is not enabled or configured' errors when model/provider mismatch.
2025-12-17 18:30:19 +00:00

28 lines
985 B
JSON

{
"name": "pulse-integration-tests",
"version": "1.0.0",
"description": "Integration tests for Pulse (Playwright E2E)",
"type": "module",
"scripts": {
"test": "playwright test",
"test:ui": "playwright test --ui",
"test:debug": "playwright test --debug",
"test:headed": "playwright test --headed",
"test:report": "playwright show-report",
"docker:up": "docker-compose -f docker-compose.test.yml up -d",
"docker:down": "docker-compose -f docker-compose.test.yml down -v",
"docker:logs": "docker-compose -f docker-compose.test.yml logs -f",
"docker:rebuild": "docker-compose -f docker-compose.test.yml up -d --build",
"pretest": "node ./scripts/pretest.mjs",
"posttest": "node ./scripts/posttest.mjs"
},
"keywords": ["pulse", "integration", "e2e", "playwright"],
"author": "rcourtman",
"license": "MIT",
"devDependencies": {
"@playwright/test": "^1.48.0",
"@types/node": "^20.10.0",
"typescript": "^5.3.0"
}
}