You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a new editor tab (view) opens, the webview renders before that view's per-view state has been hydrated: ModesView briefly shows the previous view's (or the global default's) mode and API configuration ??the flash of incorrect mode/apiConfig ??before the extension posts the hydrated state. The webview has no signal that the per-view view state has loaded, so it cannot withhold the mode UI until then.
vps2 F7 of the durable per-view state series (fork tracking issue easonLiangWorldedtech#41). Draft PR: #1567 (branch vps2/f7-viewstate-loaded, stacked on the F6 head f42c571; head c00ffc3) — #1567
Fix scope (6 files, all under webview-ui/, 96 insertions / 5 deletions = a+d 101 measured vs the F6 head)
src/context/ExtensionStateContext.tsx ??the viewStateLoaded: boolean + setViewStateLoaded wiring (interface field, useState, setViewStateLoaded(true) after setDidHydrateState(true) in the state-message handler, context value).
src/components/modes/tests/ModesView.spec.tsx ??the mock fields + the new "shows a loading skeleton while view-local state is initializing" test.
src/context/tests/ExtensionStateContext.spec.tsx ??the TestComponent wiring + 3 new tests (initializes false; true after the first state message; setViewStateLoaded).
src/App.tsx ??the -3 deletion of the bare webviewDidLaunch useEffect (the F1c-owned hunk from fix(webview): add loading skeleton for view state initialization #928, folded into this unit because F1c shipped without it; the payload-carrying post already lives in ExtensionStateContext.tsx).
src/tests/App.spec.tsx ??the getViewStateId mock field (+1; absent at the base, added in this unit).
Series note
Draft PR; this unit is the 9th of the merge chain (F1a to F1b to F1c to F2 to F3 to F4 to F5 to F6 to F7) and the final vps2 unit. The PR body documents the #928 port fidelity (including the #928 files deliberately NOT ported, per unit), the folded App.tsx hunk, the budget measurement, and the mutation-diff gate. No Closes/Fixes/Resolves linkage ??this issue is the series gap record for the unit.
Gap
When a new editor tab (view) opens, the webview renders before that view's per-view state has been hydrated: ModesView briefly shows the previous view's (or the global default's) mode and API configuration ??the flash of incorrect mode/apiConfig ??before the extension posts the hydrated state. The webview has no signal that the per-view view state has loaded, so it cannot withhold the mode UI until then.
Upstream provenance
Fix unit
vps2 F7 of the durable per-view state series (fork tracking issue easonLiangWorldedtech#41). Draft PR: #1567 (branch vps2/f7-viewstate-loaded, stacked on the F6 head f42c571; head c00ffc3) — #1567
Fix scope (6 files, all under webview-ui/, 96 insertions / 5 deletions = a+d 101 measured vs the F6 head)
Series note
Draft PR; this unit is the 9th of the merge chain (F1a to F1b to F1c to F2 to F3 to F4 to F5 to F6 to F7) and the final vps2 unit. The PR body documents the #928 port fidelity (including the #928 files deliberately NOT ported, per unit), the folded App.tsx hunk, the budget measurement, and the mutation-diff gate. No Closes/Fixes/Resolves linkage ??this issue is the series gap record for the unit.