[PR #3835] [MERGED] Fix assigned image, agent, and package lifecycle issues #6121

Closed
opened 2026-10-23 04:07:18 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3835
Author: @SpicyMarinara
Created: 7/19/2026
Status: ✅ Merged
Merged: 7/19/2026
Merged by: @SpicyMarinara

Base: staging ← Head: agent/issue-sweep-3828-3832


📝 Commits (3)

  • 0803b7d chore: start assigned issue sweep
  • b007e68 fix assigned capability and agent lifecycle issues
  • 1ea73a5 address CodeRabbit lifecycle suggestions

📊 Changes

10 files changed (+370 additions, -50 deletions)

View changed files

📝 packages/client/src/components/chat/AgentAddSetupFields.tsx (+24 -3)
📝 packages/client/src/components/chat/ChatSettingsDrawer.tsx (+77 -20)
📝 packages/client/src/components/chat/ChatSetupWizard.tsx (+4 -0)
📝 packages/server/src/routes/capability-packages.routes.ts (+34 -11)
📝 packages/server/src/services/capability-packages/package-manager.service.ts (+35 -5)
➕ packages/server/src/services/image/comfyui-reference-placeholders.ts (+20 -0)
📝 packages/server/src/services/image/image-generation.ts (+24 -8)
📝 packages/server/src/services/image/runpod-comfyui.service.ts (+18 -3)
📝 scripts/regressions/capability-package-lifecycle.regression.ts (+84 -0)
📝 scripts/regressions/open-issues.regression.ts (+50 -0)

📄 Description

Linked issues

Closes #3828
Closes #3829
Closes #3831
Closes #3832

Why this change

The assigned sweep exposed four host-integration gaps: indexed ComfyUI reference slots could leak into workflows, invalid turn-game packages could mutate install state before activation failed, existing chats had no clear way back to changing agent defaults, and multi-agent package removal cleaned only the primary package ID.

What changed

  • Pad only workflow-declared missing ComfyUI reference slots with the existing placeholder image, for local and RunPod workflows, while preserving the opt-out setting.
  • Reject turn-game packages without a server entrypoint before registry or artifact mutation.
  • Keep newly attached Illustrator settings inherited when they match the agent defaults, and show compact inherited/override status plus a reset action for prompt templates, the Illustrator prompt model, and Illustrator reference toggles.
  • Resolve all agent definitions owned by a package before uninstall, then remove their chat selections, agent-keyed metadata, configurations, runs, and memory using the existing storage cleanup path.
  • Add focused regression coverage for each lifecycle edge case.

Validation performed

  • pnpm check
  • pnpm regression:issues
  • pnpm smoke:ui — 72 passed, 46 intentional viewport skips
  • git diff --check

Validation checklist

  • pnpm check passes locally
  • Relevant regression suites pass locally
  • Container (Docker / Podman) built and ran without issue
  • Ran affected UI paths manually
  • Checked relevant error and compatibility paths
  • Read and followed CONTRIBUTING.md

Manual verification requested

  • Manually verify a local ComfyUI workflow with one supplied reference and multiple indexed filename slots.
  • Manually verify an existing Illustrator chat can reset its prompt template, prompt model, and reference toggles to the current agent defaults.
  • Manually verify uninstalling a fixture package with two agent definitions removes both from chat settings and stored agent state.

Summary by CodeRabbit

  • New Features

    • Chat settings now show when Illustrator options and prompt templates override agent defaults.
    • Added “Use agent default” reset controls for Illustrator character appearance and avatar reference toggles.
    • Improved ComfyUI reference-image handling, automatically filling missing reference slots (including names).
  • Bug Fixes

    • Capability package uninstall/removal now cleans up all associated agents and updates affected chat metadata accordingly.
    • Invalid “turn-game” packages missing a server entrypoint are rejected before installation proceeds.
    • Illustrator default vs override settings are preserved correctly; ComfyUI placeholder backfill now reuses uploaded placeholder filenames and uses safer timeout parsing.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/3835 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/19/2026 **Status:** ✅ Merged **Merged:** 7/19/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `agent/issue-sweep-3828-3832` --- ### 📝 Commits (3) - [`0803b7d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0803b7d990dfb2124598471d34ce712b1a960038) chore: start assigned issue sweep - [`b007e68`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b007e68bb3ea1f382544d3359039c45ab27b82e9) fix assigned capability and agent lifecycle issues - [`1ea73a5`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1ea73a5204526d7f398a6b3c98ee25556735cb6f) address CodeRabbit lifecycle suggestions ### 📊 Changes **10 files changed** (+370 additions, -50 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/chat/AgentAddSetupFields.tsx` (+24 -3) 📝 `packages/client/src/components/chat/ChatSettingsDrawer.tsx` (+77 -20) 📝 `packages/client/src/components/chat/ChatSetupWizard.tsx` (+4 -0) 📝 `packages/server/src/routes/capability-packages.routes.ts` (+34 -11) 📝 `packages/server/src/services/capability-packages/package-manager.service.ts` (+35 -5) ➕ `packages/server/src/services/image/comfyui-reference-placeholders.ts` (+20 -0) 📝 `packages/server/src/services/image/image-generation.ts` (+24 -8) 📝 `packages/server/src/services/image/runpod-comfyui.service.ts` (+18 -3) 📝 `scripts/regressions/capability-package-lifecycle.regression.ts` (+84 -0) 📝 `scripts/regressions/open-issues.regression.ts` (+50 -0) </details> ### 📄 Description ## Linked issues Closes #3828 Closes #3829 Closes #3831 Closes #3832 ## Why this change The assigned sweep exposed four host-integration gaps: indexed ComfyUI reference slots could leak into workflows, invalid turn-game packages could mutate install state before activation failed, existing chats had no clear way back to changing agent defaults, and multi-agent package removal cleaned only the primary package ID. ## What changed - Pad only workflow-declared missing ComfyUI reference slots with the existing placeholder image, for local and RunPod workflows, while preserving the opt-out setting. - Reject turn-game packages without a server entrypoint before registry or artifact mutation. - Keep newly attached Illustrator settings inherited when they match the agent defaults, and show compact inherited/override status plus a reset action for prompt templates, the Illustrator prompt model, and Illustrator reference toggles. - Resolve all agent definitions owned by a package before uninstall, then remove their chat selections, agent-keyed metadata, configurations, runs, and memory using the existing storage cleanup path. - Add focused regression coverage for each lifecycle edge case. ## Validation performed - `pnpm check` - `pnpm regression:issues` - `pnpm smoke:ui` — 72 passed, 46 intentional viewport skips - `git diff --check` ## Validation checklist - [ ] `pnpm check` passes locally - [ ] Relevant regression suites pass locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran affected UI paths manually - [ ] Checked relevant error and compatibility paths - [ ] Read and followed `CONTRIBUTING.md` ## Manual verification requested - Manually verify a local ComfyUI workflow with one supplied reference and multiple indexed filename slots. - Manually verify an existing Illustrator chat can reset its prompt template, prompt model, and reference toggles to the current agent defaults. - Manually verify uninstalling a fixture package with two agent definitions removes both from chat settings and stored agent state. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Chat settings now show when Illustrator options and prompt templates override agent defaults. - Added “Use agent default” reset controls for Illustrator character appearance and avatar reference toggles. - Improved ComfyUI reference-image handling, automatically filling missing reference slots (including names). - **Bug Fixes** - Capability package uninstall/removal now cleans up all associated agents and updates affected chat metadata accordingly. - Invalid “turn-game” packages missing a server entrypoint are rejected before installation proceeds. - Illustrator default vs override settings are preserved correctly; ComfyUI placeholder backfill now reuses uploaded placeholder filenames and uses safer timeout parsing. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:07:18 +07:00
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#6121
No description provided.