[PR #448] [MERGED] fix(#438): persist selfies to active swipe, fix group notification identity #4623

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

📋 Pull Request Information

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

Base: main ← Head: fix/issue-438-avatar-and-selfie


📝 Commits (4)

  • db6c83d fix(#438): persist selfies to active swipe, fix group notification identity
  • 60e08e4 fix(#438): address review feedback
  • 0ff30a9 fix(#438): bind selfie persistence to generation swipe index
  • 241c293 fix(#438): capture originating swipe index at command queueing time

📊 Changes

3 files changed (+166 additions, -93 deletions)

View changed files

📝 packages/client/src/hooks/use-generate.ts (+71 -38)
📝 packages/server/src/routes/generate.routes.ts (+25 -31)
📝 packages/server/src/services/storage/chats.storage.ts (+70 -24)

📄 Description

Linked issue

Closes #438

Why this change

Convo/RP chats could show stale or mismatched character identity in notification bubbles, especially during multi-character generation. Generated selfies were saved to the gallery but disappeared from normal chat rendering because they were not persisted to the active swipe metadata used by the message view.

What changed

  • Persist generated selfie attachments to both the message extra and the active swipe extra so they remain visible in normal chat rendering, after edit mode closes, and after swipe/chat refreshes.
  • Resolve off-chat notification identity from the saved assistant message's actual characterId instead of assuming the first chat character or the next group turn.
  • Preserve avatar crop data when building floating notification bubbles from cached character data.

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

This is my first Codex-assisted fix, and I want to be transparent about the verification gaps:

  • node scratch/issue-438-repro.mjs confirmed the storage bug before the patch and the fixed behavior after: beforePatchVisibleAttachments 0, afterPatchVisibleAttachments 1.
  • pnpm --filter @marinara-engine/client exec tsc --noEmit passed.
  • pnpm --filter @marinara-engine/client lint passed.
  • pnpm --filter @marinara-engine/shared lint passed.
  • pnpm check did not complete because impeccable:check is currently crashing in scripts/check-impeccable-context.mjs (unrelated, pre-existing).
  • Server type-check is still blocked by existing unrelated errors in packages/server/src/services/haptic/buttplug-service.ts for OutputType.HwPositionWithDuration (also pre-existing).
  • Manual app-shell verification still needed: generate a selfie in a Convo/RP chat and confirm it stays visible after closing edit mode, switching swipes, and switching chats.
  • Manual app-shell verification still needed: off-chat group notifications show the character who actually sent the saved message, not the next character in the group turn.

Happy to take guidance on any of this.

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)

Manual app-shell verification still needed with a configured image-generation provider.

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Fixed character avatars and names displaying incorrectly in group generation notifications, ensuring accurate identity information is shown
    • Corrected image attachment handling to properly associate selfies and images with specific message versions
    • Improved concurrency and state tracking during multi-character generation for better reliability and data consistency

🔄 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/448 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/5/2026 **Status:** ✅ Merged **Merged:** 5/6/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `main` ← **Head:** `fix/issue-438-avatar-and-selfie` --- ### 📝 Commits (4) - [`db6c83d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/db6c83d5c99a7abfc5b24cfc0d512fe5b4a19eba) fix(#438): persist selfies to active swipe, fix group notification identity - [`60e08e4`](https://github.com/Pasta-Devs/Marinara-Engine/commit/60e08e43a7cf7fb3b37734b3b714dc8418659568) fix(#438): address review feedback - [`0ff30a9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0ff30a983fce6ee304ef429dd70ed1eb974f0f5b) fix(#438): bind selfie persistence to generation swipe index - [`241c293`](https://github.com/Pasta-Devs/Marinara-Engine/commit/241c293e1f5e15691f42452c59d44f5f5c014a0d) fix(#438): capture originating swipe index at command queueing time ### 📊 Changes **3 files changed** (+166 additions, -93 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/hooks/use-generate.ts` (+71 -38) 📝 `packages/server/src/routes/generate.routes.ts` (+25 -31) 📝 `packages/server/src/services/storage/chats.storage.ts` (+70 -24) </details> ### 📄 Description ## Linked issue Closes #438 ## Why this change Convo/RP chats could show stale or mismatched character identity in notification bubbles, especially during multi-character generation. Generated selfies were saved to the gallery but disappeared from normal chat rendering because they were not persisted to the active swipe metadata used by the message view. ## What changed - Persist generated selfie attachments to both the message extra and the active swipe extra so they remain visible in normal chat rendering, after edit mode closes, and after swipe/chat refreshes. - Resolve off-chat notification identity from the saved assistant message's actual `characterId` instead of assuming the first chat character or the next group turn. - Preserve avatar crop data when building floating notification bubbles from cached character data. ## 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 This is my first Codex-assisted fix, and I want to be transparent about the verification gaps: - `node scratch/issue-438-repro.mjs` confirmed the storage bug before the patch and the fixed behavior after: `beforePatchVisibleAttachments 0`, `afterPatchVisibleAttachments 1`. - `pnpm --filter @marinara-engine/client exec tsc --noEmit` passed. - `pnpm --filter @marinara-engine/client lint` passed. - `pnpm --filter @marinara-engine/shared lint` passed. - `pnpm check` did not complete because `impeccable:check` is currently crashing in `scripts/check-impeccable-context.mjs` (unrelated, pre-existing). - Server type-check is still blocked by existing unrelated errors in `packages/server/src/services/haptic/buttplug-service.ts` for `OutputType.HwPositionWithDuration` (also pre-existing). - **Manual app-shell verification still needed:** generate a selfie in a Convo/RP chat and confirm it stays visible after closing edit mode, switching swipes, and switching chats. - **Manual app-shell verification still needed:** off-chat group notifications show the character who actually sent the saved message, not the next character in the group turn. Happy to take guidance on any of this. ## 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) Manual app-shell verification still needed with a configured image-generation provider. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **Bug Fixes** * Fixed character avatars and names displaying incorrectly in group generation notifications, ensuring accurate identity information is shown * Corrected image attachment handling to properly associate selfies and images with specific message versions * Improved concurrency and state tracking during multi-character generation for better reliability and data consistency <!-- 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: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#4623
No description provided.