fischer-agentkit/docs/residual-review-findings/feat-ui-ue-enhancement.md

2.8 KiB
Raw Permalink Blame History

Residual Review Findings — feat/ui-ue-enhancement

Run context: ce-code-review mode:agent, run_id 20260701-122351-b8e97648 Branch: feat/ui-ue-enhancement Base: 521f573 (origin/main) Date: 2026-07-01

Residual Review Findings

以下 actionable findings 未在 Step 5 应用,需要后续处理:

  • P1 | src/agentkit/experts/_phase_executor.py:241 | expert_step 流式事件 payload 缺少 expert_name/expert_color/content/step 字段,与前端 WsServerMessage 契约不匹配,产生损坏的占位消息 | autofix_class: manual, owner: downstream-resolver
  • P2 | src/agentkit/core/config_driven.py:693 | execute_stream 绕过 execute(),未注册 CancellationToken流式任务无法被 cancel_task() 协作式取消 | autofix_class: gated_auto, owner: downstream-resolver, requires_verification: true
  • P2 | src/agentkit/experts/orchestrator.py:293 | team_synthesis 流式中断后留下孤儿 streaming milestone 占位(无终结事件),前端永久转圈 | autofix_class: manual, owner: downstream-resolver
  • P2 | src/agentkit/server/frontend/src/stores/chatStream.ts:880 | team_synthesis_chunk 占位匹配缺少 synthesis_id 去重,可附身到上一次孤儿 milestone | autofix_class: manual, owner: downstream-resolver

Advisory findings (report-only)

  • P2 | _phase_executor.py | 三个流式 handler 方法存在大量重复代码_handle_rewoo_stream/_handle_plan_exec_stream/_handle_reflexion_stream
  • P2 | config_driven.py:856 | 同步 _handle_react 未复用 _build_llm_messages存在漂移风险
  • P2 | chatStore.ts:489 | deleteMessage 仅前端隐藏,无 UI 提示用户消息会在重新同步后恢复
  • P3 | base.py:177 | execute_stream 缺少 on_task_start/on_task_complete/on_task_failed 生命周期钩子调用
  • P3 | config_driven.py:686 | ConfigDrivenAgent 流式分派逻辑无单元测试
  • P3 | chatStore.ts:1751 | hasReply 守卫仅检查紧邻下一条消息,无法覆盖跨消息回复场景
  • P3 | chatStream.ts:1904 | per-token 字符串拼接在热路径上为 O(n²) 分配V8 rope strings 优化,影响有限)
  • P3 | ThinkingBlock.vue:136 | summary computed 依赖 content.length每 token 重算
  • P3 | UserBubble.vue:1640 | 每个 bubble 挂载独立 document touchstart 监听器

Applied in Step 5

  • P0 fix | chat.py:144 | _VALID_TEAM_EVENT_TYPES 添加 expert_result_chunk/expert_result_chunk_reset/team_synthesis_chunk
  • P0 fix | _phase_executor.py:246 | final_answer 不重复累积 token 内容(避免内容翻倍)
  • P2 fix | _phase_executor.py:278 | 异常处理扩展为 except Exception 兜底(捕获 LLMProviderError 等)
  • Test fix | test_phase_executor_streaming.py | 3 个测试更新/新增以符合 ReActEngine token+final_answer 合约