fix(history): preserve unchanged messages during sync - #83
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (6)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughChat history snapshots now use a transactional message-sync operation. It compares canonical active messages with stored rows, updates changed messages and related references, and excludes parked rows from message reads and statistics. Snapshot tests cover parked-row cleanup, preserved message order, and agent-reference cleanup. ChangesChat history synchronization
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant ChatRepository
participant ChatHistoryDao
participant chat_messages
participant chat_workspace_file_refs
ChatRepository->>ChatHistoryDao: Sync session messages and workspace file refs
ChatHistoryDao->>chat_messages: Read active rows and compare changed positions
ChatHistoryDao->>chat_messages: Delete changed suffix and upsert messages
ChatHistoryDao->>chat_workspace_file_refs: Remove inactive refs and upsert matching refs
Suggested reviewers: Merge Risk: ⚪ Minimal · up to The identified snapshot and reference risks are not reachable on the inspected paths; the change is mergeable after normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit