fix(web): waiting_input run 应答面板自动出现(SSE 关闭后重拉 interventions) - #42
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题(BL-057 手测发现)
run 在运行中时打开详情 → run 进入 waiting_input(SSE 流关闭)→ 应答面板不自动出现;切换到其他 run 再切回来才显示。
根因
App.tsx中 interventions 只在selectedId变化的 effect 里拉取。SSEonState('closed')刷新 detail 时只更新 detail/fileChanges,没有重拉 interventions——run 恰好在 SSE 关闭时变 waiting_input 时,面板数据为空(显示 No prior requests)。修复
SSE
onState('closed')刷新 detail 后:若新状态为 waiting_input / 可 respond / 带 interventions,立即拉取 interventions 并 setInterventions(与选中 effect 同逻辑)。测试
新增回归测试:run 从 running(SSE 打开)→ emit stream_end → detail 重取变 waiting_input → 断言 '1 pending request' 面板出现 + interventions 请求已发。66 前端测试全过。
附带
前端已重新构建并同步 static,本机 web 已重启提供新构建。