Skip to content

Fix blank review avatars on app detail page#8097

Open
mdmohsin7 wants to merge 6 commits into
mainfrom
caleb/fix-review-avatars
Open

Fix blank review avatars on app detail page#8097
mdmohsin7 wants to merge 6 commits into
mainfrom
caleb/fix-review-avatars

Conversation

@mdmohsin7

@mdmohsin7 mdmohsin7 commented Jun 21, 2026

Copy link
Copy Markdown
Member

Problem

Reviewer avatars on the app detail page (Apps → app → Reviews) render as blank grey circles.

Avatars are not stored anywhere — neither the AppReview model nor the backend includes a photo field. They were generated at render time from a third-party hobby service, avatar.iran.liara.run. That service is currently unreachable: every request hangs (HTTP 000, the TCP handshake never completes). Because a hung connection never raises an error, the widget's initial-letter errorBuilder fallback never fired, leaving the grey placeholder circle on screen indefinitely.

Fix

Drop the external dependency entirely. New ReviewAvatar widget renders a fully local initials avatar — a deterministic background color derived from the reviewer's uid/username plus their first initial. No network call, works offline, can't regress on a third-party outage.

Wired into both call sites:

  • Full reviews list (reviews_list_page.dart)
  • Detail-page review preview (app_detail.dart)

The now-unused _getAvatarUrl helpers were removed from both files.

Verification

No simulator/device available in the build env, so verified programmatically:

  • flutter analyze clean on all touched files.
  • New widget test (test/widgets/review_avatar_test.dart), 5/5 pass — asserts the correct initial renders, falls back to A on an empty name, emits zero Image widgets (never touches the network), and produces a stable color per seed.

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 4 files

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread app/lib/pages/apps/app_detail/widgets/review_avatar.dart Outdated
Comment thread app/lib/pages/apps/app_detail/widgets/review_avatar.dart Outdated
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