Commit Graph

1432 Commits

Author SHA1 Message Date
Christian Krakau-Louis 82aee1cd0f Merge pull request #484 from christianlouis/copilot/improve-test-coverage-files
test: improve app/views/files.py coverage from 59.67% to 99.35%
2026-03-06 12:26:08 +01:00
Christian Krakau-Louis 681bc77803 Merge pull request #486 from christianlouis/copilot/improve-test-coverage-similarity
test(similarity): raise coverage for app/utils/similarity.py from 62% to 100%
2026-03-06 12:25:54 +01:00
github-actions[bot] 158b113ac9 docs(changelog): update changelog [skip ci] 2026-03-06 11:22:00 +00:00
Christian Krakau-Louis e7a8582799 Merge pull request #485 from christianlouis/copilot/improve-test-coverage-gpt-file
test: improve coverage for extract_metadata_with_gpt to 100%
2026-03-06 12:21:21 +01:00
github-actions[bot] 2c02d33a28 chore(release): update build metadata files [skip ci] 2026-03-06 11:21:10 +00:00
semantic-release 0f5680b86c 0.78.1
Automatically generated by python-semantic-release
2026-03-06 11:21:07 +00:00
Christian Krakau-Louis a4af6323ab Merge pull request #487 from christianlouis/copilot/fix-mypy-error-templates
Fix mypy TemplateResponse annotation in db_wizard and harden owner fallback in process_document
2026-03-06 12:20:46 +01:00
copilot-swe-agent[bot] aab1c5fda9 test: improve coverage for app/views/files.py from 59.67% to 99.35%
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-06 11:15:11 +00:00
copilot-swe-agent[bot] 575b4e088e fix(views): resolve mypy TemplateResponse typing and owner fallback
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-06 10:47:46 +00:00
copilot-swe-agent[bot] 7acac4225b test(similarity): improve test coverage for app/utils/similarity.py to 100%
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-06 10:40:58 +00:00
copilot-swe-agent[bot] b9015764c5 test: improve coverage for extract_metadata_with_gpt to 100%
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-06 10:38:58 +00:00
copilot-swe-agent[bot] 7991ddb5bd Initial plan 2026-03-06 10:33:43 +00:00
copilot-swe-agent[bot] b958537adf Initial plan 2026-03-06 10:32:34 +00:00
copilot-swe-agent[bot] e056c54bdb Initial plan 2026-03-06 10:32:17 +00:00
copilot-swe-agent[bot] 58d0fccaa0 Initial plan 2026-03-06 10:31:52 +00:00
github-actions[bot] fef66b16a9 chore(release): update build metadata files [skip ci] 2026-03-06 10:29:07 +00:00
semantic-release e7872607fd 0.78.0
Automatically generated by python-semantic-release
2026-03-06 10:29:04 +00:00
Christian Krakau-Louis 26b4d04d76 Merge pull request #482 from christianlouis/copilot/add-database-configuration-wizard
feat(database): integrate wizard into settings page, improve accessibility and test coverage
2026-03-06 11:28:44 +01:00
Christian Krakau-Louis aad62958fb Merge pull request #476 from christianlouis/copilot/add-multi-user-support
Fix MagicMock leaking into SQLAlchemy INSERT in filename preservation tests
2026-03-06 11:28:25 +01:00
copilot-swe-agent[bot] 7dae15fd29 docs(database): update configuration guides with wizard cross-references, clean up review feedback
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-06 10:13:40 +00:00
copilot-swe-agent[bot] 174e4890dd feat(database): integrate wizard into settings page, improve accessibility and test coverage
- Add "DB Wizard" link button to settings page header
- Add help_link to database_url SETTING_METADATA pointing to /database-wizard
- Add help_link rendering in settings template for any setting with a help_link
- Fix SQLite whitespace path handling in build_connection_string
- Add dark mode CSS overrides for wizard template
- Add aria-describedby for all form inputs with help text
- Add prefers-reduced-motion media query for smooth scrolling
- Expand test coverage: 106 tests (up from 49)
  - db_wizard.py: 100% coverage
  - db_wizard view: 100% coverage
  - database.py API: 97.37% coverage
  - db_migrate.py: 96.60% coverage

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-06 10:02:04 +00:00
copilot-swe-agent[bot] f4b793e9b8 fix(tests): add missing mock settings attrs in test_original_filename_preservation
The test was patching `settings` with a MagicMock but only setting
`workdir`.  Other attributes (`default_owner_id`, `enable_deduplication`,
`show_deduplication_step`, `enable_text_quality_check`) remained as
MagicMock objects.  When `default_owner_id` (truthy MagicMock) was
assigned to `owner_id` and passed to SQLAlchemy, SQLite rejected the
unsupported type.

Fix: explicitly set all accessed settings attributes to sensible test
defaults in both test functions.

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-06 10:00:33 +00:00
github-actions[bot] 330c3aedb6 style: apply ruff auto-fix
- Auto-formatted code with ruff format
- Applied ruff linting fixes with --fix

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-06 09:40:21 +00:00
copilot-swe-agent[bot] 507c333c15 fix: address code review feedback
- Add inline safety comment for noqa: S608 (table_name from inspect)
- Fix HTTPException detail to be a string (not dict)
- Add aria-label to migration progress bar
- Rename _noop to _NoOpContextManager in tests
- Add explanatory comment for zip(strict=False)

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-05 22:22:49 +00:00
copilot-swe-agent[bot] cb3bf809cc docs(database): add wizard and migration tool documentation
Update DatabaseConfiguration.md with sections for the new Database
Configuration Wizard and Database Migration Tool. Also update API.md
with the new /api/database/ endpoint documentation.

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-05 22:19:39 +00:00
copilot-swe-agent[bot] f6fcaaeccc feat(database): add database configuration wizard and migration tool
Add a guided database configuration wizard and a data migration tool that
allows users to:
- Build database connection strings through a step-by-step UI
- Test database connections before applying
- Preview and execute data migrations from SQLite to PostgreSQL/MySQL
- Copy to clipboard for easy .env file updates

New files:
- app/utils/db_wizard.py — connection string builder, parser, and tester
- app/utils/db_migrate.py — table-by-table data migration utility
- app/api/database.py — REST API endpoints for wizard operations
- app/views/db_wizard.py — view route for the wizard page
- frontend/templates/db_wizard.html — multi-tab wizard UI
- tests/test_db_wizard.py — unit tests for db_wizard utilities
- tests/test_db_migrate.py — unit tests for db_migrate utilities
- tests/test_db_wizard_api.py — integration tests for API and views

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-05 22:10:14 +00:00
copilot-swe-agent[bot] c8bc4afc93 fix: address code review — use modern type hints and Callable annotation
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-05 22:03:30 +00:00
copilot-swe-agent[bot] 62d7ad7e9e feat(settings): add dynamic autocomplete for AWS/Azure regions, OCR langs, and embedding models
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-05 22:00:22 +00:00
copilot-swe-agent[bot] 0f408f67b4 Initial plan 2026-03-05 21:57:53 +00:00
copilot-swe-agent[bot] 3fd2bb3c5f chore: plan general autocomplete widget for settings
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-05 21:48:13 +00:00
copilot-swe-agent[bot] 3601e2ca5c feat(ui): add user autocomplete widget for default_owner_id, user search API, and documentation
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-05 21:40:41 +00:00
copilot-swe-agent[bot] 5722252dcb feat(multi-user): add unclaimed doc visibility, claim/assign-owner endpoints, default_owner_id
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-05 21:22:51 +00:00
copilot-swe-agent[bot] a8d44b189c refactor(multi-user): address code review - module imports, explicit false(), string length
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-05 11:37:54 +00:00
copilot-swe-agent[bot] d7b7f1478f test(multi-user): add comprehensive tests for multi-user isolation and feature flag
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-05 11:34:41 +00:00
copilot-swe-agent[bot] 71f437e43a feat(multi-user): add multi-user feature flag, owner_id model field, and user-scoped queries
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-05 11:26:24 +00:00
copilot-swe-agent[bot] af4cd966e9 Initial plan 2026-03-05 11:14:38 +00:00
github-actions[bot] d8b7fe4148 chore(release): update build metadata files [skip ci] 2026-03-02 19:04:12 +00:00
semantic-release 98dbe76634 0.77.2
Automatically generated by python-semantic-release
2026-03-02 19:04:09 +00:00
Christian Krakau-Louis 7586381026 Merge pull request #473 from christianlouis/copilot/fix-upload-widget-count 2026-03-02 20:03:50 +01:00
github-actions[bot] b6cc867c35 chore(release): update build metadata files [skip ci] 2026-03-02 18:53:04 +00:00
semantic-release e19b1af705 0.77.1
Automatically generated by python-semantic-release
2026-03-02 18:53:00 +00:00
Christian Krakau-Louis 4dbdc2e03a Merge pull request #474 from christianlouis/copilot/fix-unregistered-task-error
fix(tasks): register missing Celery tasks in celery_worker.py
2026-03-02 19:52:40 +01:00
copilot-swe-agent[bot] 3be1fa5040 fix(upload): fix upload progress counter showing done count always as 0
Replace the fragile global DOM query approach in `updateOverallStatus`
with per-batch closure-based counters inside `processFiles`.

- Add `total`, `done`, `updateStatus()`, and `markDone()` as closure
  variables/functions within each `processFiles` invocation
- Change `_uploadSingleFile` to accept an `onTerminal` callback instead
  of `statusMessage`, called when a file reaches a terminal state
- Pass `markDone` as the `onTerminal` callback from `scheduleNext`
- Remove the now-unused global `updateOverallStatus` function

The previous implementation queried `document.querySelectorAll('.file-status')`
globally and relied on text `startsWith` checks to count completed files.
This was fragile and could produce a stale done=0 count in practice.
The new approach uses deterministic closure counters, so the displayed
"Uploading files (X/N)" count correctly increments as files complete.

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-02 18:44:05 +00:00
copilot-swe-agent[bot] 14adbeeabb fix(tasks): register missing Celery tasks in celery_worker.py
Add imports for convert_to_pdfa, finalize_document_storage,
process_with_ocr, upload_with_rclone, and webhook_tasks which
were missing from celery_worker.py, causing "unregistered task"
errors at runtime.

Add dynamic test that discovers all task modules in app/tasks/
and verifies each is imported in celery_worker.py.

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-02 18:23:44 +00:00
github-actions[bot] 1d4ccb1f2f chore(release): update build metadata files [skip ci] 2026-03-02 18:21:19 +00:00
semantic-release ca07d6a876 0.77.0
Automatically generated by python-semantic-release
2026-03-02 18:21:16 +00:00
Christian Krakau-Louis c1366fa970 Merge pull request #472 from christianlouis/copilot/improve-settings-page-ux
feat(ui): redesign settings page with search, sidebar nav, and collapsible sections
2026-03-02 19:20:52 +01:00
copilot-swe-agent[bot] d6db9ad5ee Initial plan 2026-03-02 18:15:20 +00:00
copilot-swe-agent[bot] 1f0331117a Initial plan 2026-03-02 18:14:14 +00:00
copilot-swe-agent[bot] b8bd049dff fix(ui): address code review feedback for settings page
- Replace &nbsp; with CSS spacing classes for accessibility
- Use |tojson filter for search index to prevent XSS
- Add IntersectionObserver cleanup via Alpine $cleanup
- Add sr-only setting key text for mobile screen readers
- Respect prefers-reduced-motion for smooth scrolling

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-02 18:13:41 +00:00