openpencil/tests/e2e
Danila Poyarkov cb075b3e1a
perf: speed up opening large pages (#953)
* perf(canvas): find guide owners from an index instead of walking the page

Drawing and hit-testing guides visited every layer of the page on each frame to find the few that carry guides; on a large page that took about 1.2s of a load's rendering. The graph now keeps the set of layers with guides current from its node events, and both read it.

* perf(layout): write only changed geometry and request one render per layout pass

Layout wrote every laid-out layer's geometry whether or not it changed, so each pass over a large page notified every graph listener for every layer; a page load spent about 1s handling those updates. Layout now writes only the fields that changed, and the updates a layout pass makes ask for a single render, queued for before the next frame, instead of bumping the editor's reactive versions once per layer.

* test(canvas): drop the graph double the guide tests no longer use

* perf(fig): copy an opened file once on the main thread instead of three times

Opening a .fig in the browser copied the file for a main-thread fallback the caller's buffer already served, then copied it twice more for the worker, which parses from one and keeps the other as the original archive. A 109MB file briefly took over 400MB on the main thread. The fallback now reuses the caller's buffer, and the worker receives one copy and makes its archive copy itself.

* docs(changelog): note faster large-page loads

* fix(app): run recovery and autosave after edits, not redraws

Recovery and autosave watched sceneVersion, a render counter that every
requestRender bumps: opening a file, layout passes, fonts, and each layer a
page loads. Safari has no File System Access API, so its opened files have
no writable source and always get recovery snapshots. Loading a page also
invalidated the original archive, so a snapshot encoded the whole document
again; on the Preline UI kit's CMS page that ran about 100 s on the main
thread in WebKit before failing.

Recovery, autosave, and saved versions now follow the content revision of
createDocumentChanges. A page's layers loading from the opened file, which
runs inside applyImportedStateDuring on both the worker and main-thread
paths, no longer counts as an edit for that revision or for the original
archive, and asks for one render rather than one per layer.

In WebKit the CMS page switch drops from 105-133 s to 21 s, and its longest
main-thread stall from 90-117 s to 1.4 s.

* refactor(app): stop storing a version with recovery snapshots

Adopting a snapshot now protects the document's current content revision,
so nothing reads the version a snapshot was taken at. Snapshots saved by
earlier versions carry a sceneVersion field instead; dropping the field
keeps the metadata type true for both. Tests tell snapshots apart by the
bytes they were built with.
2026-10-07 20:57:57 +00:00
..
app perf: speed up opening large pages (#953) 2026-10-07 20:57:57 +00:00
brand feat: refresh branding with generated platform icons (#707) 2026-09-16 11:54:07 +03:00
canvas fix(canvas): keep image-heavy documents within CanvasKit memory (#963) 2026-10-07 20:30:25 +00:00
chat feat(chat): attach dropped images and style tables, menus, and link prompts in replies (#955) 2026-10-07 18:18:15 +00:00
clipboard fix: match Figma's transforms, strokes, booleans, sections, and names (#931) 2026-10-07 08:36:50 +00:00
code fix: meet WCAG AA contrast and name controls for screen readers (#952) 2026-10-07 17:51:24 +00:00
collab feat(collab): show MCP agents, follow streamed JSX, and follow your agents as they work (#725) 2026-10-07 10:04:58 +00:00
color-picker test: typecheck the test suites and fix what that found (#896) 2026-10-05 12:42:38 +00:00
components feat: show controls in a prebuilt demo and fix what saving it to .fig lost (#938) 2026-10-07 18:37:05 +00:00
context-menu feat: create, fill, and edit slots (#862) 2026-10-04 17:02:28 +00:00
design perf(properties): retain inactive panels safely 2026-09-15 17:01:44 +03:00
design-check test: typecheck the test suites and fix what that found (#896) 2026-10-05 12:42:38 +00:00
dom-css feat: write variables as a CSS token stylesheet (#856) 2026-10-04 18:15:52 +00:00
editor fix(layout): size each axis on its own and lay out before geometry reads (#942) 2026-10-07 11:52:08 +00:00
export test: typecheck the test suites and fix what that found (#896) 2026-10-05 12:42:38 +00:00
fonts test: typecheck the test suites and fix what that found (#896) 2026-10-05 12:42:38 +00:00
keyboard feat: create, fill, and edit slots (#862) 2026-10-04 17:02:28 +00:00
layers fix: match Figma's transforms, strokes, booleans, sections, and names (#931) 2026-10-07 08:36:50 +00:00
native feat(ai): add guided AI setup for providers, coding agents, and Pi (#916) 2026-10-07 08:46:57 +00:00
pages fix: match Figma's panel X, Y, rotation and themed page backgrounds (#940) 2026-10-07 10:02:52 +00:00
panels feat(vue): add responsive property grids 2026-07-26 12:42:50 +03:00
perf test: typecheck the test suites and fix what that found (#896) 2026-10-05 12:42:38 +00:00
properties feat: create, fill, and edit slots (#862) 2026-10-04 17:02:28 +00:00
scene test: honor the configured browser test origin 2026-09-16 12:46:13 +03:00
settings fix: meet WCAG AA contrast and name controls for screen readers (#952) 2026-10-07 17:51:24 +00:00
snap test(snapping): verify pixel rounding without guides 2026-09-13 14:02:16 +03:00
storage refactor(ui): compose shared editor controls (#670) 2026-09-10 12:09:06 +03:00
storybook fix: meet WCAG AA contrast and name controls for screen readers (#952) 2026-10-07 17:51:24 +00:00
stroke-picker fix: match Figma's transforms, strokes, booleans, sections, and names (#931) 2026-10-07 08:36:50 +00:00
text test: typecheck the test suites and fix what that found (#896) 2026-10-05 12:42:38 +00:00
toolbar test: typecheck the test suites and fix what that found (#896) 2026-10-05 12:42:38 +00:00
tools test: typecheck the test suites and fix what that found (#896) 2026-10-05 12:42:38 +00:00
ui test(ui): keep runtime theme import dependency-safe 2026-07-20 14:07:32 +03:00
variables feat: let a collection name the attribute its modes switch by (#913) 2026-10-06 12:35:41 +00:00
vectorize feat(app): convert image layers to vectors 2026-07-27 16:22:05 +03:00
viewport
autosave.spec.ts test: typecheck the test suites and fix what that found (#896) 2026-10-05 12:42:38 +00:00
components.spec.ts feat: create, fill, and edit slots (#862) 2026-10-04 17:02:28 +00:00
fixtures.ts test(app): stabilize final interaction coverage 2026-07-20 16:34:16 +03:00
recovery.spec.ts fix: protect unsaved documents and defer credential access (#713) 2026-09-17 15:25:15 +03:00