Repository navigation
Handle persisted user turns without messages during restore - #494
Merged
Sheng Chen (jdneo) merged 2 commits intoOct 21, 2026
Merged
Sheng Chen (jdneo) merged 2 commits into
Sheng Chen (jdneo) merged 2 commits into
Conversation
mikemikimike
requested review from
Ethan Hou (ethanyhou),
Sheng Chen (jdneo) and
xinyi-gong
as code owners
October 16, 2026 12:03
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused null guard addresses the reported failure, with regression coverage for continued restoration and no identified blocking issues.
0 open findings
What changed in this PR
Prevents missing messages in persisted user turns from interrupting conversation restoration, addressing issue #420.
Changes:
- Skip malformed user turns and log their IDs.
- Add a regression test confirming subsequent valid turns still restore.
| File | Description |
|---|---|
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/ChatView.java | Guard missing messages and extract the restoration loop. |
| com.microsoft.copilot.eclipse.ui.test/src/com/microsoft/copilot/eclipse/ui/chat/ChatViewTest.java | Test skipping malformed turns and continuing restoration; simplify mock setup. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Sheng Chen (jdneo)
approved these changes
Oct 21, 2026
Sheng Chen (jdneo)
left a comment
Member
There was a problem hiding this comment.
LGTM, thank you for your contribution!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Restoring a persisted conversation can fail when a turn is deserialized as
UserTurnDatawithout aMessageDataobject, interrupting restoration of the conversation.Changes
Tests
npm i -f./mvnw clean verify --batch-mode./mvnw checkstyle:check --batch-mode./mvnw test --batch-modeEditorLifecycleListenerIntegrationTests, disabled on Linux).git diff --checkKnown limitation
The issue did not include the sanitized persisted conversation, so this change handles the missing-message state but does not identify why the reported conversation produced it.
Fixes #420
#420