Soluciona el error "invalid reference format" que ocurría cuando se
generaban tags Docker con formato inválido como ":-bcbb6d2".
Cambios en workflow:
- Elimina prefix={{branch}}- del tag type=sha que causaba el formato
inválido cuando branch estaba vacío
- Simplifica a type=sha,format=short para generar tags como sha-bcbb6d2
Cambios en Dockerfile:
- Añade declaraciones ARG con valores por defecto para BUILD_DATE,
VERSION y REVISION (dev, unknown)
- Añade labels OCI estándar para metadatos de imagen
- Garantiza que las variables siempre tengan valores válidos
Esto previene errores como:
ERROR: failed to build: invalid tag "ghcr.io/dawnsystem/intellidocs-ngx:-bcbb6d2"
Soluciona el error en test_opencv_available donde las versiones se
comparaban como strings en vez de valores semánticos, causando que
4.11.0 fuera considerada menor que 4.8.0.
Cambios:
- Importa packaging.version para comparaciones correctas
- Modifica todas las comparaciones de versiones para usar version.parse()
- Añade packaging a las dependencias de testing en pyproject.toml
Esto asegura que versiones como 4.11.0 sean correctamente reconocidas
como superiores a 4.8.0.
Fixes the error: "cd: /home/user/IntelliDocs-ngx: No such file or directory"
Changes:
- Removed hardcoded absolute path `/home/user/IntelliDocs-ngx` from line 48
- After `actions/checkout@v4`, the runner is already in the project directory
- Using the implicit `${{ github.workspace }}` is the standard practice
This fixes the workflow failure in the "Install Python dependencies" step
of the "test-ml-dependencies" job.
Issue: GitHub Actions runners don't have this local development path
Solution: Rely on the default working directory set by actions/checkout
Removed unnecessary blank lines in the docstrings of security.py and reformatted the registration of the deletion-requests route in urls.py for improved readability.
Added AISuggestionFeedback import to serialisers.py and introduced DeletionRequestDetailSerializer for enhanced document detail handling. Removed the obsolete migration 1073_add_ai_permissions.py as it is no longer needed, streamlining the migration history.
Updated the __get_boolean function in settings.py to handle boolean values more consistently. The function now checks if the retrieved value is already a boolean before processing it, enhancing type safety and preventing potential errors in boolean evaluations.
Updated ai-suggestions-panel.component.ts and document-detail.component.ts to convert suggestion values to strings, enhancing type safety and preventing potential runtime errors. This change ensures that all suggestion values are consistently treated as strings across the application.
- Add AI settings keys to ui-settings.ts with proper defaults
- Create AiSettingsComponent with full functionality
- Add AI tab to main settings component
- Implement toggles for AI scanner, ML features, and advanced OCR
- Add sliders for auto-apply and suggest thresholds
- Add ML model selector dropdown
- Add test button for AI sample document
- Add AI performance statistics display
- Integrate AI settings into main settings form and save logic
- Add comprehensive tests for AI settings component
Co-authored-by: dawnsystem <42047891+dawnsystem@users.noreply.github.com>
- Created AIStatus data model with TypeScript interfaces
- Implemented AIStatusService with polling mechanism
- Created AIStatusIndicatorComponent with icon, tooltip, and animations
- Added component to navbar between notifications and user menu
- Includes unit tests for service and component
- Shows AI active/inactive state with visual indicators
- Displays statistics: documents scanned, suggestions applied
- Shows pending deletion requests with badge
- Processing animation when AI is active
- Link to AI configuration settings
- Non-intrusive design following existing patterns
Co-authored-by: dawnsystem <42047891+dawnsystem@users.noreply.github.com>
- Backend API:
- Added DeletionRequestSerializer and DeletionRequestActionSerializer
- Added DeletionRequestViewSet with approve/reject/pending_count actions
- Added /api/deletion_requests/ route
- Frontend:
- Created deletion-request data model
- Created deletion-request.service.ts with full CRUD operations
- Created DeletionRequestsComponent with status filtering (pending/approved/rejected/completed)
- Created DeletionRequestDetailComponent with impact analysis display
- Added /deletion-requests route with permissions guard
- Implemented approve/reject modals with confirmation
- Added status badges and pending request counter
- All code linted and built successfully
Co-authored-by: dawnsystem <42047891+dawnsystem@users.noreply.github.com>
Added comprehensive documentation in administration.md including:
- Command syntax and all available options
- Usage examples for different scenarios
- Explanation of confidence levels
- Performance considerations for large document sets
Co-authored-by: dawnsystem <42047891+dawnsystem@users.noreply.github.com>
- Fixed blank line whitespace issues
- Changed logger.error with exc_info=True to logger.exception
- Prefixed unused unpacked variables with underscore
- Applied ruff formatting to both command and test files
Co-authored-by: dawnsystem <42047891+dawnsystem@users.noreply.github.com>
Resolved merge conflicts in:
- src/documents/ai_deletion_manager.py: Kept webhook integration alongside dev changes
- src/documents/ai_scanner.py: Kept webhook integration and applied_fields tracking
- src/documents/models.py: Integrated AISuggestionFeedback model with webhook imports
All conflicts resolved maintaining both webhook functionality and new AI suggestions features from dev branch.
Co-authored-by: dawnsystem <42047891+dawnsystem@users.noreply.github.com>
- Created serializers for AI suggestions (AISuggestionsSerializer, ApplySuggestionSerializer, etc.)
- Added AISuggestionFeedback model for tracking applied/rejected suggestions
- Implemented 4 new API endpoints:
- GET /api/documents/{id}/ai-suggestions/ - Get AI suggestions for a document
- POST /api/documents/{id}/apply-suggestion/ - Apply a suggestion and record feedback
- POST /api/documents/{id}/reject-suggestion/ - Reject a suggestion and record feedback
- GET /api/documents/ai-suggestion-stats/ - Get accuracy statistics
- Created database migration for AISuggestionFeedback model
- Added comprehensive test suite (28 test cases) covering all endpoints
- Supports tracking for tags, correspondents, document types, storage paths, titles
- Calculates accuracy rates and confidence scores for AI improvement
Co-authored-by: dawnsystem <42047891+dawnsystem@users.noreply.github.com>