mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #8362] [MERGED] Let characters and personas choose their fight token picture #8318
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#8318
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/8362
Author: @kolacheee
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/26/2026
Merged by: @kolacheee
Base:
staging← Head:claude/project-thread-0zjeto📝 Commits (7)
51b63d2Let characters and personas choose their fight token pictureea353efMerge remote-tracking branch 'origin/staging' into claude/project-thread-0zjeto2187d82Call the token picture block Game Mode Iconf59e7b3Merge remote-tracking branch 'origin/staging' into claude/project-thread-0zjeto0261d78Keep the gallery upload check inside the gallery folder9cb0cc5Merge remote-tracking branch 'origin/staging' into claude/project-thread-0zjeto2a52986Show initials when a token picture fails to load; keep a fresh upload selected📊 Changes
20 files changed (+742 additions, -32 deletions)
View changed files
📝
docs/characters/colors-and-stats.md(+10 -0)📝
docs/characters/personas.md(+2 -0)➕
e2e/game-mode-icon.e2e.ts(+201 -0)📝
packages/client/src/components/characters/CharacterEditor.tsx(+20 -1)➕
packages/client/src/components/characters/GameModeIconSection.tsx(+259 -0)📝
packages/client/src/components/chat/ChatArea.tsx(+9 -1)📝
packages/client/src/components/chat/chat-area.types.ts(+9 -1)📝
packages/client/src/components/game/GameCombatUI.tsx(+13 -11)📝
packages/client/src/components/game/GameSurface.tsx(+28 -7)📝
packages/client/src/components/game/RulesetCombatBoard.tsx(+15 -7)📝
packages/client/src/components/game/TacticalCombatUI.tsx(+7 -1)➕
packages/client/src/components/game/TokenPicture.tsx(+19 -0)📝
packages/client/src/components/personas/PersonaEditor.tsx(+22 -1)📝
packages/client/src/localization/locales/en.json(+15 -0)📝
packages/server/src/routes/characters.routes.ts(+22 -1)📝
packages/shared/src/index.ts(+1 -0)📝
packages/shared/src/types/character.ts(+6 -0)📝
packages/shared/src/types/persona.ts(+3 -1)➕
packages/shared/src/utils/combat-icon.ts(+33 -0)➕
scripts/regressions/game-mode-icon.regression.ts(+48 -0)📄 Description
Linked issue
Closes #8360
Why this change
A fight token draws the character's avatar, or the initials when there is none. There was no way to give the token a different picture (a face crop, a token-sized drawing) or to keep the initials when the card has an avatar.
What changed
extensions.combatIconon a character andpersonaStats.combatIconon a persona. SharedparseCombatIconChoice/resolveCombatIconUrlaccept only pictures from the app's own character/persona gallery routes, so a card can never point a token at an outside URL; anything else falls back to the avatar.docs/characters/colors-and-stats.md, pointer inpersonas.md.Validation
pnpm checkpasses locally (one pre-existing lint warning inHomeProfessorMariChat.tsx, unrelated)CONTRIBUTING.mdManual verification notes
e2e/game-mode-icon.e2e.ts, 10/10 green on desktop-chromium and mobile-chromium (the browser drives the real editors): a character switches to Initials (preview shows them, saved on the card), then uploads a picture (selected, previewed, saved), then back to Avatar (choice cleared); a persona with no avatar sees the "no avatar" note and saves Initials into its stats; a non-image upload to both gallery routes is refused with 400 and nothing is added;generatedPartyMemberToCombatantdraws the avatar, nothing for initials, the gallery picture, and ignores an off-site URL; a token whose picture returns 404 shows its initials.scripts/regressions/game-mode-icon.regression.tscovers the parser and resolver.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation): noted on #7512UI evidence (if applicable)
The block sits on the Stats tab above Ruleset sheets: a round token preview beside an Avatar / Custom image / Initials switch; Custom image shows the gallery pictures as round thumbnails and an upload dropzone.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.