[GH-ISSUE #5686] [Issue]: Stop unexplained iPhone reloads during active chat sessions #3144

Closed
opened 2026-10-21 05:59:59 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @SpicyMarinara on GitHub (Aug 31, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5686

Originally assigned to: @SpicyMarinara on GitHub.

Summary

On iPhone, Marinara can intermittently go dark and reload while the user is in a chat or taps a control that opens another surface. No render-error recovery screen appears, and the supplied diagnostics report no server freeze.

Inspection of the reported build found deterministic silent reload paths during client updates, plus unnecessary permanent compositing hints on every mounted Roleplay avatar that increase iOS WebKit GPU pressure.

Expected behavior

An available client update should not replace an active session without warning. Marinara should ask the user to refresh at a convenient moment, and long Roleplay chats should avoid persistent GPU-layer hints on repeated message avatars.

Actual behavior

The PWA is configured for automatic service-worker activation and calls the reload form of updateSW when new content is found. The five-minute runtime build check also clears caches and replaces the page immediately, while a first lazy-chunk failure performs another automatic reload when the user taps an unopened surface after an update.

Separately, every mounted Roleplay avatar receives will-change: opacity, filter even while static. A long transcript can therefore keep the browser reserving compositing resources for dozens of repeated images; opening another layered surface can add pressure at the moment described in the report.

Steps to reproduce

  1. Keep a staging session open on an iPhone while a newer client build is deployed.
  2. Continue using a chat, return to the app, or tap a lazily loaded panel that has not been opened in the current session.
  3. Observe that update detection or stale-chunk recovery may replace the page without asking first.
  4. In a long Roleplay chat, inspect mounted message avatars and observe that the permanent will-change hint applies to each repeated avatar image.

Environment

  • Marinara Engine version: 2.4.5
  • Build: 2.4.5+ebfa30512c5d
  • Commit: ebfa30512c
  • Install type: Not provided
  • Server OS: Linux 6.12.90+deb13.1-amd64 (x64)
  • Server memory: heap 187.5 / 2152 MiB; RSS 478.8 MiB
  • Background wake lock: not reported
  • Last detected freeze: none detected
  • Client OS: iOS 18.7
  • Browser or app shell: Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.6 Mobile/15E148 Safari/604.1
  • GPU: Apple GPU
  • Active connection: GPT 5.6 Sol
  • Connection provider: openai
  • LLM model: gpt-5.6-sol

Logs, screenshots, or video

No client crash log or video was supplied. The observed behavior is a dark screen followed by a reload. The server diagnostics report no detected freeze.

Additional context

This fix should stay deliberately small:

  • change PWA updates from silent auto-reload to an explicit refresh prompt;
  • prompt instead of immediately replacing the page when the client/server build changes;
  • retain one automatic stale-chunk recovery only for the genuinely unrecoverable missing-module case;
  • remove permanent will-change hints from repeated message avatars while retaining them for the small live sprite set.

The automatic reload paths are confirmed in code. A separate iOS WebKit process termination cannot be proven from the supplied diagnostics, so real-device confirmation remains necessary after these deterministic causes and the repeated compositing pressure are removed.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @SpicyMarinara on GitHub (Aug 31, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5686 Originally assigned to: @SpicyMarinara on GitHub. ## Summary On iPhone, Marinara can intermittently go dark and reload while the user is in a chat or taps a control that opens another surface. No render-error recovery screen appears, and the supplied diagnostics report no server freeze. Inspection of the reported build found deterministic silent reload paths during client updates, plus unnecessary permanent compositing hints on every mounted Roleplay avatar that increase iOS WebKit GPU pressure. ## Expected behavior An available client update should not replace an active session without warning. Marinara should ask the user to refresh at a convenient moment, and long Roleplay chats should avoid persistent GPU-layer hints on repeated message avatars. ## Actual behavior The PWA is configured for automatic service-worker activation and calls the reload form of updateSW when new content is found. The five-minute runtime build check also clears caches and replaces the page immediately, while a first lazy-chunk failure performs another automatic reload when the user taps an unopened surface after an update. Separately, every mounted Roleplay avatar receives will-change: opacity, filter even while static. A long transcript can therefore keep the browser reserving compositing resources for dozens of repeated images; opening another layered surface can add pressure at the moment described in the report. ## Steps to reproduce 1. Keep a staging session open on an iPhone while a newer client build is deployed. 2. Continue using a chat, return to the app, or tap a lazily loaded panel that has not been opened in the current session. 3. Observe that update detection or stale-chunk recovery may replace the page without asking first. 4. In a long Roleplay chat, inspect mounted message avatars and observe that the permanent will-change hint applies to each repeated avatar image. ## Environment - Marinara Engine version: 2.4.5 - Build: 2.4.5+ebfa30512c5d - Commit: ebfa30512c5d - Install type: Not provided - Server OS: Linux 6.12.90+deb13.1-amd64 (x64) - Server memory: heap 187.5 / 2152 MiB; RSS 478.8 MiB - Background wake lock: not reported - Last detected freeze: none detected - Client OS: iOS 18.7 - Browser or app shell: Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.6 Mobile/15E148 Safari/604.1 - GPU: Apple GPU - Active connection: GPT 5.6 Sol - Connection provider: openai - LLM model: gpt-5.6-sol ## Logs, screenshots, or video No client crash log or video was supplied. The observed behavior is a dark screen followed by a reload. The server diagnostics report no detected freeze. ## Additional context This fix should stay deliberately small: - change PWA updates from silent auto-reload to an explicit refresh prompt; - prompt instead of immediately replacing the page when the client/server build changes; - retain one automatic stale-chunk recovery only for the genuinely unrecoverable missing-module case; - remove permanent will-change hints from repeated message avatars while retaining them for the small live sprite set. The automatic reload paths are confirmed in code. A separate iOS WebKit process termination cannot be proven from the supplied diagnostics, so real-device confirmation remains necessary after these deterministic causes and the repeated compositing pressure are removed. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [x] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:59:59 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Aug 31, 2026):

Owned by @SpicyMarinara and being handled in draft PR #5687 against staging. The hardware-only WebKit termination path remains an explicit manual verification item; the deterministic reload paths and repeated avatar compositing pressure are confirmed in code.

<!-- gh-comment-id:5475679209 --> @SpicyMarinara commented on GitHub (Aug 31, 2026): Owned by @SpicyMarinara and being handled in draft PR #5687 against staging. The hardware-only WebKit termination path remains an explicit manual verification item; the deterministic reload paths and repeated avatar compositing pressure are confirmed in code.
Author
Owner

@SpicyMarinara commented on GitHub (Aug 31, 2026):

Resolved by #5687 and landed on staging in commit 00123f543b.

<!-- gh-comment-id:5476311725 --> @SpicyMarinara commented on GitHub (Aug 31, 2026): Resolved by #5687 and landed on `staging` in commit 00123f543b3af56c17f0967b7aa314aed20f577a.
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#3144
No description provided.