Commit 261feaa
committed
🤖 fix: reduce ProjectSidebar re-renders during streaming
ProjectSidebar was re-rendering on every streaming delta and Git status poll,
causing unnecessary UI churn when idling looking at a streaming chat.
Changes:
- Stabilize unreadStatus Map identity in useUnreadTracking
- Only return new Map reference when values actually change
- Prevents ProjectSidebar re-renders when unread state hasn't changed
- Keep Git status interval at 3s for interactive updates
- Reverted temporary increase to 10s to maintain snappy UI feel
- Git status changes don't cause full sidebar re-renders due to
WorkspaceGitStatusIndicator reading from context directly
Performance impact:
- ProjectSidebar only re-renders when inputs that affect rendering change
- Streaming in non-selected workspace no longer causes sidebar churn
- Git status updates remain fast (3s) without dragging parent tree
_Generated with `cmux`_1 parent 539d428 commit 261feaa
2 files changed
+22
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
76 | 77 | | |
77 | | - | |
| 78 | + | |
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
82 | | - | |
| 83 | + | |
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
| |||
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
95 | | - | |
| 96 | + | |
96 | 97 | | |
97 | 98 | | |
98 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
99 | 116 | | |
100 | 117 | | |
101 | 118 | | |
| |||
0 commit comments