Commit Graph
8 Commits
Author SHA1 Message Date
by-ae 17858e1963 fix: store unicode names that look the same as one preset
A letter plus a combining accent was rejected, and when it was already
in the file it did not match the composed name.
2026-11-01 07:31:19 +10:00
by-ae a5a88ed0e8 fix: read store files that start with a UTF-8 BOM
json.load rejects a leading byte-order mark, so a valid bucket was moved
aside and the next save replaced it. Reading as utf-8-sig keeps the data.
2026-10-29 07:46:20 +10:00
03603614b1 fix: back up store files that are not JSON objects
A bucket file that parsed as a JSON array or other non-object was treated
as empty and then overwritten on the next save, so the previous contents
were gone. Those files are now moved aside like invalid JSON. A backup
created in the same second no longer replaces an existing one.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: AE <by-ae@users.noreply.github.com>
2026-10-27 21:01:27 +00:00
27db6ef197 fix: create each store bucket lock only once
The per-bucket lock was inserted without synchronization. Two first
writers could take different locks and overwrite each other's preset
file. Lock creation now happens under a guard lock.

Co-authored-by: AE <by-ae@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-10-26 21:11:37 +00:00
by-aeandCursor Agent 3a1dcd649d fix: support Unicode names and prevent concurrent write corruption in store
- Allow Unicode letters/numbers in preset names (e.g. 角色, Персонаж, Émilie)
- Add thread-safe locking per bucket to prevent race conditions during concurrent writes
- Use mkstemp() for atomic temp file creation to avoid tmp file name collisions
- Add tests demonstrating the bugs and verifying the fixes

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-10-24 20:52:01 +00:00
by-aeandCursor Agent 41a54fa376 fix: handle corrupt JSON files in store with backup recovery
- Add error handling for JSONDecodeError and UnicodeDecodeError in _read_json
- Move corrupt files to timestamped backup (e.g. characters.json.corrupt-1234567890)
- Treat corrupt bucket as empty, allowing other buckets to continue working
- Clean up temp files if _write_json fails
- Log warnings for corrupt file recovery and errors for backup failures

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-10-24 09:56:46 +00:00
by-aeandCursor Agent ac895b1de8 store: fsync preset JSON before atomic replace
Ensures data is written to disk before the atomic rename. The write
was already atomic (tmp + os.replace), but adding fsync prevents
preset corruption if the process is killed between json.dump and
the file system sync.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-10-23 21:15:11 +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