[PR #8851] [MERGED] fix: confirm character sprite image imports through the regular file picker #8841

Closed
opened 2026-11-07 17:40:08 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: staging ← Head: codex/sprite-import-confirmation


📝 Commits (10+)

  • d8995b3 fix: confirm sprite folder imports inside Engine
  • faec0e7 test: adapt sprite library checks to folder confirmation
  • 5604cb7 test: preserve dropped image MIME types and reject native dialogs
  • b4a55f0 fix: restore sprite folder selection before Engine confirmation
  • 52c9f23 test: open sprite tools before selecting a folder
  • 3337c49 fix: confirm sprite images selected through the regular file picker
  • a084de7 docs: align sprite import help with image selection
  • 7aa9ffb fix: use generic image upload progress text
  • 9eaaf61 Merge remote-tracking branch 'upstream/staging' into codex/sprite-import-confirmation
  • cb050f0 ci: skip optional CUDA download in native CPU checks

📊 Changes

12 files changed (+250 additions, -73 deletions)

View changed files

📝 .github/workflows/platform-artifacts.yml (+3 -0)
📝 docs/agents/avatars.md (+1 -1)
📝 docs/characters/sprites.md (+9 -5)
📝 e2e/core-flows.e2e.ts (+91 -0)
📝 e2e/sprite-library.e2e.ts (+57 -16)
📝 packages/client/src/components/characters/CharacterEditor.tsx (+10 -45)
➕ packages/client/src/components/characters/SpriteImageImport.tsx (+64 -0)
📝 packages/client/src/components/personas/PersonaEditor.tsx (+1 -1)
📝 packages/client/src/hooks/use-characters.ts (+2 -1)
➕ packages/client/src/lib/sprite-folder-import.ts (+3 -0)
📝 packages/client/src/localization/locales/en.json (+7 -3)
📝 scripts/regressions/restart-supervisor.regression.ts (+2 -1)

📄 Description

Linked issue

Closes #8849

Why this change

Character folder upload can invoke a browser-owned security warning before Engine receives any files. The requested cross-device flow is to browse inside a folder, select images, and confirm their count in Engine. Sprite uploads also showed the misleading “Uploading character sheet…” label.

What changed

  • You can no longer select whole folders in character Sprites. Select individual images with the ordinary multiple-image picker instead. Character imports no longer scan subfolders or restore folder-export catalogs; imported sprites start loose. Existing folder organization and persona whole-folder upload remain available.

  • Confirm the supported-image count in Engine before importing selected or dropped images. Cancel sends no sprite uploads, and the same selection can be retried.

  • Display exactly Uploading Images... for sprite and character-sheet uploads. The shared translation also covers persona sheet uploads.

  • Reuse the existing upload control and import path, update localized help and English guides, and add focused browser coverage. Sprite identity, duplicate-label behavior, storage and backend validation are unchanged.

  • Native CI now skips ONNX Runtime's optional CUDA download, matching the existing CPU validation jobs. Dependency installation, build and native runtime tests continue to run.

  • Restart-check failures now include the supervisor exit code/signal and detect signal termination directly, improving investigation evidence while retaining all startup/restart deadlines and ownership assertions.

Maintainer decision requested: @SpicyMarinara, please confirm whether replacing character whole-folder import with selected-image import is acceptable. This completed implementation remains draft under the capability-removal gate in .github/agents/chai-workflow.md.

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

Agent-run results on 9eaaf61ca071c5ffa111859f83ed7c02742ca131, integrating staging 0313889a4:

  • pnpm install --frozen-lockfile, pnpm check and git diff --check: passed. Lint retains 12 existing hook-dependency warnings.
  • node scripts/run-regressions.mjs --filter sprite: 7/7 passed.
  • pnpm smoke:ui: 7/7 passed.
  • Focused image-selection and both sprite-library cases on desktop Chromium, mobile Chromium and mobile WebKit: 9/9 passed.
  • pnpm smoke:production --workers=1: 3/3 passed.
  • Exact-revision Docker image built and ran. Deployed identity, supported-image confirmation, cancel, both visible pending labels, provider isolation, and saved character/sprite preservation verified.
  • CodeRabbit completed review of all nine changed files: three copy suggestions, no functional findings. Dispositions: retain detailed expandable help migrated from existing copy; keep the exact shared progress text explicitly requested for both upload types; retain “Engine confirmation,” which names the product and distinguishes its dialog from the browser warning. These are documented dismissals, not a zero-findings claim.

CI-only follow-up on cb050f00f15bdda3e6b00bc5437964a2d0ee2c7f: pnpm check, the existing restart-diagnostics workflow regression and YAML formatting passed. A network-disabled disposable Linux container verified the optional installer exits successfully with ONNXRUNTIME_NODE_INSTALL=skip, the bundled CPU backend loads, and the inference API remains available. CodeRabbit reviewed the workflow change with zero findings. The prior functional/browser evidence above remains on 9eaaf61ca; application code is identical after this workflow-only follow-up. Fresh hosted CI completed: the Ubuntu native install/build check now passes, as do project validation, all three full Node regression shards, CodeQL and container checks. A separate Windows launcher startup failure on that earlier head prompted the diagnostic follow-up below; its successful fresh replay supersedes the earlier rerun request. The intermittent startup cause remains unproven.

Diagnostic follow-up on 4f15905b7025223b7b596a21c743e52c39eb1dc1: pnpm check and focused formatting passed. On CI's exact Node24.22.2, real-child exit42 and SIGTERM controls stayed failed with the correct status in the assertion; the real startup/restart case passed. Final CodeRabbit review has zero findings after reproducing/fixing its signal-guard finding. Reusable controls are in the evidence gist; further observations were shared with the existing #8081 investigation. The intermittent hosted startup exit is not claimed fixed. All executed technical CI on this head passed, including both Windows checks, Ubuntu native install/build, full Node regressions, project validation, CodeQL and container/platform checks. Maintainer direction/approval and ready-state Dottore review remain.

Manual verification notes

The requester tested the isolated preview, reported the behavior acceptable and completed the human validation checklist.

  • Manually verify folder navigation, multiple-image selection, count confirmation, Cancel and reselection on intended desktop and phone browsers.
  • Manually verify both sprite and character-sheet controls show Uploading Images....
  • Ordinary OS file-selection UI and existing unsaved-card close/reload protection remain. Persona directory upload is outside this character-only change. No physical-phone or complete browser-matrix claim.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README) 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)

Updated docs/characters/sprites.md and docs/agents/avatars.md. Translation follow-up: #8850. No file/heading renames, version bump or CHANGELOG changes.

UI evidence (if applicable)

Synthetic before/after screenshots and phone confirmation.

The HTML contains original embedded PNGs for download/viewing. Before captures use the unmodified staging CharacterEditor and English catalog; after captures use this branch, with disposable synthetic fixtures. Reporter screenshots, private preview addresses and saved user images are excluded.


🔄 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/8851 **Author:** [@DSBwizzard](https://github.com/DSBwizzard) **Created:** 11/5/2026 **Status:** ✅ Merged **Merged:** 11/5/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `codex/sprite-import-confirmation` --- ### 📝 Commits (10+) - [`d8995b3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d8995b3c62f2a38652305bc0c5ee6bc2bfed7ef4) fix: confirm sprite folder imports inside Engine - [`faec0e7`](https://github.com/Pasta-Devs/Marinara-Engine/commit/faec0e75f54c9cd4df0bd260a07d77a88364bee9) test: adapt sprite library checks to folder confirmation - [`5604cb7`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5604cb7647a9a6d59eba586bcc0d094618e43e6f) test: preserve dropped image MIME types and reject native dialogs - [`b4a55f0`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b4a55f0172e1cc7b3ac82422de46459d2d13b365) fix: restore sprite folder selection before Engine confirmation - [`52c9f23`](https://github.com/Pasta-Devs/Marinara-Engine/commit/52c9f233a45c1c8b3f4a109a336066b57ab1ade8) test: open sprite tools before selecting a folder - [`3337c49`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3337c493b77a160f0e3690e7f255f0240ade90a8) fix: confirm sprite images selected through the regular file picker - [`a084de7`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a084de70566b0b725ff08ba456f1aa08061f25d5) docs: align sprite import help with image selection - [`7aa9ffb`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7aa9ffb45b76654f544623d6f2754dc707009b3b) fix: use generic image upload progress text - [`9eaaf61`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9eaaf61ca071c5ffa111859f83ed7c02742ca131) Merge remote-tracking branch 'upstream/staging' into codex/sprite-import-confirmation - [`cb050f0`](https://github.com/Pasta-Devs/Marinara-Engine/commit/cb050f00f15bdda3e6b00bc5437964a2d0ee2c7f) ci: skip optional CUDA download in native CPU checks ### 📊 Changes **12 files changed** (+250 additions, -73 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/platform-artifacts.yml` (+3 -0) 📝 `docs/agents/avatars.md` (+1 -1) 📝 `docs/characters/sprites.md` (+9 -5) 📝 `e2e/core-flows.e2e.ts` (+91 -0) 📝 `e2e/sprite-library.e2e.ts` (+57 -16) 📝 `packages/client/src/components/characters/CharacterEditor.tsx` (+10 -45) ➕ `packages/client/src/components/characters/SpriteImageImport.tsx` (+64 -0) 📝 `packages/client/src/components/personas/PersonaEditor.tsx` (+1 -1) 📝 `packages/client/src/hooks/use-characters.ts` (+2 -1) ➕ `packages/client/src/lib/sprite-folder-import.ts` (+3 -0) 📝 `packages/client/src/localization/locales/en.json` (+7 -3) 📝 `scripts/regressions/restart-supervisor.regression.ts` (+2 -1) </details> ### 📄 Description ## Linked issue Closes #8849 ## Why this change Character folder upload can invoke a browser-owned security warning before Engine receives any files. The requested cross-device flow is to browse inside a folder, select images, and confirm their count in Engine. Sprite uploads also showed the misleading “Uploading character sheet…” label. ## What changed - **You can no longer select whole folders in character Sprites.** Select individual images with the ordinary multiple-image picker instead. Character imports no longer scan subfolders or restore folder-export catalogs; imported sprites start loose. Existing folder organization and persona whole-folder upload remain available. - Confirm the supported-image count in Engine before importing selected or dropped images. Cancel sends no sprite uploads, and the same selection can be retried. - Display exactly **Uploading Images...** for sprite and character-sheet uploads. The shared translation also covers persona sheet uploads. - Reuse the existing upload control and import path, update localized help and English guides, and add focused browser coverage. Sprite identity, duplicate-label behavior, storage and backend validation are unchanged. - Native CI now skips ONNX Runtime's optional CUDA download, matching the existing CPU validation jobs. Dependency installation, build and native runtime tests continue to run. - Restart-check failures now include the supervisor exit code/signal and detect signal termination directly, improving investigation evidence while retaining all startup/restart deadlines and ownership assertions. **Maintainer decision requested:** @SpicyMarinara, please confirm whether replacing character whole-folder import with selected-image import is acceptable. This completed implementation remains draft under the capability-removal gate in `.github/agents/chai-workflow.md`. ## Validation - [x] `pnpm check` passes locally - [x] Container (Docker / Podman) built and ran without issue - [x] Ran the app, clicked through the changes manually - [x] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [x] Above manual verification completed (describe below) - [x] Read and followed `CONTRIBUTING.md` Agent-run results on `9eaaf61ca071c5ffa111859f83ed7c02742ca131`, integrating staging `0313889a4`: - `pnpm install --frozen-lockfile`, `pnpm check` and `git diff --check`: passed. Lint retains 12 existing hook-dependency warnings. - `node scripts/run-regressions.mjs --filter sprite`: 7/7 passed. - `pnpm smoke:ui`: 7/7 passed. - Focused image-selection and both sprite-library cases on desktop Chromium, mobile Chromium and mobile WebKit: 9/9 passed. - `pnpm smoke:production --workers=1`: 3/3 passed. - Exact-revision Docker image built and ran. Deployed identity, supported-image confirmation, cancel, both visible pending labels, provider isolation, and saved character/sprite preservation verified. - CodeRabbit completed review of all nine changed files: three copy suggestions, no functional findings. Dispositions: retain detailed expandable help migrated from existing copy; keep the exact shared progress text explicitly requested for both upload types; retain “Engine confirmation,” which names the product and distinguishes its dialog from the browser warning. These are documented dismissals, not a zero-findings claim. CI-only follow-up on `cb050f00f15bdda3e6b00bc5437964a2d0ee2c7f`: `pnpm check`, the existing restart-diagnostics workflow regression and YAML formatting passed. A network-disabled disposable Linux container verified the optional installer exits successfully with `ONNXRUNTIME_NODE_INSTALL=skip`, the bundled CPU backend loads, and the inference API remains available. CodeRabbit reviewed the workflow change with zero findings. The prior functional/browser evidence above remains on `9eaaf61ca`; application code is identical after this workflow-only follow-up. Fresh hosted CI completed: the Ubuntu native install/build check now passes, as do project validation, all three full Node regression shards, CodeQL and container checks. A separate Windows launcher startup failure on that earlier head prompted the diagnostic follow-up below; its successful fresh replay supersedes the earlier rerun request. The intermittent startup cause remains unproven. Diagnostic follow-up on `4f15905b7025223b7b596a21c743e52c39eb1dc1`: `pnpm check` and focused formatting passed. On CI's exact Node24.22.2, real-child exit42 and SIGTERM controls stayed failed with the correct status in the assertion; the real startup/restart case passed. Final CodeRabbit review has zero findings after reproducing/fixing its signal-guard finding. Reusable controls are in the [evidence gist](https://gist.github.com/DSBwizzard/9586ba2652c0c19c48873f038a8893d7); further observations were shared with the existing #8081 investigation. The intermittent hosted startup exit is not claimed fixed. All executed technical CI on this head passed, including both Windows checks, Ubuntu native install/build, full Node regressions, project validation, CodeQL and container/platform checks. Maintainer direction/approval and ready-state Dottore review remain. ### Manual verification notes The requester tested the isolated preview, reported the behavior acceptable and completed the human validation checklist. - Manually verify folder navigation, multiple-image selection, count confirmation, Cancel and reselection on intended desktop and phone browsers. - Manually verify both sprite and character-sheet controls show **Uploading Images...**. - Ordinary OS file-selection UI and existing unsaved-card close/reload protection remain. Persona directory upload is outside this character-only change. No physical-phone or complete browser-matrix claim. ## Docs and release impact - [ ] No docs changes needed - [x] Updated docs (README / CONTRIBUTING / android/README) as needed - [x] 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) Updated `docs/characters/sprites.md` and `docs/agents/avatars.md`. Translation follow-up: #8850. No file/heading renames, version bump or CHANGELOG changes. ## UI evidence (if applicable) [Synthetic before/after screenshots and phone confirmation](https://gist.github.com/DSBwizzard/9586ba2652c0c19c48873f038a8893d7). The HTML contains original embedded PNGs for download/viewing. Before captures use the unmodified staging CharacterEditor and English catalog; after captures use this branch, with disposable synthetic fixtures. Reporter screenshots, private preview addresses and saved user images are excluded. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 17:40:08 +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#8841
No description provided.