diff --git a/docs/BUG_HISTORY.md b/docs/BUG_HISTORY.md index fe6211cf..39ef625d 100644 --- a/docs/BUG_HISTORY.md +++ b/docs/BUG_HISTORY.md @@ -3310,11 +3310,26 @@ - 首次发现:2026-08-15 - 最近更新:2026-08-15 - 影响面:初始化出生时间采集、`homepage/new` 生时校正 Case 基线与候选搜索范围、历史 Session 恢复。 -- 用户现象:用户再次新建校正时,系统可能以上一次采用的分钟而不是最初填报时间为中心,并继续继承旧的前后误差;初始化页面还要求用户选择误差分钟或大致时段。 +- 用户现象:用户再次新建校正时,系统可能以上一次采用的分钟而不是最初填报时间为中心,并继续继承旧的前后误差;只有大致时段或完全未知声明的 Profile 也可能被错误当成可创建精确分钟扫描的基线。 - 触发条件:Profile 同时存在 `reported_birth_time`、历史 `active_birth_time` 和 uncertainty,或只有 period/unknown 声明时创建 fresh Case。 - 根因:fresh Case 的范围推导优先使用 `active_birth_time`,再直接读取 Profile uncertainty;初始化模型把用户声明误差和引擎搜索窗口混为同一字段,并允许用 period 或全天范围代替具体初始时间。 -- 修复:初始化 UI 只采集一个具体 `reported_birth_time`,不再提供误差分钟、大致时段、范围线索或跳过入口;新填报的准确时间保存为 `reported + 0/0`,不自动宣称引擎 confirmed。`homepage/new` 只查询和使用 `reported_birth_time`,忽略历史 active minute、uncertainty 与 period;没有合法 reported time 时在调用创建 RPC 前以 `profile_incomplete` fail closed。Case 扫描所需的可移动窗口改为独立的服务器执行策略,目前以填报时间为中心使用前后 15 分钟,不再伪装成用户声明;`intent=session` 继续恢复历史 Case 自身冻结的 baseline/range。 -- 验证:回归覆盖新初始化只展示单一时间输入、`0/0` 持久化但不确认、旧 uncertainty 不影响 fresh range、旧 active minute 不进入 baseline、period/unknown/无具体时间 legacy profile 不得新建、失败前不调用 RPC,以及 session 恢复不读取当前 Profile;与 Focus、receipt 和 migration 回归合并运行 203 passed、0 failed。正式 staging 质量门禁另暴露两个旧测试合同,现已改为锁定“初始化仅填写一个具体时间”和 receipt tools 按真实 terminal receipt 时间排序,不再要求旧的不确定时间入口或字母排序。 +- 修复:新填报的准确时间保存为 `reported + 0/0`,不自动宣称引擎 confirmed;初始化仍允许用户如实声明大致时段或完全未知,但这些声明不能作为 fresh 精确分钟扫描的基线。`homepage/new` 只查询和使用合法 `reported_birth_time`,忽略历史 active minute、uncertainty 与 period;没有合法 reported time 时在调用创建 RPC 前以 `profile_incomplete` fail closed。Case 扫描所需的可移动窗口改为独立的服务器执行策略,目前以填报时间为中心使用前后 15 分钟,不再伪装成用户声明;`intent=session` 继续恢复历史 Case 自身冻结的 baseline/range。 +- 验证:回归覆盖准确时间 `0/0` 持久化但不确认、旧 uncertainty 不影响 fresh range、旧 active minute 不进入 baseline、period/unknown/无具体时间 legacy profile 不得新建、失败前不调用 RPC,以及 session 恢复不读取当前 Profile;初始化入口回归另由 BUG-197 锁定。与 Focus、receipt 和 migration 回归合并运行 203 passed、0 failed。 - 防复发:`reported_birth_time` 是 fresh Case 唯一用户时间基线;`active_birth_time` 只表示已采用的当前排盘时间,不能反向改写新校正起点;用户声明字段、服务器搜索策略与最终 confirmed truth 必须保持分层。 -- 相关记录:BUG-127、BUG-177、BUG-187 +- 相关记录:BUG-127、BUG-177、BUG-187、BUG-197 - 修复版本:本次功能分支提交(精确 SHA 以提交、远程分支与 staging 发布结果为准) + +## BUG-197 | 精确分钟校正前置条件误删不确定和未知出生时间入口 + +- 状态:resolved +- 首次发现:2026-08-15 +- 最近更新:2026-08-15 +- 影响面:初始化“出生日期与时间”表单、移动端资料填写、无准确出生时间用户的普通产品入口。 +- 用户现象:表单只显示“我知道准确出生时间”,原有“我不确定准确时间”、大致时段、补充描述和“完全不清楚,跳过出生时间”全部消失,无法准确填写分钟的用户无法继续。 +- 触发条件:staging 包含 `075c62e5` 后打开未确认出生时间的初始化表单。 +- 根因:BUG-196 修复把“fresh 生时校正 Case 必须有合法 `reported_birth_time`”错误扩大为“初始化表单只能接受具体时间”,同时测试也被改成明确禁止不确定/未知入口,导致业务回归被质量门禁当成正确结果。 +- 修复:恢复“我知道准确出生时间 / 我不确定准确时间”两条一级选择;不确定路径恢复大致时段、可选描述和完全未知跳过入口,未知状态允许返回描述范围。保留 BUG-196 的服务端边界:准确时间继续保存为 `reported + 0/0` 且不自动 confirmed;period/unknown 只能完成资料声明和使用无需分钟的功能,不能创建 fresh 精确分钟扫描。 +- 验证:先把两个错误测试合同改回用户路径合同并确认旧实现稳定失败,再恢复实现后通过;目标回归锁定 `family_exact + period_only` 两个一级选项、period/unknown 的真实组件分支、跳过入口、`reported` 状态及 consultation 的 minute-free 行为。390×844 Chrome 真实点击验证两个一级选项、时段表单、完全未知跳过和返回范围按钮均可见;滚动容器 `overflow-y: auto`,可从 `scrollTop=414` 滚到 `718` 并到达底部,`继续`按钮可进入视口。预览模式的三个 401 来自无登录态的只读背景接口,不影响本表单交互;仍需完成 staging 远端 SHA 验收。 +- 防复发:资料声明完整性和精确分钟校正可启动性必须是两个独立条件;任何 fresh Case 前置条件调整不得删除 period/unknown 资料入口。UI 合同测试必须正向断言两个一级选择、时段选择和跳过路径存在,禁止再用负向断言把产品能力删除写成门禁。 +- 相关记录:BUG-127、BUG-196 +- 修复版本:本次 staging 修复提交(精确 SHA 以远端分支核验结果为准) diff --git a/frontend/src/components/birth-time-intake.tsx b/frontend/src/components/birth-time-intake.tsx index 5a4cdd46..4793b8fc 100644 --- a/frontend/src/components/birth-time-intake.tsx +++ b/frontend/src/components/birth-time-intake.tsx @@ -6,6 +6,7 @@ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@ import { birthTimeConsultationOptionsCopy } from "@/lib/birth-time-consultation-consent"; import { birthTimeDisplayState, + birthTimePeriodOptions, birthTimeSourceDefaults, birthTimeSourceOptions, type BirthTimeDraft, @@ -70,6 +71,9 @@ export function BirthTimeIntakeFields({ value, onPatch }: BirthTimeIntakeProps) const source = value.birthTimeSource; const isConfirmed = value.birthTimeStatus === "confirmed"; const displayState = birthTimeDisplayState(value); + const knowledgeMode = source === "period_only" || source === "unknown" + ? "uncertain" + : source ? "exact" : ""; const usesClockTime = source === "hospital_record" || source === "family_exact" || source === "approximate" @@ -114,16 +118,20 @@ export function BirthTimeIntakeFields({ value, onPatch }: BirthTimeIntakeProps) )} {!isConfirmed &&
- 填写出生时间 -

请填写你初始化提供的具体出生时间。

+ 你对出生时间了解多少? +

不用猜具体分钟,先选一个最符合你的情况的选项。

{birthTimeSourceOptions.map((option) => (