Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta Adatta ai principianti
#15,405 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
1/5
Tempo stimato
1-3 ore
Idoneità per principianti
90/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
frontend

Direzione di ricerca

Inizia in apps/web/src/components/ChatView.tsx, in corrispondenza di backgroundWorkBannerItem, e ispeziona l’espressione dell’icona del banner intorno alla riga 7050; poi esegui tsc --noEmit in apps/web. Il lavoro è completato quando la undefined presentation reference viene risolta usando lo stato di completamento dell’attività in background riportato, il banner viene visualizzato senza arrestarsi e il controllo TypeScript ha esito positivo.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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"
Lingua principale
TypeScript
Stelle
24.8k
Fork
6.4k
Merge medio
2h 31m
PR unite (30g)
475

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di pingdotgg/t3code

Tutte le issue di pingdotgg/t3code

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.