Commit Graph
7 Commits
Author SHA1 Message Date
by-aeandCursor Agent 972828e095 Add input sanitization and error handling for API routes
Harden route handlers against malformed requests:

Store entry route (PUT):
- Validate name is non-empty and under 128 chars
- Verify request body is a JSON object, not array or primitive
- Return clear error messages for each validation failure

Background stat route (GET):
- Handle os.path.getmtime() failures (permissions, race conditions)
- Log file stat errors for debugging
- Return appropriate HTTP status codes

Prevents crashes from malicious or malformed API requests.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-10-22 21:52:55 +00:00
by-aeandCursor Agent 6b459d3211 Add graceful error handling for missing ComfyUI dependencies
Wrap imports in try-except blocks to provide clear error messages:
- Node imports: log helpful message if ComfyUI dependencies missing
- PromptServer import: log warning if server unavailable
- Export empty mappings instead of crashing ComfyUI startup

This allows the extension to fail gracefully when dependencies
are unavailable (e.g., during testing or accidental standalone
execution) while still providing diagnostic information.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-10-22 21:52:20 +00:00
by-aeandCursor Agent 7487718e4c Improve README with usage guide and troubleshooting section
Add practical documentation that helps users:

Usage section:
- Where to find nodes in the menu
- How to connect the nodes
- What output to expect

Troubleshooting section:
- Nodes not appearing (installation issues)
- Route/store errors (usually harmless)
- Background image not updating (connection issues)
- Workflow compatibility (breaking changes prevention)

Reduces user friction and provides self-service solutions
for common setup problems.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-10-22 21:51:55 +00:00
by-aeandCursor Agent 42ca7fc9eb Add GitHub Actions CI workflow for automated testing
Implement CI pipeline that runs on push and pull requests:

Python checks (3.10, 3.11, 3.12):
- Lint with flake8 (syntax errors and code quality)
- Compile all Python modules
- Run unit test suite

JavaScript checks:
- Validate syntax of all JS files with Node.js

This ensures code quality and catches issues before they reach users.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-10-22 21:51:31 +00:00
by-aeandCursor Agent 71cccd9504 Add comprehensive unit tests for store module
Implement 10 unit tests covering:
- Name validation (valid and invalid patterns)
- Save, load, and delete operations
- Multiple entries and overwrites
- Empty buckets and non-existent entries
- Invalid bucket names
- Persistence across reloads

Tests use unittest (stdlib) and mock folder_paths dependency,
ensuring the store logic is reliable without ComfyUI runtime.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-10-22 21:51:16 +00:00
by-aeandCursor Agent 4424d858dd Add robust error handling for malformed JSON inputs
Prevent crashes when users provide invalid JSON or malformed bbox data:
- Catch TypeError and ValueError in addition to JSONDecodeError
- Handle non-numeric bbox coordinates gracefully with try-except
- Fall back to default positioning when bbox parsing fails

This protects users from workflow crashes due to corrupted or
hand-edited JSON input.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-10-22 21:50:38 +00:00
by-aeandCursor feb8947b50 Initial release of Ideogram 4 Prompt Builder Pro.
Fork of KJNodes' Ideogram 4 Prompt Builder with stores, multi-select, scene save/load, live background preview, and separate width/height outputs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-10 17:27:52 +10:00