Commit Graph
246 Commits
Author SHA1 Message Date
Dariusz L 9cd8966d13 refactor(context): require directory service dependencies 2026-08-02 02:55:06 +02:00
Dariusz L 39a0606afa refactor(context): require scanner service dependencies 2026-08-02 02:52:37 +02:00
Dariusz L 8744da536b refactor(settings): extract settings routes into SettingsService 2026-08-02 02:48:51 +02:00
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
Dariusz L db7977fb55 refactor(routes): split large route modules into focused submodules
Break monolithic model_info, search, and workflow route files into
smaller modules by responsibility: civitai_search, custom_url,
model_details, search_support, source_search, workflow_analysis,
hashes, and loaded_models. Update registry imports to preserve the
existing route registrations and API surface. Add partition coverage
tests to ensure no route endpoints are dropped or duplicated.
2026-08-01 23:19:56 +02:00
Dariusz L 6ff887f004 refactor: introduce RouteContext for route dependency registration 2026-08-01 23:09:51 +02:00
Dariusz L c7a0f2f78c fix: prefer selected-file hash over inherited workflow or source hash 2026-08-01 22:50:13 +02:00
Dariusz L d906a14804 refactor: split route registry into dedicated route modules 2026-08-01 22:32:20 +02:00
Dariusz L b12cc65a10 refactor: extract API routes into core/routes package
Move the inline route definitions out of __init__.py into a new core/routes
package (registry, base_models, helpers, settings, version). Add the
JobProgressTracker utility in core/progress.py and extract version discovery
logic into core/version.py. Update tests to cover the refactored structure.
2026-08-01 21:57:51 +02:00
Dariusz L 201936b79a feat(downloader): add SHA-256 verification for Python downloads
Implement streaming SHA-256 verification for Python download backend,
writing to a .part file first and publishing to the final path only after
the hash matches the source metadata. Mismatched downloads are preserved
at .badsha instead of being silently deleted. Close the download response
in a finally block to avoid leaking handles on cancellation or errors.
2026-08-01 20:28:18 +02:00
Dariusz L a8ba99800c Expand HuggingFace author fallback to multiple known publishers
Support both Comfy-Org and Kijai author indexes as known HuggingFace fallbacks, aggregate their status in the backend, refresh the cached author index, and update the frontend UI and tests.
2026-07-29 16:18:25 +02:00
Dariusz L f8a6e8b626 feat: add HuggingFace model details, variant table, and download context 2026-07-28 17:20:36 +02:00
Dariusz L 1e7cad595c refactor: extract custom-node model adapters from inline handlers 2026-07-28 14:43:37 +02:00
Dariusz L 36fa574562 Preserve workflow UI state and avoid redundant matching during refresh
- Skip fuzzy matching for already-resolved model references in the backend
- Keep existing nodes in their previous result positions during incremental workflow analysis
- Simplify frontend workflow sync and add a content-preserving refresh path
- Preserve scroll position and suppress progress overlay during background Missing/Loaded Models refresh
- Add backend and frontend tests for the new incremental refresh behavior
2026-07-27 18:02:10 +02:00
Dariusz L d29803aeff feat: incremental workflow analysis via node fingerprint cache and preserved loaded models refresh on widget changes 2026-07-27 17:24:17 +02:00
Dariusz L 15e0b932e8 Add shared workflow model inventory cache and improve progress/hash behavior 2026-07-27 17:05:17 +02:00
Dariusz L a5910e1354 Link parent model resources to Civitai images and preserve additional resources 2026-07-27 16:09:08 +02:00
Dariusz L 23af562721 Separate model description from version description in metadata, responses, and UI 2026-07-27 15:31:59 +02:00
Dariusz L 31ad1cde7c refactor: introduce Model Resolver-owned metadata sidecars and build modes 2026-07-27 15:00:18 +02:00
Dariusz L 63ed2b8ca7 feat: support video previews in model downloads, tooltips, and info dialogs 2026-07-26 23:39:09 +02:00
Dariusz L e1c4359dc3 Serve adjacent model previews in tooltips via /model_resolver/model-preview 2026-07-26 21:13:11 +02:00
Dariusz L c01c31df32 feat: generate model preview images during download 2026-07-26 20:58:31 +02:00
Dariusz L 2d6be246b4 Extract and display copyable CivitAI ComfyUI workflow metadata in model previews
- Preserve existing image metadata when re-normalizing CivitAI model images
- Add extractComfyWorkflow helper to recover pasteable editor workflows from image metadata, including nested/double-encoded JSON and non-finite number tolerance
- Surface recovered workflows as a copyable button in the model info image preview under Other metadata
- Add focused tests for workflow extraction, metadata preservation, and edge cases
2026-07-26 20:40:41 +02:00
Dariusz L 58e1aeff29 Preserve full CivitAI metadata in LoRA Manager sidecars 2026-07-26 19:56:29 +02:00
Dariusz L 21822224b7 Update AzLogs to 2.0.1 and centralize rotated log filename handling 2026-07-24 22:01:41 +02:00
Dariusz L e568f81f2b feat(civarchive): prioritize known mirrors for remote size probes 2026-07-24 21:42:11 +02:00
Dariusz L 486ff262f1 fix: normalize Windows backslash paths consistently in frontend path joins 2026-07-24 21:35:38 +02:00
Dariusz L 6ff9db2af6 normalize subfolder paths to forward slashes across backend and frontend 2026-07-24 21:22:31 +02:00
Dariusz L 90a3e7583e fix(file-manager): treat explorer exit code 1 as success on Windows 2026-07-24 21:07:05 +02:00
Dariusz L d614c454ef feat(file-manager): make open-containing-folder cross-platform
Replace the Windows-only Explorer behavior with a host-file-manager
implementation that supports Windows, macOS, and Linux. The endpoint
now validates input, handles frontend backslash paths on POSIX, returns
structured errors, and reports the launcher/platform. Update README
wording and add tests for the new module.
2026-07-24 21:03:45 +02:00
Dariusz L 390ed097a6 feat(civitai): handle devalue-serialized tRPC payloads in CivitAI search 2026-07-24 19:16:59 +02:00
Dariusz L 467b1987e1 Improve LoRA model strength detection across workflow analysis and UI 2026-07-24 17:57:27 +02:00
Dariusz L 1ee4c6ce4c workflow_analyzer: handle implicit control_after_generate widgets in dynamic layouts
Treat control_after_generate widgets that are implicitly inserted after seed
widgets as non-model widgets when analyzing dynamic node layouts. This
prevents the resolver from attempting to resolve control values such as
'fixed', 'randomize', 'increment', and 'decrement' as model paths.
2026-07-24 15:22:55 +02:00
Dariusz L ac9bf820c8 Handle control_after_generate widget indexes in workflow analyzer 2026-07-24 15:10:00 +02:00
Dariusz L 03c545e297 Improve workflow analyzer widget category hints and test coverage 2026-07-24 14:43:18 +02:00
Dariusz L 45ea998068 Resolve GGUF models by normalized download category alias 2026-07-24 14:11:25 +02:00
Dariusz L da7d9b3fc9 Skip non-model reference categories in workflow analyzer
Treat widget values under the configs and custom_nodes dynamic
categories as non-model references so the workflow analyzer does
not falsely mark them as missing models. Added a regression test
to verify a checkpoint widget is still detected when a config
widget is present.
2026-07-24 14:04:07 +02:00