Commit Graph
91 Commits
Author SHA1 Message Date
Dariusz L 9f9b3da12c Use getMissingModelDomKey for search UI element IDs
Replace inline node_id/widget_index DOM key construction with the
centralized getMissingModelDomKey helper across search panel and
missing browser methods. This keeps search results and button IDs
stable when the same model appears in multiple workflows/widgets.

Also adds a regression test verifying that search progress stays
with its model when switching between shared widgets.
2026-09-10 14:30:33 +02:00
Dariusz L 65fd1ac554 frontend: restore missing-browser split width synchronously on initial paint
In missing_browser_methods.js, apply the saved split before the first paint when
the docked panel is narrower than the last layout, instead of waiting one
animation frame. Also tighten fast-width estimation by trying
getBoundingClientRect().width when clientWidth/offsetWidth are unavailable, and
measure from the observed resize host rather than the browser element itself.
2026-08-12 21:09:47 +02:00
Dariusz L 277268c055 refactor: unify frontend category collection 2026-08-06 23:43:58 +02:00
Dariusz L 335f886a4e Unify local path joining 2026-08-06 21:19:29 +02:00
Dariusz L 2ef86fed3b refactor: unify local match classification 2026-08-06 20:01:20 +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 d964f5fad7 refactor missing model filter bindings 2026-08-05 15:10:39 +02:00
Dariusz L f1cdfcdbd6 refactor missing model row reconciliation 2026-08-05 15:05:51 +02:00
Dariusz L 8606e3e1fd fix(frontend): preserve analysis progress during polling 2026-08-04 20:23:13 +02:00
Dariusz L a093edd004 fix(frontend): dispose missing models virtualizer on full refresh 2026-08-04 19:29:25 +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 fdaa00265a feat(frontend): add virtualized missing browser and custom modal resize
- Replace full missing-models list rendering with virtual scroll container
- Improve splitter responsiveness by lowering layout frame stride to 1
- Add custom modal resize handle with pointer-event driven sizing
- Reduce live layout throttle from 40ms to 16ms
- Update related route assertions for new layout behavior
2026-08-04 15:19:26 +02:00
Dariusz L da76170abc Add toggle to show/hide inactive missing models 2026-08-03 17:17:56 +02:00
Dariusz L bb3ccdd47f feat: improve CivArchive status feedback 2026-08-02 22:06:38 +02:00
Dariusz L ce52d957f9 feat(frontend): explain CivArchive availability errors 2026-08-02 15:28:52 +02:00
Dariusz L c025f9bdba refactor(frontend): extract missing model state 2026-08-02 13:46:38 +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 9cbc3098c6 Preserve missing browser detail width across rerenders 2026-08-01 15:15: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 10a0327328 feat: preserve Missing Models browser geometry during cached refresh 2026-07-28 19:03:08 +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 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 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 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 668cecea2d Make resolver workflow model selection survive analysis timing
Queue workflow model reference selection requests in the dialog, wait for
workflow analysis to complete before attempting selection, and handle
superseded or timed-out requests gracefully.

- Track pending selection requests on the dialog with status fields
- Apply queued selections from lifecycle graph methods after analysis
- Await loadWorkflowData/loadLoadedModels so the caller can proceed
  after tab content is actually ready
- Add timeout handling with user-visible warnings when selection cannot
  complete
- Cover queueing, superseding, waiting, and completion in JS tests
2026-07-24 16:00:10 +02:00
Dariusz L d368a6dffc frontend: add Model Resolver node context menu action and workflow selection support 2026-07-24 15:49:52 +02:00
Dariusz L 854cb2c08c track explicit search sources and gate local database download visibility 2026-07-22 13:25:33 +02:00
Dariusz L a822ef09c3 feat(missing models): add type filter dropdown to missing models browser 2026-07-22 13:09:14 +02:00
Dariusz L c5215c2d3f Stabilize download workflow scope during missing-model render 2026-07-22 12:48:05 +02:00
Dariusz L d293b0aaf8 Treat model_gguf as diffusion_models and render accepted file formats in missing-model UI 2026-07-20 16:54:28 +02:00
Dariusz L 5362cb17a3 refactor: remove dead code and add isAutoOpenEnabled helper 2026-07-18 14:01:05 +02:00
Dariusz L be12494953 refactor: centralize shared utilities across backend and frontend
Backend:
- Move SHA256 normalization logic from path_utils._normalize_header_sha256
  into core/type_utils.normalize_sha256, adding support for 0x-prefixed
  hashes and unifying the normalization path used by
  extract_safetensors_header_sha256.
- Add tests for the 0x prefix normalization cases.

Frontend:
- Introduce copyTextWithFeedback in web/resolver/utils/html_utils.js
  as a shared clipboard helper with configurable feedback text, CSS class,
  and duration, replacing repeated inline clipboard copy logic in
  globals.js, model_info_methods.js, and the notification utility.
- Centralize showNotification on ResolverManagerDialog and remove the
  duplicate implementation from missingBrowserMethods.
- Replace local const localStorage = safeStorage aliases in
  model_info_methods.js, missing_browser_methods.js, and
  options_methods.js with direct safeStorage usage.
2026-07-17 18:06:22 +02:00
Dariusz L 04c3de9533 refactor: reuse shared path and URL normalization utilities
Replace inline regex path/URL normalization in resolver.py and
missing_browser_methods.js with the existing shared helpers:

- core/resolver.py: normalize_workflow_download_url now uses
  prepare_remote_size_probe_url from type_utils instead of a local
  huggingface-specific regex substitution.
- web/resolver/views/missing_browser_methods.js: path identity
  generation now uses normalizePathIdentity from html_utils.js rather
  than ad hoc replace/trim/lowercase logic.

This keeps normalization behavior consistent across the codebase and
removes duplicated regex patterns.
2026-07-16 10:27:06 +02:00
Dariusz L 8823049f9e refactor: centralize filename extraction, remote URL normalization, and storage abstractions 2026-07-16 10:13:38 +02:00
Dariusz L 6ed34b6a92 Preserve active download local matches and clean up cancelled downloads
Keep path-specific Local Matches for active downloads during refreshes,
URN search, and missing-model display so late hash-only lookups do not
overwrite them.

Remove cancelled download matches from missing-model UI and cached
analysis when a download is cancelled.
2026-07-12 22:04:53 +02:00
Dariusz L 245bf79800 fix: deduplicate missing models by category+filename and expand per-node resolutions
Previously, identify_missing_models grouped missing entries only by filename,
which could merge unrelated models from different categories that happen to
share a filename. This change deduplicates by (category, filename) and tracks
all_node_refs with a reference_count so the frontend can preserve one
resolution per node reference instead of collapsing duplicates.

Frontend changes in resolve_download_methods.js iterate over all_node_refs,
and missing_browser_methods.js now shows '+ N refs' in the missing-model
label and clarifies the locate tooltip when multiple workflow references
share the same missing model.
2026-07-04 17:26:35 +02:00
Dariusz L 4c065818e3 feat: add custom URL resolution to missing browser 2026-07-04 00:45:13 +02:00
Dariusz L ce29f88c6d refactor: centralize repeated filename/search/URL/HTTP helpers
Replace duplicated filename-to-query logic with a single
\uild_filename_search_queries\ helper in matcher/civarchive/huggingface,
standardize Civitai URL generation in the frontend via \getCivitaiModelUrl\,
unify browser user-agent and response file-size extraction in the downloader
path, and derive workflow node-type category hints from widget categories
rather than maintaining a large static mapping.
2026-07-02 22:56:21 +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 88cf8580f7 feat: add local model hash calculation with manual-progress notifications 2026-07-02 00:41:40 +02:00
Dariusz L ea97e36532 fix: guard renderModelTreeNodes calls behind expand state to avoid unnecessary rendering 2026-07-01 23:07:32 +02:00