mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #770] [MERGED] fix(library): use square aspect for character card image to undistort saved crops #4767
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#4767
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/770
Author: @Romuromylus
Created: 5/12/2026
Status: ✅ Merged
Merged: 5/12/2026
Merged by: @Romuromylus
Base:
main← Head:fix/character-library-aspect📝 Commits (2)
4f5f6eafix(library): use square aspect for character card image to undistort saved crops633656efix(library): match shimmer placeholder to new square card image📊 Changes
1 file changed (+3 additions, -3 deletions)
View changed files
📝
packages/client/src/components/characters/CharacterLibraryView.tsx(+3 -3)📄 Description
Linked issue
Closes #769
Why this change
AvatarCropWidget). The Character Library card thumbnail and the detail-panel hero rendered them in anaspect-[4/3]container, andgetAvatarCropStyleproduces an<img>sized to(cw/srcWidth × ch/srcHeight)withobject-fit: fill— so the square crop was stretched horizontally by exactly the container's aspect ratio (4/3). Faces looked compressed vertically / wide. A Discord user reported the bug and verified that overriding the container aspect to1/1via custom-theme CSS fixed the visual.What changed
packages/client/src/components/characters/CharacterLibraryView.tsx: switched the detail-panel hero image container and the grid card image container fromaspect-[4/3]/sm:aspect-[4/3]toaspect-square/sm:aspect-squareso the saved square crop renders undistorted. Cards become slightly taller; uncropped portrait avatars now show more of the source than before, less cropped top/bottom.rectangleSafeCropStyleinChatMessage.tsx) is left untouched — fixing the root math ingetAvatarCropStylewould touch ~30 consumers and is out of scope for this report.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
h-24 w-24thumbnail variant (below thesm:breakpoint) is unchanged — only thesm:-and-up rendering switches tosm:aspect-square.object-coveron the<img>).Docs and release impact
UI evidence (if applicable)
Reproduced and verified on a live deploy of this branch. JS inspection confirms every Character Library image container computes at exactly 1:1 (282×282 in the grid) and
aspect-[4/3]is absent from the rendered tree. No console errors introduced.Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.