mirror of
https://github.com/storytold/photocraft.git
synced 2026-10-27 06:07:13 +01:00
User and imported .abr brush presets now survive a restart. The new photocraft_engine::preset_store keeps one JSON file per preset group plus content-addressed, deflated tip bitmaps (8-bit when the tip came from 8-bit data) in <config dir>/Presets, and an index with group order and deleted built-ins. Built-ins are never written; writes are atomic and bounded; corrupt or oversized files are skipped with a warning and left on disk. The desktop app loads the store on a background thread and attaches it when it arrives; sessions without a store (CLI, MCP, web, tests) stay hermetic. Brush preset mutations bump ToolState::presets_rev and the store syncs after the command, rewriting only groups whose content changed. Fixes #78 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>