Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 26, 2025

Description

Before:

getUserAvatar() returned the entire API response object { avatarUrl: "..." } instead of the URL string, causing the Avatar component to always show the fallback image.

After:

Properly extracts and returns the avatarUrl string from the API response:

// Before
const userAvatar = await response.json();
return userAvatar;

// After
const { avatarUrl } = await response.json();
return avatarUrl;

Closes #574

Testing instructions

  1. Log in with an OAuth provider (Google/GitHub)
  2. Verify avatar renders in the header dropdown
  3. Navigate to /profile and verify avatar renders in the profile card

Additional information

Also updated test mocks in GlobalHeader.test.tsx and UserDropdownMenu.test.tsx to return the correct response shape { avatarUrl: '...' } rather than a plain string.

[optional] Screenshots

N/A - requires authenticated session with OAuth provider

Pre-submission checklist

  • Code builds and passes locally
  • PR title follows Conventional Commit format (e.g. test #001: created unit test for __ component)
  • Request reviews from the Peer Code Reviewers and Senior+ Code Reviewers groups
  • Thread has been created in Discord and PR is linked in gis-code-questions
Original prompt

HARD RESTRICTIONS (MUST FOLLOW — do not continue if violated):

  • We use pnpm only.
  • NEVER create package-lock.json, yarn.lock, or lockfiles of any kind.
  • If you attempt to modify a lockfile, halt immediately and ask for clarification.
  • You MAY NOT install dependencies unless I explicitly request it in writing.
    If enforcing these rules prevents progress, STOP and ask me — do not continue anyway.

Implement this ticket in a new branch that you create and assign me as reviewer.

Task:

  • User avatar's aren't rendering in the header or on the profile page. Only the default fallback image is rendering.

Scope Rules:

  • Only modify files directly relevant to this task.
  • Do NOT touch package.json, pnpm-lock.yaml, workflows, .github templates, or unrelated code.
  • Absolutely no refactors unless required to complete this ticket.
  • If the target element is not found, ASK before making assumptions.

PR Rules:

  • Use our PR template exactly.
  • Fill Before/After sections from the real code changes.
  • Title must follow Conventional Commit format.
  • Include Closes #574.
  • Keep changes minimal and readable.

If anything is unclear, ambiguous, or missing context — pause and ask me instead of guessing.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel
Copy link

vercel bot commented Nov 26, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
elecretanta Ready Ready Preview Comment Nov 26, 2025 5:42pm
elecretanta-storybook Ready Ready Preview Comment Nov 26, 2025 5:42pm
elecretanta-unit-test Ready Ready Preview Comment Nov 26, 2025 5:42pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 26, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch copilot/fix-user-avatar-rendering

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Comment @coderabbitai help to get the list of available commands and usage tips.

Co-authored-by: alexappleget <137813659+alexappleget@users.noreply.github.com>
@alexappleget alexappleget requested review from a team and shashilo and removed request for a team November 26, 2025 17:43
Copilot AI changed the title [WIP] Fix user avatars not rendering in header and profile page fix: extract avatarUrl from API response in getUserAvatar Nov 26, 2025
Copilot AI requested a review from alexappleget November 26, 2025 17:43
@alexappleget alexappleget marked this pull request as ready for review November 26, 2025 17:47
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.

Create Secret Santa Group Flow Has Incorrect Heading

2 participants