mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7516] [MERGED] fix(tracker): keep the outfit in Character Tracker portraits #7770
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#7770
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/7516
Author: @SpicyMarinara
Created: 10/13/2026
Status: ✅ Merged
Merged: 10/13/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/7419-tracker-portrait-outfit📝 Commits (5)
c6e72ccfix(tracker): keep the outfit in Character Tracker portraitse5b85dfdocs(tracker): describe outfit portraits and the new portrait buttons37ff042fix(tracker): accept long looks and outfits in the portrait routec8af159fix(tracker): keep every outfit sentence and protect uploads during portrait generationc22a0fafix(tracker): keep provider error text out of the portrait route response📊 Changes
16 files changed (+505 additions, -64 deletions)
View changed files
📝
docs/agents/built-in-agents.md(+1 -1)📝
docs/roleplay/hud-and-trackers.md(+2 -0)📝
packages/client/src/components/agents/AgentEditor.tsx(+18 -0)📝
packages/client/src/features/tracker-panel/components/TrackerSectionList.tsx(+3 -0)📝
packages/client/src/features/tracker-panel/components/TrackerWindowCharacters.tsx(+5 -0)📝
packages/client/src/features/tracker-panel/components/character-card/FeaturedCharacterPortrait.tsx(+34 -0)📝
packages/client/src/features/tracker-panel/components/character-card/FeaturedCharacterTrackerCard.tsx(+3 -0)📝
packages/client/src/features/tracker-panel/components/controls/TrackerPortraitStage.tsx(+38 -0)📝
packages/client/src/features/tracker-panel/components/sections/CharacterTrackerPanel.tsx(+5 -0)📝
packages/client/src/features/tracker-panel/hooks/use-tracker-mutations.ts(+56 -10)📝
packages/client/src/localization/locales/en.json(+5 -0)📝
packages/server/src/routes/avatars.routes.ts(+54 -0)📝
packages/server/src/routes/generate.routes.ts(+11 -51)➕
packages/server/src/services/image/tracker-portrait.ts(+147 -0)📝
packages/shared/src/utils/image-prompt-compiler.ts(+2 -1)📝
scripts/regressions/image-appearance-game.regression.ts(+121 -1)📄 Description
Linked issue
Closes #7419
Why this change
wearing …clause, but the portrait prompt compiler drops that clause for the Off, Auto, anime, Danbooru, cinematic, digital-painting and painterly style profiles. Only the coat-and-boots words it recognises survived, and an outfit like "a simple red tunic" vanished entirely, so the image model saw only the look.What changed
Outfit:line, and the shared prompt compiler now keepsOutfit:items the same way it keepsAppearance:items. A user who writesOutfit:in a prompt the compiler shortens also keeps it now. An outfit written as several sentences ("Barefoot. Loose linen trousers and a sleeveless grey vest.") is joined into one line, so every part of it survives, not just the first sentence.POST /api/avatars/npc/:chatId/generatebehind those buttons. In debug mode (or withDEBUG_AGENTS), it logs the final portrait prompt and negative prompt, for automatic portraits too.services/image/tracker-portrait.ts, which replaces the inline generation ingenerate.routes.ts.docs/agents/built-in-agents.mdand the portrait buttons indocs/roleplay/hud-and-trackers.md. Translations: #7517.Validation
pnpm checkpasses locallyCONTRIBUTING.mdCommands run by the agent, with results:
node ./scripts/run-regressions.mjs --filter scripts/regressions/image-appearance-game.regression.ts: passed. The new #7419 block checks Look vs Look + Outfit vs missing, blank or non-text outfit prompt assembly, that a one-phrase and a multi-sentence outfit both survive compilation in every built-in style profile, and the route: 400 without a tracker image connection, the outfit reaching the image service only for Look + Outfit, the old portrait file kept when the image service fails (and the service's own error text kept out of the response), a second request for the same character refused with 409 while the first is held open (it never reaches the image service), and an upload made during generation kept on disk (the late generation answers 409). With the compiler change reverted, it fails atoff: the outfit reaches the image prompt. On the pre-review head it failed at the non-text outfit (replace is not a function), then atoff: and the next one(multi-sentence outfit), then at the 409 check (200: a second paid image); with only the upload guard disabled it fails at the late request (200: the upload overwritten).LOG_LEVEL=warn: withdebugMode: truethe server prints[debug/character-tracker/portrait] prompt:with the outfit in it and the negative prompt; withdebugMode: falseit prints nothing.prompt.regression.ts,tracker,image,avatar,portrait,illustrator,open-issues,agent-activation,spatial-context,localization: all passed (before review fixes). After the review fixes (c22a0fa35):image-appearance-game(1/1),agent-activation(2/2),spatial-context(1/1) andopen-issues(1/1) passed again.pnpm lint(server and client tsc, client ESLint): passed, with one existing warning inHomeProfessorMariChat.tsx.pnpm localization:check: passed. Prettier on the changed files: clean.pnpm check(locales, format, lint, e2e and token-estimation types, build): passed on the final code (c22a0fa35), after the review fixes; the only lint output is the existingHomeProfessorMariChat.tsxwarning.pnpm localization:check: passed.coderabbit review --agent --committed): 2 findings, both declined with reasons:.pngmay hold JPEG/WebP bytes": the NPC avatar route serves any recognised raster by its detected format (validateImageAssetBufferinmedia-file-security.tsexists for exactly this), and the.pngname is the existing contract that the on-disk lookups ingenerate.routes.tsandchats.routes.tsrely on. The automatic path always wrote this way; this PR only moved it.generateAvataris anasyncfunction, so it always returns a promise and.finallyalways runs.[docs-i18n]follow-up is #7517.err.message": fixed inc22a0fa35after the GitHub CodeRabbit review raised it too (CWE-209). Only the two conflict messages are sent as-is; the regression asserts the provider's text stays out of the 502 body.requirePrivilegedAccess": the global host, IP allowlist, Basic Auth and CSRF hooks already cover every API route. The privileged gate is for admin features (backups, imports, packages, updates); the peer image and chat generation routes don't use it, and adding it would break the buttons for LAN users without an admin secret.Manual verification notes
Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)Docs changed:
docs/agents/built-in-agents.md,docs/roleplay/hud-and-trackers.md. Translation follow-up: #7517.UI evidence (if applicable)
None captured by the agent; see the manual verification steps above.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.