mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #1986] [Issue]: Startup restore into Game mode can hang and leave conversations spinning #973
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#973
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 @cha1latte on GitHub (Jun 2, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1986
Originally assigned to: @cha1latte on GitHub.
Summary
When the app starts after Game mode was the last visited surface, Marinara tries to restore into Game mode and startup takes an unusually long time. After that slow startup, navigating to other conversations still shows the spinning waiting indicator, suggesting startup or restore work may be blocking or leaving shared runtime state stuck.
Expected behavior
The app should restore the last visited surface without an excessive startup delay. If Game mode has expensive state to load, the app should remain responsive and switching to other conversations should not keep showing a waiting spinner.
Actual behavior
On launch, because Game mode was the last place used before closing, the app attempted to load back into Game mode. That load took a very long time. Even after navigating to other conversations, the UI still showed the spinning waiting wheel.
Steps to reproduce
Impact area
Environment
refactorat9cc3d1eflocallyv24.13.0, pnpm10.33.2rustc 1.95.0 (59807616e 2026-04-14)Logs, screenshots, or video
Not captured yet. The visible symptom is a very slow restore into Game mode on startup, followed by persistent waiting spinners when navigating to other conversations.
Regression notes
Unknown whether this worked before. The concerning part is that restoring Game mode on startup appears able to make unrelated conversation navigation look blocked afterward.
Additional context
This may involve startup route restoration, Game mode initialization, shared generation/loading state, or cleanup of pending runtime work during mode navigation. Please investigate what is making startup take so long and why the waiting spinner remains visible after switching away from Game mode.
Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked:
@cha1latte commented on GitHub (Jun 2, 2026):
Additional diagnosis from source inspection:
The slowdown does not look limited to chats with existing conversation history. Empty conversations can still hit several startup and shared-surface reads.
Likely contributors:
localStorage(marinara-active-chat-id). If the last active chat was Game mode, the app immediately remounts the Game route on launch.spawn_blocking, so this is probably not literal Rust file I/O running on the browser UI thread. However, multiple reads are still kicked off eagerly and their React/query/render follow-up can make the UI feel blocked.The bug may therefore be better framed as startup hydration and route-restore work being too eager, not only "chat history is slow." Suggested fix direction: