FEATURE | ChatPrompt V2: Historical turn view and revert functionality

Resolved πŸ’¬ 2 comments Opened Feb 27, 2026 by drdzey Closed Mar 3, 2026

πŸ“‹ Description

Add ability to view and revert to historical conversation turns in ChatPrompt V2 extraction panel.

🎯 Context

When user selects a non-final turn in conversation history:

  • Currently shows intermediate result with grayed overlay
  • Need to add action buttons for viewing/reverting

βœ… Requirements

UI Changes (ExtractionDetailView)

Add 3 buttons in top-right corner when viewing historical turn:

  1. πŸ‘οΈ View This Result
  • Removes gray overlay
  • Hides buttons 1) and 2)
  • Keeps only button 3) visible
  • Read-only view of intermediate result
  1. βͺ Revert to This Result
  • Calls new backend API to delete all turns with index > selected turn
  • Refreshes entire thread state after successful deletion
  • Updates conversation bubbles and result display
  1. ⏭️ View Final Result
  • Switches back to the latest/final turn
  • Restores normal view (no overlay, no special buttons)

Backend API (new endpoint needed)

DELETE /api/chat/threads/{threadId}/turns?afterIndex={turnIndex}
  • Deletes all turns with index greater than specified
  • Returns updated thread state

State Management

  • Track IsViewingHistoricalTurn in ViewModel
  • Track SelectedHistoricalTurnIndex
  • Handle overlay visibility based on state

🎨 UI Mockup

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ [View This] [Revert to This] [View Final] β–’ β”‚  <- new buttons
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ β”‚
β”‚ β–‘β–‘β–‘ Historical result (grayed overlay) β–‘β–‘β–‘β–‘ β”‚
β”‚ β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“ Files to Modify

  • src/ViewModels/Panel/ChatPrompts/ExtractionDetailViewModel.cs - state & commands
  • src/SVIViews/Panel/ChatPrompts/ExtractionDetailView.xaml - buttons UI
  • src/AppraisalData/Abstractions/IChatServiceProvider.cs - new method
  • src/AppraisalData/Logic/ChatServiceProvider.cs - API call implementation
  • Backend: new endpoint for turn deletion

---

~ Lili

View original on GitHub β†—

This issue has 2 comments on GitHub. Read the full discussion on GitHub β†—