Files
Jyotisha/frontend/tests/icon-motion-audit.test.ts
T
Jesse_ChenandClaude Opus 5.5 b5a02ca861 fix(home): split starter fine print, show hints only when actionable (BUG-1041)
TASK-starter-home-polish-20260926:
- D1 today's trend moves to a sub-line under the greeting
  (.starter-greeting-sub), read from the same dailyStarlanguage state the
  warm snapshot seeds; static sentence until ready, hidden without a minute.
- D2 the line under the pills appears only for a resumable case or a
  non-self subject; the first-run and redo sentences are removed.
- BUG-1041 entrySummaryFromResponse read snake_case keys while the
  entry-summary route returns camelCase, so every account parsed as a
  first run; the parser now reads the route's shape (snake_case still ok).
- D3 daily entry icon MoonStar, credits icon Coins; D4 boundary line kept.
- Records: CHANGELOG, DESIGN, VOICE, BUG_HISTORY, PROGRESS, testing list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017eEAG8HD3mm8gsKXgk8uU8
2026-09-26 08:47:53 +08:00

24 lines
1.5 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
import test from "node:test";
const starterHome = readFileSync(new URL("../src/components/starter-home.tsx", import.meta.url), "utf8");
const css = readFileSync(new URL("../src/app/globals.css", import.meta.url), "utf8");
test("the 2026-09-22 icon audit keeps the existing entry icons and adds no loop", () => {
// 原值:`import { Clock3, Sparkles }`、`<Sparkles aria-hidden="true" />`,且 doesNotMatch /Moon|MoonStar|thinking-orbs/
// 新值:`import { Clock3, MoonStar }`、`<MoonStar aria-hidden="true" />`,doesNotMatch 收窄为 /Sparkles|thinking-orbs/
// 原因:TASK-starter-home-polish-20260926 D3 产品拍板今日星语入口改 lucide MoonStar(与右上角点数不再同图标);
// 「不加循环动画、不引入 thinking-orbs」这条意图原样保留,并反向锁住旧图标不回来。
assert.match(starterHome, /import \{ Clock3, MoonStar \} from "lucide-react"/);
assert.match(starterHome, /<MoonStar aria-hidden="true" \/>/);
assert.match(starterHome, /<Clock3 aria-hidden="true" \/>/);
assert.doesNotMatch(starterHome, /Sparkles|thinking-orbs/);
const blockStart = css.indexOf(".starter-entry {");
const blockEnd = css.indexOf(".starter-entry > svg");
const block = css.slice(blockStart, blockEnd);
assert.doesNotMatch(block, /animation:/);
assert.doesNotMatch(css, /thinking-orbs/);
assert.match(css, /@media \(prefers-reduced-motion:\s*reduce\)[\s\S]*transition-duration:\s*\.01ms !important/);
});