Skip to content

Fix IndexedDB DataCloneError and add project import/export#26

Open
fenelon wants to merge 1 commit into
YUZU-Hub:mainfrom
fenelon:fix/indexeddb-save-and-project-import-export
Open

Fix IndexedDB DataCloneError and add project import/export#26
fenelon wants to merge 1 commit into
YUZU-Hub:mainfrom
fenelon:fix/indexeddb-save-and-project-import-export

Conversation

@fenelon
Copy link
Copy Markdown

@fenelon fenelon commented Mar 18, 2026

Summary

  • Fix DataCloneError that prevented projects from saving to browser storage. saveState() was serializing HTMLImageElement objects in background.image which IndexedDB cannot clone. Now strips Image objects and persists the data URL as imageSrc, reconstructing on load.
  • Fix same issue in duplicateScreenshot(), setCurrentScreenshotAsDefault(), and createNewScreenshot() which also deep-cloned background objects containing live Image references.
  • Add project import/export: "Save Project" downloads current project as .appscreen file; "Load Project" imports from file, creating a new project with all screenshots and settings restored.

Test plan

  • Open app, upload screenshots, set a background image — verify no DataCloneError in console
  • Reload page — verify background image persists across sessions
  • Click "Save Project" — verify .appscreen file downloads
  • Click "Load Project" and select the exported file — verify project imports with all data intact
  • Test duplicate screenshot with background image set — verify no errors
  • Test "Set as Default" with background image — verify new screenshots inherit it correctly

🤖 Generated with Claude Code

- Strip HTMLImageElement from background objects before saving to IndexedDB
- Persist background image data URLs as `imageSrc` and reconstruct on load
- Fix same issue in duplicateScreenshot, setCurrentScreenshotAsDefault, createNewScreenshot
- Add Save/Load Project buttons below Export All for `.appscreen` file export/import

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@fenelon
Copy link
Copy Markdown
Author

fenelon commented Mar 19, 2026

Fixed version preview here: https://appscreen.ellin.co/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant