Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Error banner stays after the server connection recovers

Đang mở Phù hợp với người mới
#51 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@charan-rathore đang làm issue này rồi.

Từ ngày 4/10/2026.

  • #73 của @charan-rathore — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
88/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript, vite
Lĩnh vực
frontend

Hướng nghiên cứu

Bắt đầu trong src/client/App.tsx, tập trung vào refresh() và các cập nhật trạng thái lỗi. Tái hiện vấn đề bằng cách chạy Vite và API riêng biệt, dừng rồi khởi động lại API, sau đó chờ polling thành công. Được xem là hoàn tất khi banner kết nối biến mất sau khi /api/workspace trả về 200, trong khi các lỗi không liên quan như "Could not save." vẫn hiển thị.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Steps

  1. Run the API and Vite as separate processes, so that stopping one does not stop the other (npm run dev uses concurrently -k, which stops both):
    • npx vite
    • node --env-file-if-exists=.env --import tsx src/server/index.ts
  2. Open http://127.0.0.1:5173 and stop only the API process. Wait ~7 s (the app polls every 3 s).
  3. 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.

Ngôn ngữ chính
TypeScript
Star
2.8k
Fork
344
Merge trung bình
7 giờ 8 phút
Pull request đã merge (30 ngày)
10

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của CopilotKit/OpenDots

Tất cả issue của CopilotKit/OpenDots

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.