Repository navigation
Commit 7ff5f14
committed
fix(webview): address the open review findings on the view-state unit
Threads addressed (10/10 on this head), each with the negative control that
was actually run with the production line mutated:
- registerCommands.ts:372 - re-issue the editor group lock on the tracked-panel
reuse path. Control: `if (!lockedTabGroups.has(tabPanel))` -> `if (false)`
fails "re-runs the editor group lock when the first attempt failed".
- registerCommands.ts:478 - fail the tab open when the panel closes while the
provider initializes. Control: `if (closedBeforeInitialized)` -> `if (false)`
fails "fails the open when the panel closes while the provider is
initializing".
- ClineProvider.ts:852 - drop the clear tombstone when the durable clear write
fails. Control: `if (!wasCleared)` -> `if (false)` fails "drops the clear
tombstone when the durable clear write fails".
- ClineProvider.ts:2762 - restore the task history mode and _taskMode when the
shared mode write fails. Control: `if (task && previousTaskMode !== undefined)`
-> `if (false)` fails "restores the task history mode and _taskMode when the
shared mode write fails".
- ClineProvider.ts:3320 - refresh the sibling views only after the compensated
write group committed. Control: re-inserting the pre-fix refresh call after
`if (failedActivation) throw ...` fails "does not refresh the pinned sibling
views when a compensated write of the upsert fails".
- ClineProvider.ts:3454 - fail the deletion when the surviving profile cannot be
read (the idempotent prune path still continues and clears the residue).
Control: `if (previousRecord)` -> `if (false)` fails "fails the deletion and
keeps the record id when the surviving profile cannot be read".
- ClineProvider.ts:3513 - restore the deleted record under its original id.
Control: re-adding `id: _previousId` to the rollback destructure fails the id
assertion of the same test.
- ClineProvider.ts:3577 - run the live sibling re-pin last, after every other
write committed. Control: re-inserting the re-pin before postStateToWebview
fails "leaves the pinned sibling views on the deleted profile when a later
deletion step fails".
- ClineProvider.ts:3698 - isolate and log the sibling refresh of
activateProviderProfileUnlocked the same way.
- webviewMessageHandler.ts:2530 - run the rename's name check, save, and
compensation inside one ProviderSettingsManager critical section shared by
every instance bound to the same secrets key. Control: replacing the wrapper
with an inline call fails "runs the name check, the save, and the compensation
inside the shared critical section"; dropping the shared lock map fails
"serializes critical sections across managers bound to the same secrets key".
Verification: tsc --noEmit clean; the five touched specs pass (730 tests,
--no-file-parallelism); eslint --max-warnings=0 clean over the touched files;
src/eslint-suppressions.json untouched; prettier --check clean.1 parent 63e0fb2 commit 7ff5f14
9 files changed
Lines changed: 668 additions & 92 deletions
File tree
- src
- activate
- __tests__
- core
- config
- __tests__
- webview
- __tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
771 | 771 | | |
772 | 772 | | |
773 | 773 | | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
774 | 853 | | |
775 | 854 | | |
776 | 855 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
66 | 84 | | |
67 | 85 | | |
68 | 86 | | |
| |||
368 | 386 | | |
369 | 387 | | |
370 | 388 | | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
371 | 395 | | |
372 | 396 | | |
373 | 397 | | |
| |||
419 | 443 | | |
420 | 444 | | |
421 | 445 | | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
422 | 451 | | |
423 | 452 | | |
424 | 453 | | |
| |||
454 | 483 | | |
455 | 484 | | |
456 | 485 | | |
| 486 | + | |
457 | 487 | | |
458 | 488 | | |
459 | 489 | | |
| |||
476 | 506 | | |
477 | 507 | | |
478 | 508 | | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
479 | 516 | | |
480 | 517 | | |
481 | 518 | | |
| |||
502 | 539 | | |
503 | 540 | | |
504 | 541 | | |
505 | | - | |
506 | | - | |
| 542 | + | |
507 | 543 | | |
508 | 544 | | |
509 | 545 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
115 | 145 | | |
116 | 146 | | |
117 | 147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
93 | 137 | | |
94 | 138 | | |
95 | 139 | | |
| |||
0 commit comments