mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #4538] [Issue]: NovelAI style plate blanks the connection editor on file-dialog open, and the image is never saved (v2.4.0, packaged launcher) #2473
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#2473
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 @jswen4-tech on GitHub (Aug 3, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4538
Originally assigned to: @SpicyMarinara on GitHub.
Follow-up to #3757 (closed but not fixed; still reproduces on v2.4.0).
There are two linked failures. Both are reproducible; the second is the real blocker.
Steps: Connections → open a NovelAI image-generation connection → NovelAI generation setup → NovelAI V4.5 style plate → Choose image.
The connection editor content goes dark immediately — even on Cancel with no file selected. The app shell (sidebars, toolbar) stays; only the editor region goes dark. A window resize does not restore it, but forcing a repaint another way (e.g. selecting a node in DevTools) does. That points to a compositor/paint problem on focus loss rather than a layout change.
After choosing an image, the style plate is empty after (a) switching to another connection and back, and (b) a full refresh. The image never survives. Save can't be reached normally because the editor is blanked at the moment of selection; even when forced back and saved, it hasn't reliably persisted on the launcher.
Key clue — source vs. packaged build differ
Packaged launcher (MarinaraLauncher.exe, served at 127.0.0.1:7860 in Chrome): image does not persist. While the editor is blank, React DevTools shows no ConnectionEditor in the component tree — suggesting the editor unmounts/closes on file-dialog blur rather than merely failing to paint. This would explain why the image can't be saved.
From source (pnpm dev, localhost:5173): the editor stays mounted and the image does survive a refresh.
So the behavior is packaged-build-specific, which seems like the most important lead.
Ruled out (from source reading + live DevTools):
Not the style-plate render/upload code — handleNovelAiStylePlateUpload and the render block are clean.
Not a thrown error — with "pause on caught exceptions" enabled, nothing throws on repro.
Not the marinaraEffectsPaused CSS — those rules only target the logo and RGB toggle.
Not the app background-paint effect (App.tsx ~L577) — no focus/blur dependency; the dark is just the default getDefaultAppBackgroundColor showing through an empty appBackgroundColor (
#0b0b0f).
Not backdrop-filter; not a height collapse (panel elements retain height; elementsFromPoint at center hits only the bare app shell).
Likely suspect
Console logs [Violation] 'blur' handler took ~200ms on click. usePageActivity() (hooks/use-page-activity.ts) returns isPageActive = document.visibilityState === "visible" && document.hasFocus() and listens on window blur. Opening an OS file dialog blurs the window → isPageActive flips false. A transient focus loss to a file dialog isn't the tab being hidden, but several render paths consume isPageActive.
Suggested direction
Check what unmounts/dismisses the connection editor on window blur in the packaged build — the editor leaving the React tree on file-dialog open is the core bug and explains why the image can't be saved.
Consider basing isPageActive on visibilitychange only (drop the window blur/hasFocus() term), or ensure only decorative/animation paths consume it — never the editor's mount/visibility.
Environment: Marinara Engine v2.4.0, Windows, stock install. Reproduced via packaged launcher and pnpm dev. Chrome, Brave, Firefox.
I can build from source and test any patch within a minute.
@SpicyMarinara commented on GitHub (Aug 4, 2026):
Implementation has started in draft PR #4553. Owner: @SpicyMarinara.
@SpicyMarinara commented on GitHub (Aug 4, 2026):
Delivered to staging via #4553 (merge commit
7708b7f0b2).