Commit Graph
26 Commits
Author SHA1 Message Date
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 b5d10fa5cc refactor: extract floating tree picker positioning into shared tree_picker.js
Create createFloatingTreePicker() utility to replace duplicated inline
floating positioning logic in download_target_methods.js and
missing_browser_methods.js. The factory handles portalization, duplicate
removal, viewport-aware positioning (open above/below), scroll container
height calculation, and scroll/resize listener lifecycle management,
reducing ~175 lines of duplicated code.
2026-06-24 23:04:50 +02:00
Dariusz L d3c7ace464 feat: add folder browser context menu and local model deduplication
- Add right-click 'Open Folder' context menu to folder browser rows and
  root group headers, with left-click guards to prevent context actions on
  non-primary clicks
- Deduplicate local model entries before filtering using path-based identity
  and category ranking to prefer the active download category
2026-06-24 22:57:56 +02:00
Dariusz L 26cca55fee feat: add right-click context menu to local model folder browser
- Introduce --mr-z-context-menu-popup z-index variable and shift existing
  z-indices up by one so context menu popups layer correctly above
  other UI elements.
- Update resolver-main.css and resolver-shell.css context-menu rules to
  use the new popup z-index with a fallback.
- Add joinLocalModelPath, buildLocalFolderContext, buildLocalModelContext,
  and getLocalPathContextAttrs helpers to missing_browser_methods.js.
- Wire folder and model entries in the local browser to include encoded
  JSON context attributes so right-click opens the model/folder context
  menu with the correct open-folder and model actions.
2026-06-24 22:44:51 +02:00
Dariusz L f4f07ccb0a completion: add local model browser with category-aware filtering and download target synchronization 2026-06-24 22:30:31 +02:00
Dariusz L 5445dd4ac0 feat: implement local hash matching via metadata sidecar files
Backend adds SHA256 normalization, metadata sidecar lookup, and hash fields across source modules. Frontend handles local_hash_matches in search responses and missing browser.
2026-06-24 21:59:10 +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 a499af3345 Enable local model matching for resolved models and prevent symlink/junction scan loops 2026-06-22 02:21:24 +02:00
Dariusz L 74a696a4bc Add manual refresh button for local model matches in missing browser
When a model is missing, users can now click a refresh button in the
'Local Matches' header to rescan local folders and refresh matches
for that specific model. The button requests POST /model_resolver/local-matches
with force_rescan=true, shows loading state, and updates the UI on
completion or error. CSS was added for the new button element.
2026-06-22 02:00:40 +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 d88b3b6c6c feat: guard missing-browser split drag and register CSS track property 2026-06-21 21:12:28 +02:00
Dariusz L 9cfa50e406 perf(missing-browser): optimize resize and rendering performance
- Disable CSS transitions during splitter drag to prevent jank
- Apply content-visibility: auto to off-screen missing list and match rows
- Suppress redundant style.setProperty calls when split width is unchanged
- Reset applied split width state on cleanup
2026-06-21 20:04:52 +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 5f1e814751 feat: support subgraph-aware node location and widget model context
- workflow_analyzer: refactor widget category hint resolution and add widget name candidate extraction across widgets, inputs, proxyWidgets, and localized names; expose new helpers get_widget_name_candidates/get_widget_name_hint
- workflow_analyzer: add get_model_widget_category_hint and get_effective_model_category_hint to unify category fallback logic
- workflow_analyzer: include widget_name on model refs emitted by get_node_model_info
- workflow_analyzer: introduce promoted-widget context resolution (_build_promoted_widget_contexts, _find_promoted_widget_targets, etc.) and wire it into analyze_workflow_models so instance widgets and promoted widget locators are tracked with subgraph scope
- lifecycle_graph_methods: refactor locateNodeInGraph into subgraph-aware resolver using findLocateTarget/getGraphNodeById/findSubgraphById/findNodeInGraphTree; support targeting nodes inside specific subgraphs with proper canvas focus and notifications
- missing_browser_methods: use unified getMissingLocateTarget for locate button/display fields; pass subgraphId and isTopLevel to locateNodeInGraph; add promoted-widget-aware tooltips and canLocate handling
2026-06-19 01:39:15 +02:00
Dariusz L 47d286620f feat: add configurable download path system with templates and mappings
Implements a new download path configuration UI and backend logic:
- Add Subfolder fill mode: Suggested (existing), Template, Manual
- Add Base Model Path Mappings to override detected base-model folders
- Add Default Root settings to control root directory per category
- Add Detect From Existing Folders button that infers templates and mappings from local model folders
- Add backend /model_resolver/root-directories and /model_resolver/path-template-suggestions routes
- Refactor resolver settings into core/settings.py for shared frontend/backend use
- Extract path template inference logic into core/path_templates.py
- Update download panel, context menu, and loading flow to use new path settings
2026-06-19 00:09:58 +02:00
Dariusz L 9399f52033 Preserve local matches and download target selections across workflow changes 2026-06-18 02:46:33 +02:00
Dariusz L 38874f5d99 feat: centralize download progress UI state and re-render on view reconnect 2026-06-12 18:01:07 +02:00
Dariusz L bbfd50a075 feat: expose download folder context through status indicators and notifications
Propagate the resolved download directory and file path from the backend
download flow into frontend progress UI: add \path\ and \directory\ fields
to download progress state, render right-clickable context menu entries on
progress bars and status messages, and allow opening the download folder
directly from completion or error notifications. Also update the HuggingFace
author index.
2026-06-12 16:32:48 +02:00
Dariusz L e61c868038 fix: prevent stale tab renders by scoping workflow and loaded models data loading to their respective tokens 2026-06-07 18:37:00 +02:00
Dariusz L 57ac022fc4 feat: add refresh button to re-analyze workflow and refresh local matches 2026-06-06 18:26:47 +02:00
Dariusz L 541881ce49 refactor: replace post-download re-analysis with targeted local match refresh
Replace the heavy autoResolveAfterDownload path (which re-analyzed the
entire workflow) with a more efficient refreshLocalMatchesForDownloadedMissing
call that queries /model_resolver/local-matches directly for the
specific downloaded file.

This removes the unnecessary re-analysis step, adds an explicit
force_rescan flag (coerced to bool on the backend for safe JSON
payload handling), propagates the missing model's category through
the activeDownloads tracking objects, and updates related UI text
to reflect the new narrower behavior.
2026-06-06 18:09:06 +02:00
Dariusz L 57018b4e0f feat: add search result timestamps, enhanced cache clearing, and maintenance UI
Add searched_at timestamps to search results so cached entries are accurately tracked and preserved across merges. Expand the clear-search-cache command to also invalidate popular databases, model list, and the new result timestamp store. Frontend gains new cache-clearing methods and a full resolver cache reset for maintenance. The search panel and missing browser now show source result dates and toggle the search button between 'Search' and 'Search Again' when results already exist.
2026-06-06 16:38:30 +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 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