# 2026-04-14 — Doc-service tests, AI category suggestions, LM Studio default **Timestamp:** 2026-04-14T00:00:00+00:00 ## Summary Added pytest test suite for doc-service, updated the AI prompt to return suggested categories, wired up a suggestions UI in DocumentsPage (per-suggestion Accept/Create&Assign/Dismiss), changed the default AI provider to LM Studio at host.docker.internal:1234, and created a gitignored test PDF directory. ## Files Added - `features/doc-service/tests/__init__.py` - `features/doc-service/tests/conftest.py` — SQLite in-memory DB, tmp DATA_DIR, mock AI provider, minimal+invoice PDF builders, real_pdfs fixture (auto-skips if no PDFs present) - `features/doc-service/tests/test_categories.py` — full CRUD + per-user isolation - `features/doc-service/tests/test_documents.py` — upload, list, get, status, delete, category assignment, AI processing integration, live PDF tests - `features/doc-service/tests/pdfs/.gitkeep` — tracked empty directory; drop PDFs here for live testing ## Files Modified - `.gitignore` — ignore `features/doc-service/tests/pdfs/*.pdf` - `features/doc-service/pyproject.toml` — added `aiosqlite>=0.20` to dev deps - `features/doc-service/app/services/ai/base.py` — added `suggested_categories` to AI prompt (2–5 category names per document) - `features/doc-service/app/services/config_reader.py` — default provider changed to `lmstudio`; URLs changed to `host.docker.internal:1234/v1` (Docker→host resolution on macOS/Windows) - `backend/app/core/app_config.py` — default `LMStudioConfig.base_url` = `http://host.docker.internal:1234/v1`; default provider = `lmstudio` - `frontend/src/pages/DocumentsPage.tsx` — added `SuggestionChip` component and `suggested_categories` section in DocumentRow: checks if suggestion already exists as a user category, shows "Assign" (existing) or "Create & Assign" (new), dismiss removes from local state