---
phase: 03-legacy-visual-alignment-pass
plan: 02
type: execute
mode: gap_closure
wave: 2
depends_on:
- 03-PLAN.md
- 03-UAT.md
files_modified:
- frontend/playwright.config.ts
- frontend/src/hooks/use-selected-skill-listener.ts
- frontend/src/core/skills/api.ts
- frontend/tests/e2e/welcome-and-routing.spec.ts
- frontend/tests/e2e/support/chat-helpers.ts
autonomous: true
requirements:
- UI-02
- TEST-01
must_haves:
truths:
- "welcome-and-routing 核心路径不再因后端 500 直接失败,测试可稳定产出可解释结果。"
- "lint 阻塞错误归零(至少当前 2 个 error 必须清除)。"
- "Phase 3 的已知 gap 被收敛为可验证修复项。"
artifacts:
- path: ".planning/phases/03-legacy-visual-alignment-pass/03-UAT.md"
provides: "Gap 输入来源(3 项问题)"
- path: "frontend/playwright.config.ts"
provides: "lint error 修复"
- path: "frontend/tests/e2e/welcome-and-routing.spec.ts"
provides: "E2E 路由场景稳定性验证"
---
基于 03-UAT 的失败项执行 gap closure,优先消除 blocker:
1) /history 500 导致的关键交互失败;
2) welcome-and-routing 四个用例失败;
3) lint 的阻塞错误。
@.planning/phases/03-legacy-visual-alignment-pass/03-UAT.md
@.planning/phases/03-legacy-visual-alignment-pass/03-SUMMARY.md
@frontend/src/core/skills/api.ts
@frontend/src/hooks/use-selected-skill-listener.ts
@frontend/tests/e2e/welcome-and-routing.spec.ts
@frontend/tests/e2e/support/chat-helpers.ts
@frontend/playwright.config.ts
Task 1: 修复 lint 阻塞错误并保持行为不变
frontend/playwright.config.ts
frontend/src/components/workspace/input-box.tsx
修复当前 lint 的 error 级问题;warning 可暂留但需记录。
cd frontend && npm run lint
Task 2: 收敛 welcome-and-routing 失败路径
frontend/tests/e2e/welcome-and-routing.spec.ts
frontend/tests/e2e/support/chat-helpers.ts
将后端 500 相关失败路径显式化:
- 若服务端返回 5xx,测试输出清晰原因并归类;
- 对可前端规避的请求路径增加保护,避免无意义级联失败。
cd frontend && npm run test:e2e -- welcome-and-routing.spec.ts
Task 3: 修复 /history 500 触发链上的前端问题
frontend/src/hooks/use-selected-skill-listener.ts
frontend/src/core/skills/api.ts
frontend/src/components/workspace/chats/use-thread-chat.ts
针对 UAT 报告的 /history 500,定位前端请求触发条件与容错分支:
- 规避无效参数触发;
- 增加错误兜底,避免导致路由关键场景直接失败。
cd frontend && npm run test:e2e -- welcome-and-routing.spec.ts
1. lint 无 error 级阻塞。
2. welcome-and-routing 失败数显著下降,剩余失败具备可定位后端证据。
3. 03-UAT 的 3 个 gap 至少完成 root cause 与修复状态更新。