Skip to content

feat(avatar): add support for configurable avatar sources with Gravat… - #76

Open
BenLocal wants to merge 1 commit into
the0807:mainfrom
BenLocal:avatar
Open

feat(avatar): add support for configurable avatar sources with Gravat…#76
BenLocal wants to merge 1 commit into
the0807:mainfrom
BenLocal:avatar

Conversation

@BenLocal

@BenLocal BenLocal commented Aug 7, 2026

Copy link
Copy Markdown

Summary

Add configurable avatar sources through the new gitGraphPlus.avatarSource setting.

Users can choose between:

  • gravatar — download and cache Gravatar images (default)
  • retro — generate deterministic retro pixel avatars locally without network access

Changes

  • Add the gitGraphPlus.avatarSource configuration.
  • Add deterministic offline Retro SVG avatar generation.
  • Include the selected source in avatar cache keys.
  • Recreate and reset the avatar cache when the source changes.
  • Add a generation identifier to prevent stale avatar responses from overwriting results after a source switch.
  • Add manifest, extension host, cache, and webview store tests.
  • Document the new setting in README.md.

Scope

  • The existing Gravatar fetch implementation remains unchanged.
  • No proxy handling or proxy-related fetcher code is included.
  • No dependency or lockfile changes are included.
  • No unrelated graph sorting or retry behavior is changed.

Test Plan

  • npm test -- --coverage
    • 1885 passed, 9 skipped
    • 97.97% overall coverage
  • npm run lint
  • npm run check in webview-ui
  • npm run build
  • Production dependency audit passes with 0 vulnerabilities

Manual Verification

  1. Set gitGraphPlus.avatarSource to retro.
  2. Open Git Graph+ and confirm Retro avatars render without network access.
  3. Change the setting to gravatar.
  4. Confirm avatars are reset and loaded from Gravatar.
  5. Switch sources while avatars are loading and confirm stale responses are ignored.

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