mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #2223] [MERGED] Fix generated game background cover resize #5486
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#5486
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/2223
Author: @cha1latte
Created: 6/4/2026
Status: ✅ Merged
Merged: 6/4/2026
Merged by: @cha1latte
Base:
refactor← Head:fix/issue-2142-game-background-cover📝 Commits (2)
a284bc7Fix generated background cover resize041b974Guard generated background resize formats📊 Changes
1 file changed (+245 additions, -3 deletions)
View changed files
📝
src-tauri/crates/assets/src/lib.rs(+245 -3)📄 Description
Linked issue
Closes #2142
Why this change
gameBackgroundImage()path that cover-resized to the VN scene canvas.What changed
marinara-assetsbefore writingbackgrounds/generated/*uploads.1280x720and re-encodes to the uploaded image format.Refactor impact
Primary owner:
Rust storage, game mode generated assets
Impact areas reviewed:
src/features/modes/game/api/game-api.tsgenerated backgrounds calluploadGeneratedAsset("backgrounds", "generated", ...).src-tauri/crates/assets/src/lib.rsowns the managed game asset write boundary.backgrounds/illustrationsand manual/custom background uploads were covered as negative controls..gifand.avifbackground uploads were covered as rejection paths before decode/write; normal non-generated background extension acceptance is unchanged.Boundary notes:
imageExt()path, so the resize path uses only the asset crate's already-declared PNG/JPEG/WebP codec support.Pressure points touched:
Validation
pnpm typecheck,pnpm build,pnpm check:architecture,pnpm check:docs, or fullpnpm checkwhen warranted)pnpm checkpasses before PR push/handoffManual verification notes
cargo run --manifest-path scratch/issue-2142-repro/Cargo.tomlreproduced the bug withstored_dimensions=512x512and failed because generated backgrounds were not1280x720.cargo run --manifest-path scratch/issue-2142-repro/Cargo.tomlpassed withstored_dimensions=1280x720.cargo test --manifest-path src-tauri/Cargo.toml -p marinara-assets -- --nocapturepassed: 15 tests, including direct generated.gif/.avifrejection before decode/write.cargo clippy --manifest-path src-tauri/Cargo.toml --workspace --all-targets -- -D warningspassed.cargo check --manifest-path src-tauri/Cargo.toml --workspacepassed.pnpm install --frozen-lockfilewas needed in the fresh issue worktree; it did not change dependency declarations.pnpm checkpassed.git diff --checkpassed.041b974bpassed: Browser Smoke and Performance, Frontend/Architecture/Organization, Rust Capability Layer, Bunny Review, and CodeRabbit.node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch/issue-2142-bugfix-verification.jsoncould not run because the proof-gate script is not present in this Codex install.Feature Discoverability
Check exactly one:
src/features/shell/discovery/because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool.Reason:
Docs and release impact
README.mdCONTRIBUTING.mddocs/developer/AGENTS.mdUI evidence
N/A - this is a storage-side image processing fix. The focused repro copied the actual post-fix stored image to local scratch proof and asserted its decoded dimensions.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.