mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #547] [Issue]: Background image changes incorrectly when swapping between chats #248
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#248
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?
Originally created by @aidanbrocklebank on GitHub (May 8, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/547
Originally assigned to: @cha1latte on GitHub.
Summary
Moving between roleplay chats too quickly can fail to update the background image to the correct file, leaving the background image for the previous chat showing. This can also overwrite the background image URL associated with the swapped-to chat.
Expected behavior
Every roleplay chat should have an associated background, which only changes when the user changes it in settings or when the "Background" agent changes it. The background image associated with the currently selected roleplay chat should be displayed.
Actual behavior
Swapping between two roleplay chats sometimes fails to update the background image, leaving the background for the former chat displayed behind the latter chat. This also rewrites the saved background for the latter roleplay chat.
Steps to reproduce
This may not happen every time, due to the race condition.
Environment
Logs, screenshots, or video
Additional context
This is related but distinct to #260.
My understanding is that this is the result of the two background-related
useEffects inChatArea.tsxboth havingchat?.idas a dependency, meaning they can race each other and happen in the wrong order. The timeout that delays persisting the filename also contributes inconsistency.I have a working fix locally that I can make into a PR.
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked: