Commit c6b48a9
refactor: convert isUserCollapsingRef to callback pattern
Simplifies collapse handling by using a callback function instead of
a ref parameter:
- Pass callback function to useChatScrollbox instead of ref
- Inline collapse logic into handleCollapseToggle
- Use setTimeout to reset flag after state update
- Remove separate setCollapsedAgentsWithFlag wrapper
- Remove useEffect that was watching collapsedAgents changes
This is cleaner and more explicit about when the flag is checked.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent d0697bb commit c6b48a9
2 files changed
Lines changed: 31 additions & 34 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | 225 | | |
240 | 226 | | |
241 | 227 | | |
242 | 228 | | |
243 | | - | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
244 | 232 | | |
245 | 233 | | |
246 | 234 | | |
| |||
250 | 238 | | |
251 | 239 | | |
252 | 240 | | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
253 | 246 | | |
254 | 247 | | |
255 | 248 | | |
| |||
260 | 253 | | |
261 | 254 | | |
262 | 255 | | |
263 | | - | |
| 256 | + | |
264 | 257 | | |
265 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
266 | 263 | | |
267 | 264 | | |
268 | 265 | | |
269 | | - | |
| 266 | + | |
270 | 267 | | |
271 | 268 | | |
272 | 269 | | |
| |||
629 | 626 | | |
630 | 627 | | |
631 | 628 | | |
632 | | - | |
| 629 | + | |
633 | 630 | | |
634 | 631 | | |
635 | 632 | | |
| |||
655 | 652 | | |
656 | 653 | | |
657 | 654 | | |
658 | | - | |
| 655 | + | |
659 | 656 | | |
660 | | - | |
661 | | - | |
662 | | - | |
663 | | - | |
664 | | - | |
665 | | - | |
666 | | - | |
667 | | - | |
668 | | - | |
| 657 | + | |
| 658 | + | |
669 | 659 | | |
670 | 660 | | |
671 | 661 | | |
| |||
691 | 681 | | |
692 | 682 | | |
693 | 683 | | |
694 | | - | |
| 684 | + | |
695 | 685 | | |
696 | 686 | | |
697 | 687 | | |
| |||
701 | 691 | | |
702 | 692 | | |
703 | 693 | | |
704 | | - | |
705 | | - | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
706 | 703 | | |
707 | 704 | | |
708 | 705 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
| 115 | + | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| |||
0 commit comments