ChatThreadList (lista de conversas)

Đang mở
#1,205 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

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
50/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
frontend

Hướng nghiên cứu

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.

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

Mô tả

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

Ngôn ngữ chính
TypeScript
Star
6
Fork
3
Merge trung bình
5 giờ 21 phút
Pull request đã merge (30 ngày)
378

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 codeatlasdev/ui

Tất cả issue của codeatlasdev/ui

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.