Repository navigation
Commit db6299d
committed
fix: roll back task-side mode writes when the view mode pin write fails,
rebuild re-pinned siblings' tasks
Review-round fixes on the shared code this unit carries: (1) when the
view's durable mode pin write rejected inside handleModeSwitchUnlocked,
the task-history write and the in-memory task mode had already landed and
the caller delivered the submitted message with the new task mode against
the view's unchanged mode and mode-linked API configuration - the failure
now restores the pre-switch task mode and history entry before
rethrowing. (2) rePinViewLocalStateForDeletedProfile updated each
sibling's buffer but not its running task: the posted state prefers the
task's own apiConfiguration, so a conversation in a view pinned to the
deleted profile kept sending the deleted profile's settings - the re-pin
now rebuilds the sibling's API handler with the replacement's settings and
re-points the task's sticky profile name.
Proofs: ClineProvider.spec, sticky-mode (new pin-write-failure rollback
test), and parallel-mode (sibling re-pin test asserts the task handler
rebuild and sticky-name re-point) green; negative controls: dropping the
rollback call reddens exactly the rollback test, dropping the rebuild
reddens exactly the re-pin test, restores byte-exact (hash match); eslint
--max-warnings=0 clean; prettier clean.1 parent 4b28d3d commit db6299d
3 files changed
Lines changed: 123 additions & 2 deletions
File tree
- src/core/webview
- __tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2198 | 2198 | | |
2199 | 2199 | | |
2200 | 2200 | | |
| 2201 | + | |
| 2202 | + | |
| 2203 | + | |
| 2204 | + | |
2201 | 2205 | | |
2202 | 2206 | | |
2203 | 2207 | | |
| |||
2243 | 2247 | | |
2244 | 2248 | | |
2245 | 2249 | | |
| 2250 | + | |
| 2251 | + | |
| 2252 | + | |
| 2253 | + | |
| 2254 | + | |
| 2255 | + | |
| 2256 | + | |
| 2257 | + | |
| 2258 | + | |
| 2259 | + | |
| 2260 | + | |
| 2261 | + | |
| 2262 | + | |
| 2263 | + | |
| 2264 | + | |
2246 | 2265 | | |
2247 | 2266 | | |
2248 | 2267 | | |
| |||
2269 | 2288 | | |
2270 | 2289 | | |
2271 | 2290 | | |
2272 | | - | |
| 2291 | + | |
| 2292 | + | |
| 2293 | + | |
| 2294 | + | |
| 2295 | + | |
| 2296 | + | |
| 2297 | + | |
| 2298 | + | |
| 2299 | + | |
| 2300 | + | |
| 2301 | + | |
| 2302 | + | |
| 2303 | + | |
| 2304 | + | |
| 2305 | + | |
| 2306 | + | |
| 2307 | + | |
| 2308 | + | |
| 2309 | + | |
| 2310 | + | |
2273 | 2311 | | |
2274 | 2312 | | |
2275 | 2313 | | |
| |||
2884 | 2922 | | |
2885 | 2923 | | |
2886 | 2924 | | |
| 2925 | + | |
| 2926 | + | |
| 2927 | + | |
| 2928 | + | |
| 2929 | + | |
| 2930 | + | |
| 2931 | + | |
| 2932 | + | |
| 2933 | + | |
| 2934 | + | |
2887 | 2935 | | |
2888 | 2936 | | |
2889 | 2937 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1317 | 1317 | | |
1318 | 1318 | | |
1319 | 1319 | | |
1320 | | - | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
1321 | 1333 | | |
1322 | 1334 | | |
1323 | 1335 | | |
| |||
1342 | 1354 | | |
1343 | 1355 | | |
1344 | 1356 | | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
1345 | 1369 | | |
1346 | 1370 | | |
1347 | 1371 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
627 | 627 | | |
628 | 628 | | |
629 | 629 | | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
630 | 679 | | |
631 | 680 | | |
632 | 681 | | |
| |||
0 commit comments