Commit Graph
68 Commits
Author SHA1 Message Date
Dariusz L 215f4e391e refactor frontend storage access through safeStorage 2026-08-09 00:08:51 +02:00
Dariusz L 1bba061a29 refactor: centralize filename extraction callsites 2026-08-07 01:15:45 +02:00
Dariusz L 6f3273ad3b refactor(web): unify download action handlers 2026-08-06 16:52:13 +02:00
Dariusz L 07f5f5829a fix: prevent download UI collisions for custom nodes and handle missing preview probes 2026-08-06 01:47:33 +02:00
Dariusz L fec8004573 refactor: share instant action binding 2026-08-05 02:06:57 +02:00
Dariusz L d2c4d513db refactor(frontend): reuse shared DOM synchronization 2026-08-04 20:17:41 +02:00
Dariusz L 3b98851edf fix(frontend): stabilize queued downloads refreshes 2026-08-04 19:42:55 +02:00
Dariusz L f1620a7659 frontend: preserve missing models browser state during apply and avoid duplicate workflow refreshes 2026-08-04 19:13:13 +02:00
Dariusz L 8d48e0dc37 Simplify download progress UI rendering and fix queue DOM insertion 2026-08-03 16:54:00 +02:00
Dariusz L 5b8b243aee refactor: unify download queue rendering and add workflowBack icon 2026-08-03 16:24:52 +02:00
Dariusz L 415bcb93f4 feat: improve aria2 download resilience and queue presentation 2026-08-03 15:55:08 +02:00
Dariusz L c28184aca3 Refactor download queue item rendering and actions 2026-08-03 15:01:07 +02:00
Dariusz L 8e7d14be6d Unify download progress presentation 2026-08-03 14:08:00 +02:00
Dariusz L 413e7cc0ab Promote subgraph widget contexts to top-level model references
When a subgraph exposes a promoted widget and the instance value or connected
inner widget contains a usable model path, create a top-level model reference
on the subgraph node instead of only pointing to the inner definition node.
This lets resolution, location, and queue updates target the instance widget
directly.

Also handle serialized subgraph instances that omit proxyWidgets by
reconstructing the same promotion from subgraph input/link metadata, and
extend widget values for promoted inputs in the workflow updater.
2026-08-03 04:17:49 +02:00
Dariusz L f2d11bd477 refactor(frontend): extract queue storage methods 2026-08-02 13:26:21 +02:00
Dariusz L f9a03a65a9 Add footer version check failure retry interval
Use a separate shorter refresh interval when footer version checks fail,
track the failure state, and schedule retries via a dedicated timer.
On success, clear any pending retry timer so recovery is immediate.
2026-08-02 13:10:40 +02:00
Dariusz L abb92b2138 refactor(frontend): clean unused catches and regex escapes 2026-08-02 04:20:44 +02:00
Dariusz L 4e0d11e7cc refactor(frontend): remove unused imports and locals 2026-08-02 04:14:54 +02:00
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