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

Stop the whole desktop UI re-rendering on every streaming update

Aperta
#153 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@GoDiao ci sta già lavorando.

Dal 22/10/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

area:desktop area:perf difficulty:2 enhancement help wanted

Summary

During a streaming reply, most of the desktop UI re-renders on every store update. The cause is coarse state updates combined with wide subscriptions:

  • updateSessionIn (desktop/src/stores/chatStore.ts:612-620) creates a new session object on every change.
  • Many components subscribe to that whole object, or to the whole store.

So a single text flush, a thinking delta, or the per-second timer re-renders the sidebar, the composer, the message list and the page itself.

Where it happens

  • Whole session object:
    • pages/ActiveSession.tsx:240
    • components/chat/MessageList.tsx:1222
    • components/chat/StreamingIndicator.tsx:39
    • components/chat/ChatInput.tsx:129
  • No selector at all, so they re-render on any change to any session:
    • components/chat/ChatInput.tsx:127
    • PermissionDialog.tsx:128
    • AskUserQuestion.tsx:64
  • Sidebar: subscribes to every session (components/layout/Sidebar.tsx:69) and rebuilds the running-session set each time (:188-197). So the 1,900-line sidebar re-renders on every delta of every session.
  • Thinking deltas are not batched: text and tool-input deltas go through a 50ms buffer, but thinking deltas update the store on each event (chatStore.ts:1309-1328). Each one rebuilds the whole render model in MessageList and re-renders every tool group through a new toolResultMap.
  • Elapsed timer: increments elapsedSeconds in the session state every second (chatStore.ts:850), which re-renders all of the above for the whole turn.

Tasks

Open to contributors, as sub-issues (comment on one to claim it):

  • #155 Batch thinking deltas like text deltas.
  • #156 Compute the turn's elapsed time in its own component instead of the store.
  • #157 Re-render the sidebar only when the set of running sessions changes.

Maintainer:

  • Add fine-grained selectors for common fields, such as "is this session running" and "this session's messages", and move the composer, message list, page, permission dialog and question card onto them.
  • Pass each tool group its own result instead of the whole toolResultMap.

Done when

  • Each PR shows a before/after measurement: render counts from React Profiler, or a Safari Web Inspector timeline of a streaming reply.
  • No component stops updating when it should. Tests cover the fields each changed component relies on.
  • Desktop tests and typecheck pass.
Lingua principale
TypeScript
Stelle
490
Fork
47
Merge medio
10h 53m
PR unite (30g)
81

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 GoDiao/dreamcoder

Tutte le issue di GoDiao/dreamcoder

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.