Skip to content

fix(insights): show member profile photos with the canonical avatar - #8216

Merged
waleedlatif1 merged 3 commits into
stagingfrom
fix/insights-member-avatars
Sep 24, 2026
Merged

waleedlatif1 merged 3 commits into
stagingfrom
fix/insights-member-avatars

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Insights member rows now show each member's profile photo on every tab: the Members tab and the Activity member table previously only had initials, because their responses never carried the image
  • The member lookup that already resolved names now keeps the avatar it was reading and discarding; breakdown rows carry image for members, and the overview drops its second profile query
  • Activity breakdown selects u.image on its existing user join
  • All Insights avatars use the canonical settings MemberAvatar (14px, photo or neutral initial) — same as the Members page and aligned with the 14px provider marks on model rows; the bespoke colored UsageMemberAvatar and the renderLeading indirection are removed
  • Public v2 breakdown is unchanged (its contract omits image; pinned by a test), and the agent's usage breakdown projects avatars out, matching the roster projection

Type of Change

  • Bug fix

Testing

  • Verified in the running app on Overview, Members and Activity (photo and initial fallback, light and dark)
  • New tests: activity breakdown returns member images (real Postgres, fails without the SQL change), v2 breakdown never exposes image, agent projection strips it, overview reuses the breakdown's images with a single entity read
  • Billing, Insights, v2 and agent-tool suites: 1,441 passed; lint, type-check, check:audits, docs-manifest, block registry green; /cleanup passes applied

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Sep 24, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Sep 24, 2026 1:32am UTC

Request Review

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 18 files

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

Fix all with cubic | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; the previous unbounded tie hydration issue is fully fixed and no new actionable failures remain.

Summary

This PR adds canonical member profile photos throughout organization Insights while keeping avatar data out of public and model-facing projections. The follow-up also resolves the prior unbounded tie hydration concern.

  • Hydrates member names and optional images through one bounded entity lookup.
  • Uses the canonical MemberAvatar in member breakdown and activity rows.
  • Selects activity-member images through the existing user join.
  • Preserves the public v2 breakdown contract and strips images from agent settings projections.
  • Uses a shared metric-and-key ranking so entity hydration remains bounded by the requested row limit.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Ledger[Usage ledger groups] --> Rank[Rank by metric and stable key]
  Rank --> Cut[Apply row limit]
  Cut --> Entities[Hydrate names and member images]
  Entities --> Dashboard[Insights dashboard]
  Entities --> Public[Public v2 projection]
  Entities --> Agent[Agent settings projection]
  Public --> Strip1[Schema omits images]
  Agent --> Strip2[Projection removes images]
Loading

Reviews (3) · Last reviewed commit: "fix(insights): cut breakdowns by key so ..."

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 18 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 20 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit b073643 into staging Sep 24, 2026
25 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/insights-member-avatars branch September 24, 2026 01:38

This branch was previously deployed

1 inactive deployment
Preview d3e8e281 Deployed Sep 24, 2026 by vercel[bot]
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