fix(ai): preserve existing message ids on interrupt snapshots - #1116
fix(ai): preserve existing message ids on interrupt snapshots#1116kolaworld wants to merge 2 commits into
Conversation
Keep ModelMessage.id on MESSAGES_SNAPSHOT so interrupt boundaries do not rewrite stable identity. Generate snapshot_<run>_<index> only when an id is missing. Fixes TanStack#1107
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughInterrupt ChangesSnapshot message ID preservation
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The change preserves existing message identities at interrupt boundaries and only generates fallback IDs when needed; no actionable merge-blocking risk remains after normal checks and review. Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration. 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 |
Keep ModelMessage.id on MESSAGES_SNAPSHOT so interrupt boundaries do not rewrite stable identity. Generate
snapshot_<run>_<index>only when an id is missing.Fixes #1107
🎯 Changes
snapshot_<run>_<index>.snapshot_<run>_<index>only when a message has no id, matching the client snapshot normalizer.✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit
Bug Fixes
Tests