From 07fa7cacf5f5047bc5c2dd01ed2ad85037616641 Mon Sep 17 00:00:00 2001 From: Marcin Sadowski Date: Thu, 12 Nov 2026 10:51:35 +0100 Subject: [PATCH 1/4] fix: type-check the e2e specs clean --- .ai/runs/2026-11-12-e2e-typecheck/HANDOFF.md | 3 +++ .ai/runs/2026-11-12-e2e-typecheck/PLAN.md | 15 +++++++++++++++ test/e2e/graph-pixi.spec.ts | 10 +++++----- test/e2e/tsconfig.json | 2 ++ 4 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 .ai/runs/2026-11-12-e2e-typecheck/HANDOFF.md create mode 100644 .ai/runs/2026-11-12-e2e-typecheck/PLAN.md diff --git a/.ai/runs/2026-11-12-e2e-typecheck/HANDOFF.md b/.ai/runs/2026-11-12-e2e-typecheck/HANDOFF.md new file mode 100644 index 0000000..2d78991 --- /dev/null +++ b/.ai/runs/2026-11-12-e2e-typecheck/HANDOFF.md @@ -0,0 +1,3 @@ +# Handoff + +Plan unreviewed (unattended run). Change is done: the e2e tsconfig now includes the existing `src/renderer/svg.d.ts` and `src/main/skill-scripts.d.ts`, and `graph-pixi.spec.ts` calls `toBitmap()` (typed Buffer) instead of the legacy `getBitmap()` (typed void). Remaining: review, map, PR. diff --git a/.ai/runs/2026-11-12-e2e-typecheck/PLAN.md b/.ai/runs/2026-11-12-e2e-typecheck/PLAN.md new file mode 100644 index 0000000..7adfcd1 --- /dev/null +++ b/.ai/runs/2026-11-12-e2e-typecheck/PLAN.md @@ -0,0 +1,15 @@ +# Plan: e2e typecheck green + +## Tasks +| # | Step | Status | Commit | +|---|---|---|---| +| 1 | Include svg.d.ts and skill-scripts.d.ts in test/e2e/tsconfig.json; use toBitmap() in graph-pixi.spec.ts | done | pending | + +## Validation +- pnpm run test:graph:typecheck +- pnpm run typecheck +- pnpm run lint +- pnpm test + +## Non-goals +- No suppressions, no loosened compiler options, no spec logic changes, no docs/primitives.md edit (another delegate owns it; no comparable typecheck entry exists there). diff --git a/test/e2e/graph-pixi.spec.ts b/test/e2e/graph-pixi.spec.ts index 04dc8f1..b126e14 100644 --- a/test/e2e/graph-pixi.spec.ts +++ b/test/e2e/graph-pixi.spec.ts @@ -38,8 +38,8 @@ test('repaints retained cards when platform tabs change their column width', asy if (!freshCanvasBox) throw new Error('Pixi canvas is not visible'); const fresh = await page.screenshot({ path: testInfo.outputPath('fresh.png'), clip: { ...comparisonClip, x: freshCanvasBox.x, y: freshCanvasBox.y } }); const difference = await harness.app.evaluate(({ nativeImage }, images) => { - const navigatedBitmap = nativeImage.createFromBuffer(Buffer.from(images.navigated, 'base64')).getBitmap(); - const freshBitmap = nativeImage.createFromBuffer(Buffer.from(images.fresh, 'base64')).getBitmap(); + const navigatedBitmap = nativeImage.createFromBuffer(Buffer.from(images.navigated, 'base64')).toBitmap(); + const freshBitmap = nativeImage.createFromBuffer(Buffer.from(images.fresh, 'base64')).toBitmap(); let channelDelta = 0; for (let index = 0; index < freshBitmap.length; index += 1) channelDelta += Math.abs(navigatedBitmap[index] - freshBitmap[index]); return channelDelta / freshBitmap.length / 255; @@ -433,7 +433,7 @@ test('matches all four relation edge styles and highlights the canvas node under await page.mouse.move(canvasBox.x + 4, canvasBox.y + 4); const stable = await canvas.screenshot(); const pixels = await harness.app.evaluate(({ nativeImage }, images) => { - const bitmap = (image: string) => nativeImage.createFromBuffer(Buffer.from(image, 'base64')).getBitmap(); + const bitmap = (image: string) => nativeImage.createFromBuffer(Buffer.from(image, 'base64')).toBitmap(); return { highlighted: bitmap(images.highlighted).equals(bitmap(images.cleared)), stable: bitmap(images.stable).equals(bitmap(images.cleared)), @@ -505,8 +505,8 @@ test('keeps cached tile text consistent with freshly rendered tiles after zoomin await expect(host).toHaveAttribute('style', zoomedWidth!); const fresh = await canvas.screenshot({ path: testInfo.outputPath('fresh.png') }); const difference = await harness.app.evaluate(({ nativeImage }, images) => { - const before = nativeImage.createFromBuffer(Buffer.from(images.before, 'base64')).getBitmap(); - const after = nativeImage.createFromBuffer(Buffer.from(images.after, 'base64')).getBitmap(); + const before = nativeImage.createFromBuffer(Buffer.from(images.before, 'base64')).toBitmap(); + const after = nativeImage.createFromBuffer(Buffer.from(images.after, 'base64')).toBitmap(); if (before.length !== after.length) return 1; let changed = 0; for (let index = 0; index < before.length; index += 1) if (before[index] !== after[index]) changed += 1; diff --git a/test/e2e/tsconfig.json b/test/e2e/tsconfig.json index 073d00a..3334aa5 100644 --- a/test/e2e/tsconfig.json +++ b/test/e2e/tsconfig.json @@ -13,6 +13,8 @@ "../../src/main/filecontent.ts", "../../src/main/lantern-prfile.ts", "../../src/renderer/global.d.ts", + "../../src/renderer/svg.d.ts", + "../../src/main/skill-scripts.d.ts", "../../src/renderer/lib/**/*.ts" ] } From b95ed438fe7f1ae092f856b0152846cb8663ee90 Mon Sep 17 00:00:00 2001 From: Marcin Sadowski Date: Thu, 12 Nov 2026 10:58:16 +0100 Subject: [PATCH 2/4] chore: update the Lantern map --- .lantern/map/test/e2e.lantern | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.lantern/map/test/e2e.lantern b/.lantern/map/test/e2e.lantern index 63cffea..6c1814b 100644 --- a/.lantern/map/test/e2e.lantern +++ b/.lantern/map/test/e2e.lantern @@ -47,7 +47,7 @@ test/e2e/graph-navigation.spec.ts . test 0910cf6edfbd #feature file-graph = test/e2e/support/graph-harness.ts -test/e2e/graph-pixi.spec.ts . test b75dd27e683c +test/e2e/graph-pixi.spec.ts . test 661b9b4dc1e3 #feature file-graph = test/e2e/support/graph-harness.ts @@ -123,12 +123,14 @@ test/e2e/text-select.spec.ts . test b09fe6828137 = src/renderer/lib/lanternview.ts#mountLanternView = test/fixtures/graph/pr-review-demo.ts#prReviewDemo -test/e2e/tsconfig.json . config b024315ec7d5 +test/e2e/tsconfig.json . config 20fb9354fd10 < playwright.config.ts < src/main/filecontent.ts < src/main/lantern-prfile.ts < src/main/lantern-types.ts < src/main/lantern.ts + < src/main/skill-scripts.d.ts < src/renderer/global.d.ts + < src/renderer/svg.d.ts < test/helpers/lantern-map.ts < tsconfig.json From cf67f57134b4d52fcc4907cdcf253d7f4135e0da Mon Sep 17 00:00:00 2001 From: Marcin Sadowski Date: Thu, 12 Nov 2026 10:58:25 +0100 Subject: [PATCH 3/4] chore: remove the run folder --- .ai/runs/2026-11-12-e2e-typecheck/HANDOFF.md | 3 --- .ai/runs/2026-11-12-e2e-typecheck/PLAN.md | 15 --------------- 2 files changed, 18 deletions(-) delete mode 100644 .ai/runs/2026-11-12-e2e-typecheck/HANDOFF.md delete mode 100644 .ai/runs/2026-11-12-e2e-typecheck/PLAN.md diff --git a/.ai/runs/2026-11-12-e2e-typecheck/HANDOFF.md b/.ai/runs/2026-11-12-e2e-typecheck/HANDOFF.md deleted file mode 100644 index 2d78991..0000000 --- a/.ai/runs/2026-11-12-e2e-typecheck/HANDOFF.md +++ /dev/null @@ -1,3 +0,0 @@ -# Handoff - -Plan unreviewed (unattended run). Change is done: the e2e tsconfig now includes the existing `src/renderer/svg.d.ts` and `src/main/skill-scripts.d.ts`, and `graph-pixi.spec.ts` calls `toBitmap()` (typed Buffer) instead of the legacy `getBitmap()` (typed void). Remaining: review, map, PR. diff --git a/.ai/runs/2026-11-12-e2e-typecheck/PLAN.md b/.ai/runs/2026-11-12-e2e-typecheck/PLAN.md deleted file mode 100644 index 7adfcd1..0000000 --- a/.ai/runs/2026-11-12-e2e-typecheck/PLAN.md +++ /dev/null @@ -1,15 +0,0 @@ -# Plan: e2e typecheck green - -## Tasks -| # | Step | Status | Commit | -|---|---|---|---| -| 1 | Include svg.d.ts and skill-scripts.d.ts in test/e2e/tsconfig.json; use toBitmap() in graph-pixi.spec.ts | done | pending | - -## Validation -- pnpm run test:graph:typecheck -- pnpm run typecheck -- pnpm run lint -- pnpm test - -## Non-goals -- No suppressions, no loosened compiler options, no spec logic changes, no docs/primitives.md edit (another delegate owns it; no comparable typecheck entry exists there). From c72414ccf7c707aacb1d17e4cfb7f726bba19bac Mon Sep 17 00:00:00 2001 From: Marcin Sadowski Date: Thu, 12 Nov 2026 11:05:05 +0100 Subject: [PATCH 4/4] chore: record pull request #35 in the Lantern map --- .lantern/prs/35.pr | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .lantern/prs/35.pr diff --git a/.lantern/prs/35.pr b/.lantern/prs/35.pr new file mode 100644 index 0000000..c59db18 --- /dev/null +++ b/.lantern/prs/35.pr @@ -0,0 +1,26 @@ +lantern-pr 1 +# 35 +#title fix: type-check the e2e specs clean +#url https://github.com/MobileReality/lantern/pull/35 +#branch fix/e2e-typecheck-green +#base main +#opened 2026-11-12 +#head cf67f57134b4d52fcc4907cdcf253d7f4135e0da +#describe what The e2e typecheck now passes: its tsconfig includes the existing svg and skill-script declarations, and one spec uses the typed toBitmap. +#describe before pnpm run test:graph:typecheck failed with about 64 errors. +#describe after It exits zero with no suppressions. +#describe verified test:graph:typecheck, typecheck, lint, graph-pixi e2e (14 passed). +~ test/e2e/graph-pixi.spec.ts +~ test/e2e/tsconfig.json +#order test/e2e/tsconfig.json +#order test/e2e/graph-pixi.spec.ts +#reason test/e2e/graph-pixi.spec.ts getBitmap is typed void in Electron's types; toBitmap returns the Buffer the checks need. +#reason test/e2e/tsconfig.json Lets the e2e typecheck see the svg and skill-script declarations the main tsconfig already has. +#story Type-checking the graph specs +#step actor A developer +#file test/e2e/tsconfig.json +#step action runs the graph spec typecheck +#step subject the e2e specs +#file test/e2e/graph-pixi.spec.ts +#below interaction Trust a green typecheck for the specs +#below consequence The typecheck failed with many errors => The typecheck passes