Repository navigation
Commit 8aec28c
committed
unit 3a: view state machinery, registration, and the boolean webview post
Part of the split plan issued on upstream issue 1992 for PR 2226. Content authority is
PR 2226 head bc724b8, and every ported line is verbatim from that source at the same
path, selected by donor new-side line range against unit 2's head cbf1114.
Ranges here: ClineProvider.ts new-side 77 to 1149, 2419 to 2478 and 2537 to 2542; spec new-
side 15 to 5270 plus the two postMessageToWebview mock reversions at 9667 and 9771;
webviewMessageHandler.ts new-side 705 to 715 and its spec hunks at 131 to 132 and 2809 to
2826; src/__tests__/extension.spec.ts new-side 377; api-start-new-task.spec.ts new-side 22.
The 2419 to 2478 and 2537 to 2542 groups and the two mock reversions at 377, 22, 9667 and
9771 came out of units 4 and 5 and travel here because 3a is the unit that ships
Promise<boolean>: a mockResolvedValue(undefined) feeding that method, and the donor's
rewritten diagnosticsRequest callback that returns it into a Promise<void) parameter, both
fail typecheck at this head otherwise.
5 donor declarations moved to unit 3b, which owns their first use:
- core/webview/ClineProvider.ts new-side 77: PROVIDER_SETTINGS_KEYS
- core/webview/ClineProvider.ts new-side 177: PersistedViewStateValues
- core/webview/ClineProvider.ts new-side 293: ViewLocalStateField
- core/webview/__tests__/ClineProvider.spec.ts new-side 18: GlobalState
- core/webview/ClineProvider.ts new-side 170: ViewLocalStateValues
Each of those is an unused name at this head under @typescript-eslint/no-unused-vars, and
the rule is the same one the plan already applies to assertions: a declaration ships with
the unit whose code reads it. Unit 3b carries provider new-side 1150 onward and 6219 to
6398 and spec new-side 5723 to 6124, which is where every one of these is used.
No changeset, no CHANGELOG edit, no suppression count change, no new file.1 parent cbf1114 commit 8aec28c
6 files changed
Lines changed: 610 additions & 25 deletions
File tree
- src
- __tests__
- core/webview
- __tests__
- extension/__tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
377 | | - | |
| 377 | + | |
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
| |||
0 commit comments