Agents: send the queue version so queued-message edits can be ordered against queue_update
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 28/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ệ
- go, react, typescript
Hướng nghiên cứu
Start in coderd/x/chatd/stream_loop.go, where chat.QueueVersion is compared before queue_update is emitted, and trace the PATCH handler for /api/v2/chats/{chat}/queue/{id}, which returns no body. On the client, read runEditQueuedMessage in site/src/pages/AgentsPage/components/ChatConversation/chatQueueReconciliation.ts. Done when the version is carried on the stream event, the PATCH response and ChatMessagesResponse, and the client skips its local editing_since write unless the PATCH version is newer than the last applied one.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
When two clients have the same chat open, the client can show a stale "under edit" marker on a queued message. For example, tab A begins editing a queued row while tab B saves it and ends the edit. If B's queue_update reaches tab A before A's PATCH resolves, runEditQueuedMessage (site/src/pages/AgentsPage/components/ChatConversation/chatQueueReconciliation.ts, added in #29555) still writes A's editing_since marker over the newer queue. No later queue_update repairs it, so tab A shows the wrong row-under-edit state until the next queue change or a reload.
A client-only fix is not safe, because the client cannot order a queue_update against its own PATCH. An update that arrives during the request can come from before the edit (for example, the server promoting another row, which one tab can trigger) or from after it (another tab ending the edit). In both cases the row arrives unmarked. #31651 tried two client-side guards, and each one opened a new race in the single-tab path:
- Skipping the local write when a queue update arrived during the request drops a successful begin. The composer then loses its target and demotes typed text to a new-message draft.
- Refetching the queue instead shares the
chatQueueConvergencequery, so the refetch can join a GET that started before the PATCH. It also keeps a queued save's promise pending after its mutation settled, so text typed during the refetch can be overwritten. An older update that arrives during the refetch also discards it.
The server already tracks chat.QueueVersion and compares it before it emits queue_update (coderd/x/chatd/stream_loop.go), but it does not send the version to the client. Proposed fix:
- Add the queue version to the
queue_updatestream event and toChatMessagesResponse. - Return it from
PATCH /api/v2/chats/{chat}/queue/{id}, which today returns no body. - In the client store, record the last applied queue version, and have
runEditQueuedMessagewrite its local marker only when the PATCH's version is newer.
That one comparison removes the stale marker and the races above without a refetch.
Refs #31651
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high
- Ngôn ngữ chính
- Go
- Star
- 17.3k
- Fork
- 1.6k
- Merge trung bình
- 3 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 604
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của coder/coder
-
Agent logs: "Logs overflowed" badge is clipped and its tooltip covers the log linesCó thể đã có người làm @Tyagiquamar đã nhận 15 ngày trước. Đang mởbug dashboard
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
coder/coder#30743 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
OpenAI-Compatible AI provider never uses the Responses APICó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
coder/coder#30070 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
coder/coder#30066 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
coder-desktop
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
coder/coder#30047 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
coder/coder#29968 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
prime-radiant-inc/evener#5901 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 69/100
-
kind/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
kyma-project/serverless#2769 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Update the mise toolsĐang mởready-for-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
hexlet-basics/hexlet-basics#962 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
imapproxy closeForMaintenance grace timer calls clientConn.Close() before closeMaintenanceTransportCó thể đã có người làm @dejanstrbac đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày