mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #2827] [MERGED] fix(conversation): sync chat-list + in-chat status dots with live presence #5755
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#5755
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?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/2827
Author: @Romuromylus
Created: 6/23/2026
Status: ✅ Merged
Merged: 6/23/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/convo-status-dot-sync📝 Commits (4)
1bd654ffix(conversation): sync chat-list + in-chat status dots with live presence8a347eafix(conversation): tick presence dots on a clock so time-only transitions refreshee848b4fix(conversation): require explicit schedule opt-in for live presence; share the resolverbd7caa0fix(conversation): mirror the server schedule gate (conversationSchedulesEnabled !== false)📊 Changes
7 files changed (+305 additions, -126 deletions)
View changed files
📝
packages/client/src/components/chat/ChatArea.tsx(+32 -9)📝
packages/client/src/components/layout/ChatSidebar.tsx(+14 -7)➕
packages/client/src/hooks/use-presence-clock.ts(+52 -0)➕
packages/client/src/lib/conversation-presence-status.ts(+51 -0)📝
packages/server/src/services/conversation/schedule.service.ts(+23 -110)📝
packages/shared/src/index.ts(+1 -0)➕
packages/shared/src/utils/conversation-presence.ts(+132 -0)📄 Description
Linked issue
Closes #2826
Why this change
In Conversation mode, a character's presence status dot in the chat-list sidebar (and the in-chat avatar overlay) did not match the status shown in the toolbar presence pill. After a status change — a manual override set in the pill, or a generated schedule crossing into a new time block — the pill updated immediately while the chat-list dot kept showing the old status until the next generated message.
Root cause: the sidebar and the in-chat overlay color the dot from the per-chat
conversationCharacterStatusessnapshot, which is only rewritten by the generation pipeline (generate.routes.ts). The presence pill instead reads the live status fromGET /conversation/status/:chatId, which derives it asactive override > current schedule block > default. So between generations the two surfaces diverge.What changed
getCurrentStatus,getActiveStatusOverride,getEffectiveCurrentStatus) and their schedule types (ScheduleBlock,WeekSchedule,CharacterSchedules,CurrentConversationStatus) frompackages/server/.../schedule.service.tsinto@marinara-engine/shared(utils/conversation-presence.ts) so the client can derive presence the same way the server does. This is the single source of truth for "what status is this character right now".schedule.service.tsnow imports and re-exports those helpers/types, so every existing server call site (conversation.routes.ts,generate.routes.ts, the autonomous scheduler, etc.) is unchanged — this is a behavior-preserving move on the server side.ChatSidebar.tsx(chat-list dots) andChatArea.tsx(in-chat avatar overlay) now prefer the liveoverride > schedulestatus over the generation-time snapshot, falling back to the snapshot when there is no active override or schedule. Schedules are gated byconversationSchedulesEnabled, matching the server.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
pnpm check(clean + impeccable + lint + build) passes locally; the extracted helpers also have local unit coverage for the precedence (override beats schedule), override expiry, and midnight-wrapping schedule blocks.onlineand a manualoffline+ "sleeping" override active: before this change the presence pill showed gray/"sleeping" while the chat-list dot stayed green; after, the chat-list dot is gray, matching the pill.Docs and release impact
UI evidence (if applicable)
Conversation-mode chat list, single character with an active
offline+ "sleeping" override (snapshot =online):🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.