Commit Graph
50 Commits
Author SHA1 Message Date
Dariusz L e3affba329 Add Model Resolver version status feature 2026-08-01 20:56:02 +02:00
Dariusz L 8822bb0064 Preserve Missing Models browser geometry during refresh 2026-07-28 19:05:43 +02:00
Dariusz L 1e7cad595c refactor: extract custom-node model adapters from inline handlers 2026-07-28 14:43:37 +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 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 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 e7ee26cad8 refactor: preserve downloads panel DOM state during active refresh
Patch the panel element instead of replacing innerHTML, maintaining hover and tooltip state for active download cards.
2026-07-19 15:10:12 +02:00
Dariusz L c39eea4f51 refactor: remove dead code and unused frontend handlers across backend and web 2026-07-18 13:30:34 +02:00
Dariusz L b302566542 refactor: remove dead code and add clear_completed_downloads endpoint 2026-07-18 12:57:29 +02:00
Dariusz L 28d24214aa fix: improve resolver error propagation, sanitization, and consistency 2026-07-16 11:11:48 +02:00
Dariusz L 280ca2e6de Improve HuggingFace Xet downloads with native progress snapshots, transfer metrics, cancellation, and finalizing UI state 2026-07-14 11:02:57 +02:00
Dariusz L 44f539ce49 Refactor frontend apply path for auto-resolve and queue selections 2026-07-04 17:45:17 +02:00
Dariusz L 86bd6c04fc refactor: centralize model-extension handling and search-cache clearing
- Add clear_all_search_caches() in core/sources/__init__.py and replace 4
  individual cache-clearing call sites in __init__.py with the new helper.
- Add shared parse_civitai_model_path() in core/type_utils.py and use it
  from both CivitAI and CivArchive URL parsers to remove duplicated regex logic.
- Rename parse_huggingface_url() to get_huggingface_repo_and_file_from_url()
  in core/resolver.py for clarity.
- Add stripModelExtension() and hasModelExtension() utilities (with a single
  MODEL_EXTENSIONS_REGEX) in web/resolver/utils/render_format_methods.js
  and replace repeated inline regex patterns across search_panel.js,
  model_info_methods.js, tabs_loaded_methods.js, and queue_methods.js.
2026-07-02 03:57:43 +02:00
Dariusz L 11ec45526c refactor: consolidate duplicated path and size utilities
Extract MODEL_EXTENSIONS and format_size_bytes into core/type_utils, removing duplicates from workflow_analyzer and downloader. Add getFilenameFromPath to render_format_methods and replace inline path-splitting logic across JS resolver actions, search, and views.
2026-07-02 02:27:53 +02:00
Dariusz L 2078d870b3 refactor: centralize path normalization and extract common options task handler
- Introduce normalizePathToForward/normalizePathToBackward helpers in render_format_methods.js
- Replace inline path normalization regex across 6 files with shared helpers
- Extract executeOptionsTask helper in options_methods.js to deduplicate repeated async loading/error/success handling and add missing error notifications
2026-07-02 02:12:40 +02:00
Dariusz L d97450f119 refactor: extract splitter drag logic into shared utility
Replace duplicated inline drag handlers in queue_methods.js and
missing_browser_methods.js with a new startSplitterDrag() helper in
web/resolver/utils/splitter_drag.js.

The utility centralizes pointer/mouse event binding, RAF throttling,
and touch-cancellation cleanup, cutting net code across the two
callers while preserving existing behaviour (bounds, edge-open
threshold, collapse preview, and settle/cleanup timing).
2026-07-02 01:57:37 +02:00
Dariusz L d95c099f5a Improve rendering performance and split drag behavior
- Added CSS content-visibility and contain-intrinsic-size to list row
  containers in resolver-main.css and resolver-shell.css for off-main-thread
  rendering optimization.
- Deferred queue list panel split drag updates to requestAnimationFrame in
  web/resolver/actions/queue_methods.js, reducing redundant DOM writes and
  guarding against duplicate frames during split dragging.
- Deferred missing browser split drag updates to requestAnimationFrame in
  web/resolver/views/missing_browser_methods.js with optional chaining on
  split start values, preventing layout thrashing while dragging.
2026-07-01 22:52:17 +02:00
Dariusz L 21b16389e7 refactor: simplify queue panel open/close logic 2026-07-01 20:29:43 +02:00
Dariusz L 0f62d19490 refactor: simplify queue split drag state management
Remove manual cursor and pointer-event state restoration during queue
resize. The drag now relies on the browser default col-resize behavior
and avoids setting body styles or mr-is-resizing-queue. Guard
applyQueueSplitWidth against redundant style writes and drop unused
parameters from beginQueueEdgeDrag, deferQueueSplitReleaseUi, and
startSplitDrag.
2026-07-01 18:05:16 +02:00
Dariusz L 3c4dfc72e4 feat: refactor queue panel and split layout with deferred reveal and pointer events
- Add PointerEvent support for queue toggle, edge drag, and splitter interactions
- Implement deferred queue panel reveal animation (mr-queue-opening class)
- Make queue panel updates demand-driven; skip refresh when panel is hidden
- Replace per-item remove listeners with event delegation on queue list
- Track queue split container width via ResizeObserver with safe fallbacks
- Centralize split flex application and persist queue width/collapsed state with debounce
- Fix missing browser split pane styles to use helper-track CSS variables
- Add deferred UI cleanup for missing browser split drag end
- Add prewarm frame fallback when ResizeObserver is unavailable
2026-07-01 17:58:05 +02:00
Dariusz L f780e6507b feat: preserve search state and resolution aliases across workflow transitions
- Propagate missing_search_key through resolution queue and download
  resolution paths so cache lookups remain consistent after workflow
  re-analysis or active searches.
- Set preserveSearchCacheAcrossNextWorkflowSync before reloading
  workflow data following batch queue/resolve operations.
- Remember applied resolu tions (rememberAppliedResolvedSelections)
  after both queue and direct downloads so alias tracking is not lost.
- getMissingSearchKey now short-circuits on missing_search_key and
  search_key fields instead of always deriving from node identity,
  fixing spurious cache misses.
- Guard settleInactiveSearchProgress so non-active workflow states
  only update the cache when the active workflow hosts a matching
  background search job.
- After workflow analysis, call applyResolvedSelectionAliases
  so analysis data reflects user selections.
- When switching workflows, clone and merge the previous workflow
  search-result cache and migrate background search jobs that are
  still running, so active searches are not interrupted or dropped.
2026-06-28 04:04:45 +02:00
Dariusz L aa91d1410c feat: add aria2 download backend with pause/resume support
Integrates aria2c as an alternative download backend alongside the built-in
Python downloader. Adds settings for selecting the backend and configuring
the aria2c executable path, plus a status check button in the options panel.

Backend changes:
- core/downloader.py: aria2 daemon lifecycle, JSON-RPC client, pause/resume
  state machine, and transfer tracking
- core/settings.py: download_backend normalization and aria2c_path setting
- __init__.py: new API routes for pause, resume, and aria2 status checks

Frontend changes:
- options_methods.js: backend selector, aria2c path input, check button,
  and local storage persistence
- resolve_download_methods.js: pause/resume handlers, pending status
  transitions, and progress rendering for aria2 downloads
- queue_methods.js: queue panel pause/resume buttons, backend badge, and
  debounced panel updates
- search_panel.js: actionsHtml support for composite action buttons
2026-06-27 23:39:31 +02:00
Dariusz L d49ae0becc refactor: centralize API calls through ResolverManagerDialog.fetchJson
Replace scattered api.fetchApi(...) + response.ok + response.json() boilerplate
across all web/modules with a unified this.fetchJson() helper defined on the
base dialog class.

Changes:
- dialog.fetchJson(url, options, context) handles headers, status checks, and
  JSON parsing in one place
- Extracts server-side error messages (errData.error) for better UX
- Optional silent flag suppresses notifications for background/refresh requests
- All callers simplified: async return, shorter bodies, consistent error handling
- BOM removed from workflow_update_methods.js and tabs_loaded_methods.js
2026-06-25 02:01:18 +02:00
Dariusz L 91549dbc9b refactor: delegate download cancellation, reorder workflowId, remove unused copy/filter helpers 2026-06-25 00:39:23 +02:00
Dariusz L fb8a65758b refactor: centralize context-menu attribute and element helpers
Replace scattered inline encodeURIComponent(JSON.stringify(...)) and
manual oncontextmenu/dataset assignments with unified helpers added to
renderFormatMethods:

  - encodeContextMenuModel(context): safe JSON serialization for data-model
  - getContextMenuAttrs(context, tooltip): HTML attribute string for
    template literals (used in 5 files)
  - getContextMenuProps(context, tooltip): props object for imperative
    element assignment (used in missingBrowserMethods)
  - setContextMenuElement(element, context, tooltip): sets or clears
    data-model, data-tooltip, and oncontextmenu on a DOM element

Reduces duplication across 5 modules, adds try/catch around JSON
serialization, and removes 14 lines of repeated oncontextmenu wiring.
2026-06-24 23:19:02 +02:00
Dariusz L c5c3490210 feat: add auto-refresh of ComfyUI model catalog after Apply 2026-06-24 19:22:55 +02:00
Dariusz L 34049c5ea6 Add LTX-2.3 models and resolved selection alias matching 2026-06-22 03:40:37 +02:00
Dariusz L b4cd98e1ca Refactor missing model key generation and DOM ID generation
- Centralize model key logic: replaced inline key construction across 5 files with
  getMissingModelKey() and new getMissingModelDomKey() helpers in lifecycle_graph_methods.

- Extend getMissingModelKey(): now incorporates nested_key, category, and an identity
  field (original_lora_name, original_path, expected_filename, name, filename, urn_string)
  so that distinct models within the same subgraph produce unique keys.

- Fix duplicate DOM ID collisions: getMissingModelDomKey() encodes the full key as a
  URL-safe base64 string for all element IDs (local-matches-body, selected-bar, combo,
  locate, local-matches-refresh, selected-apply, selected-remove), preventing collisions
  between subgraph instances that share a node_id/widget_index.

- Store missing_key on resolution objects in queue_methods to keep the canonical key in
  sync between queue and browser views.
2026-06-22 03:27:22 +02:00
Dariusz L 590b4a4969 feat(missing-browser): add toggle to show resolved models
Report resolved (already-existing) models alongside missing ones in the
missing-browser view. Resolved models are hidden by default; a new
'Show resolved' toggle in the toolbar reveals them with a badge and
reduced-opacity row styling. The toggle state is persisted in
localStorage.

Backend: include resolved_models and total_resolved in the analysis
payload so the frontend can merge them into the display list.

Frontend: normalize resolved workflow models into the missing-models
display shape, compute visibility-aware counts, and refresh the
missing-browser view on queue mutating actions.
2026-06-22 01:34:55 +02:00
Dariusz L e66c660dd3 feat: add dedicated open_path field for download context and folder opening
- Add open_path to download history context context (queue_methods.js)
- Add open_path to active download progress context (resolve_download_methods.js)
- Use open_path as primary path for hasLocalPath check and openContainingFolder (model_info_methods.js)
2026-06-19 23:20:02 +02:00
Dariusz L 5985e63487 feat: add workflowId resolution and improved download workflow state detection 2026-06-19 23:08:04 +02:00
Dariusz L 3460fb510e feat: improve download history context menu and remove button support
- Propagate additional workflow fields (key, signature, tab info) to
  getDownloadHistoryFolderContext and queued missing model lookups
- Add remove button UI and removeDownloadHistoryEntry handler for
  individual download history entries
- Allow switching back to workflow from download history context menu
  alongside existing queue-download switch action
- Fix eligibility checks so folder and workflow context menu items
  render correctly for download history scope
2026-06-19 22:44:38 +02:00
Dariusz L e70055e82f feat(queue): add persistent download history with active/history tabs
Adds a downloads panel inside the resolve queue UI with two tabs:
- Active: live downloads
- History: completed or already-downloaded entries

History is persisted in localStorage (model_resolver_download_history, capped at 200 entries) via new helper methods on queueMethods. Downloads complete by calling rememberCompletedDownloadHistory(), which records filename, category, workflow, node, target path, size, status and timestamp. CSS additions cover the subtab bar, history item layout, and a small status badge.
2026-06-19 22:21:10 +02:00
Dariusz L c3caeb0a24 feat: add ETA and improved progress metadata to download queue 2026-06-19 21:20:40 +02:00
Dariusz L 78697ffc49 feat: add active workflow context to download queue items and download data
Track the active ComfyUI workflow name, route key, tab identity, and
signature on every download-info object, then expose those details in
the download queue render. Add a contextual 'Switch to Workflow'
menu action and helpers for locating and activating the correct
workflow tab from a stored route/label/tab identity.
2026-06-19 20:54:37 +02:00
Dariusz L 4f91accbab feat: improve model scan cache override, combo UX, and filename handling
- Add force_rescan end-to-end so callers can bypass the short-lived local model scan cache: backend entry in __init__.py and core/resolver.py, lifecycle_graph_methods forwards it through the workflow analysis body, and download_target_methods passes ?force=1 from the refresh flow.
- Rewrite combo dropdown lifecycle in missing_browser_methods with show/hide helpers, pointer-capture tracking, and a capture-phase outside-click listener so the list stays open during drag/hover and closes reliably otherwise.
- Animate refresh buttons (CSS keyframes + JS Web Animations) with reduced-motion fallback.
- Encode selected model path into the selected-bar data-model attribute and wire contextmenu so users can open the containing folder from the selection.
- Fix XSS risk in selected-bar label by escaping label HTML; change queue/selected Remove buttons to danger style.
- Increase max missing-browser model column width clamp from 430 to 820 and stop truncating missing-filename display; show full filename with tooltip instead.
- Update huggingface-author-index.json metadata timestamp/counts (1 file changed, 1 line).
2026-06-19 03:57:40 +02:00
Dariusz L 4943be89a9 Add responsive footer star link and update badge/metadata 2026-06-17 02:35:10 +02:00
Dariusz L fa2002fc2a Add per-item Apply button to queued resolution selected bar
Refactor queue_methods.js to split applyPendingResolutions into
applyQueuedByKey (per-item) and applyPendingResolutionList (shared
implementation). Add an Apply button alongside the Remove button in
the selected resolution bar, wired to applyQueuedByKey with loading
state. Update CSS for .mr-selected-actions layout and .mr-btn-primary
styling in the detail pane.
2026-06-17 01:17:25 +02:00
Dariusz L 40b1108bd2 feat: expand multi-ref pending resolutions and fix race conditions in loaded/missing tabs
- Add getResolutionQueueKey, getResolutionNodeRefs, and expandPendingResolutionsForApply helpers in queue_methods.js so each queued resolution can carry multiple node refs and be fully resolved before apply.
- Store node_refs, is_lora_v2, original_lora_name, and nested_key on pending resolutions; expand them during apply, with a guard for empty selections.
- Introduce optimistic analysis updates (applyOptimisticAnalysisData + getOptimisticAnalysisDataAfterApply) so the missing/loaded views refresh immediately after apply, then refresh in the background via refreshAnalysisInBackground.
- Update notification messaging to reflect expanded reference counts.
- Fix race conditions in lifecycle_graph_methods.js and tabs_loaded_methods.js by assigning load tokens only after the async workflow-load path begins, so early returns no longer clobber the token and stale panels are suppressed.
- Minor README badge styling fixes: add labelColor=111827 and update the Python badge to an SVG-based asset.
2026-06-17 01:06:51 +02:00
Dariusz L 7e6e08a4e7 refactor: simplify queue panel layout and unify tab styling with shared tab components 2026-06-12 18:42:26 +02:00
Dariusz L 406b6b2624 feat: add Downloads tab to queue panel and scope active downloads to current workflow 2026-06-12 18:21:24 +02:00
Dariusz L d335a1a1e2 refactor: cache queue DOM element references for updateQueueUI
Store references to queue title, toggle, and clear buttons as instance
properties in the constructor, replacing repeated DOM queries inside
updateQueueUI with direct reference lookups.
2026-06-06 17:16:51 +02:00
Dariusz L 57b8bc7cda feat: add force search (ignore cache) toggle to batch search menu
Adds a checkbox in the resolver footer search menu that bypasses all
search result caches for the duration of a batch search run.

Frontend (queue_methods.js, resolve_download_methods.js,
resolver_dialog.js, search_panel.js, resolver-main.css):
- Introduce checkbox-type footer menu items (type: 'checkbox').
- Add 'Force search (ignore cache)' checkbox to the search menu,
  wired to a new forceBatchSearch flag on ResolverManagerDialog.
- Pass forceSearch through searchMissingBatch and searchOnline to
  the backend API call.
- When the manual search button is clicked and results already exist
  for that model, forceSearch defaults to true.
- mergeSearchResults respects forceRefresh: if a forced search
  returns no results for a source, that source is cleared from the
  cached results.

Backend (__init__.py, core/sources/huggingface.py):
- force_search is read from the incoming API request and, when true,
  clears all active source search caches (local, huggingface,
  civitai, civarchive, lora_manager_archive) before searching.
- force_search is forwarded as force_refresh to
  search_huggingface_for_file, which folds it into the cache key so
  the cache is not hit, and propagates it to _get_author_index.
- Search result timestamps are no longer inherited from prior
  cached signatures when force_search is active; a fresh timestamp
  is written unconditionally.

Updated metadata/huggingface-author-index.json reflects the latest
cached author index after rebuild.
2026-06-06 17:02:25 +02:00
Dariusz L e031b288ed feat: add hover/focus preview highlights for footer menu items 2026-06-06 03:29:36 +02:00
Dariusz L 612d6d30cb feat: add disabled states and new archive source options to batch search/download menus
- Add hasSelectedMissingModels helper to gate selected batch actions
- Disable Search Selected, Selected: Local Database, Selected: CivitAI, Selected: HuggingFace, Selected: CivArchive, Selected: LoRA Manager Archive, and Download Selected when nothing is selected
- Add Selected: CivArchive and Selected: LoRA Manager Archive options
- Add Selected: Local Database option replacing previous unguarded behavior
2026-06-06 03:20:52 +02:00
Dariusz L 4eebc1c9ac refactor: consolidate link actions into footer menu
Group Queue Exact, Apply Selected, and Clear Selected into a single
'Link' dropdown menu in the missing browser footer. Move Auto-Link 100%
into the same menu and show/hide it when exact local matches exist.

Add disabledWhen support to createFooterMenu items so buttons can be
visually and functionally disabled. Include disabled state styles for
.mr-footer-menu-item.

Simplify footer visibility logic and update references throughout.
2026-06-06 03:15:49 +02:00
Dariusz L 08128de8e9 feat: improve footer menu button caret and tooltip behavior 2026-06-06 03:07:12 +02:00
Dariusz L 0e02bd9eb6 feat: add batch search cancellation and dynamic footer menu items 2026-06-06 02:59:42 +02:00
Dariusz L df8433457c feat: add per-workflow search state caching and background job deduplication 2026-06-06 02:54:59 +02:00
Dariusz L 5a8e68655f refactor: rename Model Linker to Model Resolver
Replace all link dialog terminology with resolver terminology
throughout the codebase, including module names, CSS classes,
IDs, JS variables, SVG gradient IDs, and log module names.
Remove the old web/linker/ tree and introduce the new web/resolver/
tree with parallel structure. Also replace core/linker.py with
core/resolver.py.
2026-06-05 05:53:39 +02:00