Skip to content

POC: Interactive chatbot sidebar for guided analysis and migration #1242

@djzager

Description

@djzager

Summary

Create a new chatbot webview that lives in the VS Code secondary sidebar (similar to Claude/Cursor/Copilot chat panels) and serves as the primary interactive interface for the extension. The goal is a proof-of-concept where a user can take a PatternFly application (with analysis profile and provider configuration already set up), open the chat sidebar, and interactively:

  1. Trigger and monitor an analysis run
  2. Review and discuss analysis results against migration guides (e.g., PatternFly migration guide)
  3. Collaboratively build a migration plan
  4. Execute the migration incrementally with review checkpoints

Motivation

The current UX separates analysis, results viewing, and resolution into distinct panels and workflows. A unified conversational interface would let users drive the entire migration lifecycle from a single pane — asking questions, getting explanations, and applying fixes interactively rather than through a series of disconnected actions.

Current Architecture Context

  • The extension already uses PatternFly Chatbot (@patternfly/[email protected]) in the ResolutionsPage for displaying LLM responses, tool calls, and modified files during solution workflows.
  • Webview views are registered via KonveyorGUIWebviewViewProvider with types: sidebar, resolution, profiles, hub.
  • State is managed with Immer (extension side) and Zustand (webview side), with granular message passing between them.
  • The agentic workspace uses LangGraph StateGraph with nodes for analysis fix routing, planning, and execution — already supporting user interaction checkpoints (yesNo, choice, tasks).
  • The SolutionWorkflowOrchestrator bridges the agentic workflow with the extension, converting KaiWorkflowMessage events into chat messages.

Proposed Approach

Extension Side

  • Register a new webview view in the auxiliarybar (secondary sidebar) view container in package.json:
    "viewsContainers": {
      "auxiliarybar": [{
        "id": "konveyor-chat",
        "title": "Konveyor Chat"
      }]
    }
  • Add a new WebviewType (e.g., "chat") and register a corresponding WebviewViewProvider.
  • Implement a message handler that can orchestrate analysis runs, query results, and drive the interactive workflow — all from chat commands/intents.

Webview Side

  • Create a new ChatPage component using @patternfly/chatbot in embedded mode.
  • Support conversational interaction patterns:
    • User sends natural language requests ("analyze my project", "show me the critical issues", "fix the PatternFly v4 to v5 migration issues in Button.tsx")
    • System responds with structured results, explanations, and action proposals
    • User confirms/rejects/refines before changes are applied
  • Reuse existing message types (ChatMessageType) and extend as needed for richer interaction (e.g., inline code diffs, migration guide references, task checklists).

Workflow Integration

  • The chat should be able to invoke the existing analysis pipeline and display results conversationally.
  • Integrate with the KaiInteractiveWorkflow for fix execution, surfacing user interaction checkpoints as chat prompts.
  • Add capability to ingest external migration guide content (e.g., PatternFly migration guide URL or local docs) as context for the LLM when planning migrations.

Acceptance Criteria

  • New chatbot view appears in the VS Code secondary sidebar
  • User can initiate an analysis run from the chat interface
  • Analysis results are presented conversationally with the ability to ask follow-up questions
  • The LLM can reference migration guide content when discussing results and planning
  • User can request and review code changes interactively through the chat
  • Changes are applied to workspace files after user approval
  • End-to-end demo: PatternFly app → analysis → migration plan → executed migration, all through the chat sidebar

Open Questions

  • Should this replace the existing sidebar/resolution views or coexist alongside them during the POC phase?
  • How should migration guide content be ingested — as tool-accessible documents, RAG, or direct prompt context?
  • Should the chat persist conversation history across VS Code sessions?

Metadata

Metadata

Assignees

Labels

triage/acceptedIndicates an issue or PR is ready to be actively worked on.

Projects

Status

🆕 New

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions