4.6 KiB
4.6 KiB
PROGRESS · 控制台噪音清理(2026-09-16 任务书,2026-09-25 执行)
当前结论
T1–T3 已在本分支做完,未 push。BUG-906 / BUG-907 保持 investigating:定向回归已过,没有 staging 控制台或 Network 证据,不标 resolved。第三条 reportAllChanges … startTime 未处理。
- 实施基线:
514951d7(origin/staging,2026-09-25 已 fetch)。任务书成文基线05cf20fb只作事故实证。 - 分支 / 工作树:
codex/console-noise-20260916/G:\Ferti\Jyotisha\.worktrees\console-noise-20260916。未 stash,未切分支,未 npm install,未动node_modulesjunction。
做了什么
| 项 | 实现 |
|---|---|
| T1 SVG 属性 | 删掉 western-wheel-svg.tsx 与 vedic-chart-svg.tsx 上的 height="auto"。viewBox 与 width="100%" 未动。没有新增 CSS。 |
| T1 离线导出 | report-chart-export.tsx 在 <svg 上直接写入 height="452"。源码不再包含字符串 height="auto"。抽查序列化开头:<svg xmlns="http://www.w3.org/2000/svg" height="452" viewBox="0 0 400 452" width="100%",hasAuto=false。 |
| T2 空活动任务 | activeLookup 查空返回 new NextResponse(null, { status: 204 })。带 sessionId+requestId 查空仍是 404「咨询请求不存在」,两支不共用原来那一个 if (!data)。 |
| T2 客户端 | fetchActiveConsultationStatus 先判断 status === 204 || status === 404,再 response.json()。带参 fetchConsultationStatus 未改。 |
| T3 记录 | BUG-906、BUG-907;CHANGELOG 一条;状态板该行改为待验收,落点 codex/console-noise-20260916。 |
StaleClientRecovery 只在 chunk load 失败时刷新,不拦 204,因此没有退到 200 + { status: "none" }。未改 page.tsx、layout.tsx、Python、迁移、Skill、workflow。未加 web-vitals,未为 C 类报错加 try/catch。
与任务书的偏离
- 任务书要求补的
.chart-page-western-svg { display: block; width: 100%; height: auto; }已在frontend/src/app/globals.css约 5088 行,由后续星盘页提交写好。.personal-report-chart-svg的height: auto在约 4351 行。本轮只删属性,不重复加规则。 - 行号已漂移,未按旧行号硬改:西洋盘属性约第 35 行(任务书 31);吠陀盘约第 302 行(任务书 98);星盘页字号规则约 4928 行(任务书 4599)。那条字号断言与吠陀导入方式断言都没改。
- 导出函数原来用
.replace(/height="auto"/, 'height="452"')。frontend/tests没有断言这句 replace。删属性后若留着该字符串,frontend/src无法零命中,所以改成在<svg上注入height="452"。Markdown 查看器仍然拿到固定高度。 - 首页已在
frontend/src/app/(app)/page.tsx。本单没改它。 - BUG-906 与 BUG-907 在
origin/staging上仍是空号,用了这两个号,没有新开 1023+。
验证
| 命令 | 结果 |
|---|---|
frontend 里 tsc --noEmit |
0 错,exit 0 |
npm run lint |
0 error,121 warning。告警文件都不在本单 diff 里,因此这就是 514951d7 上的既有数,本轮没有新增。记忆里的 119 是 2026-09-21 归档单的旧基线,当前 staging 已经超过。未顺手修无关 warning。 |
定向 tsx --test(chart-page-view、chart-planet-glyphs、consultation-recovery、consultation-report-export、consultation-stream-recovery、report-export-blocks、personal-report-export、session-lookup-unlisted) |
75/75 pass。其中旧的 status 结构断言、带参 404 恢复断言、导出 golden 与 LF hash 都通过。 |
全量 npm test |
# tests 3767 / pass 3682 / fail 85 / exit 1。新增两条契约在全量里分别是 ok 668 与 ok 1171。85 条 not ok 的原因是既有环境缺口,不是本单断言:重复迁移文件名 20260814025000_personal_report_document_v2.sql、Skill 运行时 symlink EPERM、Windows 路径变成 G:\G:\... 的 ENOENT、staging/deploy 脚本检查失败。没有本单 SVG 或 consult status 用例名。未在改动前重跑同一全量做逐条 diff(不 stash、不切分支)。最近一份记录是慢网单的 3766 / 3677 / 89;# tests 受 BUG-995 影响,不以总数当回归信号。 |
npm run build |
默认 Turbopack 立刻失败:node_modules junction 指向工作树文件系统根之外。next build --webpack 编译与 TypeScript 已过,收集 page data 时 /api/daily-starlanguage 因 Skill symlink EPERM 失败。没有路由表,因此没有证明 / 仍是 Static,也没有首屏 gzip。基线 gzip 未测,不能报 ±2%。 |
未验证:staging 真机控制台、切回标签页时的 204、无痕窗口里 C 类扩展报错是否消失。