Commit Graph
276 Commits
Author SHA1 Message Date
Vito 4054449650 Merge pull request #103 from ComfyAssets/chore/ci-cd-improvements
chore(ci): add code quality, Dependabot, and Black formatting
2026-02-07 08:31:16 -08:00
Vito Sansevero 2737a4b1ef style: apply Black formatter (line-length=88) to all Python files
Automated formatting pass across 30 files to establish consistent code
style enforced by CI. No logic changes.
2026-02-07 08:30:09 -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 a7a79eb75b Merge pull request #102 from ComfyAssets/fix/phase0-quick-wins
fix: pre-compile Tailwind CSS, track vendor libs (#88)
2026-02-07 08:07:39 -08:00
Vito Sansevero 2a7b53a47b fix(ci): add missing watchdog dependency to test workflow
Tests importing prompt_manager.py fail in CI because watchdog (used by
image_monitor.py) isn't installed. Add it alongside Pillow and aiohttp.
2026-02-07 08:05:01 -08:00
Vito Sansevero 5b67143782 chore: gitignore local/AI tooling files and untrack prompts.db
Add .claude/, .serena/, .playwright-mcp/, logs/, docs/, AGENTS.md,
CLAUDE.md, standalone_tagger.py, and prompts.db to .gitignore.
Untrack prompts.db so local database changes don't pollute diffs.
2026-02-07 07:58:51 -08:00
Vito Sansevero a17ecd02c1 fix: pre-compile Tailwind CSS and track vendor libs (#88)
Replace 398KB Tailwind Play Mode runtime (not for production) with 37KB
pre-compiled CSS. Fix .gitignore so web/lib/ vendor files (Tailwind CSS,
ViewerJS) are tracked — fresh clones were completely broken without them.

- Add gitignore negation rules for web/lib/
- Compile Tailwind v3.4.17 CSS at dev time via standalone CLI
- Replace <script> tags with <link> in admin, gallery, metadata HTML
- Delete tailwind.js runtime (no longer needed)
- Add Makefile with css/css-watch/css-setup targets for devs
- Track ViewerJS vendor files (viewer.min.js, viewer.min.css)
2026-02-07 07:57:31 -08:00
Vito Sansevero 6271d12426 test: add API integration tests and update CI dependencies
Add 26 aiohttp-based API endpoint tests covering health, recent prompts,
search, save/delete, update, tags, categories, stats, export, and
response envelope validation. Add aiohttp to CI workflow dependencies.
2026-02-07 07:35:59 -08:00
Vito Sansevero 45d23efcf1 test: add comprehensive database tests and CI pipeline
Phase 6 test infrastructure (6.1, 6.2, 6.5):
- Fix .coveragerc source path (src -> .)
- Fix pre-existing test failure (patch target + method rename)
- Add 52 database layer tests covering CRUD, junction table tags,
  search, pagination, statistics, image linking, and edge cases
- Add GitHub Actions CI workflow (Python 3.10-3.12)
- Total: 61 tests, all passing
2026-02-07 07:06:54 -08:00
Vito Sansevero 4deda8542d feat: normalize tag storage with junction tables
Phase 5 scalability and polish:
- Add tags + prompt_tags junction tables replacing JSON column
- Migrate existing JSON tags via json_each() on startup
- Rewrite all tag queries to use junction tables (O(1) vs O(n))
- Simplify rename/delete/merge tag operations to single SQL
- Batch-attach preview images to prompt list responses (fix N+1)
- Fix fetchone() fragility under thread contention (defensive defaults)
2026-02-07 07:02:39 -08:00
Vito Sansevero 4548beb723 refactor: split api.py into domain modules and extract frontend JS
Phase 4 structural refactoring:
- Split monolithic py/api.py (5.3k lines) into domain mixins:
  prompts.py, images.py, admin.py, logging_routes.py, autotag_routes.py
- Extract inline JS from admin.html into web/js/admin.js
- Extract inline JS from gallery.html into web/js/gallery.js
- Add gzip compression middleware to API responses (Phase 5.4)
- Standardize API error envelope with success: false (Phase 5.3)
- Add filmstrip image enrichment to prompt list responses (Phase 5.2)
2026-02-07 07:02:25 -08:00
Vito Sansevero 4f62066c63 fix: harden nodes, validators, and utility modules
Phase 0-3 fixes from codebase audit:
- Extract shared node logic into prompt_manager_base.py (DRY)
- Add input validation guards to validators.py
- Fix logging_config.py buffer management
- Harden image_monitor.py against race conditions
- Fix prompt_tracker.py cleanup edge cases
- Fix diagnostics.py import path
- Wire config.py server instance correctly
2026-02-07 07:02:10 -08:00
Vito 3e3a457fda Merge pull request #100 from ComfyAssets/feature/tagger
Feature/tagger
2026-02-06 14:36:17 -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 bd6c136608 refactor(tags-page): improve code structure and reuse 2026-02-06 14:33:26 -08:00
Vito Sansevero af9ee4e671 feat(web): add load more prompts button 2026-02-06 14:33:10 -08:00
Vito Sansevero 6ef040b4b8 refactor(comfyui): remove class_type conversion logic 2026-02-06 14:32:55 -08:00
Vito Sansevero a5a1169829 fix(api): handle invalid input and improve progress tracking 2026-02-06 14:32:43 -08:00
Vito Sansevero 9e337ed02a fix(database): handle skipped prompts in tag operations 2026-02-06 14:32:01 -08:00
Vito ab5e211019 Merge pull request #98 from ComfyAssets/feature/tag-management-page
feat(tags): Phase 2 tag management enhancements
2026-02-03 18:53:10 -08:00
Vito Sansevero 760b2a0f48 feat(tags): add Phase 2 tag management enhancements
- Bulk tag operations: rename, delete, merge across all prompts
- Right-click context menu on tags (rename/delete/merge)
- Click prompt card → dashboard search, click thumbnail → ViewerJS
- Usage bars, prompt count badge, staggered card animations
- URL-synced tag selection (#/tags/landscape,portrait?mode=or)
- Untagged prompts filter with [untagged] entry
2026-02-03 18:40:58 -08:00
Vito 778f4670be Merge pull request #97 from ComfyAssets/fix/gallery-thumbnail-as-posix
fix: resolve gallery crash when thumbnails exist
2026-02-03 14:08:22 -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 9e575ab48c Merge pull request #96 from ComfyAssets/fix/issue-94-branch-execution-v2
fix: forward partial execution targets in queuePrompt wrapper
2026-02-03 13:38:01 -08:00
Vito Sansevero 2774ed921b fix: forward partial execution targets in queuePrompt wrapper
The api.queuePrompt wrapper introduced in PR #91 only forwarded 2 of 3
arguments, dropping the options object that carries
partialExecutionTargets. This caused the server to execute all output
nodes instead of just the targeted branch.

Also removes debug console.log and print statements added during
development.

Fixes #94
2026-02-03 13:36:51 -08:00
Vito 4a2cb376da Merge pull request #95 from ComfyAssets/fix/issue-94-branch-execution
fix: restore IS_CHANGED to enable proper branch execution
2026-02-03 08:41:06 -08:00
Vito Sansevero 846b0b64b9 chore: bump version to 3.0.30 2026-02-03 08:39:29 -08:00
Vito Sansevero 557d79c173 fix: restore IS_CHANGED to enable proper branch execution
Fixes #94

The removal of IS_CHANGED in PR #91 caused ComfyUI to always
re-execute the entire graph instead of only changed branches.

IS_CHANGED returns a hash of text inputs (text, prepend_text,
append_text) - when unchanged, ComfyUI skips re-execution.
2026-02-03 08:39:22 -08:00
Vito 42aed8e9e3 Merge pull request #93 from ComfyAssets/feature/issue-76-gallery-scan-directory
feat(settings): add configurable gallery scan directory
2026-02-02 16:02:04 -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 a7d842a51c feat(settings): add configurable gallery scan directory
Add ability to configure a custom image scan directory in Settings:
- New "Image Scan Directory" field in Settings modal
- "Currently Monitoring" display shows active directory path
- Settings API now returns/saves gallery_root_path and monitored_directories
- Image monitor checks GalleryConfig before auto-detecting
- Restart notification when gallery path changes

Closes #76
2026-02-02 15:58:54 -08:00
Vito Sansevero 4f273e9b21 chore: bump version to 3.0.28 in pyproject.toml 2026-02-02 15:21:58 -08:00
Vito 8b8d1f0b5e Merge pull request #92 from ComfyAssets/fix/issue-89-save-prompt-endpoint
fix(admin): use correct endpoint for saving new prompts
2026-02-02 15:21:03 -08:00
Vito Sansevero 0655af3713 fix(admin): use correct endpoint for saving new prompts
Change the saveNewPrompt() function to use /prompt_manager/save
instead of /prompt_manager/prompts which has no POST handler.

This was causing a 405 Method Not Allowed error when trying to
add new prompts from the admin interface.

Fixes #89
2026-02-02 15:20:05 -08:00
Vito f94eb86321 Merge pull request #91 from ComfyAssets/feature/button
Feature/button fixes #88
2026-02-02 15:16:58 -08:00
Vito Sansevero 344640eb26 Merge origin/main into feature/button
Resolve conflicts in py/api.py by keeping feature/button's thumbnail
path generation approach (using rel_path.with_suffix('') and string
formatting) which was tested and working correctly.
2026-02-02 15:15:53 -08:00
Vito Sansevero b137c998b3 chore(pyproject): bump version to 3.0.27 2026-02-02 15:11:03 -08:00
Vito Sansevero f23fc5d966 fix(prompt_manager): sync and fix widget values 2026-02-02 15:10:34 -08:00
Vito Sansevero 927f1f1df7 build: update Tailwind CSS script source path 2026-02-02 15:10:26 -08:00
Vito Sansevero a8c96a2c81 build(web): update script and style source paths 2026-02-02 15:10:16 -08:00
Vito Sansevero 15e828b7a6 build(web): update library paths in admin.html 2026-02-02 15:10:06 -08:00
Vito Sansevero c3aa41d679 feat: Add singleton management for PromptTracker 2026-02-02 15:09:58 -08:00
Vito Sansevero c50a7292c7 refactor(image_monitor): use info log level instead of debug 2026-02-02 15:09:48 -08:00
Vito Sansevero 47d3f4d279 refactor: use singleton getters for initialization 2026-02-02 15:09:38 -08:00
Vito Sansevero 3fe2ee5075 feat(api): serve static files and update thumbnail paths 2026-02-02 15:09:25 -08:00
Vito Sansevero 4dbc553b04 refactor: Use singleton getters for tracker/monitor 2026-02-02 15:09:15 -08:00
Vito Sansevero 8fa490a82a refactor(prompt_manager): update imports and function names 2026-02-02 15:08:56 -08:00
Vito Sansevero d4f13e40b6 fix(database): skip duplicates in image linking 2026-02-02 15:08:44 -08:00
Vito Sansevero 86815913c1 feat(models): add UNIQUE constraint for prompt_id, filename 2026-02-02 15:08:34 -08:00