mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #1589] [MERGED] [codex] Restore upload size constant wiring #5129
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#5129
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/1589
Author: @Xelvanis
Created: 5/29/2026
Status: ✅ Merged
Merged: 5/29/2026
Merged by: @Xelvanis
Base:
refactor← Head:restore/knip-upload-size-constants📝 Commits (3)
c2cec58Restore upload size constant wiring6486b25Tie upload size messages to constantsc974f7eClarify shared image upload limit constant📊 Changes
3 files changed (+19 additions, -2 deletions)
View changed files
📝
src/engine/contracts/constants/defaults.ts(+1 -0)📝
src/shared/api/file-payload.test.ts(+9 -0)📝
src/shared/api/file-payload.ts(+9 -2)📄 Description
Linked issue
Refs #1566
Why this change
Restore the orphaned upload-size constant wiring from the Knip follow-up queue so frontend image upload validation is driven by the shared engine constants instead of duplicated literals.
This keeps the user-facing error message and the actual upload limit tied together, while avoiding a hidden coupling between generic image uploads and the background-specific size key.
What changed
MAX_FILE_SIZES.IMAGE_UPLOADconstant for shared image upload validation.MAX_IMAGE_UPLOAD_BYTESfrom the shared API file-payload adapter using that constant.IMAGE_UPLOAD_SIZE_ERRORfrom the same byte limit instead of hardcoding20 MBin the message.Refactor impact
Primary owner:
Shared API wrapper / engine contracts.
Impact areas reviewed:
ImageUploadDropzoneusage.Boundary notes:
Pressure points touched:
None; this is limited to engine constants and shared API upload payload handling.
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
AI-run validation:
pnpm test -- src/shared/api/file-payload.test.tspnpm typecheckpnpm lint:eslintpnpm check:architecturepnpm check:unusedpnpm buildgit diff --checkNo browser or Tauri manual pass was run because this slice only restores shared validation constants and unit-level coverage.
Docs and release impact
README.mdCONTRIBUTING.mddocs/developer/AGENTS.mdNo docs changes needed: this is internal shared validation wiring, not a workflow, architecture, or user-facing documentation change.
UI evidence
No UI evidence added; no visible UI layout or flow changed.
Summary by CodeRabbit
Tests
Chores
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.