page.tsx 1964 → 1951,正好回到冻结上限。tsc 0 错;lint 0 error / 118 warning;
定向 8 套件 134 项全绿;全量 fail 33 → 31 且无新增;build exit 0、/ 仍 ○ Static;
首屏 gzip +0.14%。
行为逐条核对未变:resolveBootstrapSessionSelection 与 readLoginSessionReturn
整体下沉进 home-cloud-sync 的 resolveLookupBootstrap,BUG-705 的 found /
missing / unavailable 三分支原样;await 后的 aborted 早返回改成抛 AbortError,
与该 effect 既有写法一致,外层 catch 本就放行 AbortError。
BUG-699 / 704 / 705 / 706 / 708 / 709 全部验收通过。
剩余 4 条红全属另一会话的星历 / 星盘页,已由 TASK-readonly-pages-fix-20260916
接手;staging 仍停在 2d7698ea 未部署。另记两条无自动化覆盖的欠账:动了数据库
结构但 test:db 没跑(门禁 workflow 里也没有),以及标题 / updated_at 修补脚本
在 staging 未执行。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0155nFCgCHtoA7jhSDGmZmMu
71 lines
4.6 KiB
Markdown
71 lines
4.6 KiB
Markdown
# PROGRESS · page.tsx 增长冻结修复(2026-09-15)
|
||
|
||
- 执行分支:`codex/rectification-p0-fix-20260915`
|
||
- 工作树:`.worktrees/rectification-p0-fix-20260915`
|
||
- 基线:`origin/staging` @ `4161222b`(代码基线 `f51e494c`)
|
||
|
||
## 做了什么
|
||
|
||
把 BUG-705 的 bootstrap 接线从 `page.tsx` 搬进已有的 `resolveLookupBootstrap`(`frontend/src/lib/home-cloud-sync.ts`)。该函数现在自己做 `resolveBootstrapSessionSelection` + lookup 三分支,`page.tsx` 只留一次 `await` 和两个赋值。
|
||
|
||
三分支语义未改:`found` 并进列表并选中;`missing`(404)才 `SESSION_MISSING_NOTICE` 并清 `?c=`;`unavailable` 保留 URL,提示「这条对话暂时读不到,请稍后重试。」
|
||
|
||
没有改 `chart-view-route.test.ts` 的 `1951` 上限,没有改 `session-lookup-unlisted.test.ts` / `chat-session-url.test.ts` 的任何断言。
|
||
|
||
## page.tsx 行数
|
||
|
||
| | 换行数 |
|
||
| --- | ---: |
|
||
| 父提交 `d3a2c48b` | 1951 |
|
||
| `f51e494c` | 1964 |
|
||
| 本单 | **1951** |
|
||
|
||
`node -e` 实测 1951。`npx tsx --test tests/chart-view-route.test.ts` fail=0。
|
||
|
||
## 测试
|
||
|
||
| 项 | 结果 |
|
||
| --- | --- |
|
||
| `tsc --noEmit` | 0 错 |
|
||
| `npm run lint` | **0 error** / 118 warning(既有) |
|
||
| `tests/chart-view-route.test.ts` | 7/7,含 `page.tsx does not grow` |
|
||
| `tests/session-lookup-unlisted.test.ts` | 3/3,断言未改 |
|
||
| `tests/chat-session-url.test.ts` | 12/12,断言未改 |
|
||
| 全量 `npm test`(本机 Windows) | 3087 条,pass 2998,fail **75**,skipped 14 |
|
||
|
||
全量 TAP 里 `ok 624 - page.tsx does not grow to host the chart page`。本机 fail 75 是 Windows / 无 Docker / SKILL symlink 缺口,不是这条红。Linux 门禁上的目标是 fail 33→32(就少这一条);本机对不上 32/33,不把 75 写成通过。未修另一会话的星历 / 星盘页失败。
|
||
|
||
未新增 BUG 号。未改 `CHANGELOG.md`。
|
||
|
||
## 合入
|
||
|
||
`git push origin HEAD:staging`,核对远端 SHA。
|
||
|
||
## 验收(Claude,2026-09-15,`origin/staging` @ `a38a9415`)
|
||
|
||
**通过。** 本单范围内零未通过项。
|
||
|
||
| 项 | 结果 |
|
||
| --- | --- |
|
||
| `frontend/src/app/page.tsx` 换行数 | `f51e494c` 1964 → **1951**,正好回到冻结上限 |
|
||
| `tsc --noEmit` | 0 错 |
|
||
| `npm run lint` | 0 error / 118 warning(全部既有) |
|
||
| 定向 8 套件(含 `chart-view-route`) | 134 项 **全绿** |
|
||
| 全量 `npm test` | `f51e494c` fail 33 → **fail 31**,无新增失败 |
|
||
| `npm run build` | exit 0;`/` 仍是 `○ Static` |
|
||
| 首屏 JS gzip-9 | 584,476 B(对 `ff5023a2` 583,660 B,**+0.14%**) |
|
||
|
||
修好的两条:`page.tsx does not grow to host the chart page`(本单)、`the ephemeris page is its own route and never grows page.tsx`(另一会话 `a38a9415`)。
|
||
|
||
**行为未变,已逐条核对**:`resolveBootstrapSessionSelection` + `readLoginSessionReturn` 整体下沉进 `home-cloud-sync.ts` 的 `resolveLookupBootstrap`,BUG-705 的三分支(found / missing / unavailable)语义原样保留;原来 `await` 之后那句 `if (controller.signal.aborted) return;` 改成 `throwIfAborted` 抛 `AbortError`,与该 effect 既有写法一致——外层 `catch` 本来就有 `if ((caught as Error).name !== "AbortError" && !controller.signal.aborted)` 的分支,不会把中止渲染成错误态。
|
||
|
||
一处风格备忘(不构成未通过):`page.tsx` 里 `resolveLookupBootstrap` 的调用把两个属性压到同一行以省行数。行为无碍,但下次这个文件再逼近上限时,应当继续往 `lib/` 搬,而不是继续压排版。
|
||
|
||
## 仍然欠着(不属于本单)
|
||
|
||
- **`npm run test:db` 没跑**:`f51e494c` 动了数据库结构(新增 `touch_chat_session_from_rectification_case` 函数与触发器)。验收机无 Docker;`backend-quality-gate.yml` 里也没有 `test:db`,这条至今没有任何自动化覆盖。需要产品在 staging 走 `Migrate Staging Database` 并确认触发器生效。
|
||
- **标题与 `updated_at` 修补脚本未执行**:`frontend/scripts/repair-rectification-session-titles.mjs` 默认只读,staging 未跑,损坏面数字仍为空。
|
||
- **浏览器 / 真机走查**:`docs/testing/rectification-open-identity-20260915.md`、`docs/testing/rectification-tiebreak-card-loss-20260915.md`。
|
||
- **staging 仍未部署**:`deployment.gitCommit` = `2d7698ea`,其后含门禁路径的提交未上线。本单范围已全绿,剩余 4 条红全部属于另一会话的星历 / 星盘页改动(`ephemeris_events failure degrades…`、`gated paths are one list…`、`panchanga still returns…`、`unauthenticated ephemeris requests are 401`),已由 `TASK-readonly-pages-fix-20260916.md`(BUG-710~712)接手。
|
||
|