mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #5615] Client: pass chatId on the four id-only endpoints so their lazy tables stay scoped #3109
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#3109
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 @kolacheee on GitHub (Aug 29, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5615
Originally assigned to: @kolacheee on GitHub.
What happens
#5611 / PR #5614 scoped the server's lazy-table queries, but four endpoints identify their target by id alone, so the server can only scope them when the client sends the owning chat. The server side already accepts an optional
chatIdon each; the client does not send it yet, so these remain the last cold paths that permanently convert a lazy table to fully resident (defeatingMARINARA_MAX_RESIDENT_CHATS) when they run against an evicted chat:DELETE /api/gallery/:id— accepts?chatId=(query); leaseschat_imagesDELETE /api/game/checkpoint/:id— accepts?chatId=(query); leasesgame_checkpointsDELETE /api/professor-mari-workspace/context/:id— accepts?chatId=(query, same convention its siblingGET /contextalready requires); leasesmari_workspace_contextPATCH /api/agents/runs/:runId— acceptschatIdin the JSON body; leasesagent_runsThe fix
At every client call site for these four requests, the chat is already open (you delete a gallery image from a chat's gallery, delete a checkpoint from a chat's checkpoint list, remove attached workspace context from a workspace chat, and edit an agent run from a chat's Agent Suite panel) — so the client can pass the id it already holds. Pure client change in
packages/client/; the server treats a missing value exactly as before, so this can ship independently and roll out safely.Note: on the server, sending a wrong chatId makes the row not-found (404) rather than acting cross-chat — that's intentional scoping, so the client must pass the chat that owns the resource, not just any open chat.
Follow-up to #5611; part of the #5592 close-out.
@kolacheee commented on GitHub (Aug 29, 2026):
Taking this one (kolacheee, agent-assisted) — PR incoming.