ChatThreadList (lista de conversas)

未关闭
#1,205 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
50/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript
领域
frontend

调研方向

The library entry point is packages/ui/src/lib; read the existing VirtualList, ConversationItem, and Popover/Sheet components there first, since the issue expects them to be reused. Build ChatThreadList against the stated props and check the four acceptance criteria with a fixture of 500 threads; confirm the DOM stays under 60 rows, arrow keys and Enter work, the active row has aria-current="true", and non-running rows become disabled while one thread is running. The AC paths are private, so treat them only as behavioral reference.

由索引模型根据 Issue 内容生成。

描述

area:a11y area:components enhancement

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 "ThreadList" 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):

apps/seller/src/components/copilot/thread-switcher.tsx:21-58 (ThreadRow: título truncado, relativeTime, spinner "Respondendo" com aria-label, aria-current); :69 (isEmptyDraft desabilita "Nova conversa"); :103-105 (rótulo do gatilho); :68: outras conversas desabilitadas enquanto uma responde. apps/web/src/components/conversations-admin/thread-list-card.tsx (max-h-[600px]); use-copilot-threads.ts:37-46 (lista inteira, sem paginação).

Defeitos do AC (leitura do código, não executado): - Sem renomear, excluir, buscar ou agrupar por data no seller.

  • Admin carrega todas as conversas de uma vez e filtra no cliente.
  • "Sem título" é o único estado para título vazio.

Proposta

<ChatThreadList threads activeId running onselect onnew> com grupos "Hoje/Ontem/Anteriores", busca com debounce, VirtualList acima de 100 itens, aria-current e ações opcionais onrename, ondelete (confirmação).

Critério de aceite (testável)

  • 500 conversas: menos de 60 linhas no DOM.
  • Setas movem o foco entre linhas e Enter abre.
  • Conversa ativa tem aria-current="true".
  • Enquanto uma conversa responde, as outras ficam com disabled e a que responde mostra "Respondendo" anunciado uma vez.

Mãe: #1089

主要语言
TypeScript
星标
6
派生
3
平均合并
5 小时 21 分钟
30 天内合并 PR
378

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

codeatlasdev/ui 的其他 Issue

查看 codeatlasdev/ui 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。