mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #6612] [MERGED] feat: show only active Expression Engine sprites in Roleplay #7252
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#7252
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/6612
Author: @SpicyMarinara
Created: 9/24/2026
Status: ✅ Merged
Merged: 9/24/2026
Merged by: @SpicyMarinara
Base:
staging← Head:codex/active-expression-sprites📝 Commits (7)
1f873c0feat: define optional active expression sprite visibility95f92a4Merge branch 'staging' into codex/active-expression-sprites63bc02ffeat: retain active sprites until the next expression result completes31f9e55Merge remote-tracking branch 'origin/staging' into codex/active-expression-spritesd68fe5aMerge remote-tracking branch 'origin/codex/active-expression-sprites' into codex/active-expression-spritesf6ccebbfix: retain pending expression sprites across chat switches6a8480ftest: await expression processing before reload checks📊 Changes
13 files changed (+513 additions, -11 deletions)
View changed files
📝
CHANGELOG.md(+2 -0)➕
e2e/expression-active-sprites.e2e.ts(+339 -0)📝
packages/client/src/components/chat/ChatArea.tsx(+30 -1)📝
packages/client/src/components/chat/ChatRoleplaySurface.tsx(+6 -1)📝
packages/client/src/components/chat/ChatSettingsDrawer.tsx(+10 -0)📝
packages/client/src/components/chat/ExpressionSpriteSettings.tsx(+13 -0)📝
packages/client/src/components/chat/SpriteOverlay.tsx(+5 -0)📝
packages/client/src/lib/sprite-expression-state.ts(+33 -0)📝
packages/client/src/localization/locales/en.json(+2 -0)📝
packages/server/src/routes/generate.routes.ts(+6 -5)📝
packages/server/src/routes/generate/retry-agents-route.ts(+6 -2)📝
packages/shared/src/types/chat.ts(+4 -0)📝
scripts/regressions/open-issues.regression.ts(+57 -2)📄 Description
Linked issue
Closes #6611
Why this change
Roleplay scenes can keep every enabled sprite visible even when only a few characters are active. The new Only show active sprites option under Chat Settings → Agents → Expression Engine shows the owners returned by the latest completed expression result. It is off by default.
What changed
Validation
Automated validation:
pnpm install,pnpm check(including localization, formatting, TypeScript, lint, and production builds), andpnpm version:checkpassed. The existing unrelated GameNarration hook-dependency warning remains; there are no lint errors.node scripts/run-regressions.mjs --filter open-issues.regression.tspassed, covering pending results, empty results overriding retained appearances, and legacy character/persona maps.pnpm smoke:ui e2e/expression-active-sprites.e2e.tspassed 6/6: classic/dark and Visual Novel/light across desktop Chromium, Android-sized Chromium, and iPhone-sized WebKit. A local controlled provider exercises the real generation/retry routes, separate main/expression waits, regenerated swipes, switching chats during pending expressions, reloads, fresh retry owners, empty results, and restoring all sprites when disabled. The fixture serializes access to the global Expression Engine config shared by mobile projects.spriteExpressionson an empty retry was rejected: those are sparse appearance state, whileexpressionSpriteIds: []is the authoritative completed visibility result. Clearing appearances would change the established toggle-off behavior. The regression and browser tests verify empty visibility with a retained appearance map; code comments explain the separation. A follow-up local review identified a transient loading reset, which was corrected by retaining each chat’s selection in ChatArea above the Roleplay view’s loading/remount boundary. The final follow-up local review of the application changes completed with no additional findings. The subsequent test-only reload guard passed E2E type checking and all six browser cases.GitHub review follow-up: reproduced the pending chat-switch failure, retained selection per chat above the loading boundary, and strengthened nonempty retries by seeding a different saved owner before asserting the fresh response. The legacy persona-only inference suggestion was declined: user appearances survive regeneration and cannot prove that the assistant result completed. Added regressions for that ambiguity and for explicit persona-only completion markers. The later test-readiness suggestion was fixed by polling generation/translation status and agent processing before reload. The minor Visual Novel dimming suggestion was declined: this enabled filter intentionally keeps visible sprites at their configured opacity, including before its first completed result; disabling it retains the existing dimming policy.
The final hosted review completed on
6a8480f9cwith no additional actionable comments. Its informational warnings were triaged: the Termux assertion only received Prettier line wrapping in the touched regression file (identical call and arguments), and the generic docstring percentage does not justify boilerplate for the existing UI/test helpers; the new resolver and persisted fields already have focused documentation.Human verification checklist (left unchecked):
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Docs and release impact
An Unreleased changelog entry is included. No version bump or user-facing documentation files changed.
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue openedUI evidence
Default/off, pending, completed, and settings screenshots in desktop/mobile and light/dark themes. Download the self-contained HTML using Raw / Save As and open it in a browser. All chats and provider responses are synthetic; artwork is the repository's Mari sprite.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.