mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #676] [MERGED] fix(avatar-crop): bypass new-format crops on RP rectangle avatars #4725
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#4725
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/676
Author: @Romuromylus
Created: 5/11/2026
Status: ✅ Merged
Merged: 5/11/2026
Merged by: @Romuromylus
Base:
main← Head:fix/rectangle-avatar-object-top📝 Commits (1)
0e31ca3fix(avatar-crop): bypass new-format crops on RP rectangle avatars📊 Changes
1 file changed (+7 additions, -8 deletions)
View changed files
📝
packages/client/src/components/chat/ChatMessage.tsx(+7 -8)📄 Description
Linked issue
Closes #675
Why this change
PR #674 mapped the new-format avatar crop center to
object-positionon RP rectangle sites (compact "rectangles" style and the glued side panel). On a SHORT user message the glued panel becomes a wide rectangle, andobject-coverof a tall portrait into a wide rectangle then crops the top off — any centered focal point (50%/50% for a face at top-of-source) lands on chin/chest instead of the face.Reported in #675 as a follow-up regression to PR #674.
What changed
packages/client/src/components/chat/ChatMessage.tsx—rectangleSafeCropStylenow returns{}for new-format crops on RP rectangle sites instead of computing anobjectPosition. This lets the<img>'s existing className (object-cover [object-top]) govern, which is the pre-PR #674 baseline that handled the short-message wide-rectangle case correctly.{zoom, offsetX, offsetY}crops still pass through unchanged (they compose withobject-coveras a CSS transform).rectangleSafeCropStylehelper indirection is kept so the legacy passthrough remains correct on rectangle sites.This is a partial revert of PR #674 — only the new-format branch reverts; the legacy passthrough that PR #674 also covered is preserved.
Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
test) with a persona that has a saved new-formatavatarCropwhose subject is at the top of the source — in Glued Side Panel mode, the panel should show the persona's face/head, not chin/chest. Spot-check the same with Small Rectangles compact style.{zoom, offsetX, offsetY}crop — the transform should still apply on rectangles (this PR does not change the legacy path).Docs and release impact
UI evidence (if applicable)
Reporter screenshot in #675 shows the pre-fix Glued Side Panel cutting off the face on a short user message ("Oh right, the ritual…what's the ritual?"). Post-fix, the panel uses
object-cover object-topon the raw source, restoring the head/face visibility.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.