Files
zeekayandGitHub ea43c5a975 Type lib, scripts, v2, home and app under strict (#8)
* Type scripts under strict

Playwright's API the checks use is declared in host.ts (the package is
the app repo's); caught errors read through why(). tabs-tree.test waits
for the typed tabsTree.

Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk

* Type the shared components under strict

Window globals (__lenis, __hzHold, google) and the two react-dom calls
are declared in components/*.d.ts, since @types/react-dom is not a
dependency and the lockfile is frozen.

Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk

* Type components/v2 under strict

Props, state, refs and DOM events in the 93 v2 files. A2Motion's easing
tuples are as const. Two real bugs: x-archimedes/MaskLines imported a
NoJs that does not exist, and x-hypatia/PinChapters returned the element
from a ref callback, which React 19 reads as a cleanup. AppSheet no
longer sets aria-label to a JSX label.

Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk

* Type components/home under strict

The race, cost and frontier figures, the plan cards, the repository card
and the product stories take Run, Models and Plan types from lib.

Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk

* Type the hero devices and the app routes under strict

HeroScene and its parts describe hero-scenes.json; the [slug] pages take
params as a Promise, and metadata and viewport carry Next's types.

Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk

* Give the integrations previews their Preview type

Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk

* Use the bench Card type for the closing cards

Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk
2026-11-14 01:34:34 -08:00

36 lines
1.2 KiB
TypeScript

import test from 'node:test';
import assert from 'node:assert/strict';
import AGENTS from '../content/agents.ts';
import { lab } from './lab.ts';
const icon = (name: string) => AGENTS.find((a) => a.name === name)!.icon;
// the chart's points, as the price list and the runs name them
const WEAR = [
['Claude Opus 5.5', 'Claude'],
['GPT-5.6 Sol', 'ChatGPT'],
['DeepSeek V4 Pro 0423', 'DeepSeek'],
['Grok 4.7', 'Grok Build'],
['Kimi K3', 'Kimi'],
['Gemini 3.8 Flash', 'Gemini CLI'],
];
test('a lab with a tile in the agents dock wears that tile\'s drawing', () => {
for (const [model, tile] of WEAR) {
const m = lab(model, false);
assert.ok(m, model);
if (m.src !== undefined) assert.ok(icon(tile).includes(m.src), model);
else assert.ok(icon(tile).includes(m.inner), model);
}
});
test('an Enso tier wears Hanzo\'s H, whatever it is called', () => {
assert.equal(lab('Enso Ultra', true)!.inner, lab('Enso', true)!.inner);
assert.ok(icon('Hanzo Dev').includes(lab('Enso', true)!.inner!));
});
test('Z.ai wears its own mark; a lab with none wears nothing', () => {
assert.ok(lab('GLM 5.3', false)!.inner!.includes('#3859FF'));
assert.equal(lab('Totally New Lab 1', false), null);
});