Commit Graph

15 Commits

Author SHA1 Message Date
copilot-swe-agent[bot] 89e0c2fb50 feat(pipelines): add custom processing pipeline engine
- Add Pipeline and PipelineStep models with user-specific ownership
- Add pipeline_id FK column to FileRecord
- Migration 017_add_pipelines (batch mode for SQLite FK compat)
- Pipeline CRUD API at /api/pipelines with step management endpoints
- Reorder steps PUT endpoint placed before parameterised {step_id} routes
- POST /api/files/{id}/assign-pipeline for per-file pipeline assignment
- Admin-only POST /api/pipelines/admin/system for system-level pipelines
- Management UI at /pipelines (Jinja2 + Alpine.js + Tailwind)
- Pipelines link added to desktop and mobile navigation
- 41 new tests in tests/test_api_pipelines.py (all passing)

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-07 10:32:00 +00:00
copilot-swe-agent[bot] 56f7f2351f feat(auth): add admin user management dashboard
- Add UserProfile model (app/models.py) with per-user settings: display_name, daily_upload_limit, notes, is_blocked
- Add Alembic migration 013_add_user_profiles for the new table
- Add REST API at /api/admin/users/ with list, get, upsert (PUT), delete endpoints (admin-only)
- Add HTML template admin_users.html with Alpine.js: filterable user list, paginated table, edit/create modal, delete confirmation modal
- Add view handler at /admin/users (admin-only redirect guard)
- Register routers in app/api/__init__.py and app/views/__init__.py
- Add 'Users' link to admin nav dropdown in base.html (desktop + mobile)
- Add 27 tests covering auth, list, get, upsert, delete, and model constraints
- Register UserProfile in conftest.py model imports
- Document new endpoints in docs/API.md

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-06 13:45:35 +00:00
copilot-swe-agent[bot] e60914127c feat(webhooks): add webhook support for external integrations
Add WebhookConfig model, CRUD API endpoints, HMAC-SHA256 signed delivery,
and Celery-based async dispatch with retry/backoff for document events
(document.uploaded, document.processed, document.failed).

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-01 20:42:57 +00:00
copilot-swe-agent[bot] e5a4c6c64a feat(api): add advanced filtering and saved searches
- Add date range (date_from/date_to), storage provider, and tags filters to GET /api/files
- Add SavedSearch model and migration (005_add_saved_searches)
- Add CRUD API endpoints for saved searches at /api/saved-searches
- Update files.html template with new filter controls and saved searches UI
- Update files view to pass new filter parameters to template
- Add comprehensive tests for all new functionality (26 tests)

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-01 11:22:07 +00:00
copilot-swe-agent[bot] 43bc58770d refactor: consolidate linting tools into Ruff
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-13 09:10:52 +00:00
copilot-swe-agent[bot] 94daf9b2fe test: implement mock OAuth2 server infrastructure for auth testing
- Add MockOAuth2ServerContainer using testcontainers
- Create conftest_oauth.py with OAuth test fixtures
- Add comprehensive OAuth integration tests
- Support both mock (default) and real (CI secrets) OAuth modes
- Add documentation for OAuth testing setup

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-12 11:09:37 +00:00
anthropic-code-agent[bot] 104757fd4f fix(tests): fix remaining 8 tests - storage reorganization and file detail enhancements
- Fix test_storage_reorganization.py: Use valid PDF content with EOF marker
- Fix test_file_detail_enhancements.py: Add missing sample_pdf_file fixture
- All 12 tests now passing (2 storage + 7 file detail + 3 other)

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-12 02:08:50 +00:00
copilot-swe-agent[bot] e658dec83c feat(test): add comprehensive external API integration tests with PDF generation
- Add fpdf2 dependency for dynamic test PDF generation
- Create tests/test_external_integrations.py with end-to-end pipeline tests:
  - OpenAI: key validation, metadata extraction via chat completion
  - Azure Document Intelligence: admin connectivity, full OCR on generated PDF
  - S3: bucket access, upload/download/delete pipeline
  - Dropbox: token refresh, upload/download/delete pipeline
  - OneDrive: token refresh, upload/download/delete pipeline
  - Authentik: OIDC discovery endpoint, credential consistency
  - Full pipeline: Azure OCR → OpenAI metadata extraction
- Update tests/conftest.py to capture original env vars before test overrides
- Add has_real_env() helper and original_env fixture for credential detection
- All external tests use @pytest.mark.requires_external and skipif guards
- Test files are dynamically generated with unique content per run
- Uploaded test files are cleaned up in finally blocks

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-11 15:16:53 +00:00
copilot-swe-agent[bot] fb50c8b375 test: add full-stack integration testing with real infrastructure (PostgreSQL, Redis, Gotenberg, WebDAV, SFTP, MinIO)
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-10 15:24:35 +00:00
copilot-swe-agent[bot] f2d70e90cf test: add comprehensive WebDAV tests with real server and Redis integration
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-10 15:18:17 +00:00
copilot-swe-agent[bot] a63983a26c style: fix formatting and linting issues in conftest.py
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-09 15:38:31 +00:00
copilot-swe-agent[bot] 98cf9e0e0b refactor: consolidate get_db into single module
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-09 15:37:23 +00:00
copilot-swe-agent[bot] 388bde2ff0 Fix SQLAlchemy model registration and database session injection in tests
- Import all models (DocumentMetadata, FileRecord, ProcessingLog) in conftest.py to register them with SQLAlchemy Base
- Override all three get_db functions used across the app (app.database, app.api.common, app.views.base) to ensure tests use the test database
- Fixes 21 of 24 failing tests (from "no such table" errors to passing)

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-02-07 17:54:05 +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
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