Commit Graph
115 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 ffc63529ed test(downloads): add download route tests for headers, metadata, and error handling 2026-08-02 01:56:23 +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 a6634a5f61 test(search): add SearchOrchestrator component tests 2026-08-02 01:24:41 +02:00
Dariusz L 1f82523bef test(search): add search service component tests, coverage config, and dev dependencies 2026-08-02 01:15:45 +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 632ce2a4ce Add route registry tests 2026-08-02 00:42:10 +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 9b5567f8e1 Add route tests and ClassVar typing to refactoring targets 2026-08-01 23:36:43 +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 422899e91b feat(resolver): keep model description separate from version notes 2026-08-01 21:12:53 +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 25b09799fb Simplify Missing Models browser splitter resize behavior 2026-07-31 21:24:11 +02:00
Dariusz L df4d4a36ac Improve Missing Models browser resize behavior 2026-07-31 20:54:33 +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 cb032c7c3d feat: track missing models for LoRA loader workflow signatures 2026-07-29 15:53:26 +02:00
Dariusz L 8822bb0064 Preserve Missing Models browser geometry during refresh 2026-07-28 19:05:43 +02:00
Dariusz L 10a0327328 feat: preserve Missing Models browser geometry during cached refresh 2026-07-28 19:03:08 +02:00
Dariusz L 48cc5c9050 Fix progress polling hover state regression in downloads tab 2026-07-28 18:59:45 +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 9aa7077a33 feat: preserve Missing Models browser during refresh instead of replacing it 2026-07-28 15:18:12 +02:00
Dariusz L df01b17148 Reuse visible missing model browser when navigating from resolved model
When the resolver dialog is already visible on the Missing Models tab,
showResolvedNodeModelInResolver now reuses the existing browser instead
of forcing a reload or requeuing the selection. This avoids unnecessary
UI refreshes and keeps the current view stable.

Changes:
- web/resolver/model_resolver.js: skip reopen/queue when the dialog is
  already visible on the missing tab; prefer existing browser selection
- web/resolver/views/missing_browser_methods.js: support
  preferExistingBrowser in selectWorkflowModelReference and center the
  selected row instead of scrolling to nearest
- tests/test_downloads_tab_workflow_route.mjs: cover reuse behavior and
  row-patching/centering
2026-07-28 14:50:53 +02:00
Dariusz L 1e7cad595c refactor: extract custom-node model adapters from inline handlers 2026-07-28 14:43:37 +02:00
Dariusz L 67a0fc27e7 feat: add callback-driven LoRA widget handling for Loaded Models refresh
- Configure callback-driven model widgets for LoRA Manager, LoraLoaderV2,
  Lora Stacker, and Power Lora Loader nodes in graph and loaded graph hooks
- Track callback-driven widget states to trigger context analysis and
  dialog refresh when LoRA lists or strengths change via widget callbacks
- Add signature helpers for callback-driven model list and strength changes,
  including Power Lora Loader dynamic lora_N widgets
- Extend Loaded Models tab with model DOM keys, identity normalization,
  copy-value updates with active/inactive grouping, and targeted strength
  updates from node widgets without full re-render
- Add tests verifying callback-driven refresh behavior, suppression respect,
  Power Lora Loader strength chip updates, and LoRA Manager list membership
  signature tracking
2026-07-28 14:23:11 +02:00
Dariusz L 3d513f6587 Fix docked dialog drag snap threshold and add queue splitter resize feedback 2026-07-28 13:30:04 +02:00
Dariusz L fee001829b Pin missing browser list when saved detail width exceeds max 2026-07-28 13:17:31 +02:00
Dariusz L c0b7469b4d fix(missing-browser): keep detail pane available and table-preserving across widths
Remove the brittle is-detail-collapsed responsive behavior from the missing
browser. Replace the timeout-based width handler with requestAnimationFrame
split restoration, clamp the list min width to 340px, and drop the
collapsed-state guards so the detail pane, compositor preview, and Type
column remain usable regardless of container width.
2026-07-28 13:08:26 +02:00
Dariusz L 37d31b6782 Improve resolver docked-splitter responsiveness and external resize behavior 2026-07-28 12:12:09 +02:00
Dariusz L 8b2f9e81cb refactor: improve missing browser splitter drag with compositor preview and threshold
- Add drag threshold and layout frame stride to splitter drag utility
- Use onPreview callback to animate splitter offset via translate3d during drag
- Simplify resize class and cleanup logic in missing browser methods
- Replace deferred release UI cleanup with direct activation/cleanup calls
- Update CSS to add resizing overlay and remove transition during resize
- Add test covering compositor preview behavior and CSS constraints
2026-07-28 01:25:07 +02:00
Dariusz L 643e198737 feat: add docked drag-to-undock behavior for Model Resolver
Allow dragging the docked Model Resolver dialog from its drag handle to
undock it into a floating window, with a live undock drop preview.

- Remember the dock container width and reuse it for the undock preview
- Restore the pre-dock floating size instead of falling back to defaults
- Restrict topbar drag while docked to the dedicated drag handle
- Update tests to cover the new docked drag lifecycle and preview markup
2026-07-27 19:45:30 +02:00
Dariusz L c62a88f86a Make floating dialog drag compositor-friendly and avoid forced style reads 2026-07-27 19:33:19 +02:00
Dariusz L f6db340116 Refine download tab route CSS and corresponding expectations 2026-07-27 19:11:42 +02:00
Dariusz L c599a26f55 Implement two-line status card layout for manual model selection in downloads tab
- queue_methods.js: refactor updateSelectedBarForMissing to use a fixed two-line HTML structure with icon, label, code, and action buttons
- resolver-main.css: add .mr-selected-summary/.mr-selected-status-icon/.mr-selected-actions styling and adjust .mr-missing-detail-pane button/link treatments for the new layout
- test_downloads_tab_workflow_route.mjs: assert the new markup, class structure, and CSS selectors for the selected status card
2026-07-27 19:06:51 +02:00
Dariusz L aa2d08d995 Fix Missing Models row virtualization and add regression test 2026-07-27 18:53:39 +02:00
Dariusz L ef3453d604 Refactor workflow apply path to update graph widgets directly and suppress duplicate refresh hooks
Replace graph reconfigure with targeted widget updates so applying resolved models does not re-trigger node context analysis or duplicate dialog refreshes. Add workflow refresh suppression state, defer ComfyUI model catalog refresh until after widget linking, and track missing-workflow signatures separately from general workflow changes.
2026-07-27 18:37:44 +02:00
Dariusz L 92c8227bda Skip Missing Models refresh for strength-only widget changes 2026-07-27 18:22:04 +02:00
Dariusz L 726c3a9e02 Preserve missing model selection across workflow model changes
Add workflow slot key helpers and remap selected and batch-selected keys
when the underlying missing model list changes after a workflow update.
2026-07-27 18:12:34 +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 d8db1a05cb Use shared workflow model inventory in model-hashes route 2026-07-27 17:39:35 +02:00