Add handlers for enable_standard_headers, forward_auth_enabled, and waf_disabled fields in the proxy host Update function. These fields were defined in the model but were not being processed during updates, causing: - 500 errors when saving proxy host configurations - Auth pass-through failures for apps like Seerr/Overseerr due to missing X-Forwarded-* headers Changes: - backend: Add field handlers for 3 missing fields in proxy_host_handler.go - backend: Add 5 comprehensive unit tests for field handling - frontend: Update TypeScript ProxyHost interface with missing fields - docs: Document fixes in CHANGELOG.md Tests: All 1147 tests pass (backend 85.6%, frontend 87.7% coverage) Security: No vulnerabilities (Trivy + govulncheck clean) Fixes #16 (auth pass-through) Fixes #17 (500 error on save)
6.2 KiB
QA Report: i18n Implementation
Date: December 19, 2025 Agent: QA_Security Status: ⚠️ PARTIAL PASS
Executive Summary
The i18n (internationalization) implementation has been evaluated for quality assurance. The core implementation is functional with all 5 translation files validated as proper JSON. However, there are test failures that need attention before the feature is considered production-ready.
1. Translation Files Validation ✅ PASS
All 5 locale files are valid JSON with complete translation coverage:
| Locale | File Path | Status |
|---|---|---|
| English (en) | frontend/src/locales/en/translation.json |
✅ Valid JSON |
| Spanish (es) | frontend/src/locales/es/translation.json |
✅ Valid JSON |
| French (fr) | frontend/src/locales/fr/translation.json |
✅ Valid JSON |
| German (de) | frontend/src/locales/de/translation.json |
✅ Valid JSON |
| Chinese (zh) | frontend/src/locales/zh/translation.json |
✅ Valid JSON |
Key Translation Namespaces:
common- Shared UI elementsnavigation- Sidebar and menu itemsdashboard- Dashboard componentsproxyHosts- Proxy host managementcertificates- SSL certificate managementsecurity- Security features (Cerberus, CrowdSec, WAF)accessLists- ACL managementrateLimiting- Rate limiting configurationwafConfig- WAF configurationcrowdsecConfig- CrowdSec configurationsystemSettings- System settingsaccount- Account managementauth- Authenticationusers- User managementbackups- Backup managementlogs- Log viewingsmtp- SMTP configurationsecurityHeaders- Security headers
2. TypeScript Type Check ✅ PASS
✅ Zero TypeScript errors
Command: cd frontend && npm run type-check
Result: PASS
3. Pre-commit Hooks ✅ PASS
All pre-commit hooks pass after auto-fixes:
| Hook | Status |
|---|---|
| fix end of files | ✅ Passed |
| trim trailing whitespace | ✅ Passed |
| check yaml | ✅ Passed |
| check for added large files | ✅ Passed |
| dockerfile validation | ✅ Passed |
| Go Vet | ✅ Passed |
| Check .version matches latest Git tag | ✅ Passed |
| Prevent large files not tracked by LFS | ✅ Passed |
| Prevent committing CodeQL DB artifacts | ✅ Passed |
| Prevent committing data/backups files | ✅ Passed |
| Frontend TypeScript Check | ✅ Passed |
| Frontend Lint (Fix) | ✅ Passed |
Note: Auto-fixes were applied to:
docs/plans/current_spec.md(trailing whitespace, end of file)frontend/src/pages/SecurityHeaders.tsx(trailing whitespace)
4. ESLint ✅ PASS (with warnings)
✅ Zero ESLint errors
⚠️ 40 warnings (acceptable)
Command: cd frontend && npm run lint
Result: PASS
Warning Categories (40 total):
@typescript-eslint/no-explicit-any- 35 warnings (in test files)react-hooks/exhaustive-deps- 2 warningsreact-refresh/only-export-components- 2 warnings@typescript-eslint/no-unused-vars- 1 warning
These warnings are in test files and non-critical code paths.
5. Backend Coverage ⚠️ NEAR TARGET
Total Coverage: 84.6%
Target: 85%
Status: ⚠️ Slightly below target (0.4% gap)
Package Breakdown:
| Package | Coverage |
|---|---|
| middleware | 99.0% |
| cerberus | 100.0% |
| metrics | 100.0% |
| util | 100.0% |
| version | 100.0% |
| caddy | 98.9% |
| models | 98.1% |
| config | 91.7% |
| database | 91.3% |
| server | 90.9% |
| logger | 85.7% |
| services | 84.9% |
| crowdsec | 83.3% |
| handlers | 82.3% |
| routes | 82.8% |
6. Frontend Tests ❌ FAIL
Tests: 272 failed | 857 passed | 2 skipped (1131 total)
Test Files: 34 failed | 72 passed (106 total)
Status: ❌ FAIL
Root Cause Analysis
The test failures are primarily due to i18n string matching issues. The tests were written to match hardcoded English strings, but now that i18n is implemented, the tests need to be updated to either:
- Mock the i18n library to return English translations
- Update tests to use translation keys
- Configure the test environment with the English locale
Affected Test Files
WafConfig.spec.tsx- 19 failures- Multiple other test files with similar i18n-related failures
Example Failure
// Test expects:
expect(screen.getByText('Choose a preset...')).toBeInTheDocument()
// But receives translation key: 'wafConfig.choosePreset'
7. Security Scan (Trivy)
Status: Not executed due to time constraints (test failures require attention first)
Recommendations
Critical (Must Fix Before Merge)
-
Update Test Setup for i18n
- Add i18n mock to
frontend/src/test/setup.ts - Configure test environment to use English translations
- Example fix:
import i18n from '../i18n' vi.mock('react-i18next', () => ({ useTranslation: () => ({ t: (key: string) => key, i18n: { language: 'en' } }) })) - Add i18n mock to
-
Fix WafConfig Tests
- Update string assertions to match i18n implementation
- Either use translation keys or mocked translations
Recommended (Post-Merge)
-
Improve Backend Coverage to 85%+
- Current: 84.6%
- Add tests for edge cases in
handlersandcrowdsecpackages
-
Address ESLint Warnings
- Replace
anytypes with proper TypeScript types in test files - Fix
react-hooks/exhaustive-depswarnings
- Replace
-
Run Trivy Security Scan
- Execute after test fixes to ensure no security regressions
Conclusion
The i18n implementation is structurally complete with all translation files properly formatted and containing comprehensive translations for all 5 supported languages. The core functionality is working, but frontend test suite updates are required to accommodate the new i18n integration before this can be considered production-ready.
Overall Status: ⚠️ BLOCKED - Pending test fixes
Checklist
- Translation files validation (5/5 valid JSON)
- TypeScript type checking (0 errors)
- Pre-commit hooks (all passing)
- ESLint (0 errors, 40 warnings acceptable)
- Backend coverage (84.6% - near 85% target)
- Frontend tests (272 failures - requires i18n test setup)
- Security scan (not executed)