Repository navigation
Retry avatar download after a failed attempt - #495
Open
Lars Vogel (vogella) wants to merge 2 commits into
Open
Lars Vogel (vogella) wants to merge 2 commits into
Lars Vogel (vogella) wants to merge 2 commits into
Conversation
AvatarService removed the user's download job from its job map only after a successful download, so a single network failure or unreadable image kept the default avatar for the rest of the session because no new download was ever scheduled. The job now always removes its entry, and an SWTException from decoding the image is logged like an IOException, so the next chat turn can retry. Assisted-by: multiple AI agents and layers of automated tooling 🤖
Lars Vogel (vogella)
requested review from
Ethan Hou (ethanyhou),
Sheng Chen (jdneo) and
xinyi-gong
as code owners
October 16, 2026 20:50
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The targeted fix addresses both failure paths without changing successful caching; builds and tests were not run.
No open issues 🎉
What changed in this PR
Restores avatar download retries in Eclipse chat after network or image-decoding failures.
Changes:
- Removes the job-map entry after both successful downloads and handled failures.
- Logs SWT image-decoding exceptions alongside I/O exceptions.
| File | Description |
|---|---|
| com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/services/AvatarService.java | Clears completed jobs so subsequent chat turns can retry failed downloads. |
Review effort: Balanced
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.
AvatarService removed a user's download job from its job map only after a successful download. A single network failure, or an image SWT could not decode, therefore left the entry in place, no further download was ever scheduled, and the chat showed the default avatar for the rest of the session. The job now always removes its entry and logs an SWTException from decoding like an IOException, so the next chat turn retries the download. getAvatar runs once per new chat turn, so while offline this costs at most one request per message.