Commit Graph
155 Commits
Author SHA1 Message Date
Dariusz L e3cc23cc48 Add missing sources summary refresh to LinkerManagerDialog 2026-05-27 16:23:43 +02:00
Dariusz L 246fc376f3 Migrate tooltips from title attributes to data-tooltip with custom JS implementation 2026-05-27 16:03:44 +02:00
Dariusz L 19f9d83e4a Refactor missing source dot styling with CSS variables and improved visual effects 2026-05-27 15:50:24 +02:00
Dariusz L a63c75ac63 Improve missing source status styling and logic for exact/partial/found matches 2026-05-27 02:27:45 +02:00
Dariusz L efa1e4ad2d Remove unnecessary CSS rule for missing detail pane column headers 2026-05-27 01:46:48 +02:00
Dariusz L 1602c96e28 style: adjust missing detail pane styling in model linker modal 2026-05-27 01:36:38 +02:00
Dariusz L 1484e12ef1 UI: Flatten missing detail pane sections in model linker modal
Remove backgrounds, borders, and border-radius from columns and download sections.
Adjust spacing and add borders between columns for a cleaner layout.
2026-05-27 01:20:49 +02:00
Dariusz L 638c1e7bbe Add styles for missing detail panel polish 2026-05-27 01:14:57 +02:00
Dariusz L c3fbe897d0 UI/UX improvements: refine model linker dialog styling with updated fonts, spacing, colors, and interactive elements 2026-05-27 00:42:14 +02:00
Dariusz L 2336fb6ef0 UI: Add local alternatives toggle and improve link button styling
- Add CSS for .ml-local-alternatives-toggle component with hover/focus states
- Update missing browser button styles to use compact link button
- Adjust disabled footer button opacity for better visibility
- Replace alternatives div with toggle button in linker.js
- Enhance MLToggleHidden to support aria-expanded and dynamic label/state updates
2026-05-27 00:24:37 +02:00
Dariusz L 74bc1e03f7 UI improvements: refine missing browser styling, dialog appearance, and minor text fix 2026-05-27 00:10:39 +02:00
Dariusz L 4c410de6b3 Dynamic column width calculation for missing models list in Linker Manager dialog 2026-05-26 23:57:21 +02:00
Dariusz L 18b72316be feat: add missing models browser UI and logic
- Implement CSS styles for missing models browser interface (.ml-missing-browser and related classes)
- Add JavaScript methods for handling missing models:
  * getMissingModelKey, getMissingFilename, getBestLocalMatch
  * getMissingModelSummaryStats, getMissingSourceStatus
  * renderMissingSourcesSummary, hasRenderableSearchState
- Replace missing models rendering logic with new implementation
- Support for exact/partial match statistics and source status indicators
2026-05-26 23:53:32 +02:00
Dariusz L f3a4730a4e Adjust dialog sizing to full viewport and add box-sizing 2026-05-26 22:51:57 +02:00
Dariusz L 2604be5126 Add compact search progress display and improve search status rendering 2026-05-26 18:27:47 +02:00
Dariusz L 20d4d3187b ui: improve search result action buttons styling and behavior
- Remove transform transitions and animations from action buttons
- Restyle buttons with consistent sizing, colors, and hover states
- Convert anchor tags to buttons with proper type attributes
- Add click handlers for opening links in new tabs with security attributes
- Clear subfolder list when repopulating options
2026-05-26 18:15:11 +02:00
Dariusz L d974dce5d1 ui: replace select elements with custom dropdowns for better styling
- Replace HTML <select> elements with custom div-based dropdown components
- Add CSS variable --ml-download-control-height for consistent control sizing
- Update search source and category selectors to use custom styled dropdowns
- Improve responsive layout with grid template columns and media queries
- Add keyboard and mouse event handling for custom dropdowns
- Ensure consistent styling across all form controls
2026-05-26 17:55:33 +02:00
Dariusz L 5637c6faa1 feat(linker): add online re-check and search controls for exact local matches 2026-05-26 17:30:24 +02:00
Dariusz L 997186720c feat: enhance search results table with dynamic column widths and source icons 2026-05-26 17:18:40 +02:00
Dariusz L 497818d1ee Render and normalize model version names in Linker UI
Add helper methods to normalize and split model and version names, render versioned model names in search results, cards, loading states and CivitAI links, include version metadata on rows, and add CSS styling for model version text. Improves display clarity when models include version names and avoids duplicated filenames.
2026-05-26 17:02:36 +02:00
Dariusz L ec4d6fe8f9 Refactor download/search UI and URN handling
- Replace renderDownloadSourceSection with renderKnownDownloadPanel and wireDownloadSearchPanel to centralize download/search UI wiring
- Improve URN filename resolution and search flags
- Remove obsolete .ml-download-actions CSS rules
- Minor __init__.py fix: check filename before enabling lora_manager_archive search
2026-05-26 16:52:38 +02:00
Dariusz L 5bcfd12ff5 Include known download source in search results, dedupe rows, and add download wiring
Add getDownloadSourceTableRow to render known/download-source rows
Include known download source in search results and prevent duplicates
Add wireSearchDownloadButtons to attach download handlers
Allow custom search button text and render download target controls
Minor UI/formatting fixes and URN refresh alignment
2026-05-26 16:27:06 +02:00
Dariusz L ffd7d548f2 web(linker): add estimated search progress timers and UI
Add estimated progress timers and helpers to show smoother search progress across sources. Track per-run timers, compute eased percentages, update progress state on completion/error, and adjust CSS for running state and transitions.
2026-05-26 16:19:44 +02:00
Dariusz L bab7cd266f Refactor search results to table layout with helper methods and new styles; add download and externalLink SVG icons. 2026-05-26 16:13:55 +02:00
Dariusz L bebf5b6e59 web: refine Model Linker UI — improve context menu, tooltips, info dialog, and styles
Improve UX for model relinking: add context menu actions (Show Info, Open on CivitAI, Open containing folder), sanitize CivitAI descriptions, persist info dialog size, and adjust CSS spacing and visibility.
2026-05-26 15:52:05 +02:00
Dariusz L 538d5ed50a Refactor source search into async per-source tasks
Extract local, HuggingFace, CivitAI and lora-manager searches into functions returning (results, found); build search_tasks and run them concurrently with asyncio.to_thread + asyncio.gather; consolidate result merging. Improves concurrency and clarity.
2026-05-26 15:27:15 +02:00
Dariusz L b4798333d6 web/log_system: bump version to 1.5.5 and improve logger output\n\n- Bump package version to 1.5.5\n- Include configurable milliseconds in timestamps and compact callsite labels\n- Improve console output formatting and grouping of expanded details\n- Parse and print structured JSON payloads in string args\n- Normalize and enrich callsite information for clearer source labels\n- Misc refactors and bugfixes to formatting and suffix logic\n\nReason: improve developer console readability and make logs easier to inspect and parse. 2026-05-26 14:58:11 +02:00
Dariusz L 7d8c8895f1 docs(linker): clarify 32 UI tooltips, labels, and button titles for better usability
Improve text on buttons, info-panel rows, settings tooltips, and menu
labels to more accurately describe what each element does rather than
stating the obvious. No functional changes.
2026-05-20 03:21:04 +02:00
Dariusz L ca5de099b0 Add include_brackets option to ColoredFormatter
Adds a new include_brackets parameter to ColoredFormatter that controls
whether square brackets wrap timestamps, root labels, and log level names
in formatted log output. When True, brackets are applied; when False
(the default for AzLogsLogger), brackets are omitted for cleaner output.
This allows callers like AzLogsLogger to opt-in to bracket formatting
independently via the constructor.
2026-05-20 02:10:20 +02:00
Dariusz L 272033acfe refactor(log_system): bump web logging system to v1.5.3
- Update version field in config.js, log_funcs.js, and logger.js from 1.5.1 to 1.5.3
- Rename LoggerUtils to lowercase_kebab-case log_funcs in log_funcs.js description
- Simplify Logger description to lowercase logger in logger.js
- Remove 'Colorful logs in the console' detail from logger.js description
2026-05-20 01:51:27 +02:00
Dariusz L cb106e5d73 feat(log_system): add call site tracking to web Logger
Capture and display the file path, line, and column where each log
call originated. Uses a lightweight stack-trace parser (Error().stack)
that skips internal log_system frames, preferring the first external
caller.

Changes:
- getCallsite(), parseStackLine(), formatCallsite(), formatSuffix() added
- log() and logModule() include callsite in logData and display it as
  a parenthetical suffix on both console and exported output
- serializeLogEntry/logToStorage/logToInspector preserve callsite through
  serialization round-trips
- exportLogs text output uses formatSuffix for consistent display
2026-05-20 01:46:55 +02:00
Dariusz L 780ef9d0ef refactor(log_system): bump to v1.5.2 — bracket-wrapped console output, shared file handlers, and milliseconds toggle
Console output (ColoredFormatter):
- Level name is now wrapped in [LEVEL] and left-padded via _format_level.
- Timestamp and root-label segments are individually bracket-wrapped, keeping
  plain-output layout consistent with coloured output.
- Separator between fields is colourised (colour code derived from level theme)
  so the table structure remains readable.
- New include_milliseconds init flag controls whether a fractional-second suffix
  is appended to the timestamp; _format_time respects it.
- _display_logger_name unchanged; _split_logger_name still decomposes dotted names
  into root / detail parts.

File logging (AzLogsLogger):
- file_handlers dict introduced to cache one RotatingFileHandler per top-level
  root module, preventing duplicate handlers when multiple sub-modules log to
  the same file (_get_file_handler / _get_log_file / _root_module_name).
- File handler formatter upgraded from a bare logging.Formatter to ColoredFormatter
  (colours off, milliseconds on, datefmt hard-coded to
  '%Y-%m-%d %H:%M:%S') so file output carries the same column structure as
  the console formatter.
- reset_loggers method properly removes and closes all handlers (StreamHandler
  and RotatingFileHandler) from every configured logger before clearing
  self.loggers and self.file_handlers, allowing _get_logger to be called again
  with fresh settings.
- set_file_logging now delegates to reset_loggers instead of simply clearing
  the loggers dict.
2026-05-20 01:34:51 +02:00
Dariusz L de9819e2b9 fix(log_system): bump web version to 1.5.1; fix inspector spacing and parseLoggerDetail edge case
- Bump web/log_system version from 1.5.0 to 1.5.1 to match core/
- Fix console inspector format: add space before suffix %c and trailing empty
  color intent so suffix text is not merged with the preceding styled message
- Add edge case guard in splitModuleName for single-part module strings that
  differ from LOGGER_NAME, restoring previous behavior of returning the
  logger name as root and the full value as detail
2026-05-20 00:24:53 +02:00
Dariusz L 0c7c76b263 refactor(log_system): bump version to 1.5.1; add ruff noqa T201 to log_funcs and logger
- Increment log_system version from 1.5.0 to 1.5.1 in all module docstrings
- Add # ruff: noqa: T201 to log_funcs.py and logger.py to suppress
  ruff T201 (favored print() usage) warning in logging utility modules
2026-05-19 07:59:16 +02:00
Dariusz L 72d084ab64 refactor: rename utils to lowercase_kebab-case and fix import paths; add Missing Models popup integration to linker
- Rename web/utils/{css-loader→css_loader,ErrorHandler→error_handler,IconUtils→icon_utils,ResourceManager→resource_manager} and web/log_system/{LoggerUtils→log_funcs} to lowercase_kebab-case naming convention
- Update all cross-import paths in the recreated utils and linker.js accordingly
- Add removeResolvedFromPopup / markEntryAsResolved to visually mark resolved entries in the ComfyUI Missing Models popup
- Add updateNodesDirectly to update graph node widgets in-place without triggering a full workflow reload
- Add checkAndOpenForMissingModels with isAutoOpenEnabled/setAutoOpenEnabled to auto-open the linker dialog when a workflow with missing models is loaded
- Add helper methods getMissingSearchKey, getSearchState, mergeSearchResults for per-entry search state caching and merging
2026-05-19 07:55:28 +02:00
Dariusz L e6389366d4 feat(log_system): bump version to 1.5.0 and restructure LoggerUtils JSDoc
- Bump package version from 1.4.1 to 1.5.0 across LoggerUtils.js, config.js, and logger.js
- Move changelog-style feature notes inline under the author/version JSDoc header
  in LoggerUtils.js, replacing the trailing block comment with a structured list
2026-05-19 07:44:31 +02:00
Dariusz L b532d83ae7 feat(log_system): restructure console log output with color-coded table format and module name splitting
- Rename LOG_MODULE_NAME from 'model-linker' to 'MLinker' for shorter prefixes
- Add USE_COLORS config option to control styled console output
- Refine log level color palette: purple/debug, green/info, amber/warn, red/error
- Update timestamp format to HH:mm:ss.SSS for millisecond precision
- Refactor console log rendering to a color-coded table layout with background
  highlights on timestamps and logger name columns
- Add splitModuleName helper to separate root module from dotted sub-namespace
- Add stringifyArgs helper for safe serialization of non-string log arguments
  (strings, errors, objects via JSON.stringify, fallback to String)
- Update serializeLogEntry and console output to use the new leveled layout
  (levelName padded to fixed width)
2026-05-19 07:40:47 +02:00
Dariusz L bcd947e37d feat(log_system): add USE_COLORS config option for ANSI console color support
- Bump version to 1.5.0 in config.py, log_funcs.py, and logger.py
- Add USE_COLORS = True to core/log_system/config.py
- Import USE_COLORS in log_funcs.py and pass it to the logger context as
  use_colors, honouring AZLOGS_USE_COLORS env var when set
2026-05-19 07:35:52 +02:00
Dariusz L 5b4d82f26f feat(logger): add colored log level badges, timestamps, and logger name highlighting
- Introduce LEVEL_THEME mapping per-level RGB colors for DEBUG/INFO/WARN/ERROR
- Add TIME_BG background color for timestamp blocks
- Refactor _color_level into _color_level_badge: bold + background color badge
- Add _color_timestamp, _color_root_label, _color_separator, _color_message helpers
- Format output as: <level-badge> <timestamp> <root-label> <message> <source>
- Split logger name into root/detail via _split_logger_name; show only detail in source field
- Non-colored fallback path uses same structured layout without ANSI codes
2026-05-19 07:28:47 +02:00
Dariusz L 367a6d208a refactor(logging): reformat log output, adjust stacklevel and field widths
- Change logging stacklevel from 3 to 4 in all log helper functions
  (create_module_logger, log_debug, log_info, log_warn, log_error) to
  correctly attribute the caller location in stack output.

- Reduce level_field_width from 9 to 5 (e.g. ERROR→5 chars) and set
  source_field_width to 0 so source column auto-sizes to its content.

- Add MESSAGE color (cyan) for log message highlighting in colored output.

- Extract four helper methods from ColoredFormatter.format:
  _display_logger_name  — strips the 'azlogs.' namespace prefix
  _display_level_name   — normalises WARNING → WARN for compact display
  _format_time          — builds HH:MM:SS.mmm timestamps
  _color_level          — applies bold+color to the level token

- Simplify format() to assemble [HH:MM:SS.mmm] LVL (logger:line): message
  with the new helpers applied inline.
2026-05-19 06:44:00 +02:00
Dariusz L 0584dc819f refactor(linker): separate normalized download URL from original workflow URL in link extraction 2026-05-17 06:05:53 +02:00
Dariusz L 9721fdbd0a refactor(web): extract renderSearchControls method and expose search UI alongside download source
Move the inline search-control HTML block into a dedicated renderSearchControls()
method on LinkerManagerDialog so the search bar can be reused from multiple code paths.

Previously, the search controls were only rendered when no download source was known.
Now they are also shown when a download URL exists, giving users the ability to run a
search alongside the resolved download source.

Also normalises line endings on one affected line.
2026-05-17 05:31:06 +02:00
Dariusz L ffb97fb957 docs: clarify HuggingFace token requirements in settings tooltip
Update the HuggingFace Token tooltip to provide precise guidance on
creating a fine-grained token with only Read access to public gated
repos, explicitly noting that Write, Inference, Webhooks, Billing,
Jobs, and org permissions are not needed.
2026-05-17 05:08:29 +02:00
Dariusz L 94abcdc05f feat: add latent_upscale_models category support and improve workflow model resolution
- core/downloader.py: add latent_upscale_model(s) download directory mappings
- core/workflow_analyzer.py:
  - add node type hints for VAELoaderKJ, LatentUpscaleModelLoader, DualCLIPLoader
  - introduce MODEL_WIDGET_NAME_TO_CATEGORY and get_widget_category_hint() to
    infer model categories from widget/input metadata (best-effort fallback)
  - extend NESTED_MODEL_KEYS with clip_name / clip_name1 / clip_name2
  - apply widget category hint inside get_node_model_info() for both plain
    filenames and URN-style references, matching resolution and error paths
- web/linker.js:
  - add getCategoryDisplayName() and getCategoryTokenName() helpers (including
    latent_upscale_model entries) replacing duplicated inline maps
  - use helpers for download target category chips, model-group tokens, and
    summary/compact clipboard strings
2026-05-17 04:21:59 +02:00
Dariusz L 34e3d73f3f refactor(logging): add configurable field widths for log level and source
- Set default level/source field widths to 0 (no extra spacing) in DEFAULT_CONFIG
- Add level_field_width and source_field_width parameters to ColoredFormatter
- Pad/center level tag and ljust source tag ([name:lineno]) consistently
- Add _field_width() helper to safely convert config values to non-negative ints
- Pass config widths through to ColoredFormatter in AzLogsLogger setup
- Set LOG_MODULE_NAME to 'MLinker' in config.py
2026-05-17 03:47:24 +02:00
Dariusz L eccf6e9d1e refactor: overhaul logging system across backend and web frontend
- Switch __init__.py to use create_module_logger(); remove inline logging.getLogger calls
- Rewrite log_funcs.py: introduce module-name normalization (_normalize_module_name/_normalize_module_path/_resolve_module_name), ModuleLogger class, and global log-level switching (set_global_level replaces per-module set_module_level)
- Enhance logger.py: show [name:lineno] in console prefix, sanitize log file names for safe filesystem paths, wrap RotatingFileHandler setup with OSError handling to fall back to console-only logging, pass stacklevel through log() and propagate kwargs to exception()
- Update web/log_system/logger.js: dispatch to level-specific console methods (debug/info/warn/error) via CONSOLE_METHODS map; replace truncated t/m/l/a localStorage schema with serializeLogEntry/deserializeLogEntry (backward-compatible with short keys); load saved logs on construction via loadLogs()
2026-05-17 03:38:23 +02:00
Dariusz L 967afb609c fix: correct CSS escaping for Flux model tags and remove invalid vertical-align
- Escape dot in .1 class names (Flux.1, Flux.1-d) to valid CSS syntax
- Remove vertical-align: top from block-level input/select elements
2026-05-11 05:34:14 +02:00
Dariusz L e5fa58f262 UI modernization: centralize SVG icons and adopt CSS variables
- Create web/utils/IconUtils.js with centralized SVG icon definitions
- Replace inline SVGs in linker.js with getSvgIcon() calls
- Refactor CSS to use CSS custom properties throughout
- Add renderProgressWithAction() helper for consistent progress UI
- Add renderOnlineSearchResultCard() helper for search results
- Add MLToggleHidden() utility for show/hide toggle
- Replace hardcoded spacing, fonts, colors with CSS variables
- Standardize markup with reusable CSS classes
2026-05-11 05:09:24 +02:00
Dariusz L ac4ba4df42 refactor(css): extract inline styles to dedicated CSS files
Remove ~8000 lines of inline JavaScript styles from linker.js and organize
them into two focused stylesheets:
- linker-shell.css: modal shell, backdrop, window controls, layout structure
- linker-main.css: main content area (cards, buttons, forms, dialogs, tabs)

Simplify and clean up css-variables.css variable definitions.
Update css-loader.js to load both new stylesheet files.

Significantly improves code maintainability and separation of concerns.
2026-05-11 04:52:58 +02:00
Dariusz L 29ffaea809 Update config.js 2026-05-11 02:52:06 +02:00