[GH-ISSUE #3757] [Issue]: v2.3.3 — NovelAI style plate: "Choose image" blanks the connection editor panel, image can never be set #2024

Closed
opened 2026-10-21 05:44:40 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @jswen4-tech on GitHub (Jul 17, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3757

Originally assigned to: @SpicyMarinara on GitHub.

Follow-up to #3725 / #3732. The style plate can't be configured at all — clicking the image picker blanks the connection editor panel.

I notice this item on #3732's manual review checklist is unchecked, and I think this is part of it:

  • Manually verify NovelAI V4.5 style-plate upload/removal and dynamic resolution with a live NovelAI connection.

(Filing the dynamic-resolution half separately, since it looks like an unrelated server-side issue.)

Steps to reproduce

  1. Connections → open (or create) an image generation connection with service NovelAI
  2. Expand NovelAI generation setup
  3. Under NovelAI V4.5 style plate, click Choose image

Actual

The OS file dialog opens and the entire connection editor panel goes solid black at that same moment. The rest of the UI (sidebars, toolbar, chat, Connections list) renders normally — only the editor panel's contents disappear. The image can never be saved.

Expected

Picker opens; the chosen image is stored and previewed as the style plate.

Narrowing down

  • Happens on Cancel, with no file ever selected — so nothing image-related is involved (no FileReader, no base64, no decode).
  • Reproduces on a brand-new NovelAI connection that has never had a style plate set.
  • Reproduces in Brave, Firefox, and Chrome.
  • No error anywhere — nothing in the browser console (with Preserve log enabled), and nothing in the Vite dev-mode error overlay either, so it doesn't look like a thrown exception being caught by an error boundary.
  • Escape does nothing. Refresh restores the UI, but nothing is saved.
  • Switching to another connection and back restores the panel intact — it renders fine again, just with no image set.
  • If an image was selected before the panel blanked, navigating away prompts "You have unsaved changes. Discard and continue?" — so handleNovelAiStylePlateUpload and the state update do appear to run correctly. Only the panel's rendering breaks.

Tried images at 1761×1028, 512×512, and 256×256 — identical behavior, consistent with it being unrelated to the image itself.

Places I checked that look fine

Sharing these to save you time — I read through them and couldn't find the cause, so it's probably none of these:

  • handleNovelAiStylePlateUpload (ConnectionEditor.tsx ~L2832) — guards no-file / non-image / >10MB, uses FileReader with onerror, only calls updateNovelAi on success.
  • The style-plate render block (ConnectionEditor.tsx ~L3157–3210) — the picker is a plain sr-only <input type="file"> inside a <label>, so clicking it runs no JS at all. The preview <img> is properly guarded behind novelai.styleReferenceImage.
  • NumberSetting (ConnectionEditor.tsx ~L3535+) — commit guards !Number.isFinite(parsed), so no NaN reaches state; integer={false} is passed correctly for Strength/Fidelity.
  • use-settings-sync.ts — handleVisibilityChange only fires on visibilityState === "hidden" and only pushes; a file dialog doesn't hide the tab.
  • AppShell.tsx window.addEventListener("blur", finishResize) — only registered inside startSidebarResize during an active drag, and removed on finish.

The only pattern I can find that fits every symptom is something reacting to the window blur that opening the OS file dialog causes, and collapsing the editor body (which is gated behind {expanded && (...)}) — but I couldn't find what flips it.

Environment

  • Marinara Engine v2.3.3, Windows, launched via MarinaraLauncher.exe
  • Stock install — no local modifications
  • Reproduced in Brave, Firefox, and Chrome, and also with the client run via pnpm dev against the backend on :7860
  • NovelAI native API (https://image.novelai.net), model nai-diffusion-4-5-full, Opus tier

I opened #3725 originally and I'm happy to test any fix — I can build from source and reproduce this in under a minute.

Originally created by @jswen4-tech on GitHub (Jul 17, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3757 Originally assigned to: @SpicyMarinara on GitHub. Follow-up to #3725 / #3732. The style plate can't be configured at all — clicking the image picker blanks the connection editor panel. I notice this item on #3732's manual review checklist is unchecked, and I think this is part of it: > - [ ] Manually verify NovelAI V4.5 style-plate upload/removal and dynamic resolution with a live NovelAI connection. (Filing the dynamic-resolution half separately, since it looks like an unrelated server-side issue.) ## Steps to reproduce 1. Connections → open (or create) an image generation connection with service **NovelAI** 2. Expand **NovelAI generation setup** 3. Under **NovelAI V4.5 style plate**, click **Choose image** ## Actual The OS file dialog opens and the **entire connection editor panel goes solid black** at that same moment. The rest of the UI (sidebars, toolbar, chat, Connections list) renders normally — only the editor panel's contents disappear. The image can never be saved. ## Expected Picker opens; the chosen image is stored and previewed as the style plate. ## Narrowing down - **Happens on Cancel**, with no file ever selected — so nothing image-related is involved (no FileReader, no base64, no decode). - **Reproduces on a brand-new NovelAI connection** that has never had a style plate set. - **Reproduces in Brave, Firefox, and Chrome.** - **No error anywhere** — nothing in the browser console (with Preserve log enabled), and **nothing in the Vite dev-mode error overlay** either, so it doesn't look like a thrown exception being caught by an error boundary. - Escape does nothing. Refresh restores the UI, but nothing is saved. - **Switching to another connection and back restores the panel intact** — it renders fine again, just with no image set. - If an image *was* selected before the panel blanked, navigating away prompts **"You have unsaved changes. Discard and continue?"** — so `handleNovelAiStylePlateUpload` and the state update do appear to run correctly. Only the panel's rendering breaks. Tried images at 1761×1028, 512×512, and 256×256 — identical behavior, consistent with it being unrelated to the image itself. ## Places I checked that look fine Sharing these to save you time — I read through them and couldn't find the cause, so it's probably none of these: - `handleNovelAiStylePlateUpload` (`ConnectionEditor.tsx` ~L2832) — guards no-file / non-image / >10MB, uses FileReader with `onerror`, only calls `updateNovelAi` on success. - The style-plate render block (`ConnectionEditor.tsx` ~L3157–3210) — the picker is a plain `sr-only` `<input type="file">` inside a `<label>`, so clicking it runs no JS at all. The preview `<img>` is properly guarded behind `novelai.styleReferenceImage`. - `NumberSetting` (`ConnectionEditor.tsx` ~L3535+) — `commit` guards `!Number.isFinite(parsed)`, so no `NaN` reaches state; `integer={false}` is passed correctly for Strength/Fidelity. - `use-settings-sync.ts` — `handleVisibilityChange` only fires on `visibilityState === "hidden"` and only pushes; a file dialog doesn't hide the tab. - `AppShell.tsx` `window.addEventListener("blur", finishResize)` — only registered inside `startSidebarResize` during an active drag, and removed on finish. The only pattern I can find that fits every symptom is something reacting to the **window blur** that opening the OS file dialog causes, and collapsing the editor body (which is gated behind `{expanded && (...)}`) — but I couldn't find what flips it. ## Environment - Marinara Engine **v2.3.3**, Windows, launched via `MarinaraLauncher.exe` - Stock install — no local modifications - Reproduced in Brave, Firefox, and Chrome, and also with the client run via `pnpm dev` against the backend on :7860 - NovelAI native API (`https://image.novelai.net`), model `nai-diffusion-4-5-full`, Opus tier --- I opened #3725 originally and I'm happy to test any fix — I can build from source and reproduce this in under a minute.
bsakaguchi 2026-10-21 05:44:40 +07:00
  • closed this issue
  • added the
    bug
    label
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#2024
No description provided.