mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #5880] [MERGED] fix(mobile): reduce Illustrator image-arrival pressure and refresh saved images #6978
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#6978
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/5880
Author: @SpicyMarinara
Created: 9/5/2026
Status: ✅ Merged
Merged: 9/5/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/5870-illustration-arrival📝 Commits (6)
0e367fechore: track iPhone illustration arrival regressione5b3ad9fix(mobile): reduce illustration decode pressure and refresh saved arrivals64bf0c3fix(images): retain EXIF orientation in cached previews9396bf7test: align illustration refresh guard regression with durable handoffff35d8bMerge remote-tracking branch 'origin/staging' into fix/5870-illustration-arrivale546342fix(images): keep cache hits cheap and guard descriptor cleanup📊 Changes
12 files changed (+443 additions, -24 deletions)
View changed files
📝
CHANGELOG.md(+2 -0)➕
e2e/illustration-arrival.e2e.ts(+194 -0)📝
packages/client/src/components/chat/ChatGallery.tsx(+6 -3)➕
packages/client/src/components/chat/ChatImagePreview.tsx(+17 -0)📝
packages/client/src/components/chat/ChatMessage.tsx(+3 -2)📝
packages/client/src/components/chat/ConversationMessageShared.tsx(+2 -1)📝
packages/client/src/hooks/use-generate.ts(+4 -5)📝
packages/server/src/routes/gallery.routes.ts(+9 -0)📝
packages/server/src/services/image/image-thumbnail.ts(+35 -11)📝
packages/shared/src/constants/defaults.ts(+3 -0)➕
scripts/regressions/gallery-previews.regression.ts(+166 -0)📝
scripts/regressions/roleplay-streaming.regression.ts(+2 -2)📄 Description
Linked issue
Refs #5870. Leave the physical iPhone crash report open until the maintainer can retest; this is a bounded rendering mitigation plus a reproduced automatic-image refresh fix.
Why this change
On current staging, Mari's iPhone Home Screen app goes black when an Illustrator image arrives. Restarting only the app restores it. A manual illustration subsequently appeared in both Gallery and the message after refresh, confirming it survived and was saved; the automatic illustration was still missing. Docker logs and physical-device profiling are unavailable, so GPU exhaustion is a hypothesis, not a confirmed diagnosis.
Two concrete paths were checked: mobile chat/gallery images decode the full original despite their small display size, and a saved automatic Roleplay image stays hidden while another agent keeps the generation stream open.
What changed
pictureselection avoids fetching the original in the phone transcript/grid. Desktop, external/data URLs, lightbox, and downloads retain originals.Validation
Recorded execution, separate from the unchecked human checklist:
pnpm checkpassed (local TypeScript, ESLint, localization, formatting, E2E types, production build).pnpm version:checkpassed.Focused Playwright: 9/9 passed in development across desktop Chromium, mobile Chromium, and mobile WebKit, with 20-message fixture chats. Final production-Docker browser run: 15/15 passed across the same browsers (new arrival checks, reopened-image recovery, entrance-animation lifecycle). Phone chat/grid requests did not fetch the original; opening did, and downloads matched original bytes.
Before the change: mobile
naturalWidthwas 2048 instead of 1024; a controlled provider SSE with an open remaining-agent tail failed to reveal a newly persisted illustration. After: both claims pass. SSE timing is synthetic; storage and media routes are real. This is not a reproduction of the physical black screen.node scripts/run-regressions.mjs --filter gallery-previewspassed: current shared and legacy files, fixed widths, no upscaling, EXIF orientation, GIF/WebP/APNG preservation, large-PNG-metadata fallback, originals unchanged, cache reuse, HEAD/ranges, wrong ownership, traversal and invalid media.node scripts/run-regressions.mjs --filter illustrator-disconnectpassed: actual HTTP disconnect preserves saving; explicit Stop cancels. This behavior was already fixed in #5871.Production Docker built and ran successfully after freeing local disk space: health, SPA, upload, both preview sizes and byte-identical original downloads passed. The isolated browser-fixture container used the existing E2E rate-limit bypass for rapid seeding; the initial isolated API smoke ran with normal limits. No host data was mounted.
Initial broader local browser run and Docker build were interrupted by host ENOSPC / Docker connection loss, not treated as passes. Only reinstallable dependency caches from this task's three completed temporary worktrees were removed. A stale-server retry and dev-store-import tests aimed at a production server were not counted as passes; final production-compatible checks passed above.
Updated the existing Roleplay streaming source assertion to match the new live-presentation guard while still requiring the Game-mode exclusion; that regression now passes. Required CI and CodeRabbit must pass before merge.
Final head
e5463428eincludes the latest staging integration and both CodeRabbit fixes (versioned, early cache hits; guarded descriptor close). It passespnpm check, the production Docker/API smoke, and all 15 selected production-browser checks.The complete Linux CI Node suite passes: 207/207. The isolated macOS run passed 206/207; the unchanged writer-lease fixture at
storage-writer-lock.regression.ts:314forces a v4 record using a missing macOS boot ID, which the validator rejects. Its standalone rerun fails the same way. No storage-runtime or unrelated fixture change was added to this PR.The complete desktop Chromium, mobile Chromium, and mobile WebKit CI matrix passed. Initial CI mobile-Chromium shard 3 failed in the unchanged Home widget test: the random Chibi Professor Mari toast intercepted its bookmark-button click (confirmed in the log and failure screenshot). The new illustration tests passed even in that attempt; the shard and its required aggregate gate passed on rerun without code changes or skipped assertions. CodeRabbit completed its follow-up review of
e5463428ewith no outstanding findings.pnpm checkpasses locallyContainer (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.mdManual verification notes
Docs and release impact
Changelog only; no version bump, translated user guide change, or main release.
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue openedUI evidence
Before/after screenshots and proof notes. Download/open the self-contained
proof.htmlto view the embedded screenshots. These prove the described rendering/refresh path, not an iPhone process crash diagnosis.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.