Commit Graph
14 Commits
Author SHA1 Message Date
Dariusz L 3fdec8c24e refactor(loaded): extract loaded model route handlers into service 2026-08-02 02:38:08 +02:00
Dariusz L d8aed83e04 refactor(directories): extract directory route handlers into DirectoryService 2026-08-02 02:25:08 +02:00
Dariusz L c2f44e7831 refactor(metadata): extract metadata route handlers into MetadataService and add tests 2026-08-02 02:14:10 +02:00
Dariusz L 627dd5a84a refactor(scanner): extract scanner route handlers into ScannerService and add tests 2026-08-02 02:05:27 +02:00
Dariusz L 68321b7799 refactor(downloads): extract download route handlers into DownloadService and add tests 2026-08-02 01:50:27 +02:00
Dariusz L e9ffb8f632 refactor(hash): extract hash route handlers into HashService and add tests 2026-08-02 01:38:01 +02:00
Dariusz L b9054f0d22 refactor(search): centralize route context dependency resolution in SearchDependencies 2026-08-02 01:04:10 +02:00
Dariusz L b4b03bb335 refactor(search): extract orchestrator, providers, and cache from SearchService
Replace the 1095-line monolithic SearchService with a thin facade that
delegates to SearchOrchestrator. Split the implementation into three
focused modules:

- search_orchestrator.py: request parsing, provider coordination, and
  response construction
- search_providers.py: per-source execution, progress callbacks, and
  async task creation
- search_cache.py: timestamping and stable cache stamping for results

Add unit tests for the new components in
tests/test_search_service_components.py. Preserve the existing HTTP
route behavior by keeping SearchService.search_sources as the stable
route-facing API.
2026-08-02 00:56:18 +02:00
Dariusz L 380e5d4f9b refactor: replace generic DependencyCallable with explicit Protocols for model services 2026-08-02 00:32:57 +02:00
Dariusz L 1dd1b50635 refactor: introduce typed dependency dataclasses for model services
Replace dynamic MODEL_SERVICE_DEPENDENCIES injection with frozen dataclasses
(CivitAISearchDependencies, CustomUrlDependencies, ModelDetailsDependencies)
to make service dependencies explicit and type-safe. Update model services to
construct via RouteContext, and add tests enforcing minimal dataclass fields.
2026-08-02 00:25:45 +02:00
Dariusz L c247c4a7a4 refactor: split model_service into focused service classes
Break down the monolithic model_service into smaller, single-responsibility
services: CivitAISearchService, CustomUrlService, and ModelDetailsService.
Introduce ModelServiceDependencies base class to centralize RouteContext
dependency injection. Update model_service to act as a thin facade that
delegates to the specialized services. Add unit tests validating the new
service boundaries and basic request validation behavior.
2026-08-02 00:17:45 +02:00
Dariusz L 5fd9bc5802 refactor: extract model route handlers into ModelService 2026-08-02 00:10:25 +02:00
Dariusz L be0794e36d refactor: extract workflow route handlers into WorkflowService 2026-08-01 23:56:17 +02:00
Dariusz L 91fa8f391d refactor(search): extract search orchestration into SearchService 2026-08-01 23:50:56 +02:00