[PR #4955] [MERGED] Fix Professor Mari suggestion retention and SwarmUI timeout #6551

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/4955
Author: @SpicyMarinara
Created: 8/12/2026
Status: ✅ Merged
Merged: 8/12/2026
Merged by: @SpicyMarinara

Base: staging ← Head: agent/assigned-issues-4953-4954


📝 Commits (3)

  • 3a28b0f chore: start assigned issue sweep 4953-4954
  • 53c3c68 fix Professor Mari suggestions and SwarmUI timeouts
  • cf2cd84 test strengthen issue regressions

📊 Changes

7 files changed (+179 additions, -12 deletions)

View changed files

📝 CHANGELOG.md (+2 -0)
📝 package.json (+2 -1)
📝 packages/client/src/stores/agent.store.ts (+12 -0)
📝 packages/client/src/stores/chat.store.ts (+4 -1)
📝 packages/server/src/services/image/image-generation.ts (+39 -10)
📝 scripts/regressions/assigned-issue-sweep.regression.ts (+44 -0)
➕ scripts/regressions/swarmui-timeout.regression.ts (+76 -0)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #4953
Closes #4954

Why this change

  • Professor Mari's generated continuation suggestions should survive a temporary lorebook visit instead of reverting to first-chat starters.
  • SwarmUI generations should use the timeout users already configure for ComfyUI-compatible backends rather than failing at the HTTP transport layer after roughly 30 seconds.

What changed

  • Added a chat-transition Agent Store reset that clears ordinary Agent runtime state while retaining Professor Mari's chat-ID-scoped continuation suggestions and guided-plan state. Full resets still clear everything.
  • Updated chat switching to use that scoped reset, preventing temporary editor navigation from replacing the current Professor Mari suggestions.
  • Applied the longer of IMAGE_GEN_TIMEOUT_MS and COMFYUI_GEN_TIMEOUT to SwarmUI's HTTP response headers/body deadlines, preventing the transport layer from ending an otherwise valid long-running request.
  • Added deterministic regressions for suggestion retention and a delayed mock SwarmUI response that outlives a deliberately short global Undici timeout.
  • Added user-facing release notes under CHANGELOG.md [Unreleased].

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

  • pnpm check completed successfully.
  • pnpm version:check completed successfully.
  • pnpm --filter @marinara-engine/server exec tsx ../../scripts/regressions/assigned-issue-sweep.regression.ts completed successfully.
  • pnpm regression:swarmui-timeout completed successfully; the mock generation response took 120 ms while the global transport deadline was only 40 ms.
  • Focused Playwright coverage for Professor Mari suggestions stay visible after chat history loads passed in desktop and mobile Chromium (2/2).
  • The exhaustive pnpm smoke:ui run completed with 206 passing, 104 skipped, and 20 failures in unrelated pre-existing announcement, library, catalog, achievement, and Professor Mari fixtures. The relevant suggestion-retention test passed in that run as well.
  • The in-app browser bridge could not initialize in this environment (Cannot redefine property: process), so no separate live click-through was recorded.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] <paths> follow-up issue opened
  • Version/release files updated (only if this PR includes a version bump)

No new setting or user-facing copy was introduced. Existing timeout configuration remains authoritative; only its enforcement changed. CHANGELOG.md was updated.

UI evidence (if applicable)

No visual redesign is included. This is state-retention and request-timeout behavior only.

Summary by CodeRabbit

  • Bug Fixes

    • Professor Mari continuation suggestions and guided plans now persist when navigating between chats.
    • SwarmUI image generation now respects the configured ComfyUI timeout, reducing premature request failures.
  • Tests

    • Added regression coverage for chat navigation state preservation and SwarmUI timeout handling.

🔄 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/4955 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 8/12/2026 **Status:** ✅ Merged **Merged:** 8/12/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `agent/assigned-issues-4953-4954` --- ### 📝 Commits (3) - [`3a28b0f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3a28b0f48fffe595ddad13f4321e3d872ee769b8) chore: start assigned issue sweep 4953-4954 - [`53c3c68`](https://github.com/Pasta-Devs/Marinara-Engine/commit/53c3c68dd7ef35e850b0de9818b90664ee7d7e09) fix Professor Mari suggestions and SwarmUI timeouts - [`cf2cd84`](https://github.com/Pasta-Devs/Marinara-Engine/commit/cf2cd84b75708af1188b763556ab8af9bb6c88fd) test strengthen issue regressions ### 📊 Changes **7 files changed** (+179 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -0) 📝 `package.json` (+2 -1) 📝 `packages/client/src/stores/agent.store.ts` (+12 -0) 📝 `packages/client/src/stores/chat.store.ts` (+4 -1) 📝 `packages/server/src/services/image/image-generation.ts` (+39 -10) 📝 `scripts/regressions/assigned-issue-sweep.regression.ts` (+44 -0) ➕ `scripts/regressions/swarmui-timeout.regression.ts` (+76 -0) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #4953 Closes #4954 ## Why this change - Professor Mari's generated continuation suggestions should survive a temporary lorebook visit instead of reverting to first-chat starters. - SwarmUI generations should use the timeout users already configure for ComfyUI-compatible backends rather than failing at the HTTP transport layer after roughly 30 seconds. ## What changed - Added a chat-transition Agent Store reset that clears ordinary Agent runtime state while retaining Professor Mari's chat-ID-scoped continuation suggestions and guided-plan state. Full resets still clear everything. - Updated chat switching to use that scoped reset, preventing temporary editor navigation from replacing the current Professor Mari suggestions. - Applied the longer of `IMAGE_GEN_TIMEOUT_MS` and `COMFYUI_GEN_TIMEOUT` to SwarmUI's HTTP response headers/body deadlines, preventing the transport layer from ending an otherwise valid long-running request. - Added deterministic regressions for suggestion retention and a delayed mock SwarmUI response that outlives a deliberately short global Undici timeout. - Added user-facing release notes under `CHANGELOG.md` `[Unreleased]`. ## 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 - `pnpm check` completed successfully. - `pnpm version:check` completed successfully. - `pnpm --filter @marinara-engine/server exec tsx ../../scripts/regressions/assigned-issue-sweep.regression.ts` completed successfully. - `pnpm regression:swarmui-timeout` completed successfully; the mock generation response took 120 ms while the global transport deadline was only 40 ms. - Focused Playwright coverage for `Professor Mari suggestions stay visible after chat history loads` passed in desktop and mobile Chromium (2/2). - The exhaustive `pnpm smoke:ui` run completed with 206 passing, 104 skipped, and 20 failures in unrelated pre-existing announcement, library, catalog, achievement, and Professor Mari fixtures. The relevant suggestion-retention test passed in that run as well. - The in-app browser bridge could not initialize in this environment (`Cannot redefine property: process`), so no separate live click-through was recorded. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n] <paths>` follow-up issue opened - [ ] Version/release files updated (only if this PR includes a version bump) No new setting or user-facing copy was introduced. Existing timeout configuration remains authoritative; only its enforcement changed. `CHANGELOG.md` was updated. ## UI evidence (if applicable) No visual redesign is included. This is state-retention and request-timeout behavior only. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Professor Mari continuation suggestions and guided plans now persist when navigating between chats. * SwarmUI image generation now respects the configured ComfyUI timeout, reducing premature request failures. * **Tests** * Added regression coverage for chat navigation state preservation and SwarmUI timeout handling. <!-- 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:11:30 +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#6551
No description provided.