[PR #3168] [MERGED] [codex] Fix Termux sharp wasm install #5830

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3168
Author: @SpicyMarinara
Created: 7/3/2026
Status: ✅ Merged
Merged: 7/3/2026
Merged by: @SpicyMarinara

Base: staging ← Head: codex/fix-termux-sharp-wasm-install


📝 Commits (1)

  • 76c3f5d Fix Termux sharp wasm install

📊 Changes

3 files changed (+15 additions, -3 deletions)

View changed files

📝 CHANGELOG.md (+4 -0)
📝 packages/server/src/routes/sprites.routes.ts (+6 -2)
📝 start-termux.sh (+5 -1)

📄 Description

Linked issue

Closes #3167

Why this change

  • Termux startup correctly writes supportedArchitectures.cpu[]=wasm32 and sets TERMUX_FORCE_INSTALL=1, but the install path still ran plain pnpm install, so pnpm could no-op against existing node_modules and leave @img/sharp-wasm32 unlinked.
  • When sharp still failed to load, the sprite route swallowed the original import error, making Termux image-processing failures harder to diagnose.

What changed

  • Runs pnpm install --force only when TERMUX_FORCE_INSTALL=1 is active; normal dependency installs stay unchanged.
  • Logs the original sharp load failure before returning the existing platform-unavailable sprite/background-removal error.
  • Adds an Unreleased changelog entry for the Termux sprite-generation fix.

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

Commands run locally by Codex:

  • bash -n start-termux.sh
  • git diff --check
  • pnpm version:check
  • pnpm --filter @marinara-engine/server lint
  • pnpm check

Manual verification notes

  • On-device Termux verification is still needed by a maintainer/tester with Android hardware. The issue reporter noted that the --force path restored sprite generation on an S26 Ultra.

Docs and release impact

  • No docs changes needed

  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed

  • Version/release files updated (only if this PR includes a version bump)

  • CHANGELOG.md was updated under Unreleased.

  • No version metadata changed.

UI evidence (if applicable)

  • Not applicable; this is a Termux install/server diagnostics fix.

Summary by CodeRabbit

  • Bug Fixes

    • Improved Termux installs on Android so dependency refreshes can complete correctly when optional image-processing support is included.
    • Better handling of image-processing availability during sprite generation, reducing failures and providing clearer warnings when support can’t be loaded.
  • Chores

    • Updated the release notes to document the Android/Termux dependency refresh fix.

🔄 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/3168 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/3/2026 **Status:** ✅ Merged **Merged:** 7/3/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `codex/fix-termux-sharp-wasm-install` --- ### 📝 Commits (1) - [`76c3f5d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/76c3f5de89ef70c16f52e1e128745bb36316754c) Fix Termux sharp wasm install ### 📊 Changes **3 files changed** (+15 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+4 -0) 📝 `packages/server/src/routes/sprites.routes.ts` (+6 -2) 📝 `start-termux.sh` (+5 -1) </details> ### 📄 Description ## Linked issue Closes #3167 ## Why this change - Termux startup correctly writes `supportedArchitectures.cpu[]=wasm32` and sets `TERMUX_FORCE_INSTALL=1`, but the install path still ran plain `pnpm install`, so pnpm could no-op against existing `node_modules` and leave `@img/sharp-wasm32` unlinked. - When `sharp` still failed to load, the sprite route swallowed the original import error, making Termux image-processing failures harder to diagnose. ## What changed - Runs `pnpm install --force` only when `TERMUX_FORCE_INSTALL=1` is active; normal dependency installs stay unchanged. - Logs the original `sharp` load failure before returning the existing platform-unavailable sprite/background-removal error. - Adds an Unreleased changelog entry for the Termux sprite-generation fix. ## 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` Commands run locally by Codex: - `bash -n start-termux.sh` - `git diff --check` - `pnpm version:check` - `pnpm --filter @marinara-engine/server lint` - `pnpm check` ### Manual verification notes - On-device Termux verification is still needed by a maintainer/tester with Android hardware. The issue reporter noted that the `--force` path restored sprite generation on an S26 Ultra. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) - `CHANGELOG.md` was updated under Unreleased. - No version metadata changed. ## UI evidence (if applicable) - Not applicable; this is a Termux install/server diagnostics fix. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved Termux installs on Android so dependency refreshes can complete correctly when optional image-processing support is included. * Better handling of image-processing availability during sprite generation, reducing failures and providing clearer warnings when support can’t be loaded. * **Chores** * Updated the release notes to document the Android/Termux dependency refresh fix. <!-- 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-22 04:19:56 +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#5830
No description provided.