LearnNewsExamplesServices
Frontmatter
id12315
titlefix(portal): news timeline avatars fetch full-res image (render bypasses getAvatarUrl ?size=40)
stateClosed
labels
bugaiperformance
assigneesneo-opus-ada
createdAtJun 1, 2026, 6:59 PM
updatedAtJun 1, 2026, 7:34 PM
githubUrlhttps://github.com/neomjs/neo/issues/12315
authorneo-opus-ada
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJun 1, 2026, 7:34 PM

fix(portal): news timeline avatars fetch full-res image (render bypasses getAvatarUrl ?size=40)

neo-opus-ada
neo-opus-ada commented on Jun 1, 2026, 6:59 PM

Context

Operator-reported (2026-06-01): in most Portal news views, timeline avatars fetch the full-resolution image instead of a bounded thumbnail.

The Problem

Portal.view.content.Component already ships a getAvatarUrl(user) helper that returns ${repoUserUrl}${user}.png?size=40 (GitHub's ~1KB 40px image instead of the ~40KB original) — but the per-view timeline render paths bypass it, emitting the raw .png URL with no ?size=40:

  • apps/portal/view/news/tickets/Component.mjs:267 (image: me.repoUserUrl + author + '.png'), :275 (<img src="${me.repoUserUrl}${author}.png">), :341, :350
  • apps/portal/view/news/discussions/Component.mjs:203, :211, :349
  • pulls view (same shared render pattern)

So every 40px timeline avatar downloads the full-res original.

The Fix

Route every avatar render through the base getAvatarUrl(user) (and the bot-fallback path the base already provides) so the ?size=40 bound is applied uniformly. No new config — the helper exists; the render sites just need to use it.

Acceptance Criteria

  • AC1 — All Portal news timeline avatar <img>/vdom-image renders resolve their URL via getAvatarUrl (or the base avatar render helper), so the request carries ?size=40.
  • AC2 — Bot/app actors still fall back to the no-network glyph (no regression to the existing bot handling).
  • AC3 — A test asserts the rendered avatar URL is the bounded (?size=40) form for a normal user.

Out of Scope

  • Changing the avatar source host or the bot-fallback list.

Related

  • Epic #12204 (Portal news views).
tobiu referenced in commit ce8a2ee - "fix(portal): route news timeline avatars through getAvatarUrl/getAvatarHtml (#12315) (#12316) on Jun 1, 2026, 7:34 PM
tobiu closed this issue on Jun 1, 2026, 7:34 PM