mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #3616] [Issue]: Client server state is split between React Query and Zustand #1956
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#1956
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 (Jul 14, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3616
Originally assigned to: @SpicyMarinara on GitHub.
Summary
Client server state is split between React Query and Zustand despite the documented client boundary requiring async server calls to live in React Query hooks. Game Assets currently has independent React Query and Zustand server-data paths, while the sidecar Zustand store also owns duplicated SSE transport parsing and silently discards some delete/unload failures.
This creates two sources of truth: a mutation can refresh one cache while consumers of the other continue using stale state. Sidecar failures can also become silent no-ops in the UI.
Expected behavior
Actual behavior
game-asset.store.tsfetches and stores/game-assets/manifestand performs/game-assets/rescanindependently ofuse-game-assets.ts.useRescanGameAssets()invalidates only the React Query tree key; the Zustand manifest has a separate refresh lifecycle.sidecar.store.tscontains separate SSE reader/parser implementations for general and speech downloads.deleteModel(),deleteSpeechModel(), andunloadModel()catch request failures without reporting or rethrowing them. The Local Speech Model delete action is wired directly to this silent path.Steps to reproduce
game-asset.store.tsfetches the asset manifest.DELETE /api/sidecar/speech/modelin browser DevTools (or otherwise make it return a non-2xx response).deleteSpeechModel()consumes the error and the UI shows no failure message.Runtime reproduction was not performed for this report; the missing cross-cache invalidation, duplicated readers, and swallowed error paths were verified by static inspection of current
staging.Environment
stagingat694bc88f16bd99838aa52b70bd07b56fe9e354e4(2026-07-15)Logs, screenshots, or video
None. This report is based on static inspection; no runtime logs or screenshots were captured.
Additional context
Documented boundary:
packages/client/.instructions.mdrequires server calls in React Query hooks and synchronous Zustand actionsGame Assets split ownership:
game-asset.store.tsmanifest fetch and rescanuseRescanGameAssets()React Query mutation and tree invalidationSidecar transport/error handling:
Suggested remediation:
Related but not duplicate: #2720 covered sidecar busy guards, abort/disconnect plumbing, and download lifecycle failures. It did not address the broader state-ownership boundary, duplicated model/speech SSE readers, or these remaining swallowed delete/unload errors.
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@SpicyMarinara commented on GitHub (Jul 14, 2026):
Ownership: @SpicyMarinara is addressing this in
fix/3616-3625-open-issues. A staging-targeted draft PR will be linked as soon as the first reproducible fix is committed.@SpicyMarinara commented on GitHub (Jul 14, 2026):
Draft implementation PR is now open: #3626. It remains draft while the linked regression lanes are implemented and validated.
@SpicyMarinara commented on GitHub (Jul 14, 2026):
Addressed in ready-for-review PR #3626 targeting staging. The fix and regression coverage have been pushed and validated locally.