openpencil/tests/engine/io/fig
Danila Poyarkov a2d0d6552d
fix(fig): harden document worker sessions (#594)
* fix(app): cancel large FIG opens before tab cleanup

- Abort tab-local preparation before awaiting recovery persistence so closing a decoding tab terminates its FIG worker immediately
- Add explicit graph-event unsubscription and lazy FIG resource release for disposed editor stores
- Keep staging-editor disposal separate from live graph resource ownership
- Let same-origin document fetches bypass all cross-origin font response limits

* refactor(fig): isolate worker sessions per document

- Give each lazy FIG document a dedicated MessageChannel and retained worker session
- Route manifest and page population traffic through the session port instead of global worker handlers
- Close the port and worker explicitly on cancellation or tab disposal
- Preserve current lazy source transfer and export fidelity until raw NodeChange patch export is implemented

* perf(fig): preserve unchanged archives in worker sessions

- Keep a second transferable copy of the original FIG archive inside the document worker session instead of main-thread memory
- Track whether user graph mutations invalidate exact archive reuse
- Return unchanged documents byte-for-byte through the session without full-page materialization or recompression
- Release archive request ownership with the page population worker and editor graph resources

* fix(fig): choose the first visible imported page

- Ignore internal-only canvases when selecting the initial active page\n- Keep internal component pages available for lazy instance population

* fix(fig): retain original archives across fallbacks

- Keep session-owned workers alive when population is oversized\n- Register the input archive when worker graph transfer falls back to the main thread\n- Preserve byte-identical unchanged saves without restoring lossy materialization

* fix(fig): harden worker session ownership

- Route concurrent archive replies through persistent request resolvers and reject stale in-flight archives after edits\n- Retain disposal-only handles for oversized sessions and guard Worker construction\n- Reuse the shared FIG import options contract and cover session disposal and invalidation

* test(fig): isolate Worker availability mutation
2026-08-30 21:40:13 +03:00
..
export fix(fig): harden component property round trips 2026-08-19 18:05:25 +03:00
heavy fix(kiwi): harden FIG containers and DOM imports 2026-08-13 20:33:10 +03:00
import fix(fig): harden document worker sessions (#594) 2026-08-30 21:40:13 +03:00
roundtrip fix(editor): address guide authoring review 2026-08-19 20:13:57 +03:00
instance-swap-roundtrip.test.ts fix(fig): harden component property round trips 2026-08-19 18:05:25 +03:00
page-manifest.test.ts fix(fig): harden background page loading 2026-08-18 03:52:59 -03:00
thumbnail-page.test.ts fix(fig): use Cover pages for thumbnails 2026-08-18 03:43:38 -03:00
thumbnail-range.test.ts fix(fig): use Cover pages for thumbnails 2026-08-18 03:43:38 -03:00