mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #2460] [MERGED] Fix message extra defaults on create #5615
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#5615
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/2460
Author: @Xelvanis
Created: 6/6/2026
Status: ✅ Merged
Merged: 6/6/2026
Merged by: @Xelvanis
Base:
refactor← Head:fix/2272-message-extra-defaults📝 Commits (4)
abac60cfix message extra defaults on create6459416fix message create validation gapsd0da541fix active swipe create inheritance4777583fix message create validation holes📊 Changes
8 files changed (+588 additions, -26 deletions)
View changed files
📝
src-tauri/src/commands/storage/commands/entities.rs(+73 -1)📝
src-tauri/src/commands/storage/contracts.rs(+2 -1)📝
src-tauri/src/commands/storage/message_swipes.rs(+305 -4)📝
src-tauri/src/commands/storage/shared.rs(+129 -0)📝
src/engine/contracts/schemas/chat.schema.ts(+23 -7)📝
src/features/catalog/chats/hooks/use-chats.ts(+16 -8)📝
src/shared/api/storage-api.ts(+36 -4)📝
src/shared/lib/slash-commands.ts(+4 -1)📄 Description
Linked issue
Closes #2272
Why this change
MessageExtradefault leaves when callers omittedextra.What changed
messages.extraas a Rust create default and mergedisplayText,isGenerated,tokenCount, andgenerationInfowithout overwriting provided values.storage_create, direct Rust create callers, and remote/api/invokestay aligned.isGenerated, and preservation of richerextravalues.Refactor impact
Primary owner:
Rust storage, shared API, and engine chat contract.
Impact areas reviewed:
Boundary notes:
invokeTaurior remote fetch calls were added./api/invokedispatchesstorage_createthroughstorage_create_inner, the same command path as embedded Tauri.Pressure points touched:
ModeSurface,GameSurface, shared mode UI orchestration,src-tauri/src/lib.rscommand registration, or import modules were 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 test --manifest-path src-tauri/Cargo.toml default_extra --libpassed: 2 tests.cargo test --manifest-path src-tauri/Cargo.toml create_message_preserves_provided_extra_when_defaulting_missing_leaves --libpassed: 1 test.pnpm typecheckpassed.cargo check --manifest-path src-tauri/Cargo.toml --workspacepassed.pnpm check:architecturepassed.pnpm checkpassed.MessageExtraleaves. Existing proof was insufficient because the incomplete fix was marked as not fully addressed. The committed tests are narrow storage-owner tests beside existing message create and sidecar persistence coverage.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
Not applicable; this is a storage-contract compatibility fix with no visible UI change.
Summary by CodeRabbit
New Features
extrafield with default values including display text, generation status, token count, and generation info.Tests
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.