Skip to content

Load sender avatars from GNOME Contacts - #8

Open
Toxblh wants to merge 1 commit into
hyprlab:mainfrom
Toxblh:feat/contact-avatars
Open

Load sender avatars from GNOME Contacts#8
Toxblh wants to merge 1 commit into
hyprlab:mainfrom
Toxblh:feat/contact-avatars

Conversation

@Toxblh

@Toxblh Toxblh commented Aug 6, 2026

Copy link
Copy Markdown

Summary

  • resolve sender avatars in this order: local EDS/vCard PHOTO → opt-in Gravatar → coloured initials
  • support Nextcloud data-URI PHOTO, standard folded ENCODING=b, grouped properties and safe EDS file:// photos
  • index local/CardDAV photo locations in the background and refresh visible avatars when EDS changes without jumping the message list scroll position
  • try all duplicate contact candidates and preserve cache provenance so disabling Gravatar immediately hides cached Gravatars
  • correlate asynchronous results by sender and EDS generation to prevent wrong/stale avatars
  • coalesce duplicate Gravatar lookups, cap concurrency, apply timeouts/backoff, and cache only definitive 404 misses
  • reject remote vCard PHOTO URLs and SVG; decode/downscale raster photos off the GTK thread and create bounded 160px textures on the main thread

Privacy

  • local contact photos require no additional CardDAV/network request
  • Gravatar remains opt-in and is queried only when no usable local photo exists
  • remote PHOTO URLs are never fetched
  • local file URIs are canonicalized and restricted to EDS address-book directories

Testing

  • cargo check --locked
  • cargo test --locked — 48 passed
  • cargo clippy --all-targets --locked — passes; pre-existing style warnings remain
  • combined GOA + avatar build: 57 passed
  • live EDS/Nextcloud cache indexed 399 sender-photo addresses
  • verified and decoded the local vCard PNG for schavelevoi@basealt.ru
  • multiple independent Codex and Claude review rounds completed and findings addressed

@Toxblh
Toxblh marked this pull request as draft August 6, 2026 11:51
@Toxblh
Toxblh force-pushed the feat/contact-avatars branch from 30a35fc to 058e15b Compare August 6, 2026 14:27
@Toxblh
Toxblh marked this pull request as ready for review August 6, 2026 14:27
@Toxblh
Toxblh force-pushed the feat/contact-avatars branch from 058e15b to e4bf870 Compare August 6, 2026 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant