deerflow2/.planning/phases/06-/06-05-SUMMARY.md

119 lines
5.5 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: 06-
plan: 05
subsystem: testing
tags: [mentions, references, playwright, dropdown, regression]
requires:
- phase: 06-03
provides: Phase 06 回归基线与验证缺口
provides:
- 引用上限与去歧义展示合同对齐 requirement 10
- DF-INPUT-008 稳定验证 stale toast 与提交不中断
- DF-INPUT-009 回归场景稳定化10 个成功 + 第 11 个阻止)
- toast/候选面板定位 helper 去 flaky 化
affects: [06-UAT, input-box, e2e, mention-picker, thread-submit]
tech-stack:
added: []
patterns: [stable-e2e-locators, deterministic-toast-assertion, retry-open-picker]
key-files:
created:
- .planning/phases/06-/06-05-SUMMARY.md
modified:
- frontend/src/components/workspace/input-box.tsx
- frontend/src/core/threads/hooks.ts
- frontend/tests/e2e/input-and-compose.spec.ts
- frontend/tests/e2e/support/chat-helpers.ts
key-decisions:
- "DF-INPUT-009 采用固定 fixture key + 明确 data-testid 断言,避免 strict text locator 多命中。"
- "DF-INPUT-008 改为验证 stale toast + runs/stream 提交请求 + 输入框清空,避免依赖聊天区回显时序。"
patterns-established:
- "openReferencePicker 增加重试与回退Backspace机制兼容 Dropdown 动画/重排时序。"
- "引用上限回归按 1..10 逐步计数断言,再验证第 11 次被阻止。"
requirements-completed: [ATREF-01, ATREF-02, ATREF-03, ATREF-04]
duration: 24min
completed: 2026-04-15
---
# Phase 06 Plan 05: Verification Gaps Closure Summary
**Phase 06 最后一个 gap-closure 计划已收口:输入框引用合同重新对齐 requirement=10DF-INPUT-008/009 都已变成可重复运行的稳定回归。**
## Performance
- **Duration:** 24 min
- **Started:** 2026-04-15T05:06:00Z
- **Completed:** 2026-04-15T06:02:00Z
- **Tasks:** 2
- **Files modified:** 4
## Accomplishments
- `input-box.tsx` 对齐到 requirement `10`,候选层恢复 `DropdownMenu*`chip 与候选都显式展示“文件名 + 类型 + 路径尾段”。
- `hooks.ts` 的 stale toast 文案恢复到 phase 合同值“部分引用文件已失效,已自动移除并继续发送。”。
- DF-INPUT-008 通过 helper + route stub 稳定制造 stale artifact 场景,验证 toast 出现且提交流程继续。
- DF-INPUT-009 使用固定 fixture key、唯一 locator 与串行执行稳定覆盖“10 个成功 + 第 11 个阻止”。
## Task Commits
1. **Task 1: 对齐引用展示合同与上限 10** - `16dca210` (feat)
2. **Task 2: 移除永久 skip 并稳定化 DF-INPUT-008/009 回归** - `88be05ad` (test)
3. **Rule 1 补丁: 收紧 stale-send 回归断言并消除共享线程抖动** - `a91c3c9e` (test)
## Files Created/Modified
- `.planning/phases/06-/06-05-SUMMARY.md` - 记录 plan 05 执行、补丁与最终验证结果。
- `frontend/src/components/workspace/input-box.tsx` - 恢复 `DropdownMenu` 候选链路、10 条上限合同、类型去歧义与稳定测试语义。
- `frontend/src/core/threads/hooks.ts` - stale toast 文案与软失败合同对齐。
- `frontend/tests/e2e/input-and-compose.spec.ts` - DF-INPUT-009 改为稳定 key 驱动的候选选择与计数断言。
- `frontend/tests/e2e/support/chat-helpers.ts` - `openReferencePicker` 增加重试;新增 fixture/stale helper`toastByText` 统一 `.first()`
## Decisions Made
- 不回退 Phase 06 既有 artifact materialization 主链路,只在合同缺口与回归稳定性上追加最小修复。
- DF-INPUT-008 不再保留永久 skip仅在线程环境完全缺失时才允许 helper 层 gate。
## Deviations from Plan
### Auto-fixed Issues
**1. [Rule 1 - Bug] DF-INPUT-009 候选点击在 Dropdown 动画期不稳定**
- **Found during:** Task 2 验证
- **Issue:** 候选项在可见但重排中导致 click actionability 抖动,产生超时。
- **Fix:** helper 增加开启重试;测试改用稳定 key + DOM click + 串行执行与数量递增断言。
- **Files modified:** `frontend/tests/e2e/input-and-compose.spec.ts`, `frontend/tests/e2e/support/chat-helpers.ts`
- **Verification:** `pnpm -s test:e2e --grep "DF-INPUT-007|DF-INPUT-008|DF-INPUT-009"` 通过
- **Committed in:** `88be05ad`, `a91c3c9e`
**2. [Rule 2 - Contract] stale toast 文案与 UI-SPEC 不一致**
- **Found during:** Task 2 验证
- **Issue:** 软失败主链路仍提示“部分引用已失效,已自动移除”,未对齐 phase 约定文案。
- **Fix:** `frontend/src/core/threads/hooks.ts` 两条 submit 链路统一改为“部分引用文件已失效,已自动移除并继续发送。”。
- **Files modified:** `frontend/src/core/threads/hooks.ts`
- **Verification:** `pnpm -s test:e2e --grep "DF-INPUT-008"` 通过
- **Committed in:** `16dca210`
---
**Total deviations:** 2 auto-fixed (Rule 1: bug, Rule 2: contract)
**Impact on plan:** 修复仅针对回归稳定性与合同文案,无范围膨胀,不影响已确认功能链路。
## Issues Encountered
- 共享线程 fixture 在并发 worker 下会互相污染;已将本文件串行化并改为固定 fixture stub。
## User Setup Required
None - no external service configuration required.
## Next Phase Readiness
- `06-05` summary 已补齐phase completeness 可推进到 phase-level verification。
- ATREF-04 对应的自动化护栏已可回归运行007/008/009 全部通过)。
## Self-Check: PASSED
- FOUND: `.planning/phases/06-/06-05-SUMMARY.md`
- VERIFIED: `node --test src/core/threads/hooks.test.ts` 通过
- VERIFIED: `pnpm -s typecheck` 通过
- VERIFIED: `pnpm -s test:e2e --grep "DF-INPUT-007|DF-INPUT-008|DF-INPUT-009"` → 007/008/009 全通过