mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7301] [MERGED] fix(gallery): Background works when Illustrator is installed but not added #7672
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#7672
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/7301
Author: @SpicyMarinara
Created: 10/8/2026
Status: ✅ Merged
Merged: 10/8/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/gallery-background-one-off📝 Commits (1)
aac1dcafix(gallery): offer Roleplay Background when Illustrator is installed but not added📊 Changes
7 files changed (+95 additions, -8 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
docs/media/scene-backgrounds.md(+2 -0)📝
docs/roleplay/backgrounds.md(+1 -1)📝
e2e/illustrator-manual-cadence.e2e.ts(+22 -1)📝
packages/client/src/components/chat/ChatGalleryPanel.tsx(+4 -4)📝
packages/server/src/routes/generate/retry-agents-route.ts(+4 -1)📝
scripts/regressions/illustrator-message-range.regression.ts(+61 -1)📄 Description
Linked issue
Closes #7300
Why this change
In a Roleplay chat where Illustrator is installed but not added, the Gallery offered a one-off Illustrate (added in #6885) but not Background. To get a one-off generated scene background, people had to add Illustrator to the chat, which also turns on its automatic runs. Mari asked for Background to be available whenever Illustrate is.
Root cause: two gates. The Gallery passed the background action only when Illustrator was added to the chat, and the retry route only treated a one-off request as allowed without the agent when its target was "illustration", so a background request would have been refused even with the button shown.
What changed
ChatGalleryPanel.tsx: Illustrate and Background share one condition,manualIllustratorAvailable(Illustrator installed, and either a Roleplay chat or Illustrator enabled for the chat). Game and Conversation are unchanged: in Game it equals the old condition, and Conversation has no Background action.retry-agents-route.ts: a request for exactly["illustrator"]with retry targets exactly["background"]now counts as a one-off manual run, like Illustrate. Illustrator is resolved for that request even when it isn't added to the chat or agents are off. It never writesenableAgentsoractiveAgentIds. Requests with both targets, ordinary retries and an uninstalled package still go through the active-agent check. The other gates on the path (no config row, connection resolution, the auto-backgrounds switch, applying the background) were traced and already allow a manual background request.scripts/regressions/illustrator-message-range.regression.ts: with agents off, and with agents on but Illustrator not added, a background-only request makes one plan and one image, applies the background and leaves chat activation unchanged. A request with both targets, and a request with the package uninstalled, fail without calling the provider.e2e/illustrator-manual-cadence.e2e.ts: Background shows with agents off, is hidden when the package is uninstalled, and sends the background payload without changing activation. Existing assertions are unchanged; only the first test's title now mentions background.docs/media/scene-backgrounds.mdanddocs/roleplay/backgrounds.md. CHANGELOG entry under[Unreleased].Known side effect, the same as Illustrate since #6885: a background-only retry, such as the one offered after an automatic background run fails, also runs after Illustrator has been removed from the chat. It still needs a click and an installed package.
Validation
pnpm checkpasses locallyCONTRIBUTING.mdAgent-run checks (not a substitute for the boxes above):
pnpm checkon the final head: exit 0.illustrator-message-range,illustrator-manual-cadence,manual-agent-retry-resolution,agent-connection-parameters,agent-retry-batching,docs-language: all pass. Withretry-agents-route.tsreverted to staging,illustrator-message-rangefails at the new background assertion (nobackground_change).e2e/illustrator-manual-cadence.e2e.ts+e2e/illustration-arrival.e2e.tson desktop-chromium: 8 passed.illustrator-manual-cadenceon mobile-webkit: 2 passed. With the client change reverted, the first test fails atexpect(background).toBeVisible().coderabbit review --agent --committed): 0 findings.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)Translation follow-up: #7302.
UI evidence (if applicable)
None yet.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.