Commit Graph

148 Commits

Author SHA1 Message Date
copilot-swe-agent[bot] 4b4c208035 Security fixes: use tojson filter, fix Tuple import, remove raw value exposure
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-07 22:38:58 +00:00
copilot-swe-agent[bot] 54e93dcdf2 Fix settings API route prefix to avoid double /api/ in URL
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-07 22:36:32 +00:00
copilot-swe-agent[bot] 58b960db14 Add comprehensive tests for settings management and fix Union import
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-07 22:33:49 +00:00
copilot-swe-agent[bot] e1bb9de915 Add settings management infrastructure: models, API, views, and database loading
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-07 22:31:06 +00:00
Christian Krakau-Louis db96c0d9e7 Merge pull request #123 from christianlouis/copilot/add-files-detail-view-features
Add branching visualization and per-subtask retry to file detail view
2026-02-07 23:20:32 +01:00
copilot-swe-agent[bot] 910fe86603 Add branching visualization, per-subtask retry, and step summary to file detail view
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-07 22:08:09 +00:00
copilot-swe-agent[bot] 90d69979dc Fix S3 upload error: Pass file_id as keyword argument in Celery tasks
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-07 21:56:38 +00:00
copilot-swe-agent[bot] 76ab698105 Add backend endpoints and enhanced file detail view
- Added /api/files/{file_id}/reprocess endpoint for single file reprocessing
- Added /api/files/{file_id}/preview endpoint for viewing original/processed files
- Enhanced file detail view with process flow computation
- Updated frontend template with retry button, process flow visualization, and PDF previews
- Added JavaScript for async retry functionality

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-07 20:52:08 +00:00
Christian Krakau-Louis feefae51f1 Merge pull request #113 from christianlouis/copilot/run-security-audit-with-bandit
Security audit: Fix 21 vulnerabilities and integrate Bandit into CI
2026-02-07 21:42:07 +01:00
copilot-swe-agent[bot] 7fc2703d90 Increase HTTP request timeout to 120s for large file processing (up to 1GB PDFs)
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-07 19:39:57 +00:00
copilot-swe-agent[bot] 5f175fabee Add automated build metadata generation system
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-07 19:37:40 +00:00
copilot-swe-agent[bot] edd1acb3a1 Fix all high and medium severity security issues found by Bandit
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-07 19:35:40 +00:00
copilot-swe-agent[bot] 74724973d8 Fix API routes to return JSON instead of HTML on errors
- Modified exception handlers in app/main.py to check if request path starts with /api/
- HTTPException handler returns JSON for API routes, HTML for frontend routes
- General exception handler (500) also checks and returns appropriate format
- Enhanced frontend deleteFile() to handle non-JSON responses gracefully
- Added content-type checking before parsing JSON
- Added comprehensive tests for API error handling

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-07 19:18:42 +00:00
copilot-swe-agent[bot] dabd9a944c Final review fixes: consistent parameter order and improved test documentation
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-07 17:59:42 +00:00
copilot-swe-agent[bot] e20c88dbc7 Address code review feedback: improve variable naming and parameter order
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-07 17:58:08 +00:00
copilot-swe-agent[bot] 22a14431b3 Standardize upload task signatures to accept file_id parameter
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-07 17:55:30 +00:00
copilot-swe-agent[bot] 7d24b7c668 Apply code formatting and fix linting issues
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-07 17:37:50 +00:00
copilot-swe-agent[bot] 2db58afedf Add original_filename parameter to preserve user's filename
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-07 17:36:36 +00:00
copilot-swe-agent[bot] 3f1006b035 Code review feedback: improve readability of S3 upload call
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-07 17:28:04 +00:00
copilot-swe-agent[bot] c0e049ae96 Fix OneDrive and S3 upload signature - add file_id parameter
- Updated upload_to_onedrive to accept file_id parameter with bind=True
- Updated upload_to_s3 to accept file_id parameter with bind=True
- Added proper logging with task_id and file_id tracking
- Added comprehensive unit tests for both functions
- All tests passing (8/8)

Fixes #99 and #100

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-07 17:25:23 +00:00
Christian Krakau-Louis c9af116ae9 Merge pull request #90 from christianlouis/copilot/fix-worker-file-processing
Fix DetachedInstanceError in process_document task
2026-02-07 18:09:45 +01:00
copilot-swe-agent[bot] 850afd26bd Fix DetachedInstanceError in process_document task by storing file_id before session closes
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-07 15:59:39 +00:00
copilot-swe-agent[bot] 08775459aa Fix /files view issues and add bulk operations
- Fixed status filter in /files view endpoint
- Added bulk delete and reprocess API endpoints
- Added bulk selection UI with checkboxes
- Added bulk actions bar with reprocess and delete buttons
- Updated JavaScript to handle bulk operations

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-07 15:52:38 +00:00
copilot-swe-agent[bot] f3ce81a6cf Fix 'min' undefined error in /files view by adding min/max to Jinja2 globals
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-07 15:35:54 +00:00
copilot-swe-agent[bot] 775ffa5082 Address code review feedback
- Fixed status filtering to occur before pagination for correct counts
- Resolved N+1 query problem by batch-fetching processing statuses
- Extracted status computation logic to shared utility function
- Changed sort indicator from ⬍ to ↕ for better browser compatibility
- Updated both API and view layers to use shared status utilities

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-07 15:20:59 +00:00
copilot-swe-agent[bot] 530c63ad14 Add server-side pagination, filtering, sorting, and file detail view
- Updated /api/files endpoint with pagination, filtering, and sorting support
- Added /api/files/{file_id} endpoint for detailed file information
- Updated /files view to support server-side operations
- Added /files/{file_id}/detail route for file detail page
- Created new files.html with filters, status column, and pagination
- Created file_detail.html for viewing processing history
- Status computed from ProcessingLog entries (pending, processing, completed, failed)

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-07 15:12:49 +00:00
copilot-swe-agent[bot] a12ccdabac Apply Black and isort formatting to modified files
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-07 15:00:18 +00:00
copilot-swe-agent[bot] 8eea420bc5 Add throttling to /processall endpoint to prevent overwhelming downstream APIs
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-07 14:59:19 +00:00
Christian Krakau-Louis e45eb04366 Merge branch 'main' into copilot/add-file-processing-notifications 2026-02-07 15:37:17 +01:00
Christian Krakau-Louis e8c091897a Merge pull request #76 from christianlouis/copilot/add-processing-logging
Add comprehensive logging for each processing step with frontend visibility
2026-02-07 15:06:57 +01:00
copilot-swe-agent[bot] 2189802ee8 Add database logging to upload tasks
- Add logging to upload_to_dropbox, upload_to_paperless, upload_to_nextcloud
- Pass file_id through send_to_all to upload tasks
- Log upload progress, success, and failures with context

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-07 14:02:29 +00:00
copilot-swe-agent[bot] adb0b2329e Address code review feedback
- Replace LIKE queries with exact matches in fallback lookups
- Add comments clarifying fallback queries should not be needed
- Fix duplicate comment in embed_metadata_into_pdf
- Add missing file_id parameter to log_task_progress call

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-06 22:35:30 +00:00
copilot-swe-agent[bot] 74680c8849 Fix file_id propagation through task chain
- Pass file_id as parameter through all task chains
- Update process_document, extract_metadata_with_gpt, embed_metadata_into_pdf, finalize_document_storage, send_to_all_destinations, rotate_pdf_pages, and process_with_azure_document_intelligence
- Remove unreliable LIKE queries, use explicit file_id passing instead

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-06 22:34:01 +00:00
copilot-swe-agent[bot] 9c4cf3d70e Fix notification message to accurately reflect async upload timing
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-06 22:33:16 +00:00
copilot-swe-agent[bot] 8be5b844c3 Add file processing notifications feature
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-06 22:31:48 +00:00
copilot-swe-agent[bot] 1903dc5bcd Add comprehensive processing logging system
- Added database logging to all major processing tasks
- Created API endpoints for retrieving processing logs
- Updated frontend to display processing logs per file
- Logging includes: process_document, convert_to_pdf, extract_metadata_with_gpt, embed_metadata_into_pdf, finalize_document_storage, send_to_all_destinations

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-06 22:30:18 +00:00
copilot-swe-agent[bot] 566079e5e5 Add clarifying comments explaining the use of constants
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-06 22:24:58 +00:00
copilot-swe-agent[bot] 91f851238a Replace hardcoded 'tmp' strings with constants in embed_metadata_into_pdf.py
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-06 22:23:14 +00:00
copilot-swe-agent[bot] f0f48b39a9 Add security fixes, testing infrastructure, and CI/CD improvements
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-06 21:55:19 +00:00
copilot-swe-agent[bot] b17bba225f Address code review feedback on temporary file handling
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-01 14:05:51 +00:00
copilot-swe-agent[bot] 859a0825d0 Fix hardcoded temporary directory security issue (Issue #47)
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-01 14:05:08 +00:00
Christian Krakau-Louis b9f909ccd2 feat: Enhance upload session creation by properly encoding folder paths and filenames 2025-04-12 21:33:25 +02:00
Christian Krakau-Louis 36582030c2 feat: Explicitly include the files router in the main application 2025-04-11 15:42:55 +00:00
Christian Krakau-Louis bcc7a32772 fix: Update template directory path for error handlers 2025-04-11 14:18:48 +00:00
Christian Krakau-Louis d79652b494 feat: Add authentication configuration and validation
- Introduced new authentication settings in config.py including `auth_enabled`, `admin_username`, `admin_password`, and `session_secret`.
- Added validation for `session_secret` to ensure it meets security requirements when authentication is enabled.
- Updated main.py to conditionally mount static files and log warnings if the directory is not found.
- Removed unused email template files and added new authentication and notification setup documentation.
- Implemented authentication configuration validation in validators.py and updated settings display.
- Enhanced the user interface with a new login template and SVG assets for branding.
- Added comprehensive guides for setting up authentication and notifications in the documentation.
2025-04-11 03:44:08 +02:00
Christian Krakau-Louis 05ede35059 feat: Add license and attribution routes, update templates and documentation
- Added a new license route to serve the LGPL license text.
- Introduced a new attribution page to acknowledge third-party software used in the project.
- Updated the base HTML template to include a link to the attribution page.
- Included the license router in the main application router.
- Added the license text file for LGPL to the static licenses directory.
- Updated the NOTICE file to include detailed attributions for third-party libraries.
- Added a new requirements-dev.txt for license compliance checking.
- Updated the requirements.txt to clarify the LGPL license for Paramiko.
2025-04-11 02:39:26 +02:00
Christian Krakau-Louis ce91dc8c79 feat: Implement notification system with Apprise integration and credential checks 2025-04-11 01:55:10 +02:00
Christian Krakau-Louis 9a44a7f1f7 Merge branch 'main' into 51-feature-request-switch-google-drive-integration-to-oauth-for-user-based-authentication 2025-04-11 00:18:10 +02:00
Christian Krakau-Louis 4c50c0aae6 Add Google Drive authorization processing and error handling templates
- Implemented `google_drive_callback.html` for processing Google Drive authorization, including UI for success and error states.
- Added JavaScript functionality for exchanging authorization codes, saving settings, and handling folder selection.
- Created `google_drive_callback_error.html` to display error messages during the authorization process.
2025-04-11 00:13:57 +02:00
Christian Krakau-Louis b258dd2f29 feat: Add OpenAI and Azure AI API endpoints with connection testing functionality 2025-04-09 08:59:30 +02:00