mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #2210] [MERGED] Fix managed message attachment handling #5471
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#5471
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/2210
Author: @Xelvanis
Created: 6/4/2026
Status: ✅ Merged
Merged: 6/5/2026
Merged by: @Xelvanis
Base:
refactor← Head:fix/managed-message-attachments📝 Commits (8)
bebfde9Fix managed message attachment handlingce0c3b6Address managed attachment review feedback290f72bClean up streaming attachment rollbackad93fd5Harden managed attachment rollback5ec7baeRestore chat draft after send failure755e963Guard chat send retry restorationbccc172Address managed attachment review findings5db9adfDeduplicate URL blob conversion📊 Changes
20 files changed (+1075 additions, -213 deletions)
View changed files
📝
src/engine/capabilities/storage.ts(+12 -0)📝
src/engine/contracts/schemas/chat.schema.ts(+8 -3)📝
src/engine/contracts/types/chat.ts(+2 -0)📝
src/engine/generation/generate-route-utils.ts(+3 -14)📝
src/engine/generation/start-generation.ts(+70 -26)➕
src/engine/shared/attachments/image-attachments.ts(+203 -0)➕
src/features/catalog/gallery/cache.ts(+26 -0)📝
src/features/catalog/gallery/index.ts(+1 -0)📝
src/features/modes/conversation/components/ConversationInput.tsx(+208 -42)📝
src/features/modes/conversation/components/ConversationMessage.tsx(+27 -42)📝
src/features/modes/game/components/GameInput.tsx(+11 -5)📝
src/features/modes/game/components/GameSurface.tsx(+80 -26)📝
src/features/modes/shared/chat-ui/components/ChatInput.tsx(+95 -9)📝
src/features/modes/shared/chat-ui/components/ChatMessage.tsx(+21 -40)➕
src/features/modes/shared/chat-ui/components/MessageAttachmentImagePreview.tsx(+133 -0)📝
src/features/modes/shared/chat-ui/index.ts(+1 -0)📝
src/features/modes/shared/chat-ui/lib/message-attachments.ts(+15 -3)📝
src/features/runtime/generation/hooks/use-generate.ts(+5 -2)➕
src/shared/api/message-attachment-api.ts(+20 -0)📝
src/shared/api/storage-api.ts(+134 -1)📄 Description
Linked issue
N/A
Why this change
What changed
url,filePath, andgalleryId.Refactor impact
Primary owner:
Engine generation, shared API storage, and mode input surfaces.
Impact areas reviewed:
Boundary notes:
StorageGatewayport for storage-backed attachment behavior.Pressure points touched:
GameSurfacesend orchestration.ChatInput.Validation
pnpm typecheck,pnpm build,pnpm check:architecture,pnpm check:docs, or fullpnpm checkwhen warranted)pnpm checkpasses before PR push/handoffManual verification notes
Commands run locally:
git diff --checkgit diff --cached --checkpnpm typecheckpnpm check:architecturepnpm checkManual native Tauri image-send QA was not run. The remaining manual check is sending an image attachment in conversation/roleplay and game, then confirming the message renders, provider image input still works, and the gallery updates.
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:
N/A proposed: this is a bugfix/internal storage and send-flow correction, not a new discoverable feature. Left unchecked for human confirmation.
Docs and release impact
README.mdCONTRIBUTING.mddocs/developer/AGENTS.mdDocs/release notes: no docs changes were needed for this bugfix. No root changelog/release note file is present in this checkout.
UI evidence
No screenshots or recordings captured. Native/manual UI QA remains the main proof gap.
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.