[PR #531] [MERGED] Refresh conversation status on chat open #4656

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

📋 Pull Request Information

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

Base: main ← Head: fix/issue-444-local-schedule-time


📝 Commits (1)

  • dfe0645 Refresh conversation status on chat open

📊 Changes

3 files changed (+1 additions, -0 deletions)

View changed files

➕ docs/pr-evidence/issue-444/issue-444-after.png (+0 -0)
➕ docs/pr-evidence/issue-444/issue-444-before.png (+0 -0)
📝 packages/client/src/components/chat/ConversationView.tsx (+1 -0)

📄 Description

Linked issue

Closes #444

Why this change

  • Conversation character status/activity could show stale persisted schedule state when opening a chat, because the active Conversation view waited for the first 60-second poll before syncing against the current schedule.
  • That made statuses look offset from the user's current time after startup or navigation, even when the stored schedule for the current hour was correct.

What changed

  • Run the existing /conversation/status/:chatId refresh immediately when ConversationView mounts.
  • Keep the existing 60-second status refresh interval for ongoing schedule changes.
  • Added before/after real app screenshots for the stale-first-open status case.

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 read CONTRIBUTING.md, AGENTS.md, and packages/client/.instructions.md before shipping this focused client change.
  • Assistant-selected issue preflight found no associated fix PR or local issue branch/worktree for #444 before starting, and the issue was assigned to Codex.
  • Reproduced before the fix in a real local app:
    • Seeded a Conversation chat where the character's persisted conversationActivity was Night shift 22:00-23:00, while the current schedule block for local time was Free now 18:00-19:00.
    • Opened the chat in Playwright against upstream/main.
    • Observed no /api/conversation/status/:chatId request within 2.5 seconds and the UI still showed Night shift 22:00-23:00.
  • Verified after the fix in the same real app flow:
    • Seeded the same stale persisted activity/current schedule setup.
    • Opened the chat in Playwright against this branch.
    • Observed /api/conversation/status/:chatId fire immediately and the UI update to Free now 18:00-19:00.
  • Edge cases checked:
    • Existing 60-second interval remains in place after the immediate refresh.
    • The no-schedule path is still handled by the existing endpoint behavior; this change only changes when the endpoint is called.
    • No schema, server, storage, dependency, docs, or version files changed.
  • Baseline validation: pnpm check passed locally. This ran the Impeccable context check, workspace lint/type checks, and production build.
  • Container validation was not run locally; this is a one-line client mount effect change with no container/runtime configuration changes.

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)

No docs or release metadata changes needed.

UI evidence (if applicable)

Before, opening the conversation showed the stale persisted activity from a future-looking schedule block:

Issue 444 before

After, opening the same conversation immediately syncs status and shows the current local-hour schedule block:

Issue 444 after

Summary by CodeRabbit

  • Bug Fixes
    • Improved conversation status refresh timing to fetch data immediately when opening a conversation, ensuring faster responsiveness.

🔄 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/531 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/7/2026 **Status:** ✅ Merged **Merged:** 5/7/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `main` ← **Head:** `fix/issue-444-local-schedule-time` --- ### 📝 Commits (1) - [`dfe0645`](https://github.com/Pasta-Devs/Marinara-Engine/commit/dfe06455a01089f224c5373fc78924a53fd740e1) Refresh conversation status on chat open ### 📊 Changes **3 files changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `docs/pr-evidence/issue-444/issue-444-after.png` (+0 -0) ➕ `docs/pr-evidence/issue-444/issue-444-before.png` (+0 -0) 📝 `packages/client/src/components/chat/ConversationView.tsx` (+1 -0) </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 #444 ## Why this change <!-- What user problem, bug, or goal does this solve? --> - Conversation character status/activity could show stale persisted schedule state when opening a chat, because the active Conversation view waited for the first 60-second poll before syncing against the current schedule. - That made statuses look offset from the user's current time after startup or navigation, even when the stored schedule for the current hour was correct. ## What changed <!-- List the key changes in this PR --> - Run the existing `/conversation/status/:chatId` refresh immediately when `ConversationView` mounts. - Keep the existing 60-second status refresh interval for ongoing schedule changes. - Added before/after real app screenshots for the stale-first-open status case. ## Validation <!-- Required: include commands run and/or manual checks performed --> - [x] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [x] Ran the app, clicked through the changes manually - [x] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [x] Above manual verification completed (describe below) - [x] 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 read `CONTRIBUTING.md`, `AGENTS.md`, and `packages/client/.instructions.md` before shipping this focused client change. - Assistant-selected issue preflight found no associated fix PR or local issue branch/worktree for #444 before starting, and the issue was assigned to Codex. - Reproduced before the fix in a real local app: - Seeded a Conversation chat where the character's persisted `conversationActivity` was `Night shift 22:00-23:00`, while the current schedule block for local time was `Free now 18:00-19:00`. - Opened the chat in Playwright against `upstream/main`. - Observed no `/api/conversation/status/:chatId` request within 2.5 seconds and the UI still showed `Night shift 22:00-23:00`. - Verified after the fix in the same real app flow: - Seeded the same stale persisted activity/current schedule setup. - Opened the chat in Playwright against this branch. - Observed `/api/conversation/status/:chatId` fire immediately and the UI update to `Free now 18:00-19:00`. - Edge cases checked: - Existing 60-second interval remains in place after the immediate refresh. - The no-schedule path is still handled by the existing endpoint behavior; this change only changes when the endpoint is called. - No schema, server, storage, dependency, docs, or version files changed. - Baseline validation: `pnpm check` passed locally. This ran the Impeccable context check, workspace lint/type checks, and production build. - Container validation was not run locally; this is a one-line client mount effect change with no container/runtime configuration changes. ## 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) No docs or release metadata changes needed. ## UI evidence (if applicable) Before, opening the conversation showed the stale persisted activity from a future-looking schedule block: ![Issue 444 before](https://raw.githubusercontent.com/cha1latte/Marinara-Engine/dfe06455a01089f224c5373fc78924a53fd740e1/docs/pr-evidence/issue-444/issue-444-before.png) After, opening the same conversation immediately syncs status and shows the current local-hour schedule block: ![Issue 444 after](https://raw.githubusercontent.com/cha1latte/Marinara-Engine/dfe06455a01089f224c5373fc78924a53fd740e1/docs/pr-evidence/issue-444/issue-444-after.png) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved conversation status refresh timing to fetch data immediately when opening a conversation, ensuring faster responsiveness. <!-- 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-22 04:09:33 +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#4656
No description provided.