FEATURE | ChatPrompt V2: Historical turn view and revert functionality

Status Closed โ€” not planned
Maintainer reply None cached
Activity 2 comments ยท opened Feb 27, 2026 ยท 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 โ†—