openpencil/packages
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
..
cli fix(cli): use Node fs for import command 2026-08-24 20:26:52 +03:00
core fix(fig): harden document worker sessions (#594) 2026-08-30 21:40:13 +03:00
demos
docs refactor(tools): organize internal CLI workflows (#600) 2026-08-29 14:42:44 +03:00
dom-css feat(app): prepare documents atomically per tab (#592) 2026-08-30 12:21:49 +03:00
fig Merge remote-tracking branch 'origin/master' into pr-550-push-integration 2026-08-20 17:20:25 +03:00
harness refactor(ai): ship Harness as optional companion (#561) 2026-08-19 20:04:35 +03:00
kiwi fix(kiwi): interpret compiled schemas without eval 2026-08-29 22:40:49 +03:00
mcp refactor(mcp): keep disabled tools typed across boundaries 2026-08-20 18:44:44 +03:00
pen chore: refresh compatible dependencies (#545) 2026-08-18 17:44:40 +03:00
scene-graph Merge pull request #562 from open-pencil/guide-authoring 2026-08-20 09:39:19 +03:00
vue feat(app): prepare documents atomically per tab (#592) 2026-08-30 12:21:49 +03:00