Context
The rich extension stores the most recently active panel in shared mutable state. Async handlers build their response function against that shared panel, so a later message from another panel can redirect an earlier response.
Evidence:
vscode/src/rich-extension.ts:759-789 mutates and reads the shared active view.
vscode/src/rich-extension.ts:1061-1073 awaits multiple network requests before posting Marketplace content.
Task
Capture the originating WebviewView for every request and keep panel-specific responses separate from broadcasts.
Acceptance criteria
- Async completions return to the panel that initiated them.
- Switching panels during Marketplace loading does not lose or misroute results.
- Broadcast state updates still reach every intended provider.
- A concurrency test interleaves messages from two panels.
Context
The rich extension stores the most recently active panel in shared mutable state. Async handlers build their response function against that shared panel, so a later message from another panel can redirect an earlier response.
Evidence:
vscode/src/rich-extension.ts:759-789mutates and reads the shared active view.vscode/src/rich-extension.ts:1061-1073awaits multiple network requests before posting Marketplace content.Task
Capture the originating
WebviewViewfor every request and keep panel-specific responses separate from broadcasts.Acceptance criteria