[PR #7101] [MERGED] fix(schedules): show saved portrait crops in the Character Schedule Manager (#7100) #7474

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

📋 Pull Request Information

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

Base: staging ← Head: fix/schedule-avatar-slot


📝 Commits (4)

  • 5b4f850 fix(client): show saved portrait crops in the schedule manager
  • 7809754 docs(changelog): link the schedule portrait fix to #7100
  • e3620ff test(schedules): assert where both crop formats place the portrait (#7100)
  • 82e5d57 Merge remote-tracking branch 'origin/staging' into fix/schedule-avatar-slot

📊 Changes

3 files changed (+185 additions, -8 deletions)

View changed files

📝 CHANGELOG.md (+2 -0)
➕ e2e/schedule-manager-portraits.e2e.ts (+170 -0)
📝 packages/client/src/components/chat/CharacterScheduleManagerModal.tsx (+13 -8)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #7100

Why this change

  • The Character Schedule Manager showed every character's portrait uncropped, even when a crop was saved. It read the crop from a top-level avatarCrop field that character rows never carry (the crop is stored in extensions.avatarCrop). The schedule editor it opens wasn't given the crop either.
  • The list portrait also had no clipping slot: the <img> sat directly in the row. A saved crop is placed with position: absolute and percentage sizes, so once the crop is read, the portrait sizes against a larger ancestor. It then grows to the width of the screen (about 1424px on desktop) and covers the window. This is the same class of bug as #7093. Both parts have to be fixed together.

What changed

  • CharacterScheduleManagerModal.tsx: read the crop with normalizeAvatarCrop(extensions.avatarCrop). Put the list portrait in the same sized relative overflow-hidden round slot used across the app (as in CroppedAvatarImage). Pass the crop to the schedule editor.
  • e2e/schedule-manager-portraits.e2e.ts: seeds characters with a large portrait and saved current-format and legacy crops. It asserts that each crop is used in the list and in the editor, that each list portrait stays inside its clipping slot, that the window's controls are the topmost element at their centre and clickable, and that nothing scrolls sideways.
  • CHANGELOG.md: one user-facing entry.
  • A sweep of every other getAvatarCropStyle(...) call in the client (about 50, plus 11 that pass a crop style through a variable) found no other portrait missing its slot.

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

Agent-run validation (not a substitute for the boxes above):

  • pnpm check: exit 0.
  • New e2e fails against the staging component on desktop-chromium, mobile-chromium and mobile-webkit (portrait not in a clipping slot), and passes with the fix on all three.
  • With only the slot added, the e2e fails because the crop is not used. With the crop read but no slot, the portrait grows to 1424px on desktop and 780px on phones and covers the window. Without the editor prop, the editor crop check fails.
  • e2e/schedule-generation.e2e.ts and the new e2e: 12 of 12 pass across the three projects.
  • Local CodeRabbit review: 0 findings.

Manual verification notes

  • Manually verify in a browser that a character with a saved crop shows the cropped face in the Character Schedule Manager list, in dark and light mode.
  • Manually verify that clicking Edit for that character shows the same crop in the schedule editor.
  • Manually verify on a phone-width viewport that the window's search, Select visible, Generate schedules, Remove schedules, Renew weekly and Edit controls stay clickable and nothing scrolls sideways.
  • Manually verify that a character with an older zoom-style crop, and a character with no portrait, still look right in the list.

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] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

CHANGELOG entry added under [Unreleased]. No doc describes these portraits, so no other doc changes.

UI evidence (if applicable)

Before: uncropped portrait. Crop read without the slot: the portrait covers the window. After: cropped portrait inside its round slot. Attach the e2e screenshots from a manual run.

Summary by CodeRabbit

  • Bug Fixes
    • Character portraits now display their saved crops in the Character Schedule Manager and schedule editor, while remaining contained in the manager’s round slots.

🔄 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/7101 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/5/2026 **Status:** ✅ Merged **Merged:** 10/5/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/schedule-avatar-slot` --- ### 📝 Commits (4) - [`5b4f850`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5b4f850b3e35c28fa6cd53a61a904e4162315b28) fix(client): show saved portrait crops in the schedule manager - [`7809754`](https://github.com/Pasta-Devs/Marinara-Engine/commit/78097542c23a59d1885ca002d7bc1e0db89ceb7d) docs(changelog): link the schedule portrait fix to #7100 - [`e3620ff`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e3620ff0974622957400164e713ec391e9763957) test(schedules): assert where both crop formats place the portrait (#7100) - [`82e5d57`](https://github.com/Pasta-Devs/Marinara-Engine/commit/82e5d5795d594e9f18dfd50e04258517f8405e97) Merge remote-tracking branch 'origin/staging' into fix/schedule-avatar-slot ### 📊 Changes **3 files changed** (+185 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -0) ➕ `e2e/schedule-manager-portraits.e2e.ts` (+170 -0) 📝 `packages/client/src/components/chat/CharacterScheduleManagerModal.tsx` (+13 -8) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #7100 ## Why this change - The Character Schedule Manager showed every character's portrait uncropped, even when a crop was saved. It read the crop from a top-level `avatarCrop` field that character rows never carry (the crop is stored in `extensions.avatarCrop`). The schedule editor it opens wasn't given the crop either. - The list portrait also had no clipping slot: the `<img>` sat directly in the row. A saved crop is placed with `position: absolute` and percentage sizes, so once the crop is read, the portrait sizes against a larger ancestor. It then grows to the width of the screen (about 1424px on desktop) and covers the window. This is the same class of bug as #7093. Both parts have to be fixed together. ## What changed - `CharacterScheduleManagerModal.tsx`: read the crop with `normalizeAvatarCrop(extensions.avatarCrop)`. Put the list portrait in the same sized `relative overflow-hidden` round slot used across the app (as in `CroppedAvatarImage`). Pass the crop to the schedule editor. - `e2e/schedule-manager-portraits.e2e.ts`: seeds characters with a large portrait and saved current-format and legacy crops. It asserts that each crop is used in the list and in the editor, that each list portrait stays inside its clipping slot, that the window's controls are the topmost element at their centre and clickable, and that nothing scrolls sideways. - `CHANGELOG.md`: one user-facing entry. - A sweep of every other `getAvatarCropStyle(...)` call in the client (about 50, plus 11 that pass a crop style through a variable) found no other portrait missing its slot. ## 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` Agent-run validation (not a substitute for the boxes above): - `pnpm check`: exit 0. - New e2e fails against the staging component on desktop-chromium, mobile-chromium and mobile-webkit (portrait not in a clipping slot), and passes with the fix on all three. - With only the slot added, the e2e fails because the crop is not used. With the crop read but no slot, the portrait grows to 1424px on desktop and 780px on phones and covers the window. Without the editor prop, the editor crop check fails. - `e2e/schedule-generation.e2e.ts` and the new e2e: 12 of 12 pass across the three projects. - Local CodeRabbit review: 0 findings. ### Manual verification notes - [ ] Manually verify in a browser that a character with a saved crop shows the cropped face in the Character Schedule Manager list, in dark and light mode. - [ ] Manually verify that clicking **Edit** for that character shows the same crop in the schedule editor. - [ ] Manually verify on a phone-width viewport that the window's search, **Select visible**, **Generate schedules**, **Remove schedules**, **Renew weekly** and **Edit** controls stay clickable and nothing scrolls sideways. - [ ] Manually verify that a character with an older zoom-style crop, and a character with no portrait, still look right in the list. ## 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]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) CHANGELOG entry added under `[Unreleased]`. No doc describes these portraits, so no other doc changes. ## UI evidence (if applicable) Before: uncropped portrait. Crop read without the slot: the portrait covers the window. After: cropped portrait inside its round slot. Attach the e2e screenshots from a manual run. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Character portraits now display their saved crops in the Character Schedule Manager and schedule editor, while remaining contained in the manager’s round slots. <!-- 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:20:10 +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#7474
No description provided.