[PR #5166] [MERGED] fix: resolve assigned reliability and workflow issues #6651

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

📋 Pull Request Information

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

Base: staging ← Head: agent/assigned-issues-5142-5165


📝 Commits (6)

  • 756672e fix(image): determine gallery file extension from detected bytes on save
  • 68cf303 fix: resolve assigned issue sweep
  • d414446 fix: apply automated review feedback
  • a2062ca fix: apply final automated review feedback
  • 27bf6b4 fix: complete automated review follow-ups
  • 3a0a6fb test: exercise production preview macro isolation

📊 Changes

40 files changed (+1659 additions, -431 deletions)

View changed files

📝 CHANGELOG.md (+11 -1)
📝 docs/TROUBLESHOOTING.md (+6 -0)
📝 docs/lorebooks/entries.md (+1 -1)
📝 docs/prompts/macros.md (+6 -8)
📝 packages/client/src/components/chat/ChatArea.tsx (+1 -2)
📝 packages/client/src/components/chat/ChatInput.tsx (+1 -1)
📝 packages/client/src/components/panels/SettingsPanel.tsx (+45 -11)
📝 packages/client/src/components/presets/PresetEditor.tsx (+323 -175)
📝 packages/client/src/hooks/use-generate.ts (+105 -52)
➕ packages/client/src/lib/agent-result-ownership.ts (+13 -0)
📝 packages/client/src/lib/perf-diagnostics.ts (+3 -2)
📝 packages/client/src/lib/support-diagnostics.ts (+9 -3)
📝 packages/client/src/lib/tts-dialogue.ts (+9 -7)
📝 packages/client/src/lib/tts-roleplay-speaker-extractor.ts (+1 -2)
📝 packages/client/src/localization/locales/en.json (+4 -0)
📝 packages/client/src/stores/agent.store.ts (+46 -8)
📝 packages/server/src/app.ts (+29 -0)
📝 packages/server/src/middleware/rate-limit.ts (+9 -1)
📝 packages/server/src/routes/backup.routes.ts (+141 -0)
📝 packages/server/src/routes/generate.routes.ts (+63 -16)

...and 20 more files

📄 Description

Why

This sweep resolves the currently assigned user-facing reliability and workflow reports in one coordinated staging change. The implementations stay deliberately narrow: explicit actions instead of hidden mutation, immutable run anchors instead of a new queue service, provider-safe pagination, and a small asynchronous backup handoff for Safari.

What changed

  • Stock Universal Preset views no longer create copies on mount; users choose Create editable copy explicitly.
  • Gallery saves derive the extension from detected image bytes (preserving the original contributor attribution for #5147).
  • Roleplay releases Swipe, Continue, and the composer after the durable assistant save, while each post-processing pipeline retains its own message/swipe anchor and processing token. Rewriting agents still block until their rewritten message is final.
  • setvar/getvar local variables persist in chat metadata and follow SillyTavern-compatible add/increment/decrement behavior without leaking between chats or mutating preview runs.
  • Speaker-extractor emotions are delivered as exact inline bracketed speech cues, with validation that the extractor did not rewrite dialogue.
  • Support Diagnostics separates host OS from client OS and recognizes desktop-class iPad user agents.
  • Safari backup downloads use a short start/status/file job lifecycle so the request is not idle for the many minutes needed to assemble a large archive.
  • Roleplay Spotify search paginates in batches of ten; Music DJ reapplies context repeat even when Spotify playback verification lags. The Game search half already landed through #5162.
  • Unsupported longtask observation is feature-detected. mozInputSource is absent from Engine and installed dependency sources; the reported content.js warning is injected extension code and cannot safely be suppressed by the app.
  • Termux keeps timestamped server logs for 14 days and documents wake-lock/battery-exemption setup. This supplies evidence for #5154; the reporter still needs to reproduce because a vendor/Android process kill cannot be diagnosed or honestly declared fixed without a surviving log.

Automated evidence

  • pnpm check passed (Impeccable context, localization, TypeScript/ESLint, production builds).
  • Prompt/macro/Spotify, TTS extractor, assigned-sweep, open-issue, and launcher regression lanes passed.
  • Full Node lane: 123/124 passed; the unchanged Experience-generation case reproduced locally against staging-identical files because this workstation injects its configured fallback connection into that non-isolated fixture.
  • The full Playwright lane was stopped after unrelated pre-existing one-minute Character favorite and two-minute mobile Character Chat timeouts; tests reached by that point were otherwise passing.

Manual verification still required

  • Manually verify stock-preset viewing and explicit copy creation in the browser.
  • Manually verify a multi-gigabyte backup in Safari.
  • Manually verify Swipe/Continue/new Roleplay turns while non-rewriting agents finish.
  • Manually verify inline emotion cues with an emotion-aware TTS provider.
  • Ask the Termux reporter to reproduce and attach the newest persistent server log.

Closes #5142
Closes #5147
Refs #5154
Closes #5155
Closes #5157
Closes #5158
Closes #5159
Closes #5160
Closes #5163
Closes #5164
Closes #5165

Docs translation follow-up: #5167

Summary by CodeRabbit

  • New Features

    • Chat-local macro variables persist across turns and app restarts, with improved numeric operations.
    • Stock presets are read-only until you choose Create Editable Copy.
    • Large backups now prepare asynchronously with progress, timeout, and failure reporting.
    • Support diagnostics separately report server and client operating systems.
  • Bug Fixes

    • Fixed image extensions, TTS emotion formatting, Spotify pagination and repeat behavior, swipe navigation, overlapping agent runs, and browser performance detection.
    • Termux logs are now preserved for troubleshooting.
  • Documentation

    • Added Android/Termux troubleshooting guidance and clarified macro-variable behavior.

🔄 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/5166 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 8/16/2026 **Status:** ✅ Merged **Merged:** 8/16/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `agent/assigned-issues-5142-5165` --- ### 📝 Commits (6) - [`756672e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/756672ede00ff017f25b363e686a63312bec5273) fix(image): determine gallery file extension from detected bytes on save - [`68cf303`](https://github.com/Pasta-Devs/Marinara-Engine/commit/68cf30326ad163e70d28a06cfdafca6732cd9faa) fix: resolve assigned issue sweep - [`d414446`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d4144466b5089ee2c710f88283906c9f86631acc) fix: apply automated review feedback - [`a2062ca`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a2062ca8eabc45373167c28941b5a89a0c77fe47) fix: apply final automated review feedback - [`27bf6b4`](https://github.com/Pasta-Devs/Marinara-Engine/commit/27bf6b49fbba1cdb6ec56d617327cf5f484429bf) fix: complete automated review follow-ups - [`3a0a6fb`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3a0a6fb092fe0d9b4564913e55e209aeccdec849) test: exercise production preview macro isolation ### 📊 Changes **40 files changed** (+1659 additions, -431 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+11 -1) 📝 `docs/TROUBLESHOOTING.md` (+6 -0) 📝 `docs/lorebooks/entries.md` (+1 -1) 📝 `docs/prompts/macros.md` (+6 -8) 📝 `packages/client/src/components/chat/ChatArea.tsx` (+1 -2) 📝 `packages/client/src/components/chat/ChatInput.tsx` (+1 -1) 📝 `packages/client/src/components/panels/SettingsPanel.tsx` (+45 -11) 📝 `packages/client/src/components/presets/PresetEditor.tsx` (+323 -175) 📝 `packages/client/src/hooks/use-generate.ts` (+105 -52) ➕ `packages/client/src/lib/agent-result-ownership.ts` (+13 -0) 📝 `packages/client/src/lib/perf-diagnostics.ts` (+3 -2) 📝 `packages/client/src/lib/support-diagnostics.ts` (+9 -3) 📝 `packages/client/src/lib/tts-dialogue.ts` (+9 -7) 📝 `packages/client/src/lib/tts-roleplay-speaker-extractor.ts` (+1 -2) 📝 `packages/client/src/localization/locales/en.json` (+4 -0) 📝 `packages/client/src/stores/agent.store.ts` (+46 -8) 📝 `packages/server/src/app.ts` (+29 -0) 📝 `packages/server/src/middleware/rate-limit.ts` (+9 -1) 📝 `packages/server/src/routes/backup.routes.ts` (+141 -0) 📝 `packages/server/src/routes/generate.routes.ts` (+63 -16) _...and 20 more files_ </details> ### 📄 Description ## Why This sweep resolves the currently assigned user-facing reliability and workflow reports in one coordinated staging change. The implementations stay deliberately narrow: explicit actions instead of hidden mutation, immutable run anchors instead of a new queue service, provider-safe pagination, and a small asynchronous backup handoff for Safari. ## What changed - Stock Universal Preset views no longer create copies on mount; users choose **Create editable copy** explicitly. - Gallery saves derive the extension from detected image bytes (preserving the original contributor attribution for #5147). - Roleplay releases Swipe, Continue, and the composer after the durable assistant save, while each post-processing pipeline retains its own message/swipe anchor and processing token. Rewriting agents still block until their rewritten message is final. - `setvar`/`getvar` local variables persist in chat metadata and follow SillyTavern-compatible add/increment/decrement behavior without leaking between chats or mutating preview runs. - Speaker-extractor emotions are delivered as exact inline bracketed speech cues, with validation that the extractor did not rewrite dialogue. - Support Diagnostics separates host OS from client OS and recognizes desktop-class iPad user agents. - Safari backup downloads use a short start/status/file job lifecycle so the request is not idle for the many minutes needed to assemble a large archive. - Roleplay Spotify search paginates in batches of ten; Music DJ reapplies context repeat even when Spotify playback verification lags. The Game search half already landed through #5162. - Unsupported `longtask` observation is feature-detected. `mozInputSource` is absent from Engine and installed dependency sources; the reported `content.js` warning is injected extension code and cannot safely be suppressed by the app. - Termux keeps timestamped server logs for 14 days and documents wake-lock/battery-exemption setup. This supplies evidence for #5154; the reporter still needs to reproduce because a vendor/Android process kill cannot be diagnosed or honestly declared fixed without a surviving log. ## Automated evidence - `pnpm check` passed (Impeccable context, localization, TypeScript/ESLint, production builds). - Prompt/macro/Spotify, TTS extractor, assigned-sweep, open-issue, and launcher regression lanes passed. - Full Node lane: 123/124 passed; the unchanged Experience-generation case reproduced locally against staging-identical files because this workstation injects its configured fallback connection into that non-isolated fixture. - The full Playwright lane was stopped after unrelated pre-existing one-minute Character favorite and two-minute mobile Character Chat timeouts; tests reached by that point were otherwise passing. ## Manual verification still required - [ ] Manually verify stock-preset viewing and explicit copy creation in the browser. - [ ] Manually verify a multi-gigabyte backup in Safari. - [ ] Manually verify Swipe/Continue/new Roleplay turns while non-rewriting agents finish. - [ ] Manually verify inline emotion cues with an emotion-aware TTS provider. - [ ] Ask the Termux reporter to reproduce and attach the newest persistent server log. Closes #5142 Closes #5147 Refs #5154 Closes #5155 Closes #5157 Closes #5158 Closes #5159 Closes #5160 Closes #5163 Closes #5164 Closes #5165 Docs translation follow-up: #5167 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Chat-local macro variables persist across turns and app restarts, with improved numeric operations. * Stock presets are read-only until you choose **Create Editable Copy**. * Large backups now prepare asynchronously with progress, timeout, and failure reporting. * Support diagnostics separately report server and client operating systems. * **Bug Fixes** * Fixed image extensions, TTS emotion formatting, Spotify pagination and repeat behavior, swipe navigation, overlapping agent runs, and browser performance detection. * Termux logs are now preserved for troubleshooting. * **Documentation** * Added Android/Termux troubleshooting guidance and clarified macro-variable behavior. <!-- 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:12:26 +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#6651
No description provided.