[PR #5359] [MERGED] Fix character-owned Conversation presence #6739

Closed
opened 2026-10-23 04:13:15 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/5359
Author: @Gunterlie
Created: 8/21/2026
Status: ✅ Merged
Merged: 8/21/2026
Merged by: @Gunterlie

Base: staging ← Head: one-schedule-to-rule-them


📝 Commits (10+)

  • f999538 feat(conversation): move convo schedules from per chat to per character
  • c2306c4 fix(conversation): make presence overrides per character and stop version bumps
  • b5b47ea docs(faq): clarify character-owned conversation presence
  • fe05b65 Merge origin/staging into one-schedule-to-rule-them
  • b528e71 fix: address CodeRabbit presence review
  • eec0529 fix: preserve conversation schedule opt-outs
  • 69a804d fix: clear stale conversation schedule caches
  • 940cf87 fix: harden conversation presence migration
  • 9f115c2 fix: scope legacy presence migration
  • ec02ac8 fix: validate stored conversation schedules

📊 Changes

20 files changed (+824 additions, -265 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 docs/FAQ.md (+10 -0)
📝 packages/client/src/components/characters/CharacterEditor.tsx (+76 -21)
📝 packages/client/src/components/characters/ConvoProfileFields.tsx (+44 -2)
📝 packages/client/src/components/chat/CharacterScheduleEditorModal.tsx (+2 -1)
📝 packages/client/src/components/chat/ChatArea.tsx (+30 -9)
📝 packages/client/src/components/chat/ChatInput.tsx (+1 -0)
📝 packages/client/src/components/chat/ConversationInput.tsx (+2 -0)
📝 packages/client/src/components/chat/ConversationPresenceCard.tsx (+25 -24)
📝 packages/client/src/lib/conversation-presence-status.ts (+16 -5)
📝 packages/client/src/lib/slash-commands.ts (+18 -9)
📝 packages/client/src/localization/locales/en.json (+4 -0)
📝 packages/server/src/routes/chats.routes.ts (+16 -31)
📝 packages/server/src/routes/conversation.routes.ts (+52 -121)
📝 packages/server/src/routes/generate/conversation-presence-runtime.ts (+12 -7)
📝 packages/server/src/services/conversation/server-autonomous-scheduler.service.ts (+3 -4)
📝 packages/server/src/services/storage/characters.storage.ts (+11 -1)
📝 packages/server/src/services/storage/chats.storage.ts (+292 -30)
📝 packages/shared/src/types/character.ts (+10 -0)
➕ scripts/regressions/character-schedule-ownership.regression.ts (+199 -0)

📄 Description

Why

Conversation availability belongs to the character, but schedules and manual status overrides could still behave like chat-owned state. This made the same character appear different across chats. Schedule edits could also trigger character card version and discard behavior even though presence is runtime state.

Closes #5358.

What changed

  • Store Conversation schedules and manual status overrides on the character.
  • Resolve current presence into each chat before display and generation.
  • Keep the schedule enable switch as a per-chat opt-out.
  • Exclude schedule and presence runtime fields from character card versions.
  • Add regression coverage for character-owned schedules and overrides.
  • Explain the ownership model in the FAQ and changelog.

Validation

  • pnpm check
  • One existing react-hooks/exhaustive-deps warning remains in packages/client/src/components/chat/ChatArea.tsx.

Manual verification needed

  • Manually verify that a schedule edit in one chat appears in another chat for the same character.
  • Manually verify that a manual status override applies in every chat for the same character.
  • Manually verify that disabling Conversation schedules affects only the selected chat.
  • Manually verify that schedule and presence edits do not create a card version or discard prompt.

Summary by CodeRabbit

  • New Features

    • Added character-level weekly conversation schedules, editable from the Character Editor.
    • Added manual online-status overrides that apply consistently across chats.
    • New chats can inherit a character’s active schedule and status settings.
  • Bug Fixes

    • Preserved per-chat schedule opt-outs and corrected disabled-chat presence behavior.
    • Existing schedules are retained and migrated for consistent behavior.
    • Runtime schedule and status changes no longer create unnecessary character versions.
  • Documentation

    • Added FAQ guidance covering schedules, overrides, opt-outs, and new-chat behavior.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/5359 **Author:** [@Gunterlie](https://github.com/Gunterlie) **Created:** 8/21/2026 **Status:** ✅ Merged **Merged:** 8/21/2026 **Merged by:** [@Gunterlie](https://github.com/Gunterlie) **Base:** `staging` ← **Head:** `one-schedule-to-rule-them` --- ### 📝 Commits (10+) - [`f999538`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f999538ecd6a85ff322a0dde7757cf42ee21db88) feat(conversation): move convo schedules from per chat to per character - [`c2306c4`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c2306c4a4b113f012b7ff2ccb7dbc77a3156787d) fix(conversation): make presence overrides per character and stop version bumps - [`b5b47ea`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b5b47ea191e5e5910a60a5cb263b640805b2076d) docs(faq): clarify character-owned conversation presence - [`fe05b65`](https://github.com/Pasta-Devs/Marinara-Engine/commit/fe05b65aa43d656737a3ed792be1c0f2812efcee) Merge origin/staging into one-schedule-to-rule-them - [`b528e71`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b528e715207df80446c2dc7c8ea81de0249d6d6c) fix: address CodeRabbit presence review - [`eec0529`](https://github.com/Pasta-Devs/Marinara-Engine/commit/eec052942c00dd816e7eaa6da4accd6b9131b31a) fix: preserve conversation schedule opt-outs - [`69a804d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/69a804d605637129cd38d8f2e9ee2112b2070ef0) fix: clear stale conversation schedule caches - [`940cf87`](https://github.com/Pasta-Devs/Marinara-Engine/commit/940cf876482e1e2a2c96b36038f0e99870388b1e) fix: harden conversation presence migration - [`9f115c2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9f115c22c71eee255220e7e0b299d556caa7f709) fix: scope legacy presence migration - [`ec02ac8`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ec02ac8ab6c7e14b238524649d7cecedfab30288) fix: validate stored conversation schedules ### 📊 Changes **20 files changed** (+824 additions, -265 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `docs/FAQ.md` (+10 -0) 📝 `packages/client/src/components/characters/CharacterEditor.tsx` (+76 -21) 📝 `packages/client/src/components/characters/ConvoProfileFields.tsx` (+44 -2) 📝 `packages/client/src/components/chat/CharacterScheduleEditorModal.tsx` (+2 -1) 📝 `packages/client/src/components/chat/ChatArea.tsx` (+30 -9) 📝 `packages/client/src/components/chat/ChatInput.tsx` (+1 -0) 📝 `packages/client/src/components/chat/ConversationInput.tsx` (+2 -0) 📝 `packages/client/src/components/chat/ConversationPresenceCard.tsx` (+25 -24) 📝 `packages/client/src/lib/conversation-presence-status.ts` (+16 -5) 📝 `packages/client/src/lib/slash-commands.ts` (+18 -9) 📝 `packages/client/src/localization/locales/en.json` (+4 -0) 📝 `packages/server/src/routes/chats.routes.ts` (+16 -31) 📝 `packages/server/src/routes/conversation.routes.ts` (+52 -121) 📝 `packages/server/src/routes/generate/conversation-presence-runtime.ts` (+12 -7) 📝 `packages/server/src/services/conversation/server-autonomous-scheduler.service.ts` (+3 -4) 📝 `packages/server/src/services/storage/characters.storage.ts` (+11 -1) 📝 `packages/server/src/services/storage/chats.storage.ts` (+292 -30) 📝 `packages/shared/src/types/character.ts` (+10 -0) ➕ `scripts/regressions/character-schedule-ownership.regression.ts` (+199 -0) </details> ### 📄 Description ## Why Conversation availability belongs to the character, but schedules and manual status overrides could still behave like chat-owned state. This made the same character appear different across chats. Schedule edits could also trigger character card version and discard behavior even though presence is runtime state. Closes #5358. ## What changed - Store Conversation schedules and manual status overrides on the character. - Resolve current presence into each chat before display and generation. - Keep the schedule enable switch as a per-chat opt-out. - Exclude schedule and presence runtime fields from character card versions. - Add regression coverage for character-owned schedules and overrides. - Explain the ownership model in the FAQ and changelog. ## Validation - `pnpm check` - One existing `react-hooks/exhaustive-deps` warning remains in `packages/client/src/components/chat/ChatArea.tsx`. ## Manual verification needed - [ ] Manually verify that a schedule edit in one chat appears in another chat for the same character. - [ ] Manually verify that a manual status override applies in every chat for the same character. - [ ] Manually verify that disabling Conversation schedules affects only the selected chat. - [ ] Manually verify that schedule and presence edits do not create a card version or discard prompt. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added character-level weekly conversation schedules, editable from the Character Editor. * Added manual online-status overrides that apply consistently across chats. * New chats can inherit a character’s active schedule and status settings. * **Bug Fixes** * Preserved per-chat schedule opt-outs and corrected disabled-chat presence behavior. * Existing schedules are retained and migrated for consistent behavior. * Runtime schedule and status changes no longer create unnecessary character versions. * **Documentation** * Added FAQ guidance covering schedules, overrides, opt-outs, and new-chat behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:13:15 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#6739
No description provided.