[GH-ISSUE #6077] [Issue]: Illustrator settings (image sizes, style profiles, generation toggles, video durations) live in global storage, survive package uninstall, and have no reset #3370

Closed
opened 2026-10-21 06:02:24 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @lperna on GitHub (Sep 12, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6077

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Every setting the Illustrator exposes in Settings → Generations is stored in Engine-global storage, not in the Illustrator's agent configuration (agent_configs row for type illustrator). The whole Generations tab is hidden unless the Illustrator package is installed (packages/client/src/components/panels/SettingsPanel.tsx, GenerationsSettings), yet nothing in it is owned by the agent. Uninstalling the Illustrator — which the confirm dialog and docs describe as removing the agent's configuration — leaves all of it untouched, so a reinstall does not start from defaults, and most of the fields have no per-field way back to their default.

This was first noticed for the image canvas sizes, but the problem is the storage model: all of an agent's settings should be isolated to that agent's own configuration, created when the agent is installed and removed when it is uninstalled.

Expected behavior

  • Every setting shown under Settings → Generations (or anywhere else) that exists only because the Illustrator is installed is stored in the Illustrator's agent configuration, not in app-wide storage.
  • Installing the Illustrator starts from the package defaults. Uninstalling it removes those settings along with the rest of the agent configuration. Reinstalling starts from defaults again.
  • Each field has a Reset to default control that shows the default value (as the built-in style profiles and prompt overrides already do).
  • docs/media/scene-backgrounds.md and docs/development/optional-agent-packages.md state that these settings are agent configuration and are removed on uninstall, and name anything Illustrator-visible that is intentionally kept app-wide.

Actual behavior

Inventory of what the Illustrator-gated Generations tab exposes and where each value is persisted today:

Section Settings Stored in Per-field reset
Overall Generations Queue media generation requests, Review media prompts before sending app_settings row ui (client ui.store.ts → pickSyncedSettings() → PUT /api/app-settings/ui), beside sidebar width and tracker panel side No
Image Generation Backgrounds 1280×720, Illustrations 896×1280, Noodle timelines 1024×1536, Game 1280×720, Portraits 1024×1024, Selfies 896×1152 app_settings row ui (same blob) No
Image Generation Image style profiles app_settings row ui (same blob) Built-ins only
Video Generation Scene video duration, call clip durations, custom call clip duration, animated expression clip duration app_settings row video-generation No
Prompt overrides Image and video prompt template overrides prompt_overrides table Yes
  • The server reads image sizes and style profiles from the ui blob (packages/server/src/services/image/image-generation-settings.ts, loadImageGenerationUserSettings) and video durations from the video-generation row; the client reads them from ui.store.ts (GameSurface.tsx, AvatarGenerationModal.tsx).
  • Package uninstall (packages/server/src/routes/capability-packages.routes.ts, DELETE /:id) removes the package files, the installed.json entry, chat-metadata references, and the agent_configs row. It never touches app_settings or prompt_overrides. There is no DELETE /api/app-settings/:key, and the ui blob is written as a whole-object replace from the client's full projection, so nothing can even unset a key.
  • The Illustrator package manifest has no way to declare settings it owns; the capability-package manifest schema (packages/shared/src/schemas/capability-package.schema.ts) is .strict() with no settings field. Per-agent defaultSettings from the package's agents.json do flow into agent_configs.settings, which is the right place, but none of the Generations-tab settings are routed there.
  • The Settings panel offers no reset for the size or duration fields; the user must know the default numbers and retype them. Neither the fields nor the docs state the defaults except one mention of 1280×720 in scene-backgrounds.md and 896×1152 in selfies.md.

Steps to reproduce

  1. Install the Illustrator package (Agents → Download Agents).
  2. In Settings → Generations change the Backgrounds size (e.g. to 1216×832), the scene video duration, and toggle "Review media prompts before sending".
  3. Uninstall the Illustrator, confirm, then reinstall it.
  4. Observe every value from step 2 is still in effect; no control exists to restore the defaults.

Environment

  • Marinara Engine version: 2.4.4 (commit 1a299369a), Illustrator package 1.0.4
  • Install type: source (pnpm build + pnpm start)
  • OS + version: Ubuntu 24.04 under WSL2 on Windows 11 Home
  • Browser or app shell: Chrome on Windows

Logs, screenshots, or video

storage/tables/app_settings/ui.json after step 3 (excerpt):

imageBackgroundWidth = 1216    (default 1280)
imageBackgroundHeight = 832    (default 720)
imageIllustrationWidth = 832   (default 896)
imageIllustrationHeight = 1216 (default 1280)
reviewImagePromptsBeforeSend = true

storage/tables/app_settings/video-generation.json still holds the changed duration. No agent_configs directory exists; capability-packages/installed.json shows the Illustrator active.

Additional context

Related: #913 established the current image size defaults. #3831 reported the same "no way back to default" problem for the per-chat Illustrator overrides in chatMeta; this issue is the agent-level equivalent, which additionally survives package uninstall.

Workaround: retype the defaults, or stop the server and delete the keys from ui.json / video-generation.json (the client re-fills missing keys with defaults).

Proposed fix: move the Generations-tab settings into the Illustrator's agent_configs.settings (the server already deletes that row on uninstall), re-point the server loaders and the Settings panel at the agent config, add per-field Reset to default, migrate existing values once on upgrade, and document the uninstall scope.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @lperna on GitHub (Sep 12, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6077 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Every setting the Illustrator exposes in **Settings → Generations** is stored in Engine-global storage, not in the Illustrator's agent configuration (`agent_configs` row for type `illustrator`). The whole Generations tab is hidden unless the Illustrator package is installed (`packages/client/src/components/panels/SettingsPanel.tsx`, `GenerationsSettings`), yet nothing in it is owned by the agent. Uninstalling the Illustrator — which the confirm dialog and docs describe as removing the agent's configuration — leaves all of it untouched, so a reinstall does not start from defaults, and most of the fields have no per-field way back to their default. This was first noticed for the image canvas sizes, but the problem is the storage model: **all of an agent's settings should be isolated to that agent's own configuration**, created when the agent is installed and removed when it is uninstalled. ## Expected behavior - Every setting shown under Settings → Generations (or anywhere else) that exists only because the Illustrator is installed is stored in the Illustrator's agent configuration, not in app-wide storage. - Installing the Illustrator starts from the package defaults. Uninstalling it removes those settings along with the rest of the agent configuration. Reinstalling starts from defaults again. - Each field has a **Reset to default** control that shows the default value (as the built-in style profiles and prompt overrides already do). - `docs/media/scene-backgrounds.md` and `docs/development/optional-agent-packages.md` state that these settings are agent configuration and are removed on uninstall, and name anything Illustrator-visible that is intentionally kept app-wide. ## Actual behavior Inventory of what the Illustrator-gated Generations tab exposes and where each value is persisted today: | Section | Settings | Stored in | Per-field reset | |---|---|---|---| | Overall Generations | Queue media generation requests, Review media prompts before sending | `app_settings` row `ui` (client `ui.store.ts` → `pickSyncedSettings()` → `PUT /api/app-settings/ui`), beside sidebar width and tracker panel side | No | | Image Generation | Backgrounds 1280×720, Illustrations 896×1280, Noodle timelines 1024×1536, Game 1280×720, Portraits 1024×1024, Selfies 896×1152 | `app_settings` row `ui` (same blob) | No | | Image Generation | Image style profiles | `app_settings` row `ui` (same blob) | Built-ins only | | Video Generation | Scene video duration, call clip durations, custom call clip duration, animated expression clip duration | `app_settings` row `video-generation` | No | | Prompt overrides | Image and video prompt template overrides | `prompt_overrides` table | Yes | - The server reads image sizes and style profiles from the `ui` blob (`packages/server/src/services/image/image-generation-settings.ts`, `loadImageGenerationUserSettings`) and video durations from the `video-generation` row; the client reads them from `ui.store.ts` (`GameSurface.tsx`, `AvatarGenerationModal.tsx`). - Package uninstall (`packages/server/src/routes/capability-packages.routes.ts`, `DELETE /:id`) removes the package files, the `installed.json` entry, chat-metadata references, and the `agent_configs` row. It never touches `app_settings` or `prompt_overrides`. There is no `DELETE /api/app-settings/:key`, and the `ui` blob is written as a whole-object replace from the client's full projection, so nothing can even unset a key. - The Illustrator package manifest has no way to declare settings it owns; the capability-package manifest schema (`packages/shared/src/schemas/capability-package.schema.ts`) is `.strict()` with no settings field. Per-agent `defaultSettings` from the package's `agents.json` do flow into `agent_configs.settings`, which is the right place, but none of the Generations-tab settings are routed there. - The Settings panel offers no reset for the size or duration fields; the user must know the default numbers and retype them. Neither the fields nor the docs state the defaults except one mention of 1280×720 in `scene-backgrounds.md` and 896×1152 in `selfies.md`. ## Steps to reproduce 1. Install the Illustrator package (Agents → Download Agents). 2. In Settings → Generations change the Backgrounds size (e.g. to 1216×832), the scene video duration, and toggle "Review media prompts before sending". 3. Uninstall the Illustrator, confirm, then reinstall it. 4. Observe every value from step 2 is still in effect; no control exists to restore the defaults. ## Environment - Marinara Engine version: 2.4.4 (commit `1a299369a`), Illustrator package 1.0.4 - Install type: source (`pnpm build` + `pnpm start`) - OS + version: Ubuntu 24.04 under WSL2 on Windows 11 Home - Browser or app shell: Chrome on Windows ## Logs, screenshots, or video `storage/tables/app_settings/ui.json` after step 3 (excerpt): ``` imageBackgroundWidth = 1216 (default 1280) imageBackgroundHeight = 832 (default 720) imageIllustrationWidth = 832 (default 896) imageIllustrationHeight = 1216 (default 1280) reviewImagePromptsBeforeSend = true ``` `storage/tables/app_settings/video-generation.json` still holds the changed duration. No `agent_configs` directory exists; `capability-packages/installed.json` shows the Illustrator active. ## Additional context Related: #913 established the current image size defaults. #3831 reported the same "no way back to default" problem for the per-chat Illustrator overrides in `chatMeta`; this issue is the agent-level equivalent, which additionally survives package uninstall. Workaround: retype the defaults, or stop the server and delete the keys from `ui.json` / `video-generation.json` (the client re-fills missing keys with defaults). Proposed fix: move the Generations-tab settings into the Illustrator's `agent_configs.settings` (the server already deletes that row on uninstall), re-point the server loaders and the Settings panel at the agent config, add per-field **Reset to default**, migrate existing values once on upgrade, and document the uninstall scope. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
Author
Owner

@lperna commented on GitHub (Sep 12, 2026):

Taking this one (Lloyd Perna, with Claude Code). Branch: fix/6077-illustrator-agent-settings off staging. Scope: move every Illustrator-owned Generations setting (image sizes, style profiles, generation toggles, video durations) into the Illustrator agent config so uninstall removes them, add per-field Reset, migrate existing values once, and document uninstall scope. Prompt overrides are Engine-wide templates and stay where they are.

<!-- gh-comment-id:5646128218 --> @lperna commented on GitHub (Sep 12, 2026): Taking this one (Lloyd Perna, with Claude Code). Branch: `fix/6077-illustrator-agent-settings` off `staging`. Scope: move every Illustrator-owned Generations setting (image sizes, style profiles, generation toggles, video durations) into the Illustrator agent config so uninstall removes them, add per-field Reset, migrate existing values once, and document uninstall scope. Prompt overrides are Engine-wide templates and stay where they are.
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#3370
No description provided.