mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #1197] [MERGED] Avoid duplicate chat message loads in startGeneration #4971
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#4971
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/1197
Author: @Xelvanis
Created: 5/25/2026
Status: ✅ Merged
Merged: 5/25/2026
Merged by: @cha1latte
Base:
refactor← Head:chore/reuse-start-generation-messages📝 Commits (1)
12f4ef0Avoid redundant message reload after saving user message📊 Changes
2 files changed (+152 additions, -3 deletions)
View changed files
📝
src/engine/generation/start-generation.test.ts(+130 -0)📝
src/engine/generation/start-generation.ts(+22 -3)📄 Description
Summary
startGenerationafter a normal user-message save by appending the returned saved message record.Fixes #1189
Impact
Verification
pnpm test src/engine/generation/start-generation.test.tspnpm typecheckpnpm check:architectureChangelog
Not updated. This repo currently has no
CHANGELOG.md, and the change is an internal generation-path cleanup with no user-facing behavior change.Remaining Risk
The optimized path still assumes no out-of-band same-chat message is inserted between the pre-save load and the saved user message append. Existing UI/background callers mostly gate generation per chat, and malformed saved-message returns still reload, so this is treated as low residual risk.
Summary by CodeRabbit
Bug Fixes
Tests
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.