Skip to content

Show user avatars in picker rows#559

Open
mariusvniekerk wants to merge 4 commits into
mainfrom
fix/user-picker-avatar-fallback
Open

Show user avatars in picker rows#559
mariusvniekerk wants to merge 4 commits into
mainfrom
fix/user-picker-avatar-fallback

Conversation

@mariusvniekerk

@mariusvniekerk mariusvniekerk commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator
  • Show provider profile images in reviewer and assignee pickers when they load successfully.
  • Keep initials as the fallback for manual users and accounts whose image URL fails.

Screenshot:

user-picker-avatar-fallback.png

generated by a clanker

@mariusvniekerk

Copy link
Copy Markdown
Collaborator Author

user-picker-avatar-fallback.png

generated by a clanker

@roborev-ci

roborev-ci Bot commented Jun 19, 2026

Copy link
Copy Markdown

roborev: Combined Review (355fd95)

Avatar rendering is mostly safe, but there are two medium issues around cross-provider correctness and coverage.

Medium

  • packages/ui/src/components/detail/PullDetail.svelte:1050
    Avatar URLs are generated with a GitHub-style https://{host}/{login}.png?size=40 pattern for every provider. This ignores provider-specific avatar data and can make GitLab/Gitea/Forgejo pickers issue broken image requests and fall back to initials instead of showing profile images.
    Fix: Carry provider avatar URLs through the provider-neutral data/API path, or gate URL construction behind provider-specific logic/capability support.

  • packages/ui/src/components/detail/PullDetail.svelte:1646
    The user-visible picker change is only covered by isolated UserPicker unit tests; there is no full-stack e2e coverage proving pull/issue detail pickers wire the avatar URL from real detail/autocomplete data.
    Fix: Extend the existing assignee/reviewer e2e coverage to open the pull and issue pickers and assert the expected avatar image/fallback behavior.


Panel: ci_default_security | Synthesis: codex, 7s | Members: codex_default (codex/default, done, 3m29s), codex_security (codex/security, done, 1m51s) | Total: 5m27s

mariusvniekerk and others added 4 commits June 19, 2026 22:36
Reviewer and assignee editors were falling back to initials even though the surrounding detail view already knows the provider host used for synced profile images. Reusing that host keeps the picker aligned with repo summary avatars while preserving initials for manual or unknown users.

Validation: cd frontend && node ../node_modules/vite-plus/bin/vp test run --project unit src/lib/components/detail/UserPicker.test.ts src/lib/components/detail/UserListEditor.test.ts; node node_modules/vite-plus/bin/vp run frontend-package-check; node node_modules/vite-plus/bin/vp fmt --check frontend packages/ui '!frontend/dist/**' '!packages/ui/src/api/generated/**' '!frontend/test-results/**' '!packages/ui/test-results/**' --no-error-on-unmatched-pattern --threads=1

Generated with Codex
Co-authored-by: Codex <codex@openai.com>
Profile images in the user picker can still fail at browser load time for accounts that do not expose a provider image or whose generated URL is not fetchable. Leaving the broken image in place made bot and service accounts harder to scan than the original initials fallback.

Track failed avatar loads per username and return those rows to the existing initials presentation. Loaded user photos remain unchanged, and manual or unknown users still use initials immediately.

Validation: cd frontend && node ../node_modules/vite-plus/bin/vp test run --project unit src/lib/components/detail/UserPicker.test.ts src/lib/components/detail/UserListEditor.test.ts; node node_modules/vite-plus/bin/vp run frontend-package-check; node node_modules/vite-plus/bin/vp run frontend-check; cd frontend && ../node_modules/.bin/svelte-check --tsconfig ./tsconfig.json --fail-on-warnings; node node_modules/vite-plus/bin/vp fmt --check frontend packages/ui '!frontend/dist/**' '!packages/ui/src/api/generated/**' '!frontend/test-results/**' '!packages/ui/test-results/**' --no-error-on-unmatched-pattern --threads=1; git diff --check. Live dev-ephemeral picker inspection showed failed roborev/renovate/github-advanced-security avatar URLs rendering initials while valid user images remained images. Note: svelte-mcp autofixer exited 1 with no output twice, so svelte-check via frontend-package-check was used for Svelte validation.

Generated with Codex
Co-authored-by: Codex <codex@openai.com>
User pickers were synthesizing GitHub-style avatar URLs from host and login for every provider. That breaks provider-collision and non-GitHub routes because a GitLab, Gitea, or Forgejo username is not guaranteed to resolve through https://{host}/{login}.png.

Until the API carries real provider avatar URLs, keep synthesized image URLs on GitHub routes only and let other providers use the existing initials fallback instead of issuing known-wrong image requests.

Validation: red/green Playwright coverage for the Gitea provider-collision picker fallback.

Generated with Codex
Co-authored-by: Codex <codex@openai.com>
GitLab client-go retries 429 and 5xx responses by default, which made httptest fixtures spend seconds in retry backoff and left CI-sensitive transient-error assertions dependent on the upstream retry loop.

Keep production retries unchanged, but let GitLab tests opt out through the local test helper so fake upstream responses are observed exactly once and error propagation tests stay deterministic.

Validation: go test ./internal/platform/gitlab -shuffle=on; patched PR merge checkout: go test ./internal/platform/gitlab -run TestClientListOpenMergeRequestsPropagatesTransientForkHeadRepoLookupFailures -shuffle=1781917566125672115; patched PR merge checkout: go test ./internal/platform/gitlab -shuffle=1781917566125672115. Full local gotestsum was attempted against the PR merge checkout; GitLab passed, but current main has separate macOS PTY/tmux local failures not present in the failing CI job.

Generated with Codex
Co-authored-by: Codex <codex@openai.com>
@mariusvniekerk mariusvniekerk force-pushed the fix/user-picker-avatar-fallback branch from 17747b4 to 3c7d13a Compare June 20, 2026 02:41
@roborev-ci

roborev-ci Bot commented Jun 20, 2026

Copy link
Copy Markdown

roborev: Review Unavailable (3c7d13a)

The review agent repeatedly failed to run (likely an agent or configuration error). roborev will try again on the next commit.

Last error: agent: claude-code failed stream: stream errors: You've hit your session limit · resets 5:50am (UTC): exit status 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant