[PR #5871] [MERGED] fix(mobile): recover generation results and compact message controls #6974

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

📋 Pull Request Information

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

Base: staging ← Head: fix/iphone-generation-black-screen


📝 Commits (8)

  • 72d375d chore: track iPhone generation regression investigation
  • e37721c fix(ui): use active accent for notification borders
  • bc443eb fix: release completed message animation compositor hints
  • 938b411 test: document and validate message rendering safeguards
  • 4011a25 fix: preserve Illustrator retries after passive disconnect
  • 8b8502c fix: refresh orphaned generation results when reopening a chat
  • e2fcb82 fix(mobile): fit action rows and isolate reopened generation recovery
  • 0b230a3 test: follow shared generation status hook in drawer guard

📊 Changes

13 files changed (+636 additions, -19 deletions)

View changed files

📝 CHANGELOG.md (+5 -0)
📝 docs/installation/ios-pwa.md (+2 -0)
📝 e2e/core-flows.e2e.ts (+70 -4)
➕ e2e/generation-recovery.e2e.ts (+190 -0)
➕ e2e/message-animation-lifecycle.e2e.ts (+47 -0)
📝 packages/client/src/App.tsx (+1 -1)
📝 packages/client/src/components/chat/ChatSettingsDrawer.tsx (+5 -7)
📝 packages/client/src/components/chat/MessageActionButton.tsx (+1 -1)
📝 packages/client/src/hooks/use-chats.ts (+61 -0)
📝 packages/client/src/styles/globals.css (+16 -1)
📝 packages/server/src/routes/generate/retry-agents-route.ts (+5 -4)
➕ scripts/regressions/illustrator-disconnect.regression.ts (+230 -0)
📝 scripts/regressions/open-issues.regression.ts (+3 -1)

📄 Description

Linked issue

Closes #5873.
Refs #5870. Keep #5870 open for physical iPhone confirmation of the reported persistent black screen.

Why this change

Mari's installed iPhone Home Screen app can become blank after long Roleplay replies/agent work, and reopening does not reliably reveal Illustrator results. Docker stays healthy and Messages per page is 20. Separately, #5873 reports that the recent fixed 44 px mobile action widths force wrapping; the maintainer requests near-old mobile sizing while preserving larger desktop controls.

What changed

  • Remove one permanent will-change declaration after message entrance animations. The animation and layout remain intact.
  • Reuse the existing accent-derived panel border for notifications, including agent/model warnings.
  • Preserve Illustrator-only manual/retried work on passive socket disconnect. Existing explicit Stop/Stop Agents cancellation and unrelated retry cancellation remain unchanged.
  • Reuse the existing generation-status query when opening a chat without a local generation. Poll only while the server is active, then refresh saved messages and gallery results once. Navigation, local streams, typewriters and agent tails retain ownership.
  • Compact the existing Conversation/Roleplay mobile icons to 0.875rem (about 1 px larger than the old 0.8125rem icons at the default app scale), and share one row's width without changing desktop sizes, action order, or saved swipe preferences.
  • Add focused regression proof, Unreleased notes and iOS recovery guidance. No new dependencies, schema, reload workaround or job system.

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

Automated evidence (checkboxes intentionally remain unchecked for human verification):

  • pnpm check passed, including localization, formatting, lint, E2E types and production/PWA build.
  • Real Fastify + loopback HTTP image provider regression passed: passive disconnect saves exact image bytes, gallery row, message and swipe attachments; Stop Agents and ordinary Stop prevent persistence; an unrelated Echo Chamber retry still aborts on disconnect. Baseline failed on lost image persistence.
  • Final 21 focused browser checks passed across desktop Chromium, mobile Chromium and mobile WebKit: compact one-row actions at 320 px and normal mobile width, action order, persisted swipe preferences, warning accents in light/dark themes, completed animation lifetime, reopened image visible in gallery/transcript without SSE, idle/no polling, navigation, and local stream/typewriter/agent-tail guards.
  • Baseline WebKit failed on lingering compositor hint; warning baseline failed on orchid border; mobile action baseline failed on oversized icons and visibly wrapped rows.
  • Linux/amd64 Docker build and runtime smoke passed: health endpoint, production desktop Chromium and iPhone-sized WebKit shell/action controls, no page errors. The image uses e2fcb821c production sources; the later 0b230a3e7 commit changes only an existing source-location regression assertion. The temporary container and synthetic data were removed after testing.
  • Existing open-issues regression now verifies both the drawer hook call and the extracted status endpoint; focused rerun passed after CI identified the obsolete inline-source assertion. Attached-agent Stop, message-page cache, Roleplay streaming and gallery recovery regressions also passed in isolated test data.

Manual verification notes

Manually verify on an actual iPhone Home Screen PWA connected to Docker: long Roleplay replies with agents/Illustrator, app interruption and reopening before the image finishes, and the chosen warning-border accent. Also manually verify Samsung Internet and Firefox Android at 100% browser zoom, with optional message tools enabled.

Claim boundary: removal of an unnecessary long-reply compositor hint is proven, but the physical iPhone WebKit/GPU failure has not been reproduced. This PR mitigates a concrete rendering-pressure source and fixes proven image cancellation/recovery paths; it does not establish guaranteed elimination of all iOS blank screens. Automatic /generate already survives passive disconnects; the server cancellation change specifically concerns Illustrator-only /retry-agents. No private chat screenshots or paid model calls were used.

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] follow-up issue opened
  • Version/release files updated (only if this PR includes a version bump)

Unreleased changelog and iOS PWA troubleshooting updated. Translation follow-up: #5874. Staging only; no main promotion, release/version bump, or unrelated draft changes.

UI evidence (if applicable)

Synthetic before/after browser proof. Includes warning before/after, compact Conversation/Roleplay actions and reopened image delivery. All screenshots use synthetic content.

Summary by CodeRabbit

  • Bug Fixes

    • Long Roleplay messages now release temporary animation resources after entering view.
    • Notifications and connection warnings use the selected accent color for borders in both themes.
    • Illustrator image requests can finish saving after a browser disconnect; explicit stopping still cancels them.
    • Reopened chats now refresh saved messages and gallery images after server-side generation completes.
    • Mobile message actions now fit in a compact shared row while desktop controls remain unchanged.
  • Documentation

    • Added iOS/iPadOS troubleshooting guidance for generation interruptions, recovery, cancellation, and diagnostics.

🔄 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/5871 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 9/5/2026 **Status:** ✅ Merged **Merged:** 9/5/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/iphone-generation-black-screen` --- ### 📝 Commits (8) - [`72d375d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/72d375df0f77fbb738a245a6b4d903d413ae1b1f) chore: track iPhone generation regression investigation - [`e37721c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e37721caa2c6f6615b6c53ec657fb4477bf4e73a) fix(ui): use active accent for notification borders - [`bc443eb`](https://github.com/Pasta-Devs/Marinara-Engine/commit/bc443ebffc3d73791cc7578b7614ddae51132ba9) fix: release completed message animation compositor hints - [`938b411`](https://github.com/Pasta-Devs/Marinara-Engine/commit/938b41112a323d92209b8b7e8321bc548f1fa714) test: document and validate message rendering safeguards - [`4011a25`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4011a25567e677e423dcfbf50af9a8ffc73b7b6b) fix: preserve Illustrator retries after passive disconnect - [`8b8502c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8b8502c2b82998879a8f96c227b1ea86f616045a) fix: refresh orphaned generation results when reopening a chat - [`e2fcb82`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e2fcb821c429e0da64048793b500ab925c03dad3) fix(mobile): fit action rows and isolate reopened generation recovery - [`0b230a3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0b230a3e726a92d157f59f4e4b17dc87612ee71c) test: follow shared generation status hook in drawer guard ### 📊 Changes **13 files changed** (+636 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+5 -0) 📝 `docs/installation/ios-pwa.md` (+2 -0) 📝 `e2e/core-flows.e2e.ts` (+70 -4) ➕ `e2e/generation-recovery.e2e.ts` (+190 -0) ➕ `e2e/message-animation-lifecycle.e2e.ts` (+47 -0) 📝 `packages/client/src/App.tsx` (+1 -1) 📝 `packages/client/src/components/chat/ChatSettingsDrawer.tsx` (+5 -7) 📝 `packages/client/src/components/chat/MessageActionButton.tsx` (+1 -1) 📝 `packages/client/src/hooks/use-chats.ts` (+61 -0) 📝 `packages/client/src/styles/globals.css` (+16 -1) 📝 `packages/server/src/routes/generate/retry-agents-route.ts` (+5 -4) ➕ `scripts/regressions/illustrator-disconnect.regression.ts` (+230 -0) 📝 `scripts/regressions/open-issues.regression.ts` (+3 -1) </details> ### 📄 Description ## Linked issue Closes #5873. Refs #5870. Keep #5870 open for physical iPhone confirmation of the reported persistent black screen. ## Why this change Mari's installed iPhone Home Screen app can become blank after long Roleplay replies/agent work, and reopening does not reliably reveal Illustrator results. Docker stays healthy and Messages per page is 20. Separately, #5873 reports that the recent fixed 44 px mobile action widths force wrapping; the maintainer requests near-old mobile sizing while preserving larger desktop controls. ## What changed - Remove one permanent `will-change` declaration after message entrance animations. The animation and layout remain intact. - Reuse the existing accent-derived panel border for notifications, including agent/model warnings. - Preserve Illustrator-only manual/retried work on passive socket disconnect. Existing explicit Stop/Stop Agents cancellation and unrelated retry cancellation remain unchanged. - Reuse the existing generation-status query when opening a chat without a local generation. Poll only while the server is active, then refresh saved messages and gallery results once. Navigation, local streams, typewriters and agent tails retain ownership. - Compact the existing Conversation/Roleplay mobile icons to 0.875rem (about 1 px larger than the old 0.8125rem icons at the default app scale), and share one row's width without changing desktop sizes, action order, or saved swipe preferences. - Add focused regression proof, Unreleased notes and iOS recovery guidance. No new dependencies, schema, reload workaround or job system. ## 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` Automated evidence (checkboxes intentionally remain unchecked for human verification): - `pnpm check` passed, including localization, formatting, lint, E2E types and production/PWA build. - Real Fastify + loopback HTTP image provider regression passed: passive disconnect saves exact image bytes, gallery row, message and swipe attachments; Stop Agents and ordinary Stop prevent persistence; an unrelated Echo Chamber retry still aborts on disconnect. Baseline failed on lost image persistence. - Final 21 focused browser checks passed across desktop Chromium, mobile Chromium and mobile WebKit: compact one-row actions at 320 px and normal mobile width, action order, persisted swipe preferences, warning accents in light/dark themes, completed animation lifetime, reopened image visible in gallery/transcript without SSE, idle/no polling, navigation, and local stream/typewriter/agent-tail guards. - Baseline WebKit failed on lingering compositor hint; warning baseline failed on orchid border; mobile action baseline failed on oversized icons and visibly wrapped rows. - Linux/amd64 Docker build and runtime smoke passed: health endpoint, production desktop Chromium and iPhone-sized WebKit shell/action controls, no page errors. The image uses e2fcb821c production sources; the later 0b230a3e7 commit changes only an existing source-location regression assertion. The temporary container and synthetic data were removed after testing. - Existing open-issues regression now verifies both the drawer hook call and the extracted status endpoint; focused rerun passed after CI identified the obsolete inline-source assertion. Attached-agent Stop, message-page cache, Roleplay streaming and gallery recovery regressions also passed in isolated test data. ### Manual verification notes Manually verify on an actual iPhone Home Screen PWA connected to Docker: long Roleplay replies with agents/Illustrator, app interruption and reopening before the image finishes, and the chosen warning-border accent. Also manually verify Samsung Internet and Firefox Android at 100% browser zoom, with optional message tools enabled. **Claim boundary:** removal of an unnecessary long-reply compositor hint is proven, but the physical iPhone WebKit/GPU failure has not been reproduced. This PR mitigates a concrete rendering-pressure source and fixes proven image cancellation/recovery paths; it does not establish guaranteed elimination of all iOS blank screens. Automatic /generate already survives passive disconnects; the server cancellation change specifically concerns Illustrator-only /retry-agents. No private chat screenshots or paid model calls were used. ## 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]` follow-up issue opened - [ ] Version/release files updated (only if this PR includes a version bump) Unreleased changelog and iOS PWA troubleshooting updated. Translation follow-up: #5874. Staging only; no main promotion, release/version bump, or unrelated draft changes. ## UI evidence (if applicable) [Synthetic before/after browser proof](https://gist.github.com/SpicyMarinara/a8b8247cd1a1dc9620c9b6627bb2172c). Includes warning before/after, compact Conversation/Roleplay actions and reopened image delivery. All screenshots use synthetic content. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Long Roleplay messages now release temporary animation resources after entering view. - Notifications and connection warnings use the selected accent color for borders in both themes. - Illustrator image requests can finish saving after a browser disconnect; explicit stopping still cancels them. - Reopened chats now refresh saved messages and gallery images after server-side generation completes. - Mobile message actions now fit in a compact shared row while desktop controls remain unchanged. - **Documentation** - Added iOS/iPadOS troubleshooting guidance for generation interruptions, recovery, cancellation, and diagnostics. <!-- 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:15:23 +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#6974
No description provided.