openpencil/tests/engine
Danila Poyarkov 6f5638380a
feat(app): prepare documents atomically per tab (#592)
* feat(app): show atomic document loading progress

- Preserve the existing full-canvas pencil loader while adding phase, detail, accessible status, and honest determinate progress
- Keep one generation-safe load owner across FIG decoding, graph preparation, page population, fonts, fallbacks, layout, viewport fitting, and first-render fade
- Prevent nested page setup and viewport cleanup from revealing partially prepared documents
- Cover obsolete sessions, font-resolution ownership, and staged loader UI

* refactor(app): scope editor preparation per tab

- Replace the shared loading boolean with one reactive preparation snapshot and one imperative controller per editor store
- Keep Core page work progress-only and inject canvas suspension from the app boundary
- Route FIG, storage, recovery, DOM import, and page switching through reusable tab-local preparation handles
- Abort only the closing tab's operation and cover generation safety, multi-tab isolation, progress UI, and disposal

* fix(editor): commit prepared pages atomically

- Prepare population, fonts, fallbacks, and layout without changing the visible page
- Reject cancelled and stale prepared pages before committing viewport, selection, and page events
- Keep the preparation overlay until the committed scene version is presented
- Cover call order, cancellation, stale generations, and presentation acknowledgement

* fix(app): stage imported documents before commit

- Prepare imported graphs in an isolated Core editor before replacing the live document
- Share font loading while keeping live selection, graph, renderers, and history untouched during staging
- Preserve the previous graph when staging is cancelled or fails and remove the duplicate pre-font layout pass

* refactor(app): namespace preparation UI

- Move canvas and tab preparation presentations into focused subfolders with concise component names
- Share progress and phase presentation helpers across preparation surfaces
- Show tab-local preparation status without covering the active canvas for background work

* fix(app): cancel preparation work at source

- Publish typed per-store preparation lifecycle events with explicit completion, cancellation, and failure outcomes
- Propagate tab-local AbortSignals through FIG parsing, population workers, and browser font downloads
- Keep cancellable font requests outside shared in-flight caches while retaining globally completed font registrations
- Stop FIG manifest previews from replacing the live graph before atomic document commit

* fix(app): cancel storage and DOM preparation

- Propagate preparation signals through S3 downloads, byte progress, local-cache boundaries, and DOM/CSS conversion checkpoints
- Reuse merged diagnostics and localized toasts for document, storage, and presentation failures
- Replace manual font concurrency and presentation timers with es-toolkit limitAsync and withTimeout
- Guard stalled first presentation and fix the merged recovery dialog title bindings

* fix(app): stage reload and font retry

- Prepare reload graphs in isolation and preserve the current document on read, decode, font, or layout failure
- Restore page and viewport state only after atomic graph commit with cancellable reload reads
- Run font Retry as a tab-local preparation with cache reset, final layout, picture invalidation, and presentation acknowledgement
- Keep completed document pixels visible while Retry reports activity in the tab

* fix(app): enforce exclusive preparation outcomes

- Complete document, storage, recovery, and DOM preparations only after successful commit
- Keep failed and cancelled handles terminal so lifecycle events cannot report contradictory outcomes
- Preserve external AbortError identity across storage timeouts and cancel streamed readers without returning partial bytes
- Cover credential-free pre-abort, mid-stream cancellation, progress cutoff, and terminal outcome exclusivity

* feat(diagnostics): record preparation outcomes

- Persist completed, cancelled, and failed preparation lifecycles through the validated diagnostics recorder
- Store only operation kind, outcome, cancellation or failure category, terminal phase, and coarse duration bucket
- Exclude document subjects, font families, storage identities, URLs, raw durations, messages, and stack traces

* chore(app): keep browser font tests with typography split

- Remove the browser font transport test inherited from a mixed cancellation commit; the source and coverage remain on the typography branch and safety snapshot

* test(vue): assert injected render suspension

- Exercise shouldSuspendRender instead of removed Core loading state\n- Preserve the contract that rendering resumes without a version change

* test(app): complete atomic preparation contracts

- Acknowledge first presentation in headless file-open tests\n- Assert the cancellable font-loading signature at the Tauri fallback boundary

* fix(app): preserve preparation cancellation

- Stage imported graphs before mutating live tabs and propagate aborts through page, DOM, font, and storage work\n- Use the accessible progress primitive and clamp determinate values\n- Cover fallback-font cancellation and yield pending-open test polling to the task queue

* test(text): await fallback font request cancellation

Start the mocked remote font request before aborting so the test proves that the active request receives the preparation signal.
2026-08-30 12:21:49 +03:00
..
acp
app feat(app): prepare documents atomically per tab (#592) 2026-08-30 12:21:49 +03:00
bytes refactor(core): centralize Base64 encoding 2026-07-28 08:27:22 +03:00
cli refactor: standardize acronym casing 2026-08-10 15:48:16 +03:00
clipboard fix(clipboard): preserve pasted instance links 2026-08-12 20:08:06 +03:00
collab perf(collab): skip unchanged Yjs node fields (#529) 2026-08-15 11:40:27 +03:00
color feat(vue): consolidate color model 2026-07-13 21:48:36 +03:00
core feat(fig): support text on path 2026-08-17 12:00:01 +03:00
dom-css fix(fig): restore strict parse validation 2026-07-18 03:58:18 +03:00
editor feat(app): prepare documents atomically per tab (#592) 2026-08-30 12:21:49 +03:00
figma/api feat(figma-api): add exposeInstanceSwap for real instance-swap component properties 2026-08-29 16:30:42 +03:00
geometry fix(fig): restore strict parse validation 2026-07-18 03:58:18 +03:00
hit-test perf(scene-graph): accelerate axis-aligned hit tests (#534) 2026-08-16 15:43:25 +03:00
icons fix(core): preserve inline SVG primitives (#485) 2026-08-12 16:02:45 +03:00
io feat(app): prepare documents atomically per tab (#592) 2026-08-30 12:21:49 +03:00
kiwi fix(fig): preserve regenerated override lineage 2026-07-21 01:51:27 +03:00
layout feat(fig): support text on path 2026-08-17 12:00:01 +03:00
library feat: add Figma-style variants and component libraries (#512) 2026-08-14 19:31:41 +03:00
lint
mcp fix(mcp): align runtime metadata and restart errors 2026-08-20 16:27:11 +03:00
pen refactor(fig): own instance interpretation 2026-07-18 02:06:34 +03:00
profiler
random
render feat(canvas): add Figma guide feedback parity 2026-08-20 14:02:33 +03:00
scene-graph fix(editor): harden snapping edge cases 2026-08-19 12:33:32 +03:00
snap
tauri feat(app): prepare documents atomically per tab (#592) 2026-08-30 12:21:49 +03:00
text feat(app): prepare documents atomically per tab (#592) 2026-08-30 12:21:49 +03:00
tools fix(tools): require sibling variant components 2026-08-19 20:05:54 +03:00
vector refactor(canvas): adopt immutable CanvasKit paths (#554) 2026-08-18 23:09:45 +03:00
vue feat(app): prepare documents atomically per tab (#592) 2026-08-30 12:21:49 +03:00
perf.bench.ts