[PR #1117] [MERGED] Fix idle presence restore on message send #4931

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

📋 Pull Request Information

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

Base: staging ← Head: fix/issue-1105-idle-chat-available


📝 Commits (1)

  • 0b3a802 Fix idle presence restore on message send

📊 Changes

2 files changed (+32 additions, -8 deletions)

View changed files

📝 packages/client/src/hooks/use-autonomous-messaging.ts (+4 -8)
➕ packages/client/src/lib/user-presence-activity.ts (+28 -0)

📄 Description

Linked issue

Closes #1105

Why this change

  • Sending a conversation message after the app auto-marked the user Idle still left the user presence as Idle. A message send should be the explicit activity signal that restores Available while preserving intentional DND.

What changed

  • Added a small client presence activity helper that restores effective Idle to Active only when the manual status is Available.
  • Reused that helper from the conversation autonomous activity path so successful user messages also report the current presence to /conversation/activity/presence.

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 ran packages\server\node_modules\.bin\tsx.cmd scratch/issue-1105-presence-repro.ts.
    • Before fix: repro failed because no message-send presence restore helper existed.
    • After fix: repro passed; message activity restores Idle/Available to Active, reports Active when already active, and preserves manual DND.
  • Codex ran pnpm check successfully.
  • Codex ran node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch/bugfix-verification.json successfully.
  • Visual proof URL was checked with curl.exe -I and returned HTTP 200 with Content-Type: image/png.

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)

Logic/state proof screenshot from the local verification run:

Issue 1105 presence proof

Raw proof page: https://gist.githubusercontent.com/cha1latte/8311d36d3f8a236f269366d97e32b127/raw/b21cfaa618b31a5a7fc007a3b7fa80a03ce2c9ea/issue-1105-proof.html


🔄 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/1117 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/22/2026 **Status:** ✅ Merged **Merged:** 5/23/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `staging` ← **Head:** `fix/issue-1105-idle-chat-available` --- ### 📝 Commits (1) - [`0b3a802`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0b3a802e12323bcf154494b1420b8211929c7f1a) Fix idle presence restore on message send ### 📊 Changes **2 files changed** (+32 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/hooks/use-autonomous-messaging.ts` (+4 -8) ➕ `packages/client/src/lib/user-presence-activity.ts` (+28 -0) </details> ### 📄 Description <!-- Target branch: `staging`. The default base in this UI is `main` (release branch). --> <!-- Change the base to `staging` before submitting unless this is a maintainer-approved mainline change. --> <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue Closes #1105 ## Why this change - Sending a conversation message after the app auto-marked the user Idle still left the user presence as Idle. A message send should be the explicit activity signal that restores Available while preserving intentional DND. ## What changed - Added a small client presence activity helper that restores effective Idle to Active only when the manual status is Available. - Reused that helper from the conversation autonomous activity path so successful user messages also report the current presence to `/conversation/activity/presence`. ## 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 ran `packages\server\node_modules\.bin\tsx.cmd scratch/issue-1105-presence-repro.ts`. - Before fix: repro failed because no message-send presence restore helper existed. - After fix: repro passed; message activity restores Idle/Available to Active, reports Active when already active, and preserves manual DND. - Codex ran `pnpm check` successfully. - Codex ran `node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch/bugfix-verification.json` successfully. - Visual proof URL was checked with `curl.exe -I` and returned `HTTP 200` with `Content-Type: image/png`. ## 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) Logic/state proof screenshot from the local verification run: ![Issue 1105 presence proof](https://gist.githubusercontent.com/cha1latte/8311d36d3f8a236f269366d97e32b127/raw/8fb7f577f307d0c58ff9d2f9bb5572f411ac6435/issue-1105-proof.png) Raw proof page: https://gist.githubusercontent.com/cha1latte/8311d36d3f8a236f269366d97e32b127/raw/b21cfaa618b31a5a7fc007a3b7fa80a03ce2c9ea/issue-1105-proof.html --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:11:49 +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#4931
No description provided.