Problem
Parallel mode webview instances lack durable per-view persistence. When a user:
- Opens multiple parallel tabs with different configurations (mode, API config)
- Reloads the webview or restarts VS Code
- All tabs lose their individual state and revert to defaults
Previously, persistence relied on scattered dynamic __view_state_* keys that were not formally registered in the global settings schema. This meant:
- No guaranteed reload across VS Code restarts
- No bounded cleanup (keys could accumulate indefinitely)
- No proper hydration through ContextProxy.initialize()
- Full apiConfiguration (including secrets) was stored, risking secret leaks
Solution
Introduce a formal registered global setting key viewStates in globalSettingsSchema:
- Stores only non-secret selections:
mode, currentApiConfigName, updatedAt
- Included in
GLOBAL_STATE_KEYS for proper ContextProxy hydration on startup
- Bounded cleanup: keeps most recent 50 entries, prunes older ones
- Hydrated via
loadViewState() which resolves profile settings through ProviderSettingsManager.getProfile()
Scope
- New registered global setting key
viewStates in globalSettingsSchema
- Bounded persistence with timestamp-based pruning (max 50 entries)
- ContextProxy hydration on startup for all parallel instances
- Profile resolution via ProviderSettingsManager
- No full apiConfiguration or API keys stored — only non-secret selections
Tests
- Persistence tests: 24 passed
- Full core run: 129 files passed / 2184 passed / 9 skipped
Problem
Parallel mode webview instances lack durable per-view persistence. When a user:
Previously, persistence relied on scattered dynamic
__view_state_*keys that were not formally registered in the global settings schema. This meant:Solution
Introduce a formal registered global setting key
viewStatesinglobalSettingsSchema:mode,currentApiConfigName,updatedAtGLOBAL_STATE_KEYSfor proper ContextProxy hydration on startuploadViewState()which resolves profile settings throughProviderSettingsManager.getProfile()Scope
viewStatesinglobalSettingsSchemaTests