[GH-ISSUE #926] [Issue]: Game Mode persona portrait ignores avatar crop everywhere #451

Closed
opened 2026-10-20 17:29:01 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Romuromylus on GitHub (May 16, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/926

Originally assigned to: @Romuromylus on GitHub.

Summary

In Game Mode, my user persona's portrait renders with the uncropped avatar image everywhere it appears (party portrait bar, party sidebar, character sheet, dialogue-line portraits next to my lines, and the setup wizard's persona picker). The avatar crop set in the persona's avatar settings is ignored. NPC and party-character portraits still respect their crops correctly. Same shape as the chat-side propagation gaps fixed in #665 / #669, but extended to Game Mode surfaces that were never threaded through.

Expected behavior

Wherever the user persona portrait shows in Game Mode, it should respect the crop set in the persona's Avatar Crop widget, matching how the same persona renders in Roleplay / Conversation modes.

Actual behavior

The user persona portrait renders uncropped (full source image squashed into the circle) in every Game Mode surface:

  • Party portrait bar (GamePartyBar)
  • Party sidebar + character chip in messages (GamePartySidebar)
  • Player character sheet card (GameCharacterSheet via partyCards)
  • Inline dialogue portraits next to {{user}} lines (GameNarration via speakerAvatarInfos)
  • Setup wizard "Your Persona" selected + list rows (GameSetupWizard)

Party-character (non-persona) portraits in the same surfaces respect their crop, so the data plumbing works end-to-end for characters; the persona branches were just missed.

Steps to reproduce

  1. Open Personas, pick a persona whose avatar is not 1:1 square (e.g. a tall portrait).
  2. Use the Avatar Crop widget to crop a face region.
  3. Confirm the crop renders correctly in Roleplay or Conversation chats.
  4. Start a Game Mode chat with that persona selected.
  5. Observe: the party bar portrait, sidebar portrait, character-sheet portrait, and any inline dialogue portrait next to a {{user}} line all show the uncropped avatar.
  6. (Same in the Game Setup wizard's persona picker: the selected persona row and the list rows both show uncropped.)

Environment

  • Marinara Engine version: 1.5.9 (staging at time of report)
  • Install type: source (fork-deployed Docker build on a private EasyPanel instance)
  • OS + version: Windows 11 client; Linux server
  • Browser or app shell: Chrome

Logs, screenshots, or video

No console errors. The data trace is straightforward:

  • personaInfo.avatarCrop is correctly populated upstream at packages/client/src/components/chat/ChatArea.tsx via parseAvatarCropJson(persona.avatarCrop), and PersonaInfo already declares the avatarCrop field.
  • The character branches in Game Mode propagate it (c.avatarCrop ?? fromMap?.avatarCrop ?? null).
  • The persona branches drop it at four builders:
    • packages/client/src/components/game/GameNarration.tsx — persona setAvatarInfo call passes url only (the character branch one line above passes crop).
    • packages/client/src/components/game/GameSurface.tsx — partyMembers builder's persona branch and partyCards builder's player-persona branch both omit avatarCrop.
    • packages/client/src/components/game/GameSetupWizard.tsx — the inline personas row type doesn't declare avatarCrop, and the two <img> blocks for persona rows don't use getAvatarCropStyle (they're not routed through the CharacterAvatar helper that already exists in the file).

Downstream consumers (GamePartyBar, GamePartySidebar, GameCharacterSheet) all already read avatarCrop and call getAvatarCropStyle, so just feeding the field through fixes those surfaces.

Additional context

Same shape as #665 / #669 — chat-side propagation was completed for chat surfaces but never extended to Game Mode persona surfaces.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Romuromylus on GitHub (May 16, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/926 Originally assigned to: @Romuromylus on GitHub. ## Summary In Game Mode, my user persona's portrait renders with the **uncropped** avatar image everywhere it appears (party portrait bar, party sidebar, character sheet, dialogue-line portraits next to my lines, and the setup wizard's persona picker). The avatar crop set in the persona's avatar settings is ignored. NPC and party-character portraits still respect their crops correctly. Same shape as the chat-side propagation gaps fixed in #665 / #669, but extended to Game Mode surfaces that were never threaded through. ## Expected behavior Wherever the user persona portrait shows in Game Mode, it should respect the crop set in the persona's Avatar Crop widget, matching how the same persona renders in Roleplay / Conversation modes. ## Actual behavior The user persona portrait renders uncropped (full source image squashed into the circle) in every Game Mode surface: - Party portrait bar (`GamePartyBar`) - Party sidebar + character chip in messages (`GamePartySidebar`) - Player character sheet card (`GameCharacterSheet` via `partyCards`) - Inline dialogue portraits next to {{user}} lines (`GameNarration` via `speakerAvatarInfos`) - Setup wizard "Your Persona" selected + list rows (`GameSetupWizard`) Party-character (non-persona) portraits in the same surfaces respect their crop, so the data plumbing works end-to-end for characters; the persona branches were just missed. ## Steps to reproduce 1. Open Personas, pick a persona whose avatar is not 1:1 square (e.g. a tall portrait). 2. Use the Avatar Crop widget to crop a face region. 3. Confirm the crop renders correctly in Roleplay or Conversation chats. 4. Start a Game Mode chat with that persona selected. 5. Observe: the party bar portrait, sidebar portrait, character-sheet portrait, and any inline dialogue portrait next to a {{user}} line all show the *uncropped* avatar. 6. (Same in the Game Setup wizard's persona picker: the selected persona row and the list rows both show uncropped.) ## Environment - Marinara Engine version: 1.5.9 (staging at time of report) - Install type: source (fork-deployed Docker build on a private EasyPanel instance) - OS + version: Windows 11 client; Linux server - Browser or app shell: Chrome ## Logs, screenshots, or video No console errors. The data trace is straightforward: - `personaInfo.avatarCrop` is correctly populated upstream at `packages/client/src/components/chat/ChatArea.tsx` via `parseAvatarCropJson(persona.avatarCrop)`, and `PersonaInfo` already declares the `avatarCrop` field. - The character branches in Game Mode propagate it (`c.avatarCrop ?? fromMap?.avatarCrop ?? null`). - The persona branches drop it at four builders: - `packages/client/src/components/game/GameNarration.tsx` — persona `setAvatarInfo` call passes `url` only (the character branch one line above passes `crop`). - `packages/client/src/components/game/GameSurface.tsx` — `partyMembers` builder's persona branch and `partyCards` builder's player-persona branch both omit `avatarCrop`. - `packages/client/src/components/game/GameSetupWizard.tsx` — the inline `personas` row type doesn't declare `avatarCrop`, and the two `<img>` blocks for persona rows don't use `getAvatarCropStyle` (they're not routed through the `CharacterAvatar` helper that already exists in the file). Downstream consumers (`GamePartyBar`, `GamePartySidebar`, `GameCharacterSheet`) all already read `avatarCrop` and call `getAvatarCropStyle`, so just feeding the field through fixes those surfaces. ## Additional context Same shape as #665 / #669 — chat-side propagation was completed for chat surfaces but never extended to Game Mode persona surfaces. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#451
No description provided.