Skip to content

Route asynchronous VS Code responses to their originating panel #54

Description

@Railly

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions