Commit b049fae
authored
🤖 fix: auto-refresh ReviewPanel when workspace opened after tool completion (#1242)
When file-modifying tools (`file_edit_*`, `bash`) complete while a
workspace's ReviewPanel is not mounted, the panel now correctly fetches
fresh data on mount instead of using stale cached data.
## Changes
- Track file-modifying tool completion timestamps in WorkspaceStore
- ReviewPanel checks timestamp on mount to skip cache if tools ran while
closed
- Simplified from dual mechanism (callbacks + timestamps) to single
MapStore-based approach
## How it works
1. Tool completes → store timestamp + bump MapStore subscription
2. If panel open: subscription fires → debounced refresh
3. If panel was closed: on mount, detects timestamp → skips cache →
fresh fetch
---
_Generated with `mux` • Model: `anthropic:claude-opus-4-5` • Thinking:
`high`_1 parent 4602709 commit b049fae
File tree
2 files changed
+54
-37
lines changed- src/browser
- components/RightSidebar/CodeReview
- stores
2 files changed
+54
-37
lines changedLines changed: 21 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | 130 | | |
136 | 131 | | |
137 | 132 | | |
| |||
204 | 199 | | |
205 | 200 | | |
206 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
207 | 208 | | |
208 | 209 | | |
209 | 210 | | |
| |||
309 | 310 | | |
310 | 311 | | |
311 | 312 | | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
| 313 | + | |
| 314 | + | |
317 | 315 | | |
318 | 316 | | |
319 | 317 | | |
| |||
422 | 420 | | |
423 | 421 | | |
424 | 422 | | |
425 | | - | |
426 | | - | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
427 | 426 | | |
428 | 427 | | |
429 | 428 | | |
| |||
503 | 502 | | |
504 | 503 | | |
505 | 504 | | |
506 | | - | |
507 | | - | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
508 | 508 | | |
509 | 509 | | |
510 | 510 | | |
| |||
524 | 524 | | |
525 | 525 | | |
526 | 526 | | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
527 | 534 | | |
528 | 535 | | |
529 | 536 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
275 | 277 | | |
276 | 278 | | |
277 | 279 | | |
| |||
399 | 401 | | |
400 | 402 | | |
401 | 403 | | |
402 | | - | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
403 | 410 | | |
404 | 411 | | |
405 | 412 | | |
| |||
1321 | 1328 | | |
1322 | 1329 | | |
1323 | 1330 | | |
1324 | | - | |
1325 | | - | |
| 1331 | + | |
| 1332 | + | |
1326 | 1333 | | |
1327 | | - | |
1328 | | - | |
1329 | | - | |
1330 | | - | |
1331 | | - | |
| 1334 | + | |
| 1335 | + | |
1332 | 1336 | | |
1333 | 1337 | | |
1334 | 1338 | | |
1335 | | - | |
| 1339 | + | |
| 1340 | + | |
1336 | 1341 | | |
1337 | | - | |
1338 | | - | |
1339 | | - | |
1340 | | - | |
1341 | | - | |
1342 | | - | |
1343 | | - | |
1344 | | - | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
1345 | 1351 | | |
1346 | 1352 | | |
1347 | 1353 | | |
| |||
1578 | 1584 | | |
1579 | 1585 | | |
1580 | 1586 | | |
1581 | | - | |
1582 | | - | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
1583 | 1593 | | |
1584 | 1594 | | |
1585 | 1595 | | |
| |||
0 commit comments