Error banner stays after the server connection recovers
维护者通常 2 天内回复
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 88/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript, vite
- 领域
- frontend
调研方向
从 src/client/App.tsx 开始,重点关注 refresh() 和错误状态更新。分别运行 Vite 和 API,停止并重新启动 API,然后等待轮询成功,以重现此问题。当 /api/workspace 返回 200 后连接横幅消失,同时诸如 "Could not save." 之类的不相关错误仍保持可见时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Steps
- Run the API and Vite as separate processes, so that stopping one does not stop the other (
npm run devusesconcurrently -k, which stops both):npx vitenode --env-file-if-exists=.env --import tsx src/server/index.ts
- Open http://127.0.0.1:5173 and stop only the API process. Wait ~7 s (the app polls every 3 s).
- Start the API process again and wait for a few more polls.
Expected: the connection error disappears once polling succeeds again.
Actual: a red banner ("Server returned an unreadable response.", the non-JSON 502 from the Vite proxy) stays after the API is back (/api/workspace returns 200), until it is closed manually. With the API unreachable directly, the banner reads "Failed to fetch".
Cause: refresh() in src/client/App.tsx calls setError(...) on failure but never clears it on success. setError('') is only called from user-action handlers.
Environment: Node 26.8.1, main at c2569bb (observed in the dev setup above).
Proposal: keep connection errors in separate state and clear only that state when a poll succeeds, so unrelated errors (e.g. "Could not save.") are not wiped by the 3 s poll. I'd be happy to open a small PR for this if you agree with the approach. I'll wait for your go-ahead before starting.
- 主要语言
- TypeScript
- 星标
- 2.8k
- 派生
- 344
- 平均合并
- 1 天 15 小时
- 30 天内合并 PR
- 43
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
CopilotKit/OpenDots 的其他 Issue
-
Page conversation panel overflows horizontally可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
CopilotKit/OpenDots#69 ·
维护者通常 2 天内回复
-
Long page titles are clipped in the page editor可能已有人在做 @charan-rathore 于 4 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
CopilotKit/OpenDots#68 ·
维护者通常 2 天内回复
-
难度 4/5 一周以上 新手友好度 8/100
CopilotKit/OpenDots#123 ·
维护者通常 2 天内回复
-
OpenAI only?未关闭
难度 5/5 一周以上 新手友好度 35/100
CopilotKit/OpenDots#118 ·
维护者通常 2 天内回复
-
难度 4/5 3-5 天 新手友好度 35/100
CopilotKit/OpenDots#111 ·
维护者通常 2 天内回复
查看 CopilotKit/OpenDots 的全部 Issue
相似的 Issue
-
streams:add
难度 1/5 1 小时以内 新手友好度 62/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
walletbeat/walletbeat#1558 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
hawk-digital-environments/HAWKI#438 ·
维护者通常 1 天内回复
-
Bug
难度 2/5 1-3 小时 新手友好度 72/100
GiganticMinecraft/seichi-portal-frontend#1165 ·
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复