fix(ui): reset transcript when replay starts#171
Conversation
👍 GitRank PR AnalysisScore: 20 points
Eligibility Checks
Impact SummaryThis PR fixes a bug where stale cached or live transcript state would persist when a replay session begins, causing out-of-order or duplicate messages to appear after reconnection. The fix clears the transcript state when replay starts and syncs the reset into React state immediately. The PR includes comprehensive test coverage for both the transcript session logic and the chat page integration, validating the fix handles late replay scenarios correctly. Analysis DetailsComponent Classification: This PR affects chat transcript session management and UI state synchronization, which doesn't fit neatly into a specific component category. It's classified as OTHER since it's a cross-cutting concern affecting the chat connection and transcript handling logic. Severity Justification: This is a P2 (Medium) severity bug fix. It addresses a functional issue where stale transcript state persists during reconnects, causing incorrect message ordering to be displayed to users. While this impacts user experience and data consistency, it has a workaround (page refresh) and doesn't cause service downtime or permanent data loss. Eligibility Notes: Issue: True - PR clearly fixes a bug in transcript state management. Fix Implementation: True - code changes align with the stated goal of resetting transcript on replay start. PR Linked: True - detailed summary and testing instructions provided. Tests: True - adds 15 lines to transcript session tests and 45 lines to chat page tests. Tests Required: True - this is a bug fix in business logic (chat state management) that requires regression testing to prevent similar issues. Analyzed by GitRank 🤖 |
Summary
session/loadreplay as canonical by clearing stale cached/live transcript state when replay beginsTesting