Repository navigation
Commit 896e057
fix: restore trailing debounce in EventWatcher
The rewritten debounce fired a fixed 50ms after the first change rather than
after changes stopped arriving, turning it into a throttle. A sustained burst
of appends therefore produced one callback per 50ms window instead of one per
quiet period, which is what TestEventWatcher_DebounceCollapses caught under
the race detector.
Reset the window on every new change, as the original per-session timers did,
and cap the total deferral at 500ms so a continuously active session still
refreshes instead of having its window extended forever.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: dac50159-d2c8-4ade-920a-333a51fc9ce31 parent deebcef commit 896e057
1 file changed
Lines changed: 34 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
20 | 25 | | |
21 | 26 | | |
22 | 27 | | |
| |||
265 | 270 | | |
266 | 271 | | |
267 | 272 | | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
268 | 276 | | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
273 | 300 | | |
274 | 301 | | |
275 | 302 | | |
| |||
0 commit comments