StreamControls (parar, tentar de novo, erro e limites)
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 55/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- typescript
- Bereich
- accessibility, frontend
Rechercherichtung
Start in packages/ui/src/lib: git grep -il "StreamControl" returns nothing, so both components are new; read an existing component such as MessageBubble or Popover to copy the library's props and export conventions. The AC reference paths sit in a private repo and cannot be opened, so the acceptance criteria are the spec. Done means StreamControls and ChatError exported from the package with tests for the four checks: one user question after retry, 409 mapped to run_in_progress, a single role="alert" with focus on the retry button, and the error sound throttled per id.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Versão: @codeatlasdev/ui 4.6.0 · código lido em main (950628f2) · classe: lacuna (migração do AC)
Problema
O AC depende deste comportamento hoje e a lib não o oferece. Sem ele, a migração perde qualidade no desktop, no mobile ou no PWA.
O que a lib já oferece (para não duplicar) e o que falta
Conferido com git grep -il "StreamControl" origin/main -- packages/ui/src/lib (950628f2): nenhum resultado. Peças reaproveitáveis que existem: MessageBubble, VirtualList, ConversationItem, CodeSnippet (./code), CopyButton, Chip/ChipRow, Popover, Sheet, Spinner, toast.
Referência no AC
Caminhos do repo AC (repo privado, só caminho):
packages/ui/src/components/chat/chat-composer.tsx:293-297 (botão Parar); apps/seller/src/hooks/copilot/use-copilot-thread.ts:160-166 (retry); apps/seller/src/components/copilot/chat-messages.tsx:10-26 (ERROR_COPY por regex sobre error.message), :23-24 (fallback "Algo deu errado"), e os dois Callout de "A resposta não foi concluída" e "Erro ao gerar resposta"; apps/seller/src/components/copilot/copilot-provider.tsx:60-66 (som de erro a cada erro).
Defeitos do AC (leitura do código, não executado): - use-copilot-thread.ts:164: retry chama sendMessage({ text }), que acrescenta uma nova mensagem do usuário. A falha anterior fica no histórico: a conversa passa a ter a pergunta duas vezes e o servidor guarda as duas.
ERROR_COPYnão cobre o 409 deseller-chat.ts:72-74("Resposta em andamento nesta conversa."): cai em "Algo deu errado".- Não há limite de uso, quota nem aviso de tokens. O 429 tem texto, mas o que o servidor de fato devolve não é verificado.
- Não há "regenerar" para uma resposta específica: só repete a última pergunta.
Proposta
<StreamControls status onstop onretry onregenerate> e <ChatError code message onretry> que recebe um código (run_in_progress, rate_limited, network, timeout, unknown), não texto livre. onretry remove a falha anterior antes de reenviar, ou reenvia com messageId.
Critério de aceite (testável)
- Após erro e "Tentar de novo", a conversa tem uma única pergunta do usuário (contagem igual antes e depois).
- 409 mostra "Já há uma resposta em andamento nesta conversa." (código
run_in_progress). - Erro é anunciado uma vez (
role="alert") e o foco vai ao botão de tentar de novo. - Som de erro toca no máximo uma vez por falha (throttle por id).
Mãe: #1089
- Vorherrschende Sprache
- TypeScript
- Sterne
- 6
- Forks
- 3
- Ø Merge
- 5 Std. 21 Min.
- Gemergte PRs (30 T.)
- 378
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus codeatlasdev/ui
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
codeatlasdev/ui#1340 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area:a11y area:components bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
codeatlasdev/ui#1336 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
codeatlasdev/ui#1329 ·
Maintainer antworten meist innerhalb von 1 Tag
-
good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
codeatlasdev/ui#1292 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
area:components enhancement good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
codeatlasdev/ui#1198 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in codeatlasdev/ui
Ähnliche Issues
-
bug frontend
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
CivicTechWR/accessible-housing-portal#578 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
nekko-labs/nekko-agent#2998 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Console writes URL credentials to the local log, though AGENTS.md says secrets never reach diskOffen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 86/100
sandbox-quantum/switch#2163 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement ux
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
lolimmlost/aidj#433 ·
Maintainer antworten meist innerhalb von 1 Tag
-
test: ipcShownDialogKeys.test.tsx can fail the unit run with 'window is not defined' after it endsOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag