mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #3159] [Issue]: Professor Mari floating window: blank Home, message loss, and stale state on dismiss #1696
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#1696
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 @spacyH on GitHub (Jul 2, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3159
Originally assigned to: @SpicyMarinara on GitHub.
Summary
When Professor Mari's home chat moves to the floating companion window (after switching to another chat) and the user dismisses that window, returning to Home can show a blank content area and missing assistant responses from the interrupted session. These are related failures in the floating-window lifecycle — not the original static-remount display bug, which was fixed in 2.0.8.
[NOTE: The initial investigation & recommendations were made by Prof. Mari (GLM-5.0), then reviewed & refined by Cursor (Composer 2.5) and me.]
Expected behavior
Actual behavior
Three related symptoms share the same trigger (open Mari on Home → switch chat → dismiss floating window → return Home):
Symptom 1: Blank Home page (high — blocks navigation)
The home content area is empty — only top-bar chrome remains. Normal home UI is hidden because
homeProfessorChatActivestaystruewhile the inline chat window is closed (homeProfessorChatOpenisfalse). A browser reload restores the home page.Symptom 2: Missing assistant responses (high — data loss)
Mari's responses from the interrupted turn are gone. The user message remains; the assistant reply does not. In-flight content that never reached the server's post-generation persist path is lost when the floating
HomeProfessorMariChatinstance unmounts. If the client connection drops during generation, the server aborts and the catch block emits "cancelled" without saving accumulatedassistantText.Symptom 3: "Messages vanished" on return (original report — partially fixed)
The static-remount path (switch chat → return Home without dismissing the floating window) was broken in v2.0.5–2.0.6 and is fixed in 2.0.8+ (
loadingHistorydefaultfalse,isMountedRef/EventSourceremoved, simplified load effect). The same visual symptom still reproduces through the floating-window dismiss path described above.Steps to reproduce
Control (fixed path): Repeat steps 1–2, then return Home via the Home icon without dismissing the floating window. Persisted messages should reload from the server on remount.
Environment
Logs, screenshots, or video
None attached. Static code analysis confirms the failure paths. Recommended before implementing a fix:
mari chats messages <chatId>) after dismiss to confirm server-side absence vs. display-only.homeProfessorChatActiveon navigate-away and Home click.Additional context
Root causes (distinct, shared lifecycle)
ChatArea.tsxhomeProfessorChatActivesettrueon chat open; only cleared by framer-motiononExitComplete, which never fires when the home block unmounts on chat navigation. Floating assistant is a separate instance and does not resetChatAreastate.ProfessorMariFloatingAssistantHost.tsxdismissFloating→setVisible(false)→return nullfully unmounts floatingHomeProfessorMariChatwith no flush, nostopWorkspace(), noworkspaceAbortRefcleanup.workspace-agent.service.tscreateMessage; catch block (lines ~1518–1521) emits cancelled status only — no partial save ofassistantText. User message saved at prompt start; assistant saved only after full loop completes.What was already fixed (static remount, 2.0.8+)
loadingHistoryinitial valuetruefalseisMountedRef/EventSourceapi.streamEvents+AbortControllerhasLoadedRef+.finally(() => setLoadingHistory(false))Suggested fixes (likely one PR)
useEffectinChatArea.tsxto sethomeProfessorChatActivetofalsewhenactiveChatIdbecomes non-null; optionally also reset on TopBar Home click.HomeProfessorMariChatwith CSS instead of unmounting, preserving stream consumption and React state.workspace-agent.service.tscatch block, persist trimmedassistantTextwhencontroller.signal.abortedbefore emitting cancelled status.workspaceAbortRef; optional flush beforedismissFloating.Workaround
Reload the browser to reset React state (restores Home shell). Does not recover lost assistant messages.
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 2, 2026):
Codex is taking this issue in branch
codex/fix-professor-mari-floating-dismiss, targetingstaging.