Skip to content

perf(web): downsample static account avatars - #41655

Merged
lyzno1 merged 1 commit into
mainfrom
codex/snp-741-downsample-account-avatars
Sep 2, 2026
Merged

perf(web): downsample static account avatars#41655
lyzno1 merged 1 commit into
mainfrom
codex/snp-741-downsample-account-avatars

Conversation

@lyzno1

@lyzno1 lyzno1 commented Sep 2, 2026

Copy link
Copy Markdown
Member

Summary

  • downsample cropped static account avatars to a maximum 256px edge before upload
  • preserve aspect ratio, avoid upscaling smaller images, and use high-quality canvas resampling
  • keep animated avatar uploads on the existing original-file path

Fixes SNP-741

Validation

  • vp staged
  • vp test run --project unit app/account/(commonLayout)/account-page/__tests__/avatar-image.spec.ts app/account/(commonLayout)/account-page/__tests__/AvatarWithEdit.spec.tsx (5 tests)
  • browser canvas probe verified a 1000×1000 crop produces a 256×256 PNG on localhost:3000

Screenshots

Not applicable; this changes the uploaded image payload without changing the account UI.

From Codex

@lyzno1
lyzno1 requested a review from iamjoel as a code owner September 2, 2026 08:50
@github-actions github-actions Bot added the web This relates to changes on the web. label Sep 2, 2026
@codecov

codecov Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 86.93%. Comparing base (bda60a3) to head (494e26a).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ccount/(commonLayout)/account-page/avatar-image.ts 95.83% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #41655      +/-   ##
==========================================
- Coverage   86.93%   86.93%   -0.01%     
==========================================
  Files        5309     5311       +2     
  Lines      306039   306130      +91     
  Branches    61329    61346      +17     
==========================================
+ Hits       266061   266123      +62     
- Misses      34691    34720      +29     
  Partials     5287     5287              
Flag Coverage Δ
dify-ui 93.75% <ø> (ø)
web 87.06% <96.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lyzno1
lyzno1 enabled auto-merge September 2, 2026 09:01
@lyzno1
lyzno1 added this pull request to the merge queue Sep 2, 2026
Merged via the queue into main with commit 0285584 Sep 2, 2026
52 checks passed
@lyzno1
lyzno1 deleted the codex/snp-741-downsample-account-avatars branch September 2, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

web This relates to changes on the web.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants