Files
Jyotisha/frontend/tests/ui-kit-stores.test.ts
T
jesse-uxandGrok (agent loop) d3be9491ee
Independent Staging Quality Gate / validate (push) Successful in 20m4s
Independent Staging Quality Gate / publish (push) Failing after 7m48s
组件库 K0:换上 Motion 底座和 shadcn 零件,页面还没换(#104)。
去掉 GSAP。对话入场改为按需加载的 Motion,仍是 160 毫秒,仍尊重减少动态效果。
用 shadcn@4.21.4 补上任务书列出的组件,不覆盖已有的 8 个。设计令牌映射到 shadcn 变量。
手写控件检查和只减不增的白名单。Motion 预设与四个 store 只是骨架,没有接到页面上。

自测:tsc --noEmit 退出码 0;npm run lint 0 error(122 条原有 warning);
定向测试 37 项、fail 0、cancelled 0;next build 后 / 仍是 Static;
首屏 JS gzip 578349 → 578435(+86 字节,+0.01%)。

Co-Authored-By: Grok (agent loop)
2026-10-24 15:37:29 +08:00

19 lines
874 B
TypeScript

import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
import test from "node:test";
import { useAccountStore } from "../src/stores/account-store.ts";
import { usePeopleStore } from "../src/stores/people-store.ts";
import { useSessionStore } from "../src/stores/session-store.ts";
import { useUiStore } from "../src/stores/ui-store.ts";
const home = readFileSync(new URL("../src/app/(app)/page.tsx", import.meta.url), "utf8");
test("K0 store skeletons exist and Home() does not move state into them", () => {
assert.equal(useSessionStore.getState().placeholder, true);
assert.equal(usePeopleStore.getState().placeholder, true);
assert.equal(useAccountStore.getState().placeholder, true);
assert.equal(useUiStore.getState().placeholder, true);
assert.doesNotMatch(home, /useSessionStore|usePeopleStore|useAccountStore|useUiStore/);
});