[PR #4785] [MERGED] Fix connections, Professor Mari, Tracker, and lorebooks #6496

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

📋 Pull Request Information

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

Base: staging ← Head: fix/spicymarinara-issues-4765-4777


📝 Commits (5)

  • 104d92c fix assigned issue sweep
  • 78456ba fix CodeRabbit review findings
  • 9844223 fix follow-up review findings
  • ddca169 fix workspace protocol and prompt logging
  • 0a300b2 fix portable workspace moves

📊 Changes

21 files changed (+741 additions, -117 deletions)

View changed files

📝 CHANGELOG.md (+8 -0)
📝 e2e/core-flows.e2e.ts (+6 -4)
📝 packages/client/src/components/chat/HomeProfessorMariChat.tsx (+48 -20)
📝 packages/client/src/components/connections/ConnectionEditor.tsx (+15 -8)
📝 packages/client/src/components/layout/AppShell.tsx (+21 -4)
📝 packages/client/src/features/tracker-panel/components/TrackerPanelDetachedWindow.tsx (+2 -2)
📝 packages/client/src/lib/professor-mari-transcript-scroll.ts (+6 -0)
📝 packages/client/src/lib/tracker-panel-layout.ts (+2 -6)
📝 packages/server/src/routes/generate.routes.ts (+51 -10)
📝 packages/server/src/routes/generate/lorebook-keeper-utils.ts (+4 -15)
📝 packages/server/src/routes/professor-mari-workspace.routes.ts (+2 -0)
📝 packages/server/src/services/generation/connection-admission.ts (+37 -8)
📝 packages/server/src/services/noodle/noodle-fan-activity.operation.ts (+4 -1)
📝 packages/server/src/services/professor-mari/workspace-agent.service.ts (+170 -19)
📝 packages/server/src/services/professor-mari/workspace-shell-sandbox.ts (+1 -1)
📝 packages/server/src/services/storage/characters.storage.ts (+31 -0)
📝 packages/server/src/services/storage/lorebooks.storage.ts (+50 -12)
📝 packages/shared/src/types/professor-mari-workspace.ts (+3 -0)
📝 scripts/regressions/noodle-autopost.regression.ts (+64 -0)
📝 scripts/regressions/open-issues.regression.ts (+144 -6)

...and 1 more files

📄 Description

Why

Eight assigned reports outside the Home rebuild were still affecting connection reliability, Professor Mari workflows, lorebook integrity, and Tracker usability. This sweep resolves them together while keeping the changes focused and keeping the Home rebuild PR entirely untouched.

Summary

  • Route smart Conversation group selection through the default Agent connection and Agent fallback, honoring saved model parameters instead of a fixed 512-token chat-connection request.
  • Quarantine automatic generation on a connection for six hours after three consecutive failures, while preserving foreground chat access and resetting the quarantine after recovery.
  • Keep Professor Mari history scrollable during streaming, use the Marinara confirmation dialog for individual chat deletion, and reveal failed workspace tool output in the transcript.
  • Preserve Tracker controls at the configured width, snap beside an open side panel, allow overlap when space is tight, and fully close the Tracker when its detached window closes.
  • Keep NovelAI V4.5 style-plate selection inside the Connection editor with an explicit non-submitting upload control.
  • Deactivate and reveal lorebooks that lose their final Character/Persona owner, including legacy direct links; make Lorebook Keeper replacement bodies authoritative so repeated saves do not stack old content.
  • Add reviewed structured copy, move, and remove tools for Android/Termux and other hosts without a supported raw-shell sandbox.

Security boundary

Android/Termux raw shell remains fail-closed. It does not have a supported Seatbelt/Bubblewrap equivalent. Professor Mari now receives safe structured file operations instead; they are workspace-confined, deny storage/protected paths (including symlink routes), refuse overwrite, and only remove one file or an empty directory.

Automated validation

  • pnpm check
  • pnpm --filter @marinara-engine/server exec tsx ../../scripts/regressions/open-issues.regression.ts
  • pnpm --filter @marinara-engine/server exec tsx ../../scripts/regressions/noodle-autopost.regression.ts
  • pnpm regression:professor-mari-shell-sandbox
  • pnpm regression:providers
  • Targeted Playwright coverage for NovelAI style-plate upload and desktop Tracker layout

The full local UI smoke run reached 203 passed and 100 skipped. The affected Tracker check was updated and passes in isolation; Secret Plot also passes in isolation. The unrelated existing mobile composer history-position check still hangs in isolation and is outside the files changed here.

Manual test plan

  • Manually verify NovelAI V4.5 style-plate selection in Chrome on Windows 10.
  • Manually verify Professor Mari streaming scroll, native single-chat deletion, and visible workspace error details on desktop and mobile.
  • Manually verify Tracker placement with the right panel resized and close behavior after detaching it.
  • Manually verify orphaned lorebook recovery and Lorebook Keeper replacement behavior using a copied profile.
  • Manually verify repeated Noodle provider failures cool down automatic requests while normal chats remain usable.
  • Manually verify smart group selection uses the configured Agent connection and its token/thinking settings.
  • Manually verify structured copy, move, and remove operations from Professor Mari on Termux.

Closes #4777
Closes #4775
Closes #4774
Closes #4773
Closes #4772
Closes #4770
Closes #4769
Closes #4765

Summary by CodeRabbit

  • New Features

    • Professor Mari supports structured workspace copy, move, and remove actions with safer path handling.
    • Smart group responders select suitable connections and generation settings.
    • Background connections are temporarily quarantined after repeated failures.
  • Bug Fixes

    • Improved Professor Mari transcript scrolling, tool error display, debug prompts, and chat deletion confirmation.
    • Fixed Tracker panel sizing and detached-window behavior.
    • Improved NovelAI style-plate uploads.
    • Corrected lorebook ownership, deletion, visibility, and content updates.
    • Fixed workspace file-operation error guidance.

🔄 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/4785 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 8/9/2026 **Status:** ✅ Merged **Merged:** 8/9/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/spicymarinara-issues-4765-4777` --- ### 📝 Commits (5) - [`104d92c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/104d92c32d55a8ad264589e09f8190141616ad7e) fix assigned issue sweep - [`78456ba`](https://github.com/Pasta-Devs/Marinara-Engine/commit/78456ba7653cf4421f79116dc9339e85f4389c48) fix CodeRabbit review findings - [`9844223`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9844223dfb3ee7c7c7359e1a1a70963de576cb84) fix follow-up review findings - [`ddca169`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ddca169241c9412a0821ae1693e0a4e8113f118e) fix workspace protocol and prompt logging - [`0a300b2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0a300b2e3896a5896eb59c0db9949bec9414857a) fix portable workspace moves ### 📊 Changes **21 files changed** (+741 additions, -117 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+8 -0) 📝 `e2e/core-flows.e2e.ts` (+6 -4) 📝 `packages/client/src/components/chat/HomeProfessorMariChat.tsx` (+48 -20) 📝 `packages/client/src/components/connections/ConnectionEditor.tsx` (+15 -8) 📝 `packages/client/src/components/layout/AppShell.tsx` (+21 -4) 📝 `packages/client/src/features/tracker-panel/components/TrackerPanelDetachedWindow.tsx` (+2 -2) 📝 `packages/client/src/lib/professor-mari-transcript-scroll.ts` (+6 -0) 📝 `packages/client/src/lib/tracker-panel-layout.ts` (+2 -6) 📝 `packages/server/src/routes/generate.routes.ts` (+51 -10) 📝 `packages/server/src/routes/generate/lorebook-keeper-utils.ts` (+4 -15) 📝 `packages/server/src/routes/professor-mari-workspace.routes.ts` (+2 -0) 📝 `packages/server/src/services/generation/connection-admission.ts` (+37 -8) 📝 `packages/server/src/services/noodle/noodle-fan-activity.operation.ts` (+4 -1) 📝 `packages/server/src/services/professor-mari/workspace-agent.service.ts` (+170 -19) 📝 `packages/server/src/services/professor-mari/workspace-shell-sandbox.ts` (+1 -1) 📝 `packages/server/src/services/storage/characters.storage.ts` (+31 -0) 📝 `packages/server/src/services/storage/lorebooks.storage.ts` (+50 -12) 📝 `packages/shared/src/types/professor-mari-workspace.ts` (+3 -0) 📝 `scripts/regressions/noodle-autopost.regression.ts` (+64 -0) 📝 `scripts/regressions/open-issues.regression.ts` (+144 -6) _...and 1 more files_ </details> ### 📄 Description ## Why Eight assigned reports outside the Home rebuild were still affecting connection reliability, Professor Mari workflows, lorebook integrity, and Tracker usability. This sweep resolves them together while keeping the changes focused and keeping the Home rebuild PR entirely untouched. ## Summary - Route smart Conversation group selection through the default Agent connection and Agent fallback, honoring saved model parameters instead of a fixed 512-token chat-connection request. - Quarantine automatic generation on a connection for six hours after three consecutive failures, while preserving foreground chat access and resetting the quarantine after recovery. - Keep Professor Mari history scrollable during streaming, use the Marinara confirmation dialog for individual chat deletion, and reveal failed workspace tool output in the transcript. - Preserve Tracker controls at the configured width, snap beside an open side panel, allow overlap when space is tight, and fully close the Tracker when its detached window closes. - Keep NovelAI V4.5 style-plate selection inside the Connection editor with an explicit non-submitting upload control. - Deactivate and reveal lorebooks that lose their final Character/Persona owner, including legacy direct links; make Lorebook Keeper replacement bodies authoritative so repeated saves do not stack old content. - Add reviewed structured copy, move, and remove tools for Android/Termux and other hosts without a supported raw-shell sandbox. ## Security boundary Android/Termux raw shell remains fail-closed. It does not have a supported Seatbelt/Bubblewrap equivalent. Professor Mari now receives safe structured file operations instead; they are workspace-confined, deny storage/protected paths (including symlink routes), refuse overwrite, and only remove one file or an empty directory. ## Automated validation - `pnpm check` - `pnpm --filter @marinara-engine/server exec tsx ../../scripts/regressions/open-issues.regression.ts` - `pnpm --filter @marinara-engine/server exec tsx ../../scripts/regressions/noodle-autopost.regression.ts` - `pnpm regression:professor-mari-shell-sandbox` - `pnpm regression:providers` - Targeted Playwright coverage for NovelAI style-plate upload and desktop Tracker layout The full local UI smoke run reached 203 passed and 100 skipped. The affected Tracker check was updated and passes in isolation; Secret Plot also passes in isolation. The unrelated existing mobile composer history-position check still hangs in isolation and is outside the files changed here. ## Manual test plan - [ ] Manually verify NovelAI V4.5 style-plate selection in Chrome on Windows 10. - [ ] Manually verify Professor Mari streaming scroll, native single-chat deletion, and visible workspace error details on desktop and mobile. - [ ] Manually verify Tracker placement with the right panel resized and close behavior after detaching it. - [ ] Manually verify orphaned lorebook recovery and Lorebook Keeper replacement behavior using a copied profile. - [ ] Manually verify repeated Noodle provider failures cool down automatic requests while normal chats remain usable. - [ ] Manually verify smart group selection uses the configured Agent connection and its token/thinking settings. - [ ] Manually verify structured copy, move, and remove operations from Professor Mari on Termux. Closes #4777 Closes #4775 Closes #4774 Closes #4773 Closes #4772 Closes #4770 Closes #4769 Closes #4765 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Professor Mari supports structured workspace copy, move, and remove actions with safer path handling. - Smart group responders select suitable connections and generation settings. - Background connections are temporarily quarantined after repeated failures. - **Bug Fixes** - Improved Professor Mari transcript scrolling, tool error display, debug prompts, and chat deletion confirmation. - Fixed Tracker panel sizing and detached-window behavior. - Improved NovelAI style-plate uploads. - Corrected lorebook ownership, deletion, visibility, and content updates. - Fixed workspace file-operation error guidance. <!-- 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:10:58 +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#6496
No description provided.