mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #1932] [Issue]: paged chat message reads parse full rows before projection #949
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#949
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?
Originally created by @Xelvanis on GitHub (Jun 2, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1932
Originally assigned to: @cha1latte on GitHub.
Summary
Paged chat message reads can still parse full stored message rows before projection.
storage_listcalls formessageswithfilters.chatId,fields/fieldSelections, andlimit/beforeroute to the paged reader first, then project afterward. That means largeextra,swipes, attachments, generation replay, and prompt snapshot payloads can still be parsed on active chat open, infinite scroll, tracker/world-state context reads, and post-generation refresh.This is distinct from the closed projected read fixes. #1888 covered projected message reads without the paged path, and #1919 covered projected
storage_get.Expected behavior
Projected paged message reads should keep the storage-read shape narrow before parsing large row payloads. The hot timeline path should either:
extrasubfields.Embedded Tauri and remote
/api/invokebehavior should stay identical.Actual behavior
Static trace on
refactorat8c36be60shows:src/features/catalog/chats/hooks/use-chats.ts:243callsstorageApi.listChatMessageswithtimelineMessageProjection(...)andlimit.src-tauri/src/commands/storage/commands/entities.rs:56routes any message list withlimit/beforetolist_messages_for_chat_page(...)before the projected message reader branch at:66.src-tauri/crates/storage/src/lib.rs:2191implements the reverse page scanner, and:2248parses each matched message record as a fullserde_json::Value.src-tauri/src/commands/storage/commands/entities.rs:142-:151materializes message swipe fields and projects only after rows have been read.src/features/catalog/chats/lib/timeline-message.ts:15requestsswipePreviews, and:33-:36request heavyextrasubfields such as generation replay, prompt snapshot, attachments, and persona snapshot.src/features/runtime/generation/hooks/use-generate.ts:339-:348invalidates messages, message count, chat detail, and chat list after generation events, which can trigger the expensive path right when the user expects the UI to settle.src/features/runtime/world-state/api/world-state-api.ts:179-:181reads up to 200 recent messages for visible target context through the same paged list path.Steps to reproduce
extra, alternate swipes, attachments, or prompt snapshots.storage_listcalls formessageswithfilters.chatId,fields,fieldSelections, andlimit.Impact area
Refactor branch considerations
Suggested proof:
storage_list(messages)with largeextra,swipes, and attachments.swipeCount,swipePreviews, active swipe materialization, legacy prompt snapshot synthesis, and message cursor behavior./api/invokedispatch use the same path.Additional context
Related but not duplicate:
limit/beforepage path.storage_get, not pagedstorage_list.Template check
@cha1latte commented on GitHub (Jun 2, 2026):
fixed in #1955