Agents: send the queue version so queued-message edits can be ordered against queue_update
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 28/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- go, react, typescript
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Go
- Estrellas
- 17.3k
- Forks
- 1.6k
- Merge medio
- 3 d 13 h
- PR fusionados (30 d)
- 604
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de coder/coder
-
Agent logs: "Logs overflowed" badge is clipped and its tooltip covers the log linesPosiblemente ocupada @Tyagiquamar la tomó hace 15 días. Abiertobug dashboard
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
coder/coder#30743 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
OpenAI-Compatible AI provider never uses the Responses APIQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
coder/coder#30070 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
coder/coder#30066 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
coder-desktop
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
coder/coder#30047 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
coder/coder#29968 · 1 comentario ·
Los mantenedores suelen responder en 2 días
Todos los issues de coder/coder
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
prime-radiant-inc/evener#5901 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 69/100
-
kind/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
kyma-project/serverless#2769 ·
Los mantenedores suelen responder en 1 día
-
Update the mise toolsAbiertoready-for-agent
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
hexlet-basics/hexlet-basics#962 ·
Los mantenedores suelen responder en 1 día
-
imapproxy closeForMaintenance grace timer calls clientConn.Close() before closeMaintenanceTransportPosiblemente ocupada @dejanstrbac la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
Los mantenedores suelen responder en 1 día