openpencil/tests/engine/app
Danila Poyarkov 81a07c0c9a
feat(demo): rebuild the first page as a component library with staged loading (#717)
* feat(demo): rebuild the first page as a component library with staged loading

The demo generated its document behind an empty canvas with no progress,
and the first page still carried a legacy library in a dark section that
matched neither the current showcase nor the rest of the demo.

Drive the existing editor preparation from demo generation so the canvas
overlay and tab indicator report the real phases and progress, and rebuild
the first page around a component library authored in the current style:
a Button component set with two variants, linked instances, text and
boolean component properties, and the variable collections. The deleted
effects, typography, and app-preview examples are already covered by pages
02 and 03.

* fix(demo): record demo generation failures as preparation failures

Demo generation reported a thrown error as a cancellation, because the catch
only warned and the trailing finally always cancelled the handle. Report the
failure through the preparation handle so diagnostics distinguish a broken
demo build from an abandoned one.

The finally needs no failure guard: failing clears the handle, so the
following cancel already returns early, as the preparation controller test
asserts.

* fix(demo): roll back an abandoned demo build

A preparation that superseded the demo's handle — a page switch, a font
retry, or a closed tab — left the document half-built: the first page stayed
renamed, the extra pages and sections remained, and the one-page precondition
then blocked any later attempt in that session.

Track what the build creates and remove it whenever the build does not
finish, restoring the original page name and clearing the variables it added.
The cleanup is guarded by graph identity because node and page IDs are only
unique within one graph, so a document that replaced the demo is never touched.

Splitting the build into its own function keeps the entry point to
orchestration and stays within the complexity budget.
2026-09-18 08:18:21 +03:00
..
ai fix: protect unsaved documents and defer credential access (#713) 2026-09-17 15:25:15 +03:00
automation feat(settings): configure tool access, MCP failures, and step limits 2026-09-17 23:55:58 +03:00
chat feat(settings): configure tool access, MCP failures, and step limits 2026-09-17 23:55:58 +03:00
clipboard fix(clipboard): preserve component dependency references 2026-09-13 12:46:31 +03:00
code feat(code): add live JSX and HTML/CSS editing (#525) 2026-08-15 09:48:42 +03:00
demo feat: assemble an editable demo document 2026-09-14 00:36:53 +03:00
diagnostics feat(settings): configure tool access, MCP failures, and step limits 2026-09-17 23:55:58 +03:00
document fix: protect unsaved documents and defer credential access (#713) 2026-09-17 15:25:15 +03:00
editor refactor: replace complex conditional object spreads 2026-09-01 19:49:57 +03:00
integrations fix: restore engine test coverage and isolation (#653) 2026-09-06 23:29:45 +03:00
recent-files refactor(app): polish files workspace and New tabs 2026-08-20 17:20:33 +03:00
runtime perf(canvas): rebuild navigation rendering (#591) 2026-08-31 13:39:40 +03:00
settings feat(settings): configure tool access, MCP failures, and step limits 2026-09-17 23:55:58 +03:00
shell/menu refactor(app): polish files workspace and New tabs 2026-08-20 17:20:33 +03:00
storage fix(storage): harden workspace previews 2026-08-10 20:02:58 +03:00
tabs feat(app): prepare documents atomically per tab (#592) 2026-08-30 12:21:49 +03:00
tauri fix(tauri): preserve request and abort semantics 2026-07-18 05:02:51 +03:00
usage feat(diagnostics): add local usage and diagnostics foundation 2026-08-24 16:56:40 +03:00
cache.test.ts refactor(app): polish files workspace and New tabs 2026-08-20 17:20:33 +03:00
demo.test.ts feat(demo): rebuild the first page as a component library with staged loading (#717) 2026-09-18 08:18:21 +03:00
external-link.test.ts test: move tauri helpers into domain folder 2026-05-06 16:16:08 +03:00
font-loading.test.ts fix(tauri): prevent Windows font loading crashes (#497) 2026-08-12 20:09:04 +03:00
vector-edit-transforms.test.ts fix(editor): commit vector drags on pointer release (#586) 2026-08-24 16:02:27 +03:00