[PR #6885] [MERGED] fix: assigned Termux, expression and illustration issues #7366

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

📋 Pull Request Information

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

Base: staging ← Head: codex/assigned-issue-sweep


📝 Commits (4)

  • b18a5cb chore: start assigned issue sweep
  • 67ba30c fix: restore Termux startup, merged expressions and manual illustrations
  • 921c08d fix: update vulnerable transitive dependencies found by CI
  • 60b8efe Merge staging and preserve both changelog entries

📊 Changes

19 files changed (+703 additions, -45 deletions)

View changed files

📝 AGENTS.md (+1 -0)
📝 CHANGELOG.md (+5 -0)
📝 android/README.md (+1 -0)
📝 docs/TROUBLESHOOTING.md (+6 -0)
📝 docs/installation/android-termux.md (+2 -0)
📝 e2e/illustrator-manual-cadence.e2e.ts (+107 -0)
📝 package.json (+5 -4)
📝 packages/client/src/components/chat/ChatGalleryDrawer.tsx (+3 -1)
📝 packages/server/package.json (+1 -1)
📝 packages/server/src/routes/generate.routes.ts (+11 -3)
📝 packages/server/src/routes/generate/retry-agents-route.ts (+18 -1)
📝 pnpm-lock.yaml (+30 -31)
📝 pnpm-workspace.yaml (+1 -1)
➕ scripts/regressions/expression-group-generation.regression.ts (+261 -0)
📝 scripts/regressions/illustrator-message-range.regression.ts (+41 -1)
➕ scripts/regressions/launcher/termux-client-build.regression.mjs (+92 -0)
📝 scripts/regressions/open-issues.regression.ts (+1 -1)
➕ scripts/regressions/termux-sharp.regression.mjs (+116 -0)
📝 start-termux.sh (+1 -1)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository’s staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #6883
Closes #6859
Closes #6872
Closes #6874

Why this change

Termux could rebuild successfully and still refuse to start because the launcher skipped the multiplayer guest bundle. Frozen dependency installs could omit Sharp’s Android fallback. Merged Roleplay responses exposed only their first character to Expression Engine, and manual illustrations incorrectly required enabling automatic agents.

This is the requested sweep of the four assigned issues without an existing or awaited PR. Contributor-owned work remains untouched: #6691, #6692, #6694, #6695, #6696, #6697 and #6829 await PRs; #6833 and #6848 already have draft PRs.

What changed

  • Reuse the complete client build wrapper in Termux’s existing low-memory build helper, retaining its heap policy and disabled PWA/typecheck build steps while producing the guest assets.
  • Make the already-pinned @img/sharp-wasm32 a regular server dependency. The version and native-first Sharp runtime are unchanged; frozen installs now retain the fallback.
  • In merged Roleplay replies and retries, expose the active selected cast to Expression Engine without narrowing it to the stored first-character attribution. Keep existing mandatory targets and sparse/empty presence results, including the Only show active sprites setting.
  • Restore the existing Roleplay Gallery Illustrate control and allow its exclusive one-shot request and /illustrate to use installed Illustrator while automatic agents are disabled. Keep saved settings, missing-package checks, and other modes/actions unchanged.
  • Add the maintainer’s instruction verbatim to AGENTS.md: “Prefer simple code solutions, do not over-engineer things, and reuse code whenever possible.”

The fixes reuse existing build, generation, sprite validation and gallery paths. No application version bump, new package, storage format, setting or UI copy.

The first GitHub audit also reported 11 advisories in existing transitive dependencies. Five compatible resolutions were updated: brace-expansion 2.1.4 → 2.1.7 and 5.0.9 → 5.0.12, fast-uri 3.1.7 → 3.1.8 and 4.1.4 → 4.1.5, and ip-address 10.5.1 → 10.7.1. The follow-up frozen install and audit passed with zero vulnerabilities.

Validation

Validated source commit 60b8efed228dc05e4e0decb4f0b8e91083590e76 (including the security dependency follow-up and current staging integration):

  • pnpm check, pnpm version:check, frozen dependency installation and pnpm audit --json passed; the audit reports zero vulnerabilities. Project checks, prompt/expression/Illustrator/Termux regressions, the complete container build/runtime proof and all smoke/Illustrator browser cases were rerun successfully after the security updates.

  • Focused Node lanes: Termux 3/3, open-issues 1/1, Expression 2/2 and Illustrator 6/6 passed. pnpm regression:prompt passed. Agent-context and existing launcher heap/format checks also passed.

  • The new Expression route regression reproduced the missing second character before the fix; it now verifies real provider prompts and persisted results for normal generation, retry, regeneration, selected/disabled sprites, sparse/empty presence, persona/impersonation and mode controls.

  • Real offline pinned-pnpm proof passed for an older optional-pruned install upgrading to the new dependency classification and for a clean frozen reinstall. Actual Sharp PNG create/resize/metadata passed with a simulated Android platform; the desktop negative control kept its native binding.

  • Actual MARINARA_LOW_MEMORY_BUILD=1 pnpm --filter @marinara-engine/client build followed by node scripts/check-client-build.mjs passed, including the guest JavaScript and CSS.

  • Illustrator browser cases: 6/6 passed across desktop Chromium, mobile Chromium and mobile WebKit, including gallery/slash dispatch, unchanged activation, missing-package gating and existing manual-only cadence. Separate light/dark screenshot probes passed on desktop Chromium and mobile WebKit.

  • Full Docker build and node scripts/smoke-container.mjs marinara-assigned-issue-sweep:local full arm64 passed: compiled API/frontend, native bindings, and data persistence after container replacement. The local image is labeled as local proof, not a release artifact.

  • Local CodeRabbit reviewed the original 17 changed files and separately reviewed all four files in the dependency follow-up, with zero findings in both runs. Independent review caught and fixed an initial over-broad required-expression target change before final validation.

  • pnpm smoke:ui passed 7/7 and pnpm smoke:production passed 3/3 (desktop Chromium, mobile Chromium and mobile WebKit).

  • 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

Manual verification notes

  • Manually update and launch on a physical Android/Termux device, then generate an image. Automated proof runs the real launcher build helper and actual Sharp WASM image conversion with a simulated Android platform; it is not physical-device verification.
  • Manually verify several enabled and selected characters change expressions in a merged Roleplay group, including an Expression retry and Only show active sprites.
  • Manually use Gallery Illustrate and /illustrate with installed Illustrator and automatic agents disabled; confirm an image appears and the automatic-agent settings stay disabled.

Known pre-existing browser failure: expression-active-sprites.e2e.ts fails when switching away and back during pending regeneration, restoring older sprite presence. Both desktop cases reproduce on untouched staging 9b313a48a, and the candidate reproduces across browser profiles. The new expression route regression separately verifies merged multi-character evaluation, filtering, sparse and empty results, retries, regeneration and existing persona/mode guards. No complete pass of that older browser spec is claimed.

Staging advanced through #6882 while checks were running. The only merge conflict was CHANGELOG.md; both sets of entries were preserved. Project checks, prompt and focused Node regressions, UI/production smoke and full container build/runtime checks passed again after integration.

Docs and release impact

Updated the Android wrapper guide, Termux installation guide, troubleshooting and Unreleased changelog. Checked README, CONTRIBUTING, configuration and FAQ; their setup steps remain accurate. Translation follow-up: #6886.

  • 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 (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

Before/after desktop and iPhone-sized browser screenshots: download the HTML and open it to view embedded PNGs. They use synthetic fixtures with automatic agents disabled, in light and dark mode. No generated proof images are committed.

Summary by CodeRabbit

  • New Features
    • Generate a single illustration from the Roleplay Gallery or /illustrate even when automatic agents are disabled, without changing chat settings.
  • Bug Fixes
    • Expression updates and retries in merged Roleplay groups now account for the active, selected cast.
    • Termux builds include the client assets needed for multiplayer guests, and image processing retains its Android fallback.
    • Updated dependency versions to address security issues.
  • Documentation
    • Added Termux troubleshooting and installation guidance for missing guest assets and image-processing issues.

Final delivery

Merged into staging as c67519cbe79eb8b55629ce692e32b37c3a583aed. Verified the merge commit is on remote staging and its source tree exactly matches validated head 60b8efed228dc05e4e0decb4f0b8e91083590e76.

All required GitHub checks passed before merging, including the security audit, main validation, code analysis, desktop/mobile platform build and container checks. The complete Node suite passed 474/474. CodeRabbit completed both its incremental review and the final full review against current staging with no actionable findings; no review threads remain. Physical-device/manual limits and the pre-existing sprite-switch browser failure remain documented above.

Final scope check: #6884 was newly assigned while this sweep was in review. Its author has a working prototype and explicitly seeks project direction before preparing an upstream PR; it remains untouched as an awaiting-direction/contributor-PR proposal. #6833 was closed independently. All four issues implemented here (#6883, #6859, #6872, #6874) are closed after the staging merge.


🔄 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/6885 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 9/30/2026 **Status:** ✅ Merged **Merged:** 9/30/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `codex/assigned-issue-sweep` --- ### 📝 Commits (4) - [`b18a5cb`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b18a5cbfd727c05be7d3a7b5e6f1fc1e330ba91b) chore: start assigned issue sweep - [`67ba30c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/67ba30cbcaf871326d86d242bdcf8acf4ee67ad1) fix: restore Termux startup, merged expressions and manual illustrations - [`921c08d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/921c08d6fbbc8f7358a518dd04677f895b264b59) fix: update vulnerable transitive dependencies found by CI - [`60b8efe`](https://github.com/Pasta-Devs/Marinara-Engine/commit/60b8efed228dc05e4e0decb4f0b8e91083590e76) Merge staging and preserve both changelog entries ### 📊 Changes **19 files changed** (+703 additions, -45 deletions) <details> <summary>View changed files</summary> 📝 `AGENTS.md` (+1 -0) 📝 `CHANGELOG.md` (+5 -0) 📝 `android/README.md` (+1 -0) 📝 `docs/TROUBLESHOOTING.md` (+6 -0) 📝 `docs/installation/android-termux.md` (+2 -0) 📝 `e2e/illustrator-manual-cadence.e2e.ts` (+107 -0) 📝 `package.json` (+5 -4) 📝 `packages/client/src/components/chat/ChatGalleryDrawer.tsx` (+3 -1) 📝 `packages/server/package.json` (+1 -1) 📝 `packages/server/src/routes/generate.routes.ts` (+11 -3) 📝 `packages/server/src/routes/generate/retry-agents-route.ts` (+18 -1) 📝 `pnpm-lock.yaml` (+30 -31) 📝 `pnpm-workspace.yaml` (+1 -1) ➕ `scripts/regressions/expression-group-generation.regression.ts` (+261 -0) 📝 `scripts/regressions/illustrator-message-range.regression.ts` (+41 -1) ➕ `scripts/regressions/launcher/termux-client-build.regression.mjs` (+92 -0) 📝 `scripts/regressions/open-issues.regression.ts` (+1 -1) ➕ `scripts/regressions/termux-sharp.regression.mjs` (+116 -0) 📝 `start-termux.sh` (+1 -1) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository’s `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #6883 Closes #6859 Closes #6872 Closes #6874 ## Why this change Termux could rebuild successfully and still refuse to start because the launcher skipped the multiplayer guest bundle. Frozen dependency installs could omit Sharp’s Android fallback. Merged Roleplay responses exposed only their first character to Expression Engine, and manual illustrations incorrectly required enabling automatic agents. This is the requested sweep of the four assigned issues without an existing or awaited PR. Contributor-owned work remains untouched: #6691, #6692, #6694, #6695, #6696, #6697 and #6829 await PRs; #6833 and #6848 already have draft PRs. ## What changed - Reuse the complete client build wrapper in Termux’s existing low-memory build helper, retaining its heap policy and disabled PWA/typecheck build steps while producing the guest assets. - Make the already-pinned `@img/sharp-wasm32` a regular server dependency. The version and native-first Sharp runtime are unchanged; frozen installs now retain the fallback. - In merged Roleplay replies and retries, expose the active selected cast to Expression Engine without narrowing it to the stored first-character attribution. Keep existing mandatory targets and sparse/empty presence results, including the Only show active sprites setting. - Restore the existing Roleplay Gallery Illustrate control and allow its exclusive one-shot request and `/illustrate` to use installed Illustrator while automatic agents are disabled. Keep saved settings, missing-package checks, and other modes/actions unchanged. - Add the maintainer’s instruction verbatim to AGENTS.md: “Prefer simple code solutions, do not over-engineer things, and reuse code whenever possible.” The fixes reuse existing build, generation, sprite validation and gallery paths. No application version bump, new package, storage format, setting or UI copy. The first GitHub audit also reported 11 advisories in existing transitive dependencies. Five compatible resolutions were updated: brace-expansion 2.1.4 → 2.1.7 and 5.0.9 → 5.0.12, fast-uri 3.1.7 → 3.1.8 and 4.1.4 → 4.1.5, and ip-address 10.5.1 → 10.7.1. The follow-up frozen install and audit passed with zero vulnerabilities. ## Validation Validated source commit `60b8efed228dc05e4e0decb4f0b8e91083590e76` (including the security dependency follow-up and current staging integration): - `pnpm check`, `pnpm version:check`, frozen dependency installation and `pnpm audit --json` passed; the audit reports zero vulnerabilities. Project checks, prompt/expression/Illustrator/Termux regressions, the complete container build/runtime proof and all smoke/Illustrator browser cases were rerun successfully after the security updates. - Focused Node lanes: Termux 3/3, open-issues 1/1, Expression 2/2 and Illustrator 6/6 passed. `pnpm regression:prompt` passed. Agent-context and existing launcher heap/format checks also passed. - The new Expression route regression reproduced the missing second character before the fix; it now verifies real provider prompts and persisted results for normal generation, retry, regeneration, selected/disabled sprites, sparse/empty presence, persona/impersonation and mode controls. - Real offline pinned-pnpm proof passed for an older optional-pruned install upgrading to the new dependency classification and for a clean frozen reinstall. Actual Sharp PNG create/resize/metadata passed with a simulated Android platform; the desktop negative control kept its native binding. - Actual `MARINARA_LOW_MEMORY_BUILD=1 pnpm --filter @marinara-engine/client build` followed by `node scripts/check-client-build.mjs` passed, including the guest JavaScript and CSS. - Illustrator browser cases: 6/6 passed across desktop Chromium, mobile Chromium and mobile WebKit, including gallery/slash dispatch, unchanged activation, missing-package gating and existing manual-only cadence. Separate light/dark screenshot probes passed on desktop Chromium and mobile WebKit. - Full Docker build and `node scripts/smoke-container.mjs marinara-assigned-issue-sweep:local full arm64` passed: compiled API/frontend, native bindings, and data persistence after container replacement. The local image is labeled as local proof, not a release artifact. - Local CodeRabbit reviewed the original 17 changed files and separately reviewed all four files in the dependency follow-up, with zero findings in both runs. Independent review caught and fixed an initial over-broad required-expression target change before final validation. - `pnpm smoke:ui` passed 7/7 and `pnpm smoke:production` passed 3/3 (desktop Chromium, mobile Chromium and mobile WebKit). - [ ] `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` ### Manual verification notes - Manually update and launch on a physical Android/Termux device, then generate an image. Automated proof runs the real launcher build helper and actual Sharp WASM image conversion with a simulated Android platform; it is not physical-device verification. - Manually verify several enabled and selected characters change expressions in a merged Roleplay group, including an Expression retry and Only show active sprites. - Manually use Gallery Illustrate and `/illustrate` with installed Illustrator and automatic agents disabled; confirm an image appears and the automatic-agent settings stay disabled. Known pre-existing browser failure: `expression-active-sprites.e2e.ts` fails when switching away and back during pending regeneration, restoring older sprite presence. Both desktop cases reproduce on untouched staging `9b313a48a`, and the candidate reproduces across browser profiles. The new expression route regression separately verifies merged multi-character evaluation, filtering, sparse and empty results, retries, regeneration and existing persona/mode guards. No complete pass of that older browser spec is claimed. Staging advanced through #6882 while checks were running. The only merge conflict was CHANGELOG.md; both sets of entries were preserved. Project checks, prompt and focused Node regressions, UI/production smoke and full container build/runtime checks passed again after integration. ## Docs and release impact Updated the Android wrapper guide, Termux installation guide, troubleshooting and Unreleased changelog. Checked README, CONTRIBUTING, configuration and FAQ; their setup steps remain accurate. Translation follow-up: #6886. - [ ] 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 (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) [Before/after desktop and iPhone-sized browser screenshots](https://gist.github.com/SpicyMarinara/ca359a9636312225a85f0339334ad9aa): download the HTML and open it to view embedded PNGs. They use synthetic fixtures with automatic agents disabled, in light and dark mode. No generated proof images are committed. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Generate a single illustration from the Roleplay Gallery or `/illustrate` even when automatic agents are disabled, without changing chat settings. * **Bug Fixes** * Expression updates and retries in merged Roleplay groups now account for the active, selected cast. * Termux builds include the client assets needed for multiplayer guests, and image processing retains its Android fallback. * Updated dependency versions to address security issues. * **Documentation** * Added Termux troubleshooting and installation guidance for missing guest assets and image-processing issues. <!-- end of auto-generated comment: release notes by coderabbit.ai --> ## Final delivery Merged into `staging` as `c67519cbe79eb8b55629ce692e32b37c3a583aed`. Verified the merge commit is on remote staging and its source tree exactly matches validated head `60b8efed228dc05e4e0decb4f0b8e91083590e76`. All required GitHub checks passed before merging, including the security audit, main validation, code analysis, desktop/mobile platform build and container checks. The complete Node suite passed **474/474**. CodeRabbit completed both its incremental review and the final full review against current staging with **no actionable findings**; no review threads remain. Physical-device/manual limits and the pre-existing sprite-switch browser failure remain documented above. Final scope check: #6884 was newly assigned while this sweep was in review. Its author has a working prototype and explicitly seeks project direction before preparing an upstream PR; it remains untouched as an awaiting-direction/contributor-PR proposal. #6833 was closed independently. All four issues implemented here (#6883, #6859, #6872, #6874) are closed after the staging merge. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:19:04 +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#7366
No description provided.