[PR #804] [MERGED] Fix conversation schedule inheritance for DMs #4777

Closed
opened 2026-10-22 04:10:34 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/804
Author: @cha1latte
Created: 5/13/2026
Status: ✅ Merged
Merged: 5/13/2026
Merged by: @cha1latte

Base: main ← Head: fix/issue-788-schedule-time-shift


📝 Commits (1)

  • 74e2bbb Fix conversation schedule inheritance for DMs

📊 Changes

2 files changed (+100 additions, -14 deletions)

View changed files

📝 packages/server/src/routes/conversation.routes.ts (+4 -6)
📝 packages/server/src/services/storage/chats.storage.ts (+96 -8)

📄 Description

Linked issue

Closes #788

Why this change

  • Creating a one-on-one conversation with a character who already has a generated group conversation schedule could leave the new chat with no local schedule, then status refreshes treated that character as unscheduled/online and overwrote the schedule-derived status used elsewhere.

What changed

  • Conversation chat creation now inherits fresh schedules from sibling conversation chats for the same characters.
  • Existing conversation chats can repair missing or stale schedule entries from sibling chats before deriving status, autonomous checks, busy-delay responses, or character exchanges.
  • Conversation status routes now use the repaired schedule map so opening an unscheduled one-on-one chat does not clobber a character's group schedule status.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Codex route proof: pnpm --dir packages/server exec tsx scratch/issue-788-status-repro.mjs
    • Before the fix, the harness reproduced the bug: opening an unscheduled one-on-one conversation returned online / unknown (no schedule) and overwrote the character's schedule-derived dnd / working state.
    • After the fix, newly-created one-on-one conversations inherit the fresh group schedule, existing unscheduled one-on-one conversations repair from the sibling schedule, /conversation/status/:chatId returns dnd / working, /conversation/busy-delay returns dnd / working, and the character extension remains dnd / working.
  • Codex baseline: pnpm check passed locally, including Impeccable context check, lint, and shared/server/client builds.
  • No human-only verification blocker for the core claim; this is a server-side route/storage behavior with a scratch harness proof.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

N/A - this is a server-side schedule inheritance/status repair fix for an issue reported as not visual/UI.


🔄 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/804 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/13/2026 **Status:** ✅ Merged **Merged:** 5/13/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `main` ← **Head:** `fix/issue-788-schedule-time-shift` --- ### 📝 Commits (1) - [`74e2bbb`](https://github.com/Pasta-Devs/Marinara-Engine/commit/74e2bbb9f421d562224be4609dad4118d1960f9f) Fix conversation schedule inheritance for DMs ### 📊 Changes **2 files changed** (+100 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `packages/server/src/routes/conversation.routes.ts` (+4 -6) 📝 `packages/server/src/services/storage/chats.storage.ts` (+96 -8) </details> ### 📄 Description ## Linked issue <!-- Every PR should reference a feature request or issue report. If there isn't one yet, open one first to gather opinions: --> <!-- https://github.com/Pasta-Devs/Marinara-Engine/issues/new/choose --> Closes #788 ## Why this change <!-- What user problem, bug, or goal does this solve? --> - Creating a one-on-one conversation with a character who already has a generated group conversation schedule could leave the new chat with no local schedule, then status refreshes treated that character as unscheduled/online and overwrote the schedule-derived status used elsewhere. ## What changed <!-- List the key changes in this PR --> - Conversation chat creation now inherits fresh schedules from sibling conversation chats for the same characters. - Existing conversation chats can repair missing or stale schedule entries from sibling chats before deriving status, autonomous checks, busy-delay responses, or character exchanges. - Conversation status routes now use the repaired schedule map so opening an unscheduled one-on-one chat does not clobber a character's group schedule status. ## Validation <!-- Required: include commands run and/or manual checks performed --> - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes <!-- Describe exactly what you tested in a real browser/app, step by step. --> <!-- ⚠️ If an AI agent filled out or ticked these boxes for you, treat them --> <!-- as a TO-DO LIST, not as proof the work is done. Verify each item yourself --> <!-- before submitting. If you haven't verified it, untick the box. --> - Codex route proof: `pnpm --dir packages/server exec tsx scratch/issue-788-status-repro.mjs` - Before the fix, the harness reproduced the bug: opening an unscheduled one-on-one conversation returned `online` / `unknown (no schedule)` and overwrote the character's schedule-derived `dnd` / `working` state. - After the fix, newly-created one-on-one conversations inherit the fresh group schedule, existing unscheduled one-on-one conversations repair from the sibling schedule, `/conversation/status/:chatId` returns `dnd` / `working`, `/conversation/busy-delay` returns `dnd` / `working`, and the character extension remains `dnd` / `working`. - Codex baseline: `pnpm check` passed locally, including Impeccable context check, lint, and shared/server/client builds. - No human-only verification blocker for the core claim; this is a server-side route/storage behavior with a scratch harness proof. ## Docs and release impact - [x] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) N/A - this is a server-side schedule inheritance/status repair fix for an issue reported as not visual/UI. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:10:34 +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#4777
No description provided.