[PR #5128] [MERGED] fix(conversation): scope away delays to each group responder #6643

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/5128
Author: @SpicyMarinara
Created: 8/16/2026
Status: ✅ Merged
Merged: 8/16/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/5122-away-group-delay


📝 Commits (4)

  • a89b9c9 docs: claim group presence delay fix
  • 315e1ac fix(conversation): scope group presence delays per responder
  • 7587516 Merge remote-tracking branch 'origin/staging' into fix/5122-away-group-delay
  • de32cab fix(conversation): refresh delayed responder history

📊 Changes

4 files changed (+174 additions, -21 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 packages/server/src/routes/generate.routes.ts (+76 -3)
📝 packages/server/src/routes/generate/conversation-presence-runtime.ts (+58 -18)
📝 scripts/regressions/open-issues.regression.ts (+39 -0)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.

Linked issue

Closes #5122

Why this change

In an individual Conversation group, one selected away character applied the longest presence delay to the entire response queue. Active characters therefore appeared away too and could not reply at their normal pace.

What changed

  • Keep one presence deadline per selected responder instead of sleeping on the queue's worst status.
  • Stably order active responders before delayed responders while preserving Smart selection order within equal delays.
  • Preserve each away/busy character's configured delay and the shortened direct-mention delay.
  • Refresh user messages posted during a delayed responder's wait before generating that response.
  • Add focused timing/order regression coverage and release notes.

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

Automated evidence:

  • pnpm check passes on the final branch head.
  • The new responder-order and remaining-deadline assertions pass in open-issues.regression.ts.
  • The full open-issues lane advances past the new assertions, then fails on the pre-existing Inventory section migration expectation fixed by #5117; rerun after that prerequisite lands.

Remaining manual verification:

  • In an individual Smart Conversation group, select active and away responders in one queue and confirm the active reply arrives without the away delay.
  • Confirm the away responder waits only its own configured delay.
  • Directly mention the away responder and confirm the shorter mention delay is used.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] <paths> follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

CHANGELOG.md is updated. No user-facing docs, localization, translated docs, or release metadata changes are required.

UI evidence (if applicable)

Not applicable; this is server-side response scheduling behavior.

Summary by CodeRabbit

  • Bug Fixes

    • Improved responsiveness in individual conversation group chats when active characters respond while another selected character is away.
    • Preserved each character’s configured response delay and mention shortcut.
    • Updated response timing and typing indicators to reflect per-character delays more accurately.
  • Tests

    • Added regression coverage for responder ordering, elapsed delays, and typing 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/5128 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 8/16/2026 **Status:** ✅ Merged **Merged:** 8/16/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/5122-away-group-delay` --- ### 📝 Commits (4) - [`a89b9c9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a89b9c9ea4b013b1cd7c2d1c4398f253719d062b) docs: claim group presence delay fix - [`315e1ac`](https://github.com/Pasta-Devs/Marinara-Engine/commit/315e1ac27ffab07952f83ae7674468c7a1dcb387) fix(conversation): scope group presence delays per responder - [`7587516`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7587516a89e8e3697d972619ddb748d98750d29f) Merge remote-tracking branch 'origin/staging' into fix/5122-away-group-delay - [`de32cab`](https://github.com/Pasta-Devs/Marinara-Engine/commit/de32cab7406c173ba0aa2346f8e6d1087949481a) fix(conversation): refresh delayed responder history ### 📊 Changes **4 files changed** (+174 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `packages/server/src/routes/generate.routes.ts` (+76 -3) 📝 `packages/server/src/routes/generate/conversation-presence-runtime.ts` (+58 -18) 📝 `scripts/regressions/open-issues.regression.ts` (+39 -0) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. ## Linked issue Closes #5122 ## Why this change In an individual Conversation group, one selected away character applied the longest presence delay to the entire response queue. Active characters therefore appeared away too and could not reply at their normal pace. ## What changed - Keep one presence deadline per selected responder instead of sleeping on the queue's worst status. - Stably order active responders before delayed responders while preserving Smart selection order within equal delays. - Preserve each away/busy character's configured delay and the shortened direct-mention delay. - Refresh user messages posted during a delayed responder's wait before generating that response. - Add focused timing/order regression coverage and release notes. ## 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 Automated evidence: - `pnpm check` passes on the final branch head. - The new responder-order and remaining-deadline assertions pass in `open-issues.regression.ts`. - The full open-issues lane advances past the new assertions, then fails on the pre-existing Inventory section migration expectation fixed by #5117; rerun after that prerequisite lands. Remaining manual verification: - In an individual Smart Conversation group, select active and away responders in one queue and confirm the active reply arrives without the away delay. - Confirm the away responder waits only its own configured delay. - Directly mention the away responder and confirm the shorter mention delay is used. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n] <paths>` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) `CHANGELOG.md` is updated. No user-facing docs, localization, translated docs, or release metadata changes are required. ## UI evidence (if applicable) Not applicable; this is server-side response scheduling behavior. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved responsiveness in individual conversation group chats when active characters respond while another selected character is away. * Preserved each character’s configured response delay and mention shortcut. * Updated response timing and typing indicators to reflect per-character delays more accurately. * **Tests** * Added regression coverage for responder ordering, elapsed delays, and typing 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:12:21 +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#6643
No description provided.