Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[Bug]: ReferenceError: presentation is not defined in ChatView backgroundWorkBannerItem

Đang mở Phù hợp với người mới
#15,405 1 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ó
1/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
90/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ệ
typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Bắt đầu trong apps/web/src/components/ChatView.tsx tại backgroundWorkBannerItem và kiểm tra biểu thức biểu tượng banner quanh dòng 7050, sau đó chạy tsc --noEmit trong apps/web. Được xem là hoàn tất khi undefined presentation reference được giải quyết bằng trạng thái hoàn thành tác vụ nền được báo cáo, banner hiển thị mà không bị crash và bước kiểm tra TypeScript thành công.

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

Mô tả

invalid via-triage
Before submitting
  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.
Area

apps/web

Steps to reproduce
  1. In T3 Code, open any thread that has active background tasks (e.g. background command, dev server, or subagent).
  2. Observe the chat view crashing or failing to render.
Expected behavior

The background work banner renders normally above the composer, with the status indicator dot pulsing only if the background work holds completion.

Actual behavior

The view crashes immediately with ReferenceError: presentation is not defined.

tsc --noEmit in apps/web fails with:

src/components/ChatView.tsx:7050:13 - error TS2304: Cannot find name 'presentation'.

7050             presentation.waiting && "animate-status-pulse",
                 ~~~~~~~~~~~~
Impact

Major degradation or frequent failure

Version or commit

main @ a5b34b25378 (PR #15114)

Environment

macOS / Web / Desktop

Logs or stack traces
ReferenceError: presentation is not defined
    at t3code://app/assets/_chat-qbkAHxVg.js:55:26814
    at Object.useMemo (t3code://app/assets/dist-ChxELPrq.js:26:59806)
    at e.useMemo (t3code://app/assets/Icon-l19w4AjM.js:1:7110)
    at  (t3code://app/assets/_chat-qbkAHxVg.js:55:26645)
    at Eo (t3code://app/assets/dist-ChxELPrq.js:26:47513)
Workaround / Root cause & fix

Introduced in #15114 (commit a5b34b25378). In apps/web/src/components/ChatView.tsx line 7050:

      icon: (
        <span
          className={cn(
            "size-1.5 rounded-full bg-foreground",
            presentation.waiting && "animate-status-pulse",
          )}
          aria-hidden="true"
        />
      ),

presentation was referenced without being declared or assigned in backgroundWorkBannerItem.

The fix is to import backgroundWorkHoldsCompletion from @t3tools/shared/orchestrationV2PendingBackgroundWork and evaluate:

backgroundWorkHoldsCompletion(activeBackgroundTasks) && "animate-status-pulse"
Ngôn ngữ chính
TypeScript
Star
24.8k
Fork
6.4k
Merge trung bình
13 giờ 9 phút
Pull request đã merge (30 ngày)
271

Chuẩn bị môi trường

Mở trong Codespaces

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.

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 pingdotgg/t3code

Tất cả issue của pingdotgg/t3code

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.