Commit Graph
57 Commits
Author SHA1 Message Date
Vito 6fc6e683eb feat: multi-directory gallery scan with folder filter (#126) (#135)
* refactor(api): add multi-root output dir infrastructure (#126)

- Change _gallery_cache from None to {} (dict keyed by path string)
- Update invalidate_gallery_cache() to clear dict instead of setting None
- Add _get_all_output_dirs() helper as single source of truth for
  resolving configured + fallback output directories
- Update _enrich_prompt_images() to iterate all output roots when
  computing relative paths and thumbnail URLs

* feat(api): support multiple gallery scan paths in settings endpoint (#126)

* feat(ui): dynamic multi-path settings with add/remove buttons (#126)

* cleanup: remove dead galleryRootPath assignment in loadSettings

* feat(api): multi-directory gallery scan with subfolder filter and multi-root serve (#126)

* feat(db): add folder filter to search_prompts and get_prompt_subfolders (#126)

* feat(api): add subfolders endpoint and folder filter to prompt search (#126)

* feat(ui): add folder dropdown filter to search bar (#126)

* fix: escape LIKE wildcards in folder filter and remove dead _gallery_cache_time field

* feat(scan): scan all media types across all output dirs with batched extraction (#126)

* chore: gitignore SQLite WAL-mode temp files

* fix: enrich prompt images with URLs and check all output dirs for serving

- Extract _enrich_images() for flat image lists, used by get_prompt_images
- get_prompt_images now adds url/thumbnail_url (fixes stuck "Loading images...")
- serve_image checks all output dirs not just first (fixes 403 on multi-path)
- Fix diagnostics monitor check to read current module attribute, not stale import

* feat(ui): add version-scoped update notice popup for rescan (#126)

* chore: bump version to 3.2.0
2026-04-03 06:46:01 -07:00
Vito 7f45bc6df7 feat(ui): show prompt and copy button in filmstrip viewer (#124) (#131)
* feat(ui): show prompt metadata sidebar in filmstrip viewer (#124)

The filmstrip viewer opened images without any metadata or prompt
display. Added shown/viewed callbacks to attach the existing metadata
sidebar with prompt text and copy button. Also added hidden callback
to both admin viewers for proper sidebar cleanup on close.

* chore: bump version to 3.1.6

* fix(ui): scope metadata sidebar to active viewer container (#124)

addMetadataSidebar() used querySelector('.viewer-container') which
grabbed the first match in the DOM. If a gallery viewer was opened
previously, its stale hidden container would be selected instead of
the active filmstrip viewer. Now iterates all containers and picks
the visible one.
2026-03-18 07:57:22 -07:00
Vito ad32a51497 fix: database path config option now works (#119) (#130)
* fix: resolve database path from config.json (#119)

PromptDatabase() was hardcoded to "prompts.db" relative to CWD,
ignoring the DEFAULT_DB_PATH setting from config.json. Added
_resolve_db_path() that reads from PromptManagerConfig when available
and resolves relative paths against the extension root directory.
This fixes Docker deployments where the CWD differs from the extension.

* test: add unit tests for database path resolution (#119)

Cover explicit absolute/relative paths, config fallback, relative
config paths resolved to extension root, and PromptDatabase constructor
integration with _resolve_db_path.

* docs: update database path configuration instructions (#119)

Replace outdated advice to edit py/config.py with correct config.json
approach. Add Docker-specific guidance for absolute paths.

* chore: bump version to 3.1.5

* fix: remove unused import and variables from test (#119)

Address code review: remove unused MagicMock import and unused db
local variables in constructor tests.
2026-03-18 07:29:58 -07:00
Vito 0e95dc3431 fix(ui): enable click-to-close on image viewer (#125) (#129)
* fix(ui): enable click-to-close on all image viewers (#125)

The admin gallery viewer had backdrop: 'static' which prevented closing
by clicking the dark overlay. Changed to backdrop: true and added
explicit button: true across all three ViewerJS instances so users can
close the viewer by clicking outside or using the close button.

* chore: bump version to 3.1.4
2026-03-18 07:09:22 -07:00
Vito 8dfa290417 fix: resolve UnboundLocalError and connected text input issues (#123) (#128)
* fix: initialize extended_tags before conditional block (#123)

extended_tags was only assigned inside the `if storage_text` block,
causing UnboundLocalError when text input is empty or whitespace-only.
Initialize to empty list before the conditional in both PromptManager
and PromptManagerText nodes.

* test: add unit tests for empty text input handling (#123)

Cover empty string, whitespace-only, empty with prepend/append, and
normal text for both PromptManagerText and PromptManager nodes.

* fix: use parts-based join to prevent double space on empty text (#123)

When main text is empty with prepend/append connected, the old string
concatenation produced "before  after" (double space). Switch to
building a parts list and joining with single space so empty text is
cleanly skipped.

* test: add concatenation tests for prepend/append with empty text (#123)

Cover double-space regression, all-parts-present case, and
prepend-only with empty text for both node variants.

* fix: preserve connected input values in widget sync and queue hooks (#123)

The queuePrompt interceptor, syncPromptManagerWidgets, and serialize
hook were overwriting connected input link references with the widget's
empty DOM value. When text is connected from another node, ComfyUI puts
a link reference array in the output — these hooks now check for
connections before syncing, so externally connected text flows through.

* test: add connected-input contract tests for text + prepend + append (#123)

Verifies that externally connected text appears in the final output
alongside prepend/append — the exact scenario from the QA screenshot.
Covers both PromptManagerText and PromptManager (CLIP) variants.

* chore: bump version to 3.1.3
2026-03-18 06:43:23 -07:00
Vito ff090c5ebb fix: add OUTPUT_NODE = True to all nodes to prevent caching skip (#120) (#121)
ComfyUI's execution engine walks backwards from output nodes. Without
OUTPUT_NODE = True, our nodes could be silently skipped when downstream
nodes are cached — even when IS_CHANGED returns a new value.

Since all three nodes have side effects (database writes, execution
tracking), they must be marked as output nodes so ComfyUI always
includes them in the execution graph.

Adds regression tests for OUTPUT_NODE and IS_CHANGED contracts.
Bumps version to 3.1.2.
2026-03-06 12:33:48 -08:00
Vito Sansevero d0c747a609 chore: bump version to 3.1.1 in pyproject.toml 2026-02-11 05:57:19 -08:00
Vito Sansevero fdda1c4ad5 chore: bump version to 3.1.0, update changelog, fix tag styling and filters
- Add append: to autotag skip-tagged filter alongside prepend:
- Update tag chip styling to dark fill with white text
- Add v3.1.0 changelog entry covering all changes since v3.0.26
2026-02-10 17:36:33 -08:00
Vito Sansevero d60e4ca52f chore: bump project version to 3.0.37 in pyproject.toml 2026-02-09 05:48:19 -08:00
Vito Sansevero 0a2c274a27 chore: bump version to 3.0.36 in pyproject.toml 2026-02-08 13:26:01 -08:00
Vito Sansevero f7e6fed1af chore: bump project version to 3.0.35 in pyproject.toml 2026-02-08 08:49:52 -08:00
Vito Sansevero 15bbfc4044 chore: bump project version to 3.0.34 in pyproject.toml 2026-02-08 05:40:44 -08:00
Vito Sansevero 224fcc7803 chore(ci): add code quality, security scanning, and Dependabot
- Add code-quality.yml: Black formatting check, flake8 linting, bandit
  security scan
- Add dependabot.yml: weekly updates for pip deps and GitHub Actions
- Add requirements-dev.txt: single source of truth for CI dependencies
- Harden test.yml: add permissions, pip caching, use requirements-dev.txt
- Add Black/flake8/bandit config to pyproject.toml (line-length=88)
2026-02-07 08:30:00 -08:00
Vito Sansevero 5c5fe512c8 chore: bump version to 3.0.33 in pyproject.toml 2026-02-07 08:09:26 -08:00
Vito Sansevero 091689f9f5 chore: bump version to 3.0.32 in pyproject.toml 2026-02-06 14:34:00 -08:00
Vito Sansevero f485825bfb fix: resolve gallery crash when thumbnails exist and prevent thumbnail-as-image linking
- Fix AttributeError: 'str' has no attribute 'as_posix' on thumbnail_rel_path
  in get_output_images and find_duplicates (thumbnail_rel_path is already a
  string from f-string construction, not a Path object)
- Fix NameError: total_images undefined in generate_thumbnails (was defined as
  total_media, causing progress logging and response to fail)
- Add URL encoding for paths in scan_output_dir for filenames with spaces
- Exclude thumbnails directory from image monitor to prevent linking thumbnail
  files to prompts via fallback mechanism
- Bump version to 3.0.31
2026-02-03 14:07:23 -08:00
Vito Sansevero 846b0b64b9 chore: bump version to 3.0.30 2026-02-03 08:39:29 -08:00
Vito Sansevero 9688e94b4c chore: bump version to 3.0.29 in pyproject.toml 2026-02-02 16:01:08 -08:00
Vito Sansevero 4f273e9b21 chore: bump version to 3.0.28 in pyproject.toml 2026-02-02 15:21:58 -08:00
Vito Sansevero b137c998b3 chore(pyproject): bump version to 3.0.27 2026-02-02 15:11:03 -08:00
Vito Sansevero 33a66da2f1 chore: bump version to 3.0.26 in pyproject.toml 2025-12-09 14:13:44 -08:00
Vito Sansevero 067320e9c5 chore: bump version to 3.0.25 in pyproject.toml 2025-12-09 12:51:32 -08:00
Vito Sansevero 75fad23464 chore: bump version to 3.0.24 in pyproject.toml 2025-12-09 09:32:10 -08:00
Vito Sansevero b8d6b9072d chore(pyproject): bump version to 3.0.23 2025-12-07 17:38:04 -08:00
Vito Sansevero b5e6bec141 chore: bump version to 3.0.22 in pyproject.toml 2025-12-06 07:27:26 -08:00
Vito Sansevero e0e61ad618 chore: bump version to 3.0.21 in pyproject.toml 2025-09-09 09:30:09 -07:00
Vito Sansevero 8f01bc1541 chore: bump version to 3.0.20 in pyproject.toml 2025-08-30 17:33:53 -07:00
Vito Sansevero 0b94063e73 chore: remove local settings, bump version to 3.0.19 2025-08-11 19:32:28 -07:00
Vito Sansevero d949585b35 chore: bump version to 3.0.18 in pyproject.toml 2025-08-11 15:32:48 -07:00
Vito Sansevero a6997e0c8c chore: bump version to 3.0.17 in pyproject.toml 2025-08-11 14:20:49 -07:00
Vito Sansevero 190146f7b6 chore(pyproject): bump version to 3.0.16 2025-08-04 07:00:14 -07:00
Vito Sansevero f488eec029 chore: bump version to 3.0.15 in pyproject.toml 2025-08-04 06:32:48 -07:00
Vito Sansevero cb3d09ad46 chore: bump version to 3.0.13 in pyproject.toml 2025-06-19 16:56:52 -07:00
Vito Sansevero 283268a1ec chore: bump version to 3.0.12 in pyproject.toml 2025-06-19 13:06:37 -07:00
Vito Sansevero 890060bc38 chore(pyproject): update version and add icon URL 2025-06-16 06:38:16 -07:00
Vito Sansevero f3d49a95d6 chore: bump version to 3.0.10 in pyproject.toml 2025-06-11 13:43:27 -07:00
Vito Sansevero 592812918d chore: bump version to 3.0.9 in pyproject.toml 2025-06-09 08:41:56 -07:00
Vito Sansevero 6321991af0 chore(pyproject): bump version to 3.0.8 2025-06-08 15:53:20 -07:00
Vito Sansevero feb8248fdd chore: bump version to 3.0.7 in pyproject.toml 2025-06-08 15:50:48 -07:00
Vito Sansevero 5e3e258501 chore: bump version to 3.0.6 in pyproject.toml 2025-06-08 15:38:07 -07:00
Vito Sansevero 533c234957 chore: bump version to 3.0.5 in pyproject.toml 2025-06-08 13:45:58 -07:00
Vito Sansevero 81334571fb chore: bump version to 3.0.4 in pyproject.toml 2025-06-04 08:58:00 -07:00
Vito Sansevero b7649754bd chore: bump version to 3.0.3 in pyproject.toml 2025-06-04 06:53:19 -07:00
Vito Sansevero c765181e18 chore: bump version to 3.0.2 in pyproject.toml 2025-06-03 17:57:56 -07:00
Vito Sansevero 4505e62261 chore: bump version to 3.0.1 in pyproject.toml 2025-06-03 17:07:08 -07:00
Vito Sansevero d3f65c2a7e chore(pyproject): update version to 3.0.0 2025-06-01 12:27:00 -07:00
Vito Sansevero 145fa3a6e3 chore(pyproject): bump version to 1.0.10 2025-05-29 06:49:32 -07:00
Vito Sansevero 2924a4bb9d chore: bump version to 1.0.9 in pyproject.toml 2025-05-28 11:03:28 -07:00
Vito Sansevero dcbfd6979d chore: bump version to 1.0.8 in pyproject.toml - fixes unicode in logger 2025-05-28 09:19:50 -07:00
Vito Sansevero 134fe4a840 chore: bump version to 1.0.7 in pyproject.toml - Fixes duplicates, Fixes prompts scanning, improves maintance, adds logger 2025-05-28 08:59:12 -07:00