Skip to content
This repository was archived by the owner on Sep 23, 2025. It is now read-only.

Implement Code Walkthrough System (Replace Review System) #23

@nikomatsakis

Description

@nikomatsakis

Objective

Replace the complex blocking review system with a simpler, terminal-integrated walkthrough system based on the code walkthroughs design.

Problem

The current review system with blocking feedback collection, promises/callbacks, and complex UI state management proved to be overkill. User feedback indicated that terminal-based interaction would be more practical for developers than elaborate GUI flows.

Solution

Implement present_walkthrough tool with JSON-based walkthroughs that integrate naturally with developer workflow through terminal text injection. Walkthroughs are Dialect programs that execute dynamically to resolve locations and IDE operations.

Key Changes

  • Remove: request_review, present_review, update_review tools and blocking feedback system
  • Add: present_walkthrough tool with Dialect-powered walkthroughs
  • Reuse: Comment controller, link handling, git diff rendering, QuickPick disambiguation

Implementation Plan

Phase 1: Server-Side Core

  • Define present_walkthrough MCP tool interface
  • Create walkthrough types (Rust structs matching design grammar)
  • Integrate Dialect execution - execute walkthrough JSON as Dialect program
  • Location resolution via Dialect - findReferences, findDefinitions, search through existing ide_operation
  • Send resolved walkthrough to extension via IPC

Phase 2: Extension Rendering

  • Walkthrough handler - receive resolved walkthrough, clear old state
  • Markdown rendering - reuse existing present_review markdown + link handling
  • Action buttons - render with "Ask Socratic Shell" terminal injection
  • Comment placement - use resolved locations to place VSCode comments
  • Comment replies - "Reply" buttons inject context + select terminal

Phase 3: Git Integration

  • Git diff rendering - reuse existing diff tree visualization
  • Diff + comments integration - show comments alongside diffs

Phase 4: Cleanup

  • Remove old review system code (request_review, present_review, update_review)
  • Error handling - graceful failures for bad Dialect programs
  • Update documentation and examples

Benefits

  • Non-blocking workflow - users review at their own pace
  • Terminal-centric - natural developer workflow integration
  • Unified system - handles both reviews and code explanations
  • Simplified codebase - removes complex promise/callback system
  • Dynamic execution - Dialect programs adapt to current code state
  • IDE integration - Leverages LSP capabilities via existing infrastructure

Dependencies

  • Existing "Ask Socratic Shell" mechanism
  • VSCode comment API
  • Current diff rendering and link handling code
  • Dialect interpreter and ide_operation tool

Related

Closes #22 - End-to-End LLM Roundtrip (replaced by this simpler approach)

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-managedAI is permitted to update this issue OP and add commentsfeatureNew functionalitytracking-issueOngoing work item tracked across multiple sessions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions