Skip to content

Add debounce to ConversationList for improved rendering performance (Vibe Kanban)#1909

Merged
stunningpixels merged 1 commit intomainfrom
vk/3a10-the-virtualizedp
Jan 10, 2026
Merged

Add debounce to ConversationList for improved rendering performance (Vibe Kanban)#1909
stunningpixels merged 1 commit intomainfrom
vk/3a10-the-virtualizedp

Conversation

@stunningpixels
Copy link
Copy Markdown
Contributor

@stunningpixels stunningpixels commented Jan 10, 2026

Summary

Adds a 100ms debounce to the ConversationList component's entry update handler, matching the existing pattern in VirtualizedProcessLogs.tsx.

Changes

  • Added pendingUpdateRef to store the latest pending update data (entries, addType, loading state)
  • Added debounceTimeoutRef to track the debounce timeout for cleanup
  • Wrapped the onEntriesUpdated callback logic in a debounced setTimeout with 100ms delay
  • Added a cleanup effect to clear pending timeouts on component unmount

Why

The ConversationList component receives rapid updates during streaming conversations from the useConversationHistory hook. Without debouncing, each update triggers an immediate state change and re-render, which can cause performance issues with the virtualized list.

By batching these updates with a 100ms debounce (the same delay used in VirtualizedProcessLogs.tsx), we ensure only the latest update is applied, reducing unnecessary re-renders while maintaining a responsive UI.

Implementation Details

The debounce pattern stores pending updates in a ref and only applies the most recent one after the delay expires. This ensures:

  • Rapid consecutive updates are coalesced into a single render
  • The correct scroll modifier is applied based on the final update type
  • Cleanup on unmount prevents memory leaks and stale state updates

This PR was written using Vibe Kanban

… `VirtualizedProcessLogs.tsx` has been successfully rolled out to `ConversationList.tsx`.

## Summary

Added 100ms debounce to `ConversationList.tsx` matching the pattern in `VirtualizedProcessLogs.tsx`:

1. **Added refs** (lines 94-99): `pendingUpdateRef` to store pending updates and `debounceTimeoutRef` to track the timeout
2. **Modified `onEntriesUpdated`** (lines 115-149): Now stores updates in the ref and debounces state updates with a 100ms delay
3. **Added cleanup effect** (lines 107-113): Clears any pending timeout on unmount to prevent memory leaks
@stunningpixels stunningpixels changed the title The VirtualizedProcessLogs.tsx has a debounce, we should roll this out to ConversationList.tsx (vibe-kanban) Add debounce to ConversationList for improved rendering performance (Vibe Kanban) Jan 10, 2026
@vibe-kanban-cloud
Copy link
Copy Markdown

Review Complete

Your review story is ready!

View Story

Comment !reviewfast on this PR to re-generate the story.

@stunningpixels stunningpixels merged commit e2fad0e into main Jan 10, 2026
2 checks passed
@stunningpixels stunningpixels deleted the vk/3a10-the-virtualizedp branch January 10, 2026 11:18
hushhenry pushed a commit to hushhenry/vibe-kanban that referenced this pull request Feb 17, 2026
… `VirtualizedProcessLogs.tsx` has been successfully rolled out to `ConversationList.tsx`. (BloopAI#1909)

## Summary

Added 100ms debounce to `ConversationList.tsx` matching the pattern in `VirtualizedProcessLogs.tsx`:

1. **Added refs** (lines 94-99): `pendingUpdateRef` to store pending updates and `debounceTimeoutRef` to track the timeout
2. **Modified `onEntriesUpdated`** (lines 115-149): Now stores updates in the ref and debounces state updates with a 100ms delay
3. **Added cleanup effect** (lines 107-113): Clears any pending timeout on unmount to prevent memory leaks
brandonvalentino pushed a commit to brandonvalentino/kira-code2 that referenced this pull request Mar 16, 2026
… `VirtualizedProcessLogs.tsx` has been successfully rolled out to `ConversationList.tsx`. (BloopAI#1909)

## Summary

Added 100ms debounce to `ConversationList.tsx` matching the pattern in `VirtualizedProcessLogs.tsx`:

1. **Added refs** (lines 94-99): `pendingUpdateRef` to store pending updates and `debounceTimeoutRef` to track the timeout
2. **Modified `onEntriesUpdated`** (lines 115-149): Now stores updates in the ref and debounces state updates with a 100ms delay
3. **Added cleanup effect** (lines 107-113): Clears any pending timeout on unmount to prevent memory leaks
brandonvalentino added a commit to brandonvalentino/kira-code2 that referenced this pull request Mar 16, 2026
… `VirtualizedProcessLogs.tsx` has been successfully rolled out to `ConversationList.tsx`. (BloopAI#1909)

## Summary

Added 100ms debounce to `ConversationList.tsx` matching the pattern in `VirtualizedProcessLogs.tsx`:

1. **Added refs** (lines 94-99): `pendingUpdateRef` to store pending updates and `debounceTimeoutRef` to track the timeout
2. **Modified `onEntriesUpdated`** (lines 115-149): Now stores updates in the ref and debounces state updates with a 100ms delay
3. **Added cleanup effect** (lines 107-113): Clears any pending timeout on unmount to prevent memory leaks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant