Spoken and report layers each keep a message-markdown shell and both must call renderProse; login hard-jumps drop from 4 to 3 after the onboarding suggestion effect went away. No product code.
85 lines
5.7 KiB
Markdown
85 lines
5.7 KiB
Markdown
# PROGRESS · 首页主题卡下线 + 聊天回答两层化(2026-09-15)
|
||
|
||
- 执行分支:`codex/chat-reading-load-20260915`
|
||
- 工作树:`.worktrees/chat-reading-load-20260915`
|
||
- 基线:任务书写 `ebd5ba68`;开工时工作树从 `41473261` 拉起;中途并入文档 `899f955d`(任务 2.6 / 任务 5)
|
||
|
||
## 做了什么
|
||
|
||
任务 1:删除首页「从一个主题开始」及 `/api/onboarding` 建议问题链路。问候语、今日星语卡、生时校正卡、出生资料录入链路保留。`guided_topic` 枚举保留并加注释。问候语函数搬到 `frontend/src/lib/starter-greeting.ts`。
|
||
|
||
任务 2:本命回答按第一个 H2 切成口语层 / 完整分析。默认收起。流式时折叠块不渲染 children,副标「正在写…」。复制仍走 `message.text` 全文。
|
||
|
||
任务 2.6:窄屏下三列表仍卡片化;四列及以上在 `.conversation` 里 `width: auto; min-width: max-content` 以触发横滑,并用 `--color-canvas` 渐隐提示。个人报告表格不在范围内。
|
||
|
||
任务 3:口语层定形为一句结论 → 2–3 条短要点 → 一句下一步,≤400 字。`product-voice` / `consultation-thinking-plan` / `skill-binding` / `consult/route` 口径对齐。`VOICE.md` 新增「口语层的形状」。
|
||
|
||
任务 5:全局 `input` / `select` 无条件改为 `--type-body-md`(16px)。`.otp-input` 20px、`.composer textarea` 16px 未动。
|
||
|
||
任务 4:见下表。真机清单 `docs/testing/chat-reading-load-20260915.md`。
|
||
|
||
## BUG-630
|
||
|
||
主题卡发出点已删。`guided_topic` 枚举与 `pinsConsultationDomains` 仍可读回历史会话。走查清单不再可执行。状态板改为「入口已下线,机制保留供历史会话」。
|
||
|
||
## 测试数字
|
||
|
||
| | tests(`test(` 声明) | TAP 全量 | 说明 |
|
||
| --- | ---: | --- | --- |
|
||
| 基线 `origin/staging` | 3186 | 本机全量 TAP 无法当作门禁数字 | Windows 上 skill 包 `EPERM` symlink、Docker/DB、`G:\\G:\\` 路径是环境缺口,全量 fail 不是本轮回归 |
|
||
| 改后工作树 | 3200 | 定向合同 fail=0 | 声明数 +14 |
|
||
|
||
定向套件(本轮合同,fail=0):`chat-answer-split` / `chat-answer-detail` / `chat-reading-load-home` / `chat-reading-load-mobile` / `starter-questions` / `home-bootstrap-reveal` / `onboarding-presentation` / `consultation-domain-registry` / `consultation-entrypoint` / `consultation-voice-contract` / `consultation-technique-audit` / `consultation-thinking-plan` / `chat-markdown-split` / `model-catalog`。
|
||
|
||
`tsc --noEmit` 0 错。`npm run lint` 0 error(存量 warning 未动)。
|
||
|
||
`next build`:编译通过;收集 `/api/daily-starlanguage` 等路由时因 Windows `EPERM` 无法为 `SKILL.md` 建 runtime symlink 而失败。与本轮改动无关。`/` 是否仍 Static、首屏 gzip 留给 Gitea 门禁与 Linux 构建;本机记为环境缺口。
|
||
|
||
## 删 / 增断言
|
||
|
||
删除的文件(整文件):
|
||
|
||
- `frontend/tests/onboarding-route.test.ts`(15)
|
||
- `frontend/tests/onboarding-client.test.ts`(10)
|
||
- `frontend/tests/onboarding-cache-policy.test.ts`(8)
|
||
- `frontend/tests/onboarding-route-fake.ts`
|
||
- `frontend/tests/starter-theme-layout-contract.test.ts`(1)
|
||
|
||
`starter-questions.test.ts`:删除 `keeps starter questions visible while the user edits a draft`。领域注册表两条搬到 `consultation-domain-registry.test.ts`。今日星语卡测试改名,去掉 `guided_topic` 点击断言。
|
||
|
||
新增:
|
||
|
||
- `chat-answer-split.test.ts` 26
|
||
- `chat-answer-detail.test.ts` 10
|
||
- `chat-reading-load-home.test.ts` 6
|
||
- `chat-reading-load-mobile.test.ts` 7
|
||
|
||
既有断言三栏(摘):
|
||
|
||
| 位置 | 原值 | 新值 | 原因 |
|
||
| --- | --- | --- | --- |
|
||
| `home-bootstrap-reveal` prepare 守卫 | 3(含 onboarding) | 2 | 建议问题请求已删 |
|
||
| `bootstrapPrepareSettled` | 含 `onboardingSettled` | 只等星语 / 入口摘要 / 校正会话 | 同上 |
|
||
| `model-catalog` | 断言 `/api/onboarding` + `getOnboardingAgent` | 不再覆盖该路由 | 接口已删 |
|
||
| `consultation-voice-contract` | 切 `onboardingInstructions` | 断言该常量不存在 | onboarding agent 已删 |
|
||
| `chat-markdown-split` | `renderMarkdown(spoken)` | `renderProse(spoken, renderMarkdown)` | 口语层与报告层共用解析 |
|
||
| 全局 input 字号 | `--type-body-sm` | `--type-body-md` | 任务 5,iOS 聚焦放大 |
|
||
|
||
## 偏离
|
||
|
||
- `grep guided_topic frontend/src` 仍会命中 `personal-report-generation.ts` 的 `guided_topics`(复数,报告模块,不是入口枚举)。发出点已无。
|
||
- 任务 5 选无条件 16px,不是 `(pointer: coarse)`。
|
||
- 任务 2.6 横滑提示用 `--color-canvas` 渐隐,深色主题同 token。未让步。
|
||
- 本机 `next build` / 全量 `npm test` 的失败是 Windows 环境缺口,不是产品回归。
|
||
- 浏览器与 iPhone 真机项见 `docs/testing/chat-reading-load-20260915.md`,不得写成通过。键盘遮挡见 `docs/testing/ios-keyboard-composer-20260915.md`,本轮不修。
|
||
|
||
## 未做
|
||
|
||
`TASK-mobile-touch-and-breakpoints-20260915.md`(BUG-695~697)按任务书必须排在本轮合入 staging 之后,本提交不含。
|
||
|
||
## 验收补正(2026-09-15)
|
||
|
||
Linux 门禁实测(相对本机 Windows 环境缺口):`tsc --noEmit` 0 错;`npm run lint` 0 error / 120 warning;测试声明 基线 `ebd5ba68` 3214 → 改后 3232;`npm run build` exit 0,`/` 为 `○ Static`;首屏 JS gzip-9 585,246 B → 583,660 B(−0.27%)。全量失败 27 → **29**。
|
||
|
||
多出来的两条是既有契约没跟着改:`chat-bundle-splitting-contract` 的 `message-markdown` 包裹数仍锁 1,以及 `plainParagraphs(spoken)` 字面量;`chat-navigation-a11y-contract` 的 `window.location.assign("/login")` 仍锁 4。本机当时把全量 TAP 记成 Windows 缺口,所以没看到。修复见 `TASK-chat-reading-load-fix-20260915.md`。
|