[PR #6252] [MERGED] fix: preserve portrait crops and reuse fitting memory summaries #7108

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6252
Author: @SpicyMarinara
Created: 9/15/2026
Status: ✅ Merged
Merged: 9/15/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/6247-6250-avatars-memory


📝 Commits (4)

  • fda9b93 chore: track avatar and memory recall issue fixes
  • c9dc9b7 Merge remote-tracking branch 'origin/staging' into fix/6247-6250-avatars-memory
  • 6557d3e fix: preserve portrait crops and reuse fitting memory summaries
  • b17781e test: prove continuity generation is reused across budgets

📊 Changes

7 files changed (+196 additions, -18 deletions)

View changed files

📝 CHANGELOG.md (+3 -0)
➕ e2e/avatar-preview.e2e.ts (+118 -0)
📝 packages/client/src/components/characters/CardLibraryPreview.tsx (+22 -12)
📝 packages/client/src/components/chat/RecentChats.tsx (+2 -2)
📝 packages/client/src/styles/globals.css (+6 -0)
📝 packages/server/src/services/advanced-memory.ts (+7 -3)
📝 scripts/regressions/advanced-memory-summary.regression.ts (+38 -1)

📄 Description

Linked issues

Closes #6247
Closes #6249
Related issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6250 — partially addressed for continuity-summary duplication; the reported duplicate scene summaries remain under investigation and this issue should stay open.

Why this change

Saved square avatar crops stretched in rectangular Character Library previews. Home image grids also scaled and filtered the artwork on hover, and their cards applied additional transforms, changing image sampling and sharpness.

Memory Recall treated a context-budget adjustment as a new summary identity even when the existing summary had unchanged sources and already fit. Repeated preparation consequently produced multiple continuity entries for the same range.

What changed

  • Keep the existing crop helper and render source-rectangle crops in a square that covers the preview frame. Legacy and uncropped rendering keep their existing paths.
  • Keep image dimensions and filtering stable on Library and Recent Chats hover; retain card border, color, and shadow feedback.
  • Reuse fitting continuity/temporary summaries across budget changes while validating the same audience, source fingerprints, correction dependencies, enabled state, and current rendered size.
  • Add browser geometry/hover checks and a real-service regression for concurrent initialization and repeated budget changes. Add Unreleased notes.

Verification

  • pnpm check passed, including localization, formatting, lint, types, and production builds. Final CSS and browser-test updates also passed targeted formatting and e2e type checks; hosted pnpm-validate passed on the submitted head.
  • All five Advanced Memory regression suites passed, covering 800-message history, cancellation/resume, individual knowledge boundaries, historical requests, corrections, and generation.
  • pnpm regression:prompt and pnpm version:check passed.
  • Portrait browser regression passed on desktop Chromium, mobile Chromium, mobile WebKit, and desktop Firefox. Captures include compact/full layouts and light/dark themes.
  • The same regression fails on the original portrait implementation. The added memory regression also fails on the original service when a budget adjustment creates a second checkpoint.
  • The local portrait, UX feedback, Advanced Memory, and memory wizard browser suites finished with 73 passed, 2 desktop-only skips. The separate unchanged-widget hover check also passed.
  • Required GitHub checks, CodeRabbit, all hosted Node regressions, and platform artifact builds passed on the submitted head. CodeRabbit reported no actionable code findings. The complete hosted browser matrix passed. Eleven shards passed on the first attempt. The final desktop shard initially hit the existing roleplay history-navigation test’s 60-second deadline; it passed unchanged on retry (58.1 seconds, with 100 tests passed and one skip in that shard). The focused local recheck also passed in 15.9 seconds. No assertions or timeouts were changed.

Manual verification still needed

  • Manually verify original portraits in the reporting Firefox 155 / Windows / Radeon environment; that hardware was not available locally.
  • Manually check existing portrait crops and hover feedback in a real character library.
  • Inspect the audience labels and source IDs on the duplicate Scene #1 / Scene #2 records from #6250. Repeated and concurrent initialization did not reproduce duplicate scenes in the local fixture; distinct Individual audiences are intentionally separate.
  • Review CI and CodeRabbit before merging to staging.

Scope and data safety

The memory change prevents redundant new summary versions; it does not delete existing archive records or manual corrections. A summary that no longer fits still takes the compaction path. No providers, dependencies, prompts, release versions, or translated documentation change. No new user-facing copy requires localization keys.

UI evidence

Before/after browser evidence contains the original PNG captures embedded in a self-contained HTML file. Download the HTML through Raw → Save As and open it in a browser. Desktop and mobile comparisons show the original stretch and corrected proportions. Screenshots use disposable local fixtures.


🔄 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/6252 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 9/15/2026 **Status:** ✅ Merged **Merged:** 9/15/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/6247-6250-avatars-memory` --- ### 📝 Commits (4) - [`fda9b93`](https://github.com/Pasta-Devs/Marinara-Engine/commit/fda9b9353935a50041926a1996f01acb78787ca3) chore: track avatar and memory recall issue fixes - [`c9dc9b7`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c9dc9b740c2520da53e744799ccf9177705fc0dc) Merge remote-tracking branch 'origin/staging' into fix/6247-6250-avatars-memory - [`6557d3e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6557d3ef6e0f9a3d10f13fb26f453993da7037d8) fix: preserve portrait crops and reuse fitting memory summaries - [`b17781e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b17781ea08995c47007a83742ba8d5674cf2f9ed) test: prove continuity generation is reused across budgets ### 📊 Changes **7 files changed** (+196 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+3 -0) ➕ `e2e/avatar-preview.e2e.ts` (+118 -0) 📝 `packages/client/src/components/characters/CardLibraryPreview.tsx` (+22 -12) 📝 `packages/client/src/components/chat/RecentChats.tsx` (+2 -2) 📝 `packages/client/src/styles/globals.css` (+6 -0) 📝 `packages/server/src/services/advanced-memory.ts` (+7 -3) 📝 `scripts/regressions/advanced-memory-summary.regression.ts` (+38 -1) </details> ### 📄 Description ## Linked issues Closes #6247 Closes #6249 Related issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6250 — partially addressed for continuity-summary duplication; the reported duplicate scene summaries remain under investigation and this issue should stay open. ## Why this change Saved square avatar crops stretched in rectangular Character Library previews. Home image grids also scaled and filtered the artwork on hover, and their cards applied additional transforms, changing image sampling and sharpness. Memory Recall treated a context-budget adjustment as a new summary identity even when the existing summary had unchanged sources and already fit. Repeated preparation consequently produced multiple continuity entries for the same range. ## What changed - Keep the existing crop helper and render source-rectangle crops in a square that covers the preview frame. Legacy and uncropped rendering keep their existing paths. - Keep image dimensions and filtering stable on Library and Recent Chats hover; retain card border, color, and shadow feedback. - Reuse fitting continuity/temporary summaries across budget changes while validating the same audience, source fingerprints, correction dependencies, enabled state, and current rendered size. - Add browser geometry/hover checks and a real-service regression for concurrent initialization and repeated budget changes. Add Unreleased notes. ## Verification - `pnpm check` passed, including localization, formatting, lint, types, and production builds. Final CSS and browser-test updates also passed targeted formatting and e2e type checks; hosted `pnpm-validate` passed on the submitted head. - All five Advanced Memory regression suites passed, covering 800-message history, cancellation/resume, individual knowledge boundaries, historical requests, corrections, and generation. - `pnpm regression:prompt` and `pnpm version:check` passed. - Portrait browser regression passed on desktop Chromium, mobile Chromium, mobile WebKit, and desktop Firefox. Captures include compact/full layouts and light/dark themes. - The same regression fails on the original portrait implementation. The added memory regression also fails on the original service when a budget adjustment creates a second checkpoint. - The local portrait, UX feedback, Advanced Memory, and memory wizard browser suites finished with **73 passed, 2 desktop-only skips**. The separate unchanged-widget hover check also passed. - Required GitHub checks, CodeRabbit, all hosted Node regressions, and platform artifact builds passed on the submitted head. CodeRabbit reported no actionable code findings. The [complete hosted browser matrix passed](https://github.com/Pasta-Devs/Marinara-Engine/actions/runs/35032542050). Eleven shards passed on the first attempt. The final desktop shard initially hit the existing roleplay history-navigation test’s 60-second deadline; it passed unchanged on retry (58.1 seconds, with 100 tests passed and one skip in that shard). The focused local recheck also passed in 15.9 seconds. No assertions or timeouts were changed. ## Manual verification still needed - [ ] Manually verify original portraits in the reporting Firefox 155 / Windows / Radeon environment; that hardware was not available locally. - [ ] Manually check existing portrait crops and hover feedback in a real character library. - [ ] Inspect the audience labels and source IDs on the duplicate Scene #1 / Scene #2 records from #6250. Repeated and concurrent initialization did not reproduce duplicate scenes in the local fixture; distinct Individual audiences are intentionally separate. - [ ] Review CI and CodeRabbit before merging to staging. ## Scope and data safety The memory change prevents redundant new summary versions; it does not delete existing archive records or manual corrections. A summary that no longer fits still takes the compaction path. No providers, dependencies, prompts, release versions, or translated documentation change. No new user-facing copy requires localization keys. ## UI evidence [Before/after browser evidence](https://gist.github.com/SpicyMarinara/74186454c37d1c633494dc4b3b591d09) contains the original PNG captures embedded in a self-contained HTML file. Download the HTML through **Raw → Save As** and open it in a browser. Desktop and mobile comparisons show the original stretch and corrected proportions. Screenshots use disposable local fixtures. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:16:36 +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#7108
No description provided.