Skip to content

fix: reduce UI load during streaming sessions#449

Merged
hsteude merged 7 commits into
mainfrom
fix/ui-performance-sse-markdown
Jun 8, 2026
Merged

fix: reduce UI load during streaming sessions#449
hsteude merged 7 commits into
mainfrom
fix/ui-performance-sse-markdown

Conversation

@hsteude

@hsteude hsteude commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • throttle markdown parse/sanitize work during streaming updates
  • avoid rebuilding timeline turns for text-only deltas
  • remove duplicate active-project SSE connection by routing event consumers through SyncProvider
  • remove per-event SSE hot-path logging

Verification

  • bun run build (from app-prefixable)

Closes #445
Closes #446
Closes #447
Closes #448

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR focuses on reducing frontend CPU and overhead during high-volume streaming SSE sessions by consolidating event consumption, throttling expensive markdown work, and avoiding unnecessary recomputation in the chat timeline.

Changes:

  • Routes event/status/question consumers through SyncProvider to avoid duplicate active-project SSE connections and removes per-event SSE hot-path logging.
  • Adds a subscription mechanism to SyncProvider so other contexts (like EventProvider) can consume the same parsed event stream.
  • Introduces throttled markdown parsing/sanitization and attempts to reduce timeline recomputation work during streaming deltas.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
app-prefixable/src/pages/directory-layout.tsx Reorders providers so EventProvider can consume events via SyncProvider.
app-prefixable/src/context/sync.tsx Adds subscribe() for shared SSE event consumption and removes per-event logging.
app-prefixable/src/context/events.tsx Removes its own SSE connection and consumes events through SyncProvider.
app-prefixable/src/components/message-timeline.tsx Adds a “structure” memo intended to limit turn recomputation during text deltas.
app-prefixable/src/components/markdown.tsx Throttles markdown parse/sanitize work during streaming updates.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app-prefixable/src/context/events.tsx
Comment thread app-prefixable/src/context/sync.tsx
Comment thread app-prefixable/src/components/message-timeline.tsx Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Comment thread app-prefixable/src/components/markdown.tsx
Comment thread app-prefixable/src/components/message-timeline.tsx

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Comment thread app-prefixable/src/components/message-timeline.tsx

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Comment thread app-prefixable/src/context/events.tsx
@hsteude hsteude requested review from Copilot and removed request for Copilot June 8, 2026 08:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

@hsteude hsteude merged commit 25c4964 into main Jun 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants