mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #8452] [Issue]: Large /api/chats responses grow with chat history and bypass compression #8359
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#8359
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 @minikkeuen on GitHub (Oct 29, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8452
Originally assigned to: @SpicyMarinara on GitHub.
Summary
The
GET /api/chatsresponse grows as more chats accumulate, resulting in large data transfers when the chat list is fetched.A personal network usage monitoring extension reported a 5.50 MB resource size for a single
/api/chatsrequest.Expected behavior
Chat list requests should avoid transferring unnecessary data and remain efficient as the number of chats increases.
Actual behavior
GET /api/chatsretrieves all chat rows, including potentially large metadata and embedding fields.Steps to reproduce
/api/chatsrequest size using network monitoring tools.Environment
Logs, screenshots, or video
A personal network usage monitoring extension reported 5.50 MB for a single
/api/chatsrequest.Additional context
Based on source code inspection:
chats.storage.tsselects all columns when listing chats.chats.routes.tsnormalizes and returns the chat rows.compress-json.tsonly compresses JSON responses between 1 KiB and 4 MiB.The exact contribution of individual fields to the response size has not been measured.
Potential improvements include reducing unnecessary response fields, optimizing database column selection, or reviewing compression behavior for large JSON responses.
Template check
@SpicyMarinara commented on GitHub (Oct 30, 2026):
@SpicyMarinara requested an end-to-end sweep of assigned issues. Codex is taking ownership of chat-list payload and compression. I checked the open PRs and issue-linked work before starting; a draft PR will make implementation progress visible. The fix will target staging, pass the repository validation and review gates, and this issue will close only after the resolved behavior is delivered.
@SpicyMarinara commented on GitHub (Oct 30, 2026):
Resolved on staging by #8486 (merge
1403a98185). GET /api/chats now returns the public Chat fields without internal embeddings/write counters, preserves complete metadata and stored export data, and compresses above-4-MiB lists asynchronously before sending. Real HTTP Brotli/gzip/identity and injection regressions, the existing send-without-return compression safety control, pnpm check, substantive local CodeRabbit review, final-head Dottore review and required PR checks passed. The last commit only changes indentation; full TypeScript AST comparison confirms identical reviewed code. An extra formatting-only review hit capacity and was not counted as passed. Post-merge staging checks are separate.