codex - 💡(How to fix) Fix Custom desktop pets show scaling artifacts from forced sprite resampling [3 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#20808Fetched 2026-05-03 04:45:05
View on GitHub
Comments
3
Participants
2
Timeline
6
Reactions
0
Timeline (top)
commented ×3labeled ×2cross-referenced ×1

Fix Action

Fix / Workaround

I have a patch proposal that changes the avatar root CSS to use a custom property:

Code Example

image-rendering: var(--codex-avatar-image-rendering, auto);
RAW_BUFFERClick to expand / collapse

Custom Codex desktop pets can show jagged/aliased edges even when the installed spritesheet is clean and correctly sized.

I tracked this to the desktop avatar renderer, not the source image. Custom pet spritesheets use the same fixed atlas contract as bundled pets: 8 x 9 cells, 192x208 per cell, 1536x1872 total. The renderer then draws each cell into a smaller 7.04rem CSS element with background-size: 800% 900% and forces image-rendering: pixelated.

That means a clean 192x208 sprite is resampled to roughly 113x122 CSS pixels at a default 16px root font size. On high-DPI displays that can also map to fractional physical pixels. The forced pixelated resampling is fine for bundled pixel-art pets, but it introduces artifacts for smooth/high-resolution custom pets.

The fix should make avatar image-rendering configurable:

  • Keep bundled pets rendering as pixelated.
  • Default custom pets to auto.
  • Optionally add custom-pet metadata later so pet authors can choose auto or pixelated explicitly.

I have a patch proposal that changes the avatar root CSS to use a custom property:

image-rendering: var(--codex-avatar-image-rendering, auto);

Then the avatar component can set that custom property to pixelated for bundled assets and auto for custom spritesheets.

The public openai/codex checkout does not appear to include the desktop webview avatar renderer source, so I could not submit a source-level code PR against the public tree. The packaged desktop app evidence maps to webview/assets/codex-avatar-D82knaKt.css, webview/assets/codex-avatar-BpKnWN_W.js, and webview/assets/avatar-overlay-page-Dj9Zinq_.js in the app bundle.

extent analysis

TL;DR

Make the avatar image-rendering configurable to allow for smooth rendering of custom pets by defaulting to auto instead of pixelated.

Guidance

  • Introduce a custom CSS property --codex-avatar-image-rendering to control the image-rendering style, allowing for flexibility in rendering custom pets.
  • Update the avatar component to set the custom property to pixelated for bundled assets and auto for custom spritesheets, ensuring bundled pets retain their pixelated appearance while custom pets are rendered smoothly.
  • Consider adding custom-pet metadata in the future to enable pet authors to choose between auto and pixelated rendering explicitly.
  • Verify the fix by checking the rendering of custom pets on high-DPI displays and comparing it to the rendering of bundled pets.

Example

image-rendering: var(--codex-avatar-image-rendering, auto);

This CSS snippet demonstrates how to use the custom property to set the image-rendering style, defaulting to auto if the property is not set.

Notes

The proposed fix requires modifying the desktop avatar renderer source, which is not publicly available in the openai/codex checkout. The fix may need to be applied to the specific files mentioned in the issue (webview/assets/codex-avatar-D82knaKt.css, webview/assets/codex-avatar-BpKnWN_W.js, and webview/assets/avatar-overlay-page-Dj9Zinq_.js) within the app bundle.

Recommendation

Apply the workaround by introducing the custom CSS property and updating the avatar component to set it accordingly, as this allows for a flexible and configurable solution that accommodates both bundled and custom pets.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Custom desktop pets show scaling artifacts from forced sprite resampling [3 comments, 2 participants]