From 1c428d7b6e4e9965df173c2665c720f425f6ab8c Mon Sep 17 00:00:00 2001 From: jesse-ux Date: Sun, 25 Oct 2026 15:27:14 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=9F=E4=B8=8A=E5=B7=B2=E7=BB=8F=E6=8D=A2?= =?UTF-8?q?=E8=BF=87=E7=9A=84=E7=95=8C=E9=9D=A2=E6=A3=80=E6=9F=A5=EF=BC=8C?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=8E=AF=E5=A2=83=E6=89=8D=E8=83=BD=E6=8E=A5?= =?UTF-8?q?=E7=9D=80=E5=8F=91=E5=B8=83=EF=BC=88BUG-1439=EF=BC=89=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Grok (agent loop) --- docs/BUG_HISTORY.md | 17 ++++++++++ ...ROGRESS-birth-journey-contract-20261025.md | 34 +++++++++++++++++++ docs/tasks/README.md | 1 + frontend/src/app/globals.css | 2 ++ .../class-name-definition-contract.test.ts | 10 +++++- frontend/tests/motion-presets.test.ts | 7 +++- .../tests/profile-gender-ui-20260927.test.tsx | 9 ++++- .../starter-home-polish-20260926.test.tsx | 15 +++++--- .../tests/theme-preference-contract.test.ts | 14 +++++--- frontend/tests/ui-kit-stores.test.ts | 7 +++- tests/test_birth_time_journey_contract.py | 6 +++- 11 files changed, 108 insertions(+), 14 deletions(-) create mode 100644 docs/tasks/PROGRESS-birth-journey-contract-20261025.md diff --git a/docs/BUG_HISTORY.md b/docs/BUG_HISTORY.md index 3fe019d0..8409d58d 100644 --- a/docs/BUG_HISTORY.md +++ b/docs/BUG_HISTORY.md @@ -19510,4 +19510,21 @@ - 复发自:无 - 修复版本:分支 `codex/ui-kit-6-rectification-20261023`。 +## BUG-1439 | 出生时间合同仍要求建档里的旧校正卡 + +- 状态:resolved(定向回归已改;测试网站要等这次门禁通过才更新) +- 首次发现:2026-10-25 +- 最近更新:2026-10-25 +- 影响面:测试环境发布。页面行为没有新的改动。 +- 用户现象:启程和组件库已经合进测试分支,测试网站仍停在完整数据版(二)那一版。 +- 触发条件:#96 去掉建档里到不了的校正卡之后推上 staging。从那一笔起,快速门的 Python 检查失败,后面的提交没有再发布。 +- 根因:`tests/test_birth_time_journey_contract.py` 仍要求首页扫描面里出现 ` [data-sonner-toaster]), section[popover][aria-label^="页 .theme-menu-label { padding: var(--space-1) var(--space-3); color: var(--color-ink-tertiary); font-size: var(--type-caption); font-weight: 500; } .theme-menu-item { cursor: pointer; } .theme-menu-check { display: inline-grid; margin-left: auto; place-items: center; color: var(--color-action); } +.theme-menu [data-slot="dropdown-menu-radio-item-indicator"] { color: var(--color-action); } .theme-menu-check svg { width: 15px; height: 15px; } .account-menu-separator { height: 1px; margin: var(--space-2) var(--space-3); background: var(--color-border); } @@ -6953,6 +6954,7 @@ button.synastry-dd-add { border-radius: 0 0 var(--radius-md) var(--radius-md); } } @media (max-width: 767px) { + [data-sidebar="sidebar"] { height: 100vh; } @supports (height: 1dvh) { [data-sidebar="sidebar"] { height: 100dvh; } .auth-page { height: 100dvh; } diff --git a/frontend/tests/class-name-definition-contract.test.ts b/frontend/tests/class-name-definition-contract.test.ts index 10cd0202..0921d4a7 100644 --- a/frontend/tests/class-name-definition-contract.test.ts +++ b/frontend/tests/class-name-definition-contract.test.ts @@ -55,7 +55,15 @@ const tailwindCollisions = new Set([ // on the same element. const knownUnstyled = new Set([ "birth-time-evidence-receipt", - "is-done", + // 原值:is-done 在白名单里,因为当时没有样式。 + // 新值:删掉。chart-page-dasha-panel、chat-chart-resize-handle 加入。 + // 原因:启程进度条已经给 li.is-done 上色。下面这几个类名落在自己会画样式的 + // 折叠内容、分栏、侧栏导航和手机侧栏上,类名只是钩子。 + "chart-page-dasha-panel", + "chat-chart-resize-handle", + "shell-sidebar-panel", + "sidebar-nav-item", + "sidebar-sheet", "is-live", "is-working", "onboarding-step-card", diff --git a/frontend/tests/motion-presets.test.ts b/frontend/tests/motion-presets.test.ts index 616de402..ce561e5d 100644 --- a/frontend/tests/motion-presets.test.ts +++ b/frontend/tests/motion-presets.test.ts @@ -73,6 +73,11 @@ test("LazyMotion loads domAnimation asynchronously and honors reduced motion", ( assert.match(providerSource, /reducedMotion="user"/); assert.match(providerSource, /import\("motion\/react"\)\.then\(\(module\) => module\.domAnimation\)/); assert.doesNotMatch(providerSource, /domMax/); - assert.doesNotMatch(pageSource, /motion\/react|@\/lib\/motion\/provider|@\/stores\//); + // 原值:首页不得引用 motion/react、动效外壳和任何一个 store。 + // 新值:首页仍不得静态引用 motion 或动效外壳;可以引用会话 store,不得引用另外三个。 + // 原因:K2 把对话状态放进会话 store。动效仍按需加载,不进首页同步包。 + assert.doesNotMatch(pageSource, /motion\/react|@\/lib\/motion\/provider/); + assert.match(pageSource, /useSessionStore/); + assert.doesNotMatch(pageSource, /usePeopleStore|useAccountStore|useUiStore/); assert.doesNotMatch(layoutSource, /motion\/react|@\/lib\/motion\/provider|@\/stores\//); }); diff --git a/frontend/tests/profile-gender-ui-20260927.test.tsx b/frontend/tests/profile-gender-ui-20260927.test.tsx index 3cb9e05d..171922a6 100644 --- a/frontend/tests/profile-gender-ui-20260927.test.tsx +++ b/frontend/tests/profile-gender-ui-20260927.test.tsx @@ -104,7 +104,13 @@ test("people edit form: the gender field is part of the form and writes the draf onChange: (next) => { draft = typeof next === "function" ? next(draft) : next; }, }; const markup = renderToStaticMarkup(); - assert.deepEqual(pressed(markup), ["女:false", "男:true", "不填:false"]); + // 原值:整张表的按下项只有性别三选。 + // 新值:前面还有出生时间范围四选,「差不多准」按下;性别仍是男。 + // 原因:编辑表带上了出生时间范围。这份资料是家人记得的钟点,15 分钟那一档对应「差不多准」。 + assert.deepEqual(pressed(markup), [ + "差不多准:true", "前后半小时:false", "前后一小时:false", "前后两小时:false", + "女:false", "男:true", "不填:false", + ]); const field = elements(ChartProfileForm(props)).find((element) => element.type === ProfileGenderField); assert.ok(field); (field.props.onChange as (value: ProfileGender | null) => void)(null); @@ -120,6 +126,7 @@ test("people edit form: the gender field is part of the form and writes the draf // 新值: 同一张表直接渲染;页面源码把表单放进 Dialog,并传 showRelation={!editingSelf} // 原因: K4 编辑用 Dialog,传送门不进静态 HTML;关系和性别仍是这一张表上的 ToggleGroup assert.deepEqual(pressed(editing), [ + "差不多准:true", "前后半小时:false", "前后一小时:false", "前后两小时:false", "伴侣:false", "孩子:false", "父母:false", "朋友:false", "其他:true", "女:false", "男:true", "不填:false", ]); diff --git a/frontend/tests/starter-home-polish-20260926.test.tsx b/frontend/tests/starter-home-polish-20260926.test.tsx index 850c68c3..50460de3 100644 --- a/frontend/tests/starter-home-polish-20260926.test.tsx +++ b/frontend/tests/starter-home-polish-20260926.test.tsx @@ -140,19 +140,26 @@ test("D1: today's trend is a sub-line under the greeting, static until ready, hi test("D1: page.tsx feeds the sub-line from the same daily state the warm snapshot seeds", () => { const page = readFileSync(new URL("../src/app/(app)/page.tsx", import.meta.url), "utf8"); assert.match(page, /useState\(\(\) => warmStart\(\)\?\.daily \?\? \{ kind: "pending" \}\)/); - assert.match(page, //); + // 原值:dailyTrend 只看 natalMinuteAvailable。 + // 新值:本人资料不完整时不给趋势句。 + // 原因:#96 先帮别人看时,本人没有出生资料就不显示今日星语趋势。 + assert.match(page, //); assert.doesNotMatch(page, /dailyStarlanguageTrend=\{/); }); test("D3: daily entry uses MoonStar, credits use Coins, accessible names unchanged", () => { const starterHome = readFileSync(new URL("../src/components/starter-home.tsx", import.meta.url), "utf8"); const page = readFileSync(new URL("../src/app/(app)/page.tsx", import.meta.url), "utf8"); + const credits = readFileSync(new URL("../src/components/credit-balance-button.tsx", import.meta.url), "utf8"); assert.match(starterHome, /