mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #1270] [MERGED] Fix refactor gallery upload failure handling #5016
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#5016
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/1270
Author: @cha1latte
Created: 5/26/2026
Status: ✅ Merged
Merged: 5/26/2026
Merged by: @cha1latte
Base:
refactor← Head:fix/issue-1232-gallery-upload-remote📝 Commits (1)
81ed7d8Fix gallery upload failure visibility📊 Changes
7 files changed (+114 additions, -16 deletions)
View changed files
➕
src/features/catalog/gallery/hooks/use-gallery.test.ts(+17 -0)📝
src/features/catalog/gallery/hooks/use-gallery.ts(+16 -9)➕
src/shared/api/file-payload.test.ts(+52 -0)📝
src/shared/api/file-payload.ts(+13 -1)📝
src/shared/api/image-generation-api.ts(+9 -3)📝
src/shared/api/settings-assets-api.ts(+5 -2)📝
src/shared/components/ui/ImageUploadDropzone.tsx(+2 -1)📄 Description
Linked issue
Closes #1232
Why this change
What changed
chat_gallery_upload is not exposed by the remote runtimemessage.fileToUploadPayload()and apply the 20 MB image limit to chat gallery, character gallery, and background upload API wrappers beforearrayBuffer()/base64 conversion.Refactor impact
Primary owner:
Impact areas reviewed:
refactorBoundary notes:
refactoralready allowlists and dispatcheschat_gallery_upload; this PR covers the remaining compatibility/error visibility path plus the payload preflight requested in the issue comment.Pressure points touched:
Validation
pnpm checkpasses locallypnpm typecheckpasses locallypnpm buildpasses locallypnpm check:architecturepasses locallypnpm check:docspasses locallycargo check --manifest-path src-tauri/Cargo.toml --workspacepasses locallyManual verification notes
pnpm exec vitest run src\shared\api\file-payload.test.ts src\features\catalog\gallery\hooks\use-gallery.test.ts: 2 files / 4 tests passed.pnpm exec vitest run --config scratch\vitest.issue-1232.config.ts: 1 file / 1 test passed after the fix.pnpm check:frontend: passed.pnpm check:architecture: dependency-cruiser passed and Rust structure check passed.pnpm check:docs: checked 40 docs and repo guidance files.pnpm check, but local verification timed out in the Rust phase after Cargo dependency compilation hit sandbox machine resource failures.reviewThreadsis empty.Docs and release impact
README.mdCONTRIBUTING.mddocs/developer/AGENTS.mdNo docs or release metadata changes needed; this is a narrow upload error/preflight fix.
UI evidence
No layout change. The user-facing path is covered by unit proof that single-file remote upload errors preserve the underlying unsupported-command message; the proof gist above includes the command results.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.