Added persistence for original image#288
Conversation
|
@ivantha , Can you please review and let me know if any changes are needed? |
|
Reviewed. Adds best-effort image persistence across page reloads: a new |
|
Thanks for the PR! It currently has merge conflicts with main (or is behind). Could you rebase onto the latest main and push the updated branch? Happy to merge once it's auto-rebasable. |
c29925d to
edb2230
Compare
edb2230 to
6bb8b38
Compare
|
@ivantha , as you suggested updated to match the Set-based listener approach from #286. Instead of storing a single reset callback, the store now keeps a Set of image reset listeners and returns an unregister function from registerImageReset. I also updated readImageExtension to unregister listeners on dispose so the overlap with the store refactor is reconciled cleanly. I have rebased the code so that it can be merged, please let me know if any changes are required |
Description
On app startup, the persisted image should be restored into the pipeline store and the Read Image block label should reflect the restored file name, so the editor returns to the same usable state as before reload. The persistence should be best-effort, with validation, expiry handling, and cleanup for invalid or oversized payloads.
Fixes #287
Type of Change
How Has This Been Tested?
Describe the tests you ran to verify your changes.
Screenshots (if applicable)
Before
https://github.com/user-attachments/assets/24733c14-afe9-41ce-8a55-e5096a130065
After
https://github.com/user-attachments/assets/4cc534e2-a01c-4de7-9ea0-519b0b481610
Checklist