Commit Graph
21 Commits
Author SHA1 Message Date
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 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 9e337ed02a fix(database): handle skipped prompts in tag operations 2026-02-06 14:32:01 -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 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
Vito Sansevero ffaf5fd3d8 feat(database): add method to retrieve all images with prompts 2025-12-07 17:24:54 -08:00
Vito Sansevero 22593e8514 docs: add comprehensive docstrings to all Python modules
- Add Google-style docstrings to main node files (prompt_manager.py, prompt_manager_text.py)
- Enhance database module docstrings with detailed parameter and return documentation
- Add comprehensive docstrings to all utils modules with usage examples
- Document API endpoints and configuration classes thoroughly
- Update module-level docstrings in all __init__.py files
- Ensure consistent naming (ComfyUI_PromptManager) across all documentation
- Follow Python best practices for docstring formatting
2025-08-12 06:51:36 -07:00
Vito Sansevero f161fc4c1f fix(database): resolve SQLite ORDER BY syntax error in GROUP_CONCAT
Fix compatibility issue with older SQLite versions that don't support
ORDER BY clause inside GROUP_CONCAT function.

- Remove ORDER BY from GROUP_CONCAT in SQL queries
- Add GROUP_CONCAT for created_at dates
- Sort IDs manually in Python after fetching results
- Maintain same behavior of keeping oldest prompt as primary

This resolves the startup error:
"sqlite3.OperationalError: near 'ORDER': syntax error"

The fix ensures compatibility with all SQLite versions while preserving
the original functionality of keeping the oldest duplicate.
2025-08-04 06:56:05 -07:00
Vito Sansevero caa48d7cdf refactor(database): enhance prompt ID validation logic 2025-06-19 16:56:33 -07:00
Vito Sansevero 2c890f7eaa style(models): Change log level from info to debug 2025-06-19 16:56:25 -07:00
Vito Sansevero 52ffdeda2e feat(database): add method to find duplicate prompts 2025-06-09 09:03:52 -07:00
Vito Sansevero 44afbbcd58 fix(database): handle empty categories in query 2025-05-28 13:00:19 -07:00
Vito Sansevero 92e904767d feat(database): add pagination to get_recent_prompts 2025-05-28 11:01:35 -07:00
Vito Sansevero ee21a695cd refactor(database): improve duplicate cleanup logic 2025-05-28 08:54:07 -07:00
Vito Sansevero 3b158d0ec3 feat(models): integrate logging for database operations 2025-05-28 08:29:59 -07:00
Vito Sansevero 850900fcd7 feat(logging): integrate logging in database operations 2025-05-28 08:29:51 -07:00
Vito Sansevero c639fa79a7 fix(database): delete related images before prompts 2025-05-27 12:35:27 -07:00
Vito Sansevero c22cd36e7c fix(models): correct foreign key type mismatch 2025-05-27 12:35:17 -07:00
Vito Sansevero e0ac927a0d fix(database): resolve foreign key constraint error 2025-05-25 21:36:48 -07:00
Vito Sansevero d4c1689ce4 feat(database): add prompt storage and retrieval system 2025-05-24 12:25:44 -07:00