[PR #891] [MERGED] Fix Illustrator retry image connection errors #4824

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/891
Author: @cha1latte
Created: 5/15/2026
Status: ✅ Merged
Merged: 5/15/2026
Merged by: @cha1latte

Base: staging ← Head: fix/issue-877-illustrator-default-image


📝 Commits (1)

  • 4173e24 Fix Illustrator retry image connection errors

📊 Changes

2 files changed (+21 additions, -1 deletions)

View changed files

📝 packages/client/src/hooks/use-generate.ts (+6 -0)
📝 packages/server/src/routes/generate/retry-agents-route.ts (+15 -1)

📄 Description

Linked issue

Closes #877

Why this change

  • Manual Illustrator retry could appear to complete successfully without producing an image when the retry path could not resolve an image-generation connection or emitted an agent_error the retry client ignored.

What changed

  • Normalize a blank Illustrator image connection override so retry falls back to the default image-generation connection.
  • Emit an agent_error from retry when Illustrator wants to generate but no image connection resolves, and fail stale explicit image connection IDs instead of silently skipping image generation.
  • Handle retry-stream agent_error events in the client so they show as failures and do not end with a misleading "Agent retry completed" success toast.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Codex reproduced the broken retry/error-path behavior with node scratch/issue-877-repro.mjs; before the fix, retry ignored agent_error, did not report a missing image connection, and did not fail a stale resolved image connection ID.
  • Codex verified the fixed path with node scratch/issue-877-repro.mjs --after; it confirmed retry handles agent_error, missing image connections emit agent_error, stale explicit image connection IDs fail as agent_error, blank overrides fall back to the default image-generation connection, and the default image connection lookup still accepts boolean or string defaultForAgents.
  • Codex ran pnpm check, which passed: impeccable context check, lint, shared/server/client build.
  • Bunny review before PR: pass. Diff is two scoped files, based on upstream/staging, git diff --check is clean, no server console.*, and no schema/version/dependency/auth/storage/prompt-pipeline files changed.
  • No manual-only blocker for the core claim; this is a retry stream/server error-path fix verified by static harness and baseline build.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

No docs or release metadata changes are needed for this scoped bug fix.

UI evidence (if applicable)

N/A - no layout or visual surface changed. The user-facing behavior is retry error handling/toast state, covered by the retry stream repro above.

Summary by CodeRabbit

  • Bug Fixes

    • Improved error handling during agent retries with explicit error message display.
    • Added validation for image connection configuration to prevent silent failures.
  • New Features

    • Enhanced error notifications when image generation connections are misconfigured, with guidance on setup.

Review Change Stack


🔄 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/891 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/15/2026 **Status:** ✅ Merged **Merged:** 5/15/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `staging` ← **Head:** `fix/issue-877-illustrator-default-image` --- ### 📝 Commits (1) - [`4173e24`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4173e2455eaf1f0acd4adae015e0217c77f967d0) Fix Illustrator retry image connection errors ### 📊 Changes **2 files changed** (+21 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/hooks/use-generate.ts` (+6 -0) 📝 `packages/server/src/routes/generate/retry-agents-route.ts` (+15 -1) </details> ### 📄 Description ## Linked issue <!-- Every PR should reference a feature request or issue report. If there isn't one yet, open one first to gather opinions: --> <!-- https://github.com/Pasta-Devs/Marinara-Engine/issues/new/choose --> Closes #877 ## Why this change <!-- What user problem, bug, or goal does this solve? --> - Manual Illustrator retry could appear to complete successfully without producing an image when the retry path could not resolve an image-generation connection or emitted an `agent_error` the retry client ignored. ## What changed <!-- List the key changes in this PR --> - Normalize a blank Illustrator image connection override so retry falls back to the default image-generation connection. - Emit an `agent_error` from retry when Illustrator wants to generate but no image connection resolves, and fail stale explicit image connection IDs instead of silently skipping image generation. - Handle retry-stream `agent_error` events in the client so they show as failures and do not end with a misleading "Agent retry completed" success toast. ## Validation <!-- Required: include commands run and/or manual checks performed --> - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes <!-- Describe exactly what you tested in a real browser/app, step by step. --> <!-- ⚠️ If an AI agent filled out or ticked these boxes for you, treat them --> <!-- as a TO-DO LIST, not as proof the work is done. Verify each item yourself --> <!-- before submitting. If you haven't verified it, untick the box. --> - Codex reproduced the broken retry/error-path behavior with `node scratch/issue-877-repro.mjs`; before the fix, retry ignored `agent_error`, did not report a missing image connection, and did not fail a stale resolved image connection ID. - Codex verified the fixed path with `node scratch/issue-877-repro.mjs --after`; it confirmed retry handles `agent_error`, missing image connections emit `agent_error`, stale explicit image connection IDs fail as `agent_error`, blank overrides fall back to the default image-generation connection, and the default image connection lookup still accepts boolean or string `defaultForAgents`. - Codex ran `pnpm check`, which passed: impeccable context check, lint, shared/server/client build. - Bunny review before PR: pass. Diff is two scoped files, based on `upstream/staging`, `git diff --check` is clean, no server `console.*`, and no schema/version/dependency/auth/storage/prompt-pipeline files changed. - No manual-only blocker for the core claim; this is a retry stream/server error-path fix verified by static harness and baseline build. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) No docs or release metadata changes are needed for this scoped bug fix. ## UI evidence (if applicable) N/A - no layout or visual surface changed. The user-facing behavior is retry error handling/toast state, covered by the retry stream repro above. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved error handling during agent retries with explicit error message display. * Added validation for image connection configuration to prevent silent failures. * **New Features** * Enhanced error notifications when image generation connections are misconfigured, with guidance on setup. <!-- review_stack_entry_start --> [![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/Pasta-Devs/Marinara-Engine/pull/891) <!-- review_stack_entry_end --> <!-- 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-22 04:10:57 +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#4824
No description provided.