Merge codex/report-export-dialog-polish-20261021 (#90) into staging
This commit is contained in:
@@ -37016,3 +37016,19 @@
|
||||
- 复发自:无。
|
||||
- 修复版本:分支 `codex/synastry-staging-fix-20261021`。
|
||||
|
||||
## BUG-1409 | 导出弹窗把「没有英文」写成常驻说明,选中态没有主题色
|
||||
|
||||
- 状态:resolved(待 staging 真机复测)
|
||||
- 首次发现:2026-10-21
|
||||
- 最近更新:2026-10-21
|
||||
- 影响面:个人报告导出弹窗
|
||||
- 用户现象:英文版不可用时,弹窗里多一行灰字占位置。整篇 / 自选、勾选框和弹窗里的中英切换,选中和没选中都偏灰,不好分。
|
||||
- 触发条件:打开导出弹窗。英文版状态是没生成成功,或报告生成于英文版上线前。选中「整篇报告」「自选章节」、勾选章节,或在弹窗里切换中文 / English。
|
||||
- 根因:2026-09-30 把「为什么没有英文」写成了面板里的常驻说明。BUG-1078 为了躲开深色模式下 `--color-action-soft` 的深红褐色块,把选中态改成了中性灰加黑字。
|
||||
- 修复:英文不可用时,打开弹窗在 `showModal()` 之后用 `notifyInfo` 提示一次(固定 id `report-export-english`),弹窗内不再写这两句。选中描边、圆点、勾选框用 `--color-action-strong`,语言分段的选中文字用 `--color-action`,底色保持中性。英文可用时「建议选 English」仍留在语言选项下面。页面顶栏的中英切换没改。
|
||||
- 验证:`frontend/tests/report-export-drawer.test.tsx`、`frontend/tests/report-english-edition.test.tsx`、`frontend/tests/report-buttons-scope-20260928.test.ts`。
|
||||
- 防复发:上述测试锁定「每次打开只提示一次、弹窗内没有这两句」以及「选中规则不得出现 `--color-action-soft` / `--color-action-fill`」。
|
||||
- 相关记录:BUG-1078、BUG-1079、BUG-1121。issue #90。
|
||||
- 复发自:无。本条推翻 DESIGN.md「Selected states use `--color-canvas-muted` + `--color-ink`」这一句;BUG-1078 的主语(导出面板选中态不得用 `--color-action-soft` 深色块)保留。
|
||||
- 修复版本:分支 `codex/report-export-dialog-polish-20261021`。
|
||||
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
# 进度:导出弹窗提示与选中态(2026-10-21)
|
||||
|
||||
英文不可用时,打开导出弹窗会在顶部提示一次,弹窗里不再留那两句。选中态的描边、圆点和勾选框改用主题色,底色保持中性。英文可用时,「建议选 English」仍在语言选项下面。页面顶栏的中英切换没有改。
|
||||
|
||||
## 基线
|
||||
|
||||
- 开工时 `origin/staging` = `9812f31737b9e9fdecc75952b1bac1558333c685`。任务书里写的 `bd3ce0e7b` 之后,staging 上又有纯文档提交。
|
||||
- 分支 `codex/report-export-dialog-polish-20261021`,工作树 `.worktrees/report-export-dialog-polish-20261021`。
|
||||
- 另开一份干净基线工作树没有成功:路径过长,写不下 `sealed_holdout_rerun_cross_midnight_2026_09_20.final.freeze.json`。所以没有单独的基线测试数字。本分支上没改过的用例是通过的。
|
||||
|
||||
## 断言三栏
|
||||
|
||||
| 文件 | 原值 | 新值 | 原因 |
|
||||
| --- | --- | --- | --- |
|
||||
| `frontend/tests/report-buttons-scope-20260928.test.ts` | 范围卡和语言分段 `doesNotMatch(/--color-action-soft\|--color-action\b/)`,并且 `match(/--color-ink\|--color-canvas/)` | 四条选中规则不得含 `--color-action-soft` / `--color-action-fill`;描边、圆点、勾选框和语言分段用 `--color-action-strong`(文字用 `--color-action`);底色只许 `transparent` / `--color-canvas*`,勾选框小方块的底可以是 `--color-action-strong` | issue #90 推翻 DESIGN 那一句。旧正则会把 `--color-action-strong` 判成违规。BUG-1078「不得用 soft / fill 深色块」仍在 |
|
||||
| `frontend/tests/report-english-edition.test.tsx` | legacy 时弹窗正文含「重新生成即可获得中英两版」 | 正文不含该句;`toast.info` 一次,文案为该句,id 为 `report-export-english`;仍没有 English 选项;英文可用时仍有「建议选 English」 | 说明改成打开时的顶部浮层 |
|
||||
|
||||
## BUG 编号
|
||||
|
||||
这份 `docs/BUG_HISTORY.md` 在 staging 上的最大号是 BUG-1403。#85 未合入分支已经写到 BUG-1407,任务书把 1404 起留给 #85。#86 未合入分支另写了一个内容不同的 BUG-1404。本单用 **BUG-1408**,追加在文件末尾。文件约第 18099 行还有一份重复的 Bug History,按任务书没有去重。 合入 staging 时 Claude 改为 **BUG-1409**(#85 分支的 T11 已用 1408)。
|
||||
|
||||
## 检查
|
||||
|
||||
| 检查 | 命令 | 结果 |
|
||||
| --- | --- | --- |
|
||||
| tsc | `frontend\node_modules\.bin\tsc --noEmit -p frontend` | 退出码 0 |
|
||||
| lint | 在 `frontend` 下 `npm run lint` | 0 error,122 warning。改过的四个文件单独 lint 没有输出 |
|
||||
| 导出弹窗 | `node node_modules/tsx/dist/cli.mjs --test tests/report-export-drawer.test.tsx` | 8 pass,0 fail |
|
||||
| 英文版 | 同上 `tests/report-english-edition.test.tsx` | 10 pass,0 fail |
|
||||
| 选中态 | 同上 `tests/report-buttons-scope-20260928.test.ts` | 6 pass,0 fail |
|
||||
| 类名 | 同上 `tests/class-name-definition-contract.test.ts` | 3 pass,0 fail |
|
||||
| 深色 | 同上 `tests/dark-theme-contract.test.ts` | 5 pass,0 fail |
|
||||
| 色板 | 同上 `tests/design-token-contract.test.ts` | 4 pass,1 fail |
|
||||
| 隐私 | `.worktrees/agent-loop/.venv` 的 `python -m pytest tests/test_repo_privacy_markers.py -q` | 62 passed |
|
||||
|
||||
六份前端测试是一次一起跑的:37 条里 36 过、1 失败、0 cancelled。失败的那条是 `design-token-contract.test.ts`「every color token used as a Tailwind utility is exposed through @theme」。`sourceFiles` 把 `URL.pathname` 再交给 `path.join`,Windows 上拼成 `G:\G:\Ferti\...`,打开 `chart/page.tsx` 时 ENOENT。这条测试和 `chart/page.tsx` 本单都没改,token 值也没改。Linux 上由 Claude 复验。
|
||||
|
||||
全量 `npm test` 和 `next build` 按分工没有跑。没有动数据库,`test:db` 没跑。
|
||||
|
||||
## 偏离
|
||||
|
||||
- 真机清单只加了一句核对说明,九步没有改。
|
||||
- 工作树的 `frontend/node_modules` 是指到主检出的目录联接,没有单独安装。
|
||||
- 本工作树没有 `.venv`,隐私测试用的是 `.worktrees/agent-loop/.venv`。
|
||||
|
||||
## 没做
|
||||
|
||||
浅色、深色和手机宽度的真机走查。清单在 `docs/testing/report-export-dialog-20261021.md`。
|
||||
@@ -513,7 +513,7 @@
|
||||
| `TASK-synastry-report-chat-fix-20261020.md` | `PROGRESS-synastry-report-chat-20261018.md` | 大运核对要认报告里的「小运」和英文 mahadasha / antardasha;预填文案只留一句 | 已验收 | `549e37b99` |
|
||||
| `TASK-other-subject-birth-time-edit-20261021.md` | — | 其他人的出生时间可以修改(去掉 `chart_profiles_guard_birth` 的填报时间不可改;推翻 people-archive P1 §验收 2 该条;active 锁不变) | 排队(等 #86 合入) | `codex/other-subject-birth-time-edit-20261021`;动表;不进循环 |
|
||||
| `TASK-chart-ascendant-slash-20261021.md` | — | #87 上升状态格「不适用」改「/」+ 悬停 / 点按说明;报告上升行同改并在表下加说明(推翻 10-15 口径) | 待领取(等 #86 合入) | `codex/chart-ascendant-slash-20261021` |
|
||||
| `TASK-report-export-dialog-polish-20261021.md` | — | #90 导出弹窗:英文不可用说明改顶部浮层(每次打开一次);选中态描边 / 圆点 / 勾选框用主题色、底色中性(推翻 DESIGN「Selected states use canvas-muted + ink」,BUG-1078 主语保留) | 待领取(可与 #89 并行) | `codex/report-export-dialog-polish-20261021` |
|
||||
| `TASK-report-export-dialog-polish-20261021.md` | `PROGRESS-report-export-dialog-polish-20261021.md` | #90 导出弹窗:英文不可用说明改顶部浮层(每次打开一次);选中态描边 / 圆点 / 勾选框用主题色、底色中性(推翻 DESIGN「Selected states use canvas-muted + ink」,BUG-1078 主语保留) | 待验收 | `codex/report-export-dialog-polish-20261021` |
|
||||
| `TASK-report-english-han-leak-20261021.md` | `PROGRESS-report-english-han-leak-20261021.md` | #89 个人报告英文版约 4 成整份丢弃:漏译汉字源头补英文孪生字段、修吃空格;200 张固定种子回归 + 快速门 smoke(复发自 BUG-1272);中文逐字节不变 | 待领取(最先做;#91/#92 在后) | `codex/report-english-han-leak-20261021` |
|
||||
| `TASK-chart-dasha-yogini-20261021.md` | — | #88 星盘页大运右栏切换 Chara / Yogini,Yogini 补小运(按比例,内部核对,页面注明未经外部软件核对);Ashtottari 另立单(起运表与 PyJHora 8/12 宿不一致) | 待领取(等 #86、#87 合入) | `codex/chart-dasha-yogini-20261021` |
|
||||
| `TASK-full-data-parity-1-20261021.md` | — | #91 完整数据版补齐(一):A 段渲染(中文附录改中文源、71 小节归 6 章、导出星座名)→ B 段引擎(Yogi 点、标准大运子运、Kalachakra 简化子运、年运三年全展开、36 个月星历、解释补长);不设大小上限 | 待领取(等 #89 合入;T3 与 #90 串行) | `codex/full-data-parity-1-20261021` |
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
环境:`https://staging.jyotisha.chat`,用受控测试账号。需要三类报告各一份:**有英文版**的新报告、**英文版没生成成功**的报告(如有)、**英文版上线前**生成的旧报告。没有某一类就写「无样本」,不算通过。每步在**浅色**、**深色**各走一遍;第 8 步用手机(或桌面浏览器窄到约 390px)。
|
||||
|
||||
2026-10-21 执行核对:步骤没有改。浮层固定 id 是 `report-export-english`,同一次打开只出一次。选中描边、圆点和勾选框用主题色,语言分段的选中文字也用主题色,底色保持中性。
|
||||
|
||||
| # | 操作 | 期望 | 浅色 | 深色 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| 1 | 打开旧报告(英文版上线前),点「导出」 | 屏幕**顶部中间**出浮层「这份报告生成于英文版上线前,重新生成即可获得中英两版。」,约 3 秒自动消失;浮层在弹窗之上、没被遮罩盖住;弹窗里**没有**这句灰字,也没有中文 / English 选项 | | |
|
||||
|
||||
Reference in New Issue
Block a user