Register the P12 spec and plan in the ROADMAP doc index, add the P12 batch row, and update two backlog lines that this batch's measurements settled: - The 'mobile header / hamburger menu' backlog entry carried since P9-B is falsified and removed: nav content width is only 74-158px and measures zero horizontal overflow at 320/360/375/412/768/1280px. Building it would have shipped a hamburger menu nobody needs. - Nav links wrapping per-character at phone widths stays parked pending a design decision, not a CSS tweak: it is cosmetic only (no overflow, no clipping, no lost function), whitespace-nowrap costs +11px at 320px, and all seven gap-reduction variants measured fail at 320px + long name because logo 77px + nowrap nav 138-158px + truncated name 96px do not fit. It competes for the same pixels as the header fix. - The P11 polish backlog is partially retired: three of P9-B's four items plus P11-N5/N6 are closed by this batch; the remaining nine P11 minor notes are documentation-only with no actionable change. Merged and pushed: crearte e59a171 (0.25.0), crearte-server d56c593 (0.17.1), crearte-deploy 529a988 (0.7.1). Three task-level reviews plus a whole-branch final review verdict APPROVE with notes, zero critical and zero important; all notes adjudicated before merge. The final reviewer independently reproduced three mutations rather than accepting the controller's claims.
6.4 KiB
6.4 KiB
P12 窄屏溢出修复与打磨批 — 实现计划
- spec:
docs/specs/2026-10-02-p12-narrow-viewport-overflow-design.md(权威,含全部实测数字与决策理由) - 证据:
crearte/.superpowers/sdd-p12/FINDINGS-survey.md(16 轮 spike 实测归档) - 分支名:三仓统一
fix/p12-narrow-viewport-overflow - 基线:crearte
d25c497(0.24.1)/ crearte-server9da39b6(0.17.0)/ crearte-deploy740958a(0.7.0)
任务切分与波次
派发结构(依 sdd-parallel-dispatch 技能 §1「一仓一写者」):T1/T2/T3/T5 全在 crearte 同仓同分支,共享 git index → 四路并行会争用 .git/index.lock,故合并为单个子代理(四任务文件互不重叠,单写者无内部冲突)。三仓三路并行:crearte 子代理 + 控制者本人做 T6(server)/T7(deploy)——沿用 P11-T5「小而机械、控制者已元素级核实前提」的控制者自做范式(T6 前提已实测:applyLogging 确实回显归一化值、strings 已 import;T7 插入点已定位:validate.yml 第 19-29 行 step 之后)。
T4 从「波次 2」提前为 crearte 子代理的第一步(RED→GREEN):守卫断言的正是修复后状态,先写守卫 → 跑出 RED(复现 spec §1 的 +380/+325/+76/+21/+3 实测数字)→ 再实现 T1/T2/T3 直到 GREEN。好处:① 消除 throwaway 验证脚本(不必像勘查期那样写完再删);② RED 输出本身就是「守卫有牙」的证明,无需事后再临时 revert 一处修复来自证;③ 实现者拿到真实反馈而非推断。T5 打磨三项不涉溢出,排在 GREEN 之后。
crearte 子代理(单写者,TDD 顺序)
| 任务 | 仓 | 文件 | spec | 要点 |
|---|---|---|---|---|
| T1 页头用户名截断 | crearte | app/components/AppHeader.vue、app/components/AppHeader.test.ts |
§3.1 / D-A / D-G | summary 改 flex 三件 + max-w-[6rem] + :title;▾ 独立 span 带 aria-hidden;保留 ref="summaryRef"(Esc 回焦依赖) |
| T2 五表格滚动包裹 | crearte | app/views/AdminUsersView.vue、AdminView.vue、AdminAuditView.vue |
§3.2 / D-B / D-C / D-D | 包裹层 relative overflow-x-auto pr-1 pb-1;三处 v-else 上移到包裹层;表格内部(scope/sr-only/data-testid)一字不动 |
| T3 目录排序 + 账号昵称 | crearte | app/components/ResultMeta.vue、app/views/AccountView.vue |
§3.3–3.4 / D-E / D-F | ResultMeta :22 shrink-0→min-w-0(同排另两个 shrink-0 不动);AccountView :190 加 min-w-0 wrap-anywhere |
| T5 打磨三项 | crearte | app/router/index.test.ts、app/components/GameReactions.vue + 其 test、app/components/ToastHost.vue + 其 test |
§3.5(a)(b)(c) | P9B-1 直测 focusMain();P9B-2 动态 aria-label(仅 rated && i===score 分支改写);P9B-4 announcedId 单调比较 + 新单测 |
| T6 配置错误消息钉桩 | crearte-server | src/internal/config/config_test.go |
§3.5(d) | LOG_LEVEL=" BOGUS " 断言 err 含 bogus 且不含原样 BOGUS;先核 strings import 与 applyLogging 现有文案 |
| T7 CI 空默认守卫 | crearte-deploy | .github/workflows/validate.yml |
§3.5(e) | 新 step 三态断言(空默认 / 不得为 CIDR / 覆盖仍生效);本地实跑 run 块含反向验证 |
控制者本人(与 crearte 子代理并行,各自独占一仓)
| 任务 | 仓 | 文件 | spec | 要点 |
|---|---|---|---|---|
| T6 配置错误消息钉桩 | crearte-server | src/internal/config/config_test.go |
§3.5(d) | 前提已核实:config.go applyLogging 错误文案为 fmt.Errorf("config: LOG_LEVEL: invalid value %q", cfg.LogLevel),cfg.LogLevel 已是归一化后的值 → 回显成立,纯补测试;strings 已在 test import 中 |
| T7 CI 空默认守卫 | crearte-deploy | .github/workflows/validate.yml |
§3.5(e) | 插入点已定位:compose job 内第 19 行 step 之后、第 30 行 step 之前;本地实跑 run 块三态(当前通过 / 注入 CIDR 应失败 / 覆盖 10.0.0.0/8 应通过) |
(T4 两层机器守卫已并入 crearte 子代理的第一步,见上。)
验收口径(合并前必跑,全量)
- crearte:
npm run test(基线 626 + 新增)、npm run typecheck、npm run build、npm run build:runtime、npm run e2e(基线 80+1skip + 新增 responsive)、npm run e2e:noauth(基线 4)。脚本名以package.json为准,禁用--if-present(P11 假绿事件)。 - crearte-server:容器化 Go 1.24(
GOPROXY=https://goproxy.cn,direct、GOSUMDB=sum.golang.google.cn、命名卷crearte_gomod/crearte_gocache):gofmt -l .空 /go vet ./...0 /go build ./...0 /go test ./... -count=111 包 ok。 - crearte-deploy:四 profile
config -q;卷名集合与基线逐字相同;T7 守卫脚本本地三态实跑。 - 退出码:管道后一律
set -o pipefail或不管道(P11 三度踩坑)。
纪律(延续 P9-B / P11 教训)
- 派发简报引用的每个数量由控制者预先元素级 grep 核准(P9-B「19 个 th」教训)。
- 简报里对既有代码/环境行为的事实陈述同样要核实(P11 四次被抓)。
- 任务级审查 → 控制者裁定 → 波次末全分支终审(最强模型),终审须独立复跑验收腿并对账。
- 审查依据是 spec §3 全量,不是任务书(P6 D-D 教训:任务书漏列项审查扯不出)。
- 内仓禁 master 直提;合并用
--no-ff;push 不用管道且推后ls-remote非空对账。 - 本批不做的:D4(nav 逐字换行,park 待设计决策)、汉堡菜单(已证伪)、CSP/HSTS/TLS(独立批)、后端校验规则(60 字是既有合法契约)。
挂账处置(随本批记账)
- ROADMAP / 账本中「移动端页头 / 汉堡菜单」→ 标注已证伪删除(nav 内容宽 74–158px,320–1280px 零溢出)。
- D4(nav 链接逐字换行)→ 标注 park:外观级、无溢出无功能损失,修法在 320px 与 D1a 争空间,需设计决策(更短名上限 / 汉堡菜单 / nav 缩写)。
- P9B-3(spec「19 个 th」口径)→ 已在 P9-B 波次内修完,不属本批。
- P11 其余次要 notes(T1 按需回收、T2 注释语言、T2 共享片段唯一性、T3
" warn "未断言 LogFormat、T4 README 窗口口径、T5 过程性陈述)→ 纯留档,无可动手改动,不入本批。