feat(gui): show contact avatar in thread header (tincan-ipv6d)#55
Merged
Conversation
Conversation list already had per-contact avatars; the thread header bar showed only name + phone with no visual identity cue. - AvatarWidget.update_for_name(): reset initials to a new name when the conversation changes without recreating the widget - ThreadHeader: refactored from QVBoxLayout to QHBoxLayout; avatar sits left of name/phone column; set_contact_photo() delegates to AvatarWidget.set_photo() - ThreadView.set_header_photo(): thin delegation to header - main._on_contact_photo_received(): also updates the header when the photo is for the currently selected conversation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…er avatar wiring, and main photo-received handoff (tincan-ipv6d) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
What this changes
The conversation thread header now shows a contact avatar on the left side of the name and phone number. When a PBAP photo has been fetched for the contact, it is displayed as a rounded thumbnail. When no photo is available — on first open, before PBAP sync, or for contacts with no photo — the header falls back to a generated initials-and-color circle, the same treatment the conversation list already uses.
The avatar updates when the user switches conversations:
update_for_name()resets the widget to initials immediately, and the photo is filled in asynchronously when_on_contact_photo_receivedfires. The existing conversation-list photo wiring is preserved unchanged.Review notes
tincan_gui/avatar.py: addsAvatarWidget.update_for_name(name)— resets the widget to the initials render for a new contact without needing to reconstruct the widget.tincan_gui/thread_view.py:ThreadHeaderlayout changed fromQVBoxLayouttoQHBoxLayout;AvatarWidgetadded on the left.update_contact()andset_group_info()both callupdate_for_name(). Newset_contact_photo()/set_header_photo()delegation chain.tincan_gui/main.py:_on_contact_photo_receivednow also callsset_header_photowhen the incoming conv ID matches the currently open conversation.Test plan
pytest tests/— 1151/1151 passed onfeature/tincan-ipv6dtiptests/tincan_gui/test_thread_header_avatar.pycover:update_for_name,set_contact_photo(valid + garbage + empty input),update_contactavatar wiring on conversation switch, and_on_contact_photo_receivedrouting logic including_same_convnormalisationruff check— cleanrelease-gates/tincan-ipv6d-gate.md🤖 Deployed by actual-factory