mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
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#4723
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/671
Author: @Romuromylus
Created: 5/11/2026
Status: ✅ Merged
Merged: 5/11/2026
Merged by: @Romuromylus
Base:
main← Head:feat/avatar-crop-chat-propagation📝 Commits (3)
3d30f3eRevert "Merge pull request #666 from Romuromylus/revert/avatar-crop-full-image"15dac0afeat(avatar-crop): propagate new-format crop through chat surfacesc612b04Merge branch 'main' into feat/avatar-crop-chat-propagation📊 Changes
41 files changed (+874 additions, -265 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
packages/client/src/components/characters/CharacterEditor.tsx(+19 -141)📝
packages/client/src/components/characters/CharacterLibraryView.tsx(+3 -3)📝
packages/client/src/components/chat/ChatArea.tsx(+3 -1)📝
packages/client/src/components/chat/ChatInput.tsx(+3 -3)📝
packages/client/src/components/chat/ChatMessage.tsx(+8 -5)📝
packages/client/src/components/chat/ChatNotificationBubbles.tsx(+2 -2)📝
packages/client/src/components/chat/ChatSettingsDrawer.tsx(+4 -4)📝
packages/client/src/components/chat/ChatSetupWizard.tsx(+1 -1)📝
packages/client/src/components/chat/ConversationInput.tsx(+3 -3)📝
packages/client/src/components/chat/ConversationMessage.tsx(+7 -4)📝
packages/client/src/components/chat/ConversationView.tsx(+4 -4)📝
packages/client/src/components/chat/ExpressionPanel.tsx(+2 -2)📝
packages/client/src/components/chat/QuickPersonaSwitcher.tsx(+21 -12)📝
packages/client/src/components/chat/QuickSwitcherMobile.tsx(+19 -11)📝
packages/client/src/components/chat/RecentChats.tsx(+4 -4)📝
packages/client/src/components/chat/chat-area.types.ts(+3 -1)📝
packages/client/src/components/game/GameCharacterSheet.tsx(+3 -3)📝
packages/client/src/components/game/GameNarration.tsx(+4 -4)📝
packages/client/src/components/game/GamePartyBar.tsx(+4 -4)...and 21 more files
📄 Description
Linked issue
Closes #669
Why this change
PR #661 shipped the new full-image avatar cropper and persona crop UI but explicitly deferred chat-side propagation. With #661 live, four chat surfaces rendered broken avatars on any saved new-format crop (see #665), so PR #666 reverted it. This PR re-applies #661 and lands the deferred chat-side propagation so the cropper can ship.
Verified end-to-end on a fork deployment with the four #665 surfaces all rendering clean.
What changed
Two commits so the review can separate "re-apply" from "new work":
Revert \"Merge pull request #666...\"— exactgit revert -m 1of the revert PR. Brings back PR #661 unchanged.feat(avatar-crop): propagate new-format crop through chat surfaces— the deferred scope:Part A — data plumbing
CharacterMap.avatarCroptoAvatarCrop | LegacyAvatarCrop | nulland addPersonaInfo.avatarCropinchat-area.types.ts.avatarCropfrom the persona row throughChatArea.tsx'suserPersonaInfouseMemo so all chat consumers receive it.avatarCropon user messages (sharedtype +server/generate.routes.ts+client/use-generate.ts) so the rendered avatar matches the persona that was active when the message was sent, not the current one.ChatMessage/ConversationMessagenow resolve a persona crop style on user messages (msgPersona.avatarCrop→personaInfo.avatarCrop, parsed viaparseAvatarCropJson) and pass it togetAvatarCropStyle.QuickPersonaSwitcherandQuickSwitcherMobileapply the crop to both the picker rows and the active chip in the chat header.Refactor
parsePersonaAvatarCropfromPersonasPanelintolib/utils.ts(renamedparseAvatarCropJson) since it's now used by both panel and chat.AvatarCropValue = AvatarCrop | LegacyAvatarCropinlib/utils.tsand replace inline narrow{ zoom; offsetX; offsetY }types across 17 client files so character-side crop data can also flow in the new shape.Part B — container clipping
The new-format crop renders the
<img>withposition: absolute, so each immediate parent needsposition: relative(in addition to the existingoverflow: hidden). Sweepsrelativeonto 22 parents covering:ChatInput,ChatMessage(compact + RP single-avatar variants),ChatSettingsDrawer(4 sites),ChatSetupWizard,ConversationInput,ConversationMessage(chat bubble + segment-level bubble),ConversationView(2 sites),ExpressionPanel(2 sites),QuickPersonaSwitcheractive chip,RecentChats.GameCharacterSheet,GamePartyBar,GamePartySidebar(3 sites),GameSetupWizard.ChatSidebar.Where the original parent had siblings needing to render outside the avatar bounds (e.g. active-indicator dots), the
QuickPersonaSwitcherpicker rows use the same inner-wrapper pattern PR #661 already applied to the persona panel.No data migration; legacy crops keep rendering via the legacy CSS transform path.
Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
avatarCrop(e.g. a tall portrait re-cropped via the editor): RP scene top character avatar renders the chosen framing, no stripey artifacts at container edges (was #665 surface 1).QuickPersonaSwitcherchip in the chat header and its dropdown picker rows: active persona avatar renders centered, picker rows render correctly (was #665 surface 4).QuickSwitcherMobile(narrow viewport / mobile DPI) — same persona rows render correctly.{ zoom, offsetX, offsetY }crops still render unchanged (slider-era data on existing characters). Legacy CSS transform path is preserved.avatarCropextension at all renders identically to before (uncroppedobject-cover).GamePartyBarandGamePartySidebarmember tiles,GameCharacterSheetportrait — render cropped avatars cleanly.Docs and release impact
UI evidence (if applicable)
Behavioral fix; the editor-side UX is unchanged from PR #661 (already screenshotted there). Chat-side surfaces now render cropped avatars cleanly instead of the four #665 failure modes.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.