mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #658] [Feature]: Avatar crop widget should operate on the full image (and Personas should have one too) #310
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#310
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?
Originally created by @Romuromylus on GitHub (May 10, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/658
Originally assigned to: @Romuromylus on GitHub.
What problem does this solve?
In the Character editor, the avatar zoom/position widget operates on what is effectively the already-cover-cropped view of the character image, not the full source image. Tall portraits (anything significantly taller than wide) are auto-cropped to their vertical center by
object-fit: cover, and the user has no way to:The result: users with great-looking 2:3 / 9:16 portraits end up with circle avatars stuck at the chest/midriff with no recourse, even though the full portrait stays available for the Roleplay glued side panel and other "full" views.
Personas have the same avatar upload flow but no crop UI at all in
PersonasPanel.tsx— so persona circle avatars can't be re-framed in any way.Reported by a Marinara user on Windows 11, installer .exe, v1.5.9. Affects circle avatars in all chat modes and in the persona chooser.
Proposed solution
zoom > 1, so users can re-center the crop on a face / focal point even without zooming in.avatarCropextension model and the same render-side helper, closing the customization gap.Backward compatibility: existing characters/personas with no crop data (or the legacy
{ zoom: 1, offsetX: 0, offsetY: 0 }) should keep rendering identically — no surprise visual shifts in chat sidebars, notifications, or browser tiles for already-shipped avatars.Alternatives considered
react-easy-cropfor a more standard cropper UX. Rejected as a much heavier dependency change for a feature that is already ~95% implemented locally.object-containglobally. Rejected because it would silently change the appearance of already-shipped avatars in every render site.Additional context
Relevant code today:
packages/client/src/components/characters/CharacterEditor.tsx— theMetadataTab"Avatar Zoom & Position" block (around line 1012). Min zoom hard-coded to 1, drag handler gated byif (crop.zoom <= 1) return;.packages/client/src/lib/utils.ts—getAvatarCropStyle()returns{}whenzoom <= 1, so the legacyobject-coverpath takes over for any non-zoomed-in crop.packages/client/src/components/panels/PersonasPanel.tsx— the avatar upload athandleAvatarUploadhas no follow-on crop UI.Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@Romuromylus commented on GitHub (May 10, 2026):
Planned Approach:
fullImage: trueflag to the existingAvatarCropshape so the editor / render path can switch toobject-containsemantics (zoom out below 1x, pan at any zoom). Existing crops stay on the current cover-mode codepath, so already-shipped avatars don't shift visually anywhere they're rendered.Will hold the PR in draft until manually verified on the running app.