deerflow2/.planning/phases/03-legacy-visual-alignment-.../03-02-PLAN.md

111 lines
3.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
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 路由场景稳定性验证"
---
<objective>
基于 03-UAT 的失败项执行 gap closure优先消除 blocker
1) /history 500 导致的关键交互失败;
2) welcome-and-routing 四个用例失败;
3) lint 的阻塞错误。
</objective>
<context>
@.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
</context>
<tasks>
<task type="auto" tdd="true">
<name>Task 1: 修复 lint 阻塞错误并保持行为不变</name>
<files>
frontend/playwright.config.ts
frontend/src/components/workspace/input-box.tsx
</files>
<action>
修复当前 lint 的 error 级问题warning 可暂留但需记录。
</action>
<verify>
<automated>cd frontend && npm run lint</automated>
</verify>
</task>
<task type="auto" tdd="true">
<name>Task 2: 收敛 welcome-and-routing 失败路径</name>
<files>
frontend/tests/e2e/welcome-and-routing.spec.ts
frontend/tests/e2e/support/chat-helpers.ts
</files>
<action>
将后端 500 相关失败路径显式化:
- 若服务端返回 5xx测试输出清晰原因并归类
- 对可前端规避的请求路径增加保护,避免无意义级联失败。
</action>
<verify>
<automated>cd frontend && npm run test:e2e -- welcome-and-routing.spec.ts</automated>
</verify>
</task>
<task type="auto" tdd="true">
<name>Task 3: 修复 /history 500 触发链上的前端问题</name>
<files>
frontend/src/hooks/use-selected-skill-listener.ts
frontend/src/core/skills/api.ts
frontend/src/components/workspace/chats/use-thread-chat.ts
</files>
<action>
针对 UAT 报告的 /history 500定位前端请求触发条件与容错分支
- 规避无效参数触发;
- 增加错误兜底,避免导致路由关键场景直接失败。
</action>
<verify>
<automated>cd frontend && npm run test:e2e -- welcome-and-routing.spec.ts</automated>
</verify>
</task>
</tasks>
<verification>
1. lint 无 error 级阻塞。
2. welcome-and-routing 失败数显著下降,剩余失败具备可定位后端证据。
3. 03-UAT 的 3 个 gap 至少完成 root cause 与修复状态更新。
</verification>
<output>
After completion, create `.planning/phases/03-legacy-visual-alignment-pass/03-02-SUMMARY.md`
</output>