Home

mweinbach / agent-coworker

publicmweinbach/agent-coworker
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

perf: optimize desktop ui rendering and server streaming architecture

2 months ago

fa5a8cc
Authored
Max Weinbach7/21/2026, 10:11:19 PM
- Optimize SocketSendQueue queue eviction to O(1) property checks without JSON parsing under backpressure
- Micro-batch streaming token deltas in 16ms windows to reduce WebSocket frame overhead
- Defer tool input schema validation until stream completion
- Add WeakMap caching for desktop activity group render items to eliminate redundant re-renders
- Isolate live timer clock updates into dedicated LiveTimerLabel component
- Memoize Streamdown markdown props and citation map calculations
- Add stress test coverage for queue backpressure and UI component isolation

Parent00a13e2

46 files changed
  • apps/desktop/src/App.tsx+2−2
  • apps/desktop/src/ui/ChatView.tsx+6−0
  • apps/desktop/src/ui/chat/ActivityGroupCard.tsx+63−33
  • apps/desktop/src/ui/chat/ChatFeed.tsx+4−2
  • apps/desktop/src/ui/chat/activityGroups.ts+13−1
  • apps/desktop/src/ui/markdown/DesktopMarkdown.tsx+71−42
  • apps/desktop/test/app-jsonrpc-disposal.test.tsx+20−6
  • apps/desktop/test/jsdomHarness.ts+47−6
  • apps/desktop/test/live-timer-label-isolation.test.tsx+114−0
  • apps/desktop/test/memory-page.test.ts+1−1
  • apps/desktop/test/model-stream-mapper.test.ts+3−1
  • apps/desktop/test/providers-page.test.ts+1−1
  • apps/desktop/test/streamdown-props-stability.test.tsx+113−0
  • src/cli/repl/stateStore.ts+2−6
  • src/server/canvasDocumentPersistence.ts+10−14
  • src/server/projection/conversationProjectionAssistant.ts+11−3
  • src/server/projection/conversationProjectionReasoning.ts+16−7
  • src/server/projection/conversationProjectionSessionEvents.ts+9−2
  • src/server/projection/conversationProjectionStreamUpdates.ts+66−5
  • src/server/projection/conversationProjectionTools.ts+5−1
  • src/server/projection/conversationProjectionTypes.ts+2−0
  • src/server/runtime/SocketSendQueue.ts+19−16
  • src/server/session/turnExecution/runTurnInvocation.ts+15−12
  • src/server/transcriptInbox.ts+37−15
  • src/shared/modelStream.ts+5−1
  • src/shared/modelStreamReplay.ts+1−1
  • src/skillImprovement/JobStore.ts+17−7
  • test/canvasDocumentPersistence.test.ts+2−1
  • test/chaos/sendQueue.stress.test.ts+187−0
  • test/default-global-skills.test.ts+15−15
  • test/jsonrpc/flow.journal.test.ts+10−3
  • test/modelStreamReplay.test.ts+0−1
  • test/platform/fs.test.ts+5−4
  • test/repl.multiline.test.ts+4−4
  • test/repl.port.test.ts+5−2
  • test/research/research.harness.ts+5−0
  • test/research/research.service.core.test.ts+19−18
  • test/research/research.service.followup.test.ts+9−8
  • test/research/research.service.resume.test.ts+6−5
  • test/research/research.service.sources.test.ts+6−5
  • test/server.jsonrpc.test.ts+3−0
  • test/session.stream-pipeline.test.ts+3−2
  • test/skillImprovement.improver.test.ts+5−2
  • test/skillImprovement.jobStore.test.ts+1−1
  • test/task-mode.persistence.test.ts+25−13
  • test/webDesktopRoutes.test.ts+23−8