openpencil/tests/e2e/canvas
Danila Poyarkov aa86873dd7
test: typecheck the test suites and fix what that found (#896)
* build: typecheck the test suites

Tests were in no TypeScript program: no tsconfig included tests/** or
packages/*/tests/**, and bun strips types without checking them, so a
fixture could drop a required field and keep passing until something
read it.

@types/bun moves to the root because it was installed per package only,
and #cli-tests/* joins the paths the root config already carries.

* test: fix the type errors the test suites were hiding

Typechecking the tests turned up 1123 errors. Most were ordinary
strictness, but some were real: `NodeChange` bound to Figma's plugin
typings rather than the Kiwi codec in thirteen .fig tests,
materializeInstance was called with six arguments against five so the
blobs and source children were dropped, CanvasKit pixels were written
to a plain object that never reached WASM, and assertions were made
through accessors that do not exist, so they asserted nothing.

Fixtures that had quietly lost a required field now carry it, nullable
results are narrowed through the existing expectDefined helper rather
than assumed, and stand-ins for CanvasKit and the editor go through one
named helper instead of an unexplained cast at each site.

No test was deleted, skipped, or weakened, and no `any`, non-null
assertion, or ts-expect-error was introduced.

* docs: record what typechecking the tests established

Pins the app program's global types with an assertion rather than a
note, since an unpinned types list lets any root @types package decide
which platform src/** is judged against.

The two environment faults that look like code regressions — Vite's
dependency pre-bundle outliving a package rebuild, and heavy .fig
suites failing under load — go to the development docs, where an
explanation belongs.

* fix: align @types/bun and keep node types resolvable when extended

The root manifest declared a newer @types/bun than every package, which
check:monorepo rejects, and pinning the app program's types left them
unresolvable from a config that extends this one out of tree.

* fix: fail the test typecheck when the compiler itself fails

The gate matched diagnostics by substring, so a compiler or config
failure that named no test file printed a pass while having checked
nothing. Diagnostics are now split by whether they name a file: an
unscoped one is the run failing and stops the gate, a test file's is a
finding, and a source file's stays out by design.

Also drops the parameter planComponentConstruction never read, and
makes the inner-shadow verification script exit non-zero when it
renders no image instead of logging and succeeding.

* chore: merge master into tests-typecheck
2026-10-05 12:42:38 +00:00
..
arrow-caps-visual.spec.ts-snapshots test(canvas): align visual oracles with ruler-free fixtures 2026-09-16 03:45:34 +03:00
boolean-visual.spec.ts-snapshots ci: shard unit tests by owner and cut the quick suite from 100 s to 13 s (#715) 2026-09-17 10:18:16 +03:00
color-space.webkit.spec.ts-snapshots fix: convert document colour profiles, keep text edits live, and fix .fig exports (#716) 2026-09-18 00:43:10 +03:00
corner-smoothing-visual.spec.ts-snapshots fix(editor): commit vector drags on pointer release (#586) 2026-08-24 16:02:27 +03:00
cursor-labels.spec.ts-snapshots fix: zoom in place, shape cursor names, and align context menu items (#818) 2026-10-01 21:34:36 +04:00
demo-workspace.spec.ts-snapshots feat: check designs live with a Lint panel, canvas markers, and fixes (#804) 2026-10-04 10:08:39 +00:00
dense-text-preview.spec.ts-snapshots perf(text): preserve coverage across paragraph eviction 2026-09-15 16:32:07 +03:00
distance-measurement-edge-cases.spec.ts-snapshots fix(text): finalize font readiness and label shaping (#593) 2026-08-30 14:33:32 +03:00
distance-measurement.spec.ts-snapshots fix(text): finalize font readiness and label shaping (#593) 2026-08-30 14:33:32 +03:00
document-loading.spec.ts-snapshots feat: refresh branding with generated platform icons (#707) 2026-09-16 11:54:07 +03:00
drop-files.spec.ts-snapshots fix(editor): commit vector drags on pointer release (#586) 2026-08-24 16:02:27 +03:00
fill-modes-visual.spec.ts-snapshots ci: shard unit tests by owner and cut the quick suite from 100 s to 13 s (#715) 2026-09-17 10:18:16 +03:00
frame-overlays.spec.ts-snapshots fix(canvas): keep labels readable and refine section badges 2026-09-15 19:54:04 +03:00
instance-scale-visual.spec.ts-snapshots feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
instance-sizing.spec.ts-snapshots test: replace legacy demo snapshots with current coverage 2026-09-14 01:20:56 +03:00
label-anatomy.spec.ts-snapshots perf(canvas): reuse labels with shared font fallback 2026-09-15 23:08:53 +03:00
labels fix(canvas): include component-set members in label catalog 2026-09-16 14:13:34 +03:00
live-editing.spec.ts-snapshots feat(editor): checkpoint live interaction improvements 2026-09-15 11:36:17 +03:00
nested-transform-interaction.spec.ts-snapshots fix(canvas): keep labels readable and refine section badges 2026-09-15 19:54:04 +03:00
occurrence-text-visual.spec.ts-snapshots feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
pattern-mask-visual.spec.ts-snapshots ci: shard unit tests by owner and cut the quick suite from 100 s to 13 s (#715) 2026-09-17 10:18:16 +03:00
pen-variables.spec.ts-snapshots fix(pen): resolve ordinary variable references (#622) 2026-09-06 23:50:03 +03:00
presence-cursors.spec.ts-snapshots feat: show AI agents on the canvas and to collaborators (#803) 2026-10-03 14:01:36 +04:00
retained-grid.spec.ts-snapshots feat(editor): checkpoint live interaction improvements 2026-09-15 11:36:17 +03:00
saved-glyph-visual.spec.ts-snapshots feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
scene-picture-freshness.spec.ts-snapshots fix(editor): close preview and history lifecycle gaps 2026-09-16 03:36:44 +03:00
slot-overlays.spec.ts-snapshots feat: create, fill, and edit slots (#862) 2026-10-04 17:02:28 +00:00
stroke-geometry-visual.spec.ts-snapshots fix(editor): commit vector drags on pointer release (#586) 2026-08-24 16:02:27 +03:00
stroke-paint-visual.spec.ts-snapshots fix(core): draw gradient and image strokes as the paint they are (#868) 2026-10-04 13:25:45 +00:00
text test: typecheck the test suites and fix what that found (#896) 2026-10-05 12:42:38 +00:00
tiled-large-blur-visual.spec.ts-snapshots test(canvas): align visual oracles with ruler-free fixtures 2026-09-16 03:45:34 +03:00
typography-depth-visual.spec.ts-snapshots fix(editor): commit vector drags on pointer release (#586) 2026-08-24 16:02:27 +03:00
vector feat(scene-graph)!: make a stroke a paint (#864) 2026-10-04 13:38:05 +04:00
arrow-caps-visual.spec.ts fix(core): draw gradient and image strokes as the paint they are (#868) 2026-10-04 13:25:45 +00:00
boolean-visual.spec.ts feat(scene-graph)!: make a stroke a paint (#864) 2026-10-04 13:38:05 +04:00
color-space.spec.ts fix(canvas): preserve paint geometry and color fidelity 2026-09-16 02:57:56 +03:00
color-space.webkit.spec.ts feat(updater): show download progress while installing an update 2026-09-25 23:15:14 +04:00
corner-smoothing-visual.spec.ts fix(editor): commit vector drags on pointer release (#586) 2026-08-24 16:02:27 +03:00
cursor-labels.spec.ts feat: show AI agents on the canvas and to collaborators (#803) 2026-10-03 14:01:36 +04:00
demo-workspace.spec.ts test: typecheck the test suites and fix what that found (#896) 2026-10-05 12:42:38 +00:00
dense-text-preview.spec.ts perf(text): preserve coverage across paragraph eviction 2026-09-15 16:32:07 +03:00
distance-measurement-edge-cases.spec.ts feat(scene-graph)!: make a stroke a paint (#864) 2026-10-04 13:38:05 +04:00
distance-measurement.spec.ts feat(canvas): measure distances between layers (#515) 2026-08-14 18:18:55 +03:00
document-loading.spec.ts feat: refresh branding with generated platform icons (#707) 2026-09-16 11:54:07 +03:00
drop-files.spec.ts fix(editor): commit vector drags on pointer release (#586) 2026-08-24 16:02:27 +03:00
fill-modes-visual.spec.ts feat(scene-graph)!: make a stroke a paint (#864) 2026-10-04 13:38:05 +04:00
frame-creation-preview.spec.ts feat(editor): checkpoint live interaction improvements 2026-09-15 11:36:17 +03:00
frame-overlays.spec.ts fix(renderer): rasterize settled scenes at viewport origin 2026-09-15 13:25:43 +03:00
instance-scale-visual.spec.ts test: typecheck the test suites and fix what that found (#896) 2026-10-05 12:42:38 +00:00
instance-sizing.spec.ts fix: preserve authored instance sizing through synchronization 2026-09-14 00:24:52 +03:00
label-anatomy.spec.ts feat(scene-graph)!: make a stroke a paint (#864) 2026-10-04 13:38:05 +04:00
live-editing.spec.ts feat(editor): checkpoint live interaction improvements 2026-09-15 11:36:17 +03:00
manipulation.spec.ts feat(editor): add configurable snapping and guides 2026-08-18 19:11:48 +03:00
nested-transform-interaction.spec.ts feat(editor): checkpoint live interaction improvements 2026-09-15 11:36:17 +03:00
occurrence-text-visual.spec.ts test: typecheck the test suites and fix what that found (#896) 2026-10-05 12:42:38 +00:00
painted-text.spec.ts fix(canvas): preserve paint geometry and color fidelity 2026-09-16 02:57:56 +03:00
pattern-mask-visual.spec.ts feat(scene-graph)!: make a stroke a paint (#864) 2026-10-04 13:38:05 +04:00
pen-layout.spec.ts fix(pen): honor layout and sizing defaults (#652) 2026-09-10 17:02:56 +03:00
pen-variables.spec.ts fix(pen): resolve ordinary variable references (#622) 2026-09-06 23:50:03 +03:00
presence-cursors.spec.ts feat: show AI agents on the canvas and to collaborators (#803) 2026-10-03 14:01:36 +04:00
retained-grid.spec.ts feat(editor): checkpoint live interaction improvements 2026-09-15 11:36:17 +03:00
retained-parity.spec.ts fix(renderer): rasterize settled scenes at viewport origin 2026-09-15 13:25:43 +03:00
ruler-visibility.spec.ts fix: honor ruler visibility on the overlay canvas 2026-09-14 01:12:26 +03:00
saved-glyph-visual.spec.ts feat(fig): occurrence-scoped instance interpretation as the single .fig reader 2026-10-01 11:20:27 +04:00
scene-picture-freshness.spec.ts fix(canvas): discard stale zoom fallback pictures 2026-09-15 17:40:34 +03:00
slot-overlays.spec.ts feat: create, fill, and edit slots (#862) 2026-10-04 17:02:28 +00:00
split-views.spec.ts feat(editor): model split canvas panes (#519) 2026-08-15 10:31:52 +03:00
stroke-geometry-visual.spec.ts feat(scene-graph)!: make a stroke a paint (#864) 2026-10-04 13:38:05 +04:00
stroke-paint-visual.spec.ts test: typecheck the test suites and fix what that found (#896) 2026-10-05 12:42:38 +00:00
tiled-large-blur-visual.spec.ts test: typecheck the test suites and fix what that found (#896) 2026-10-05 12:42:38 +00:00
tiled-property-preview.spec.ts feat(editor): checkpoint live interaction improvements 2026-09-15 11:36:17 +03:00
typography-depth-visual.spec.ts perf(text): preserve coverage across paragraph eviction 2026-09-15 16:32:07 +03:00