[PR #7096] [MERGED] fix(chat): keep Play as a character portraits inside the persona pickers (#7093) #7472

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

📋 Pull Request Information

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

Base: staging ← Head: fix/play-as-character-folder-7093


📝 Commits (2)

  • 8fb214f fix(chat): keep Play as a character portraits inside the persona pickers (#7093)
  • bf0cf26 Merge remote-tracking branch 'origin/staging' into fix/play-as-character-folder-7093

📊 Changes

4 files changed (+230 additions, -8 deletions)

View changed files

📝 CHANGELOG.md (+2 -0)
➕ e2e/play-as-character-folder.e2e.ts (+220 -0)
📝 packages/client/src/components/chat/ChatSettingsDrawer.tsx (+5 -5)
📝 packages/client/src/components/chat/ChatSetupWizard.tsx (+3 -3)

📄 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 #7093

Why this change

  • With Settings → Advanced → Show characters in Persona pickers on, opening Play as a character and then a folder made a character's portrait fill the whole persona picker, in new chat setup and in Chat Settings, so nothing else could be seen or clicked (reported on 2.4.6, Chrome on Windows).
  • Cause: getAvatarCropStyle() places saved avatar crops with absolute positioning and percentage sizes, so the image needs a relative overflow-hidden slot. The setup wizard's PersonaPicker put the <img> straight in the row button, and Chat Settings wrapped it in an overflow-hidden div that wasn't positioned. The image was sized against the setup dialog or the Chat Settings window instead of its 28px slot. Only characters with a saved crop triggered it.

What changed

  • ChatSetupWizard.tsx: the Play-as-character row uses the file's existing CroppedAvatarImage slot. This covers every place PersonaPicker appears: Roleplay setup, Conversation setup and Use a Profile.
  • ChatSettingsDrawer.tsx: relative on the Play-as-character row avatar and the chosen-character avatar, matching the drawer's other character avatars.
  • ChatSettingsDrawer.tsx: w-full on the persona picker's None, persona and character rows, matching the drawer's other pickers. Long names now truncate instead of making the list scroll sideways on phones.
  • New e2e/play-as-character-folder.e2e.ts covering both pickers. CHANGELOG entry.

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 (for reference, not a substitute for the boxes above):

  • e2e/play-as-character-folder.e2e.ts on desktop-chromium, mobile-chromium and mobile-webkit: 6/6 fail on unmodified staging (portrait 1084px and 1152px wide on desktop, 725–748px on a 390px phone); 6/6 pass with this change.
  • pnpm check passes.
  • Regressions character-identity, open-issues, issue-sweep-chat and chat-persona-macros pass.
  • Local CodeRabbit review: 0 findings.

Manual verification notes

  • Manually verify in a browser: with Show characters in Persona pickers on, start a new Roleplay chat, go to Persona & Characters, click Play as a character and open a folder containing a character with a cropped avatar. Portraits are small circles; search, rows and Next stay clickable.
  • Manually verify the same in a new Conversation chat's Persona & Characters step and on the Use a Profile page.
  • Manually verify in an existing chat: Chat Settings, Persona, Choose Persona, Play as a character, then a folder. Pick the character and check that the chosen-character row shows a small round portrait.
  • Manually verify on a phone that a character with a long name shows "…" and the persona list does not scroll sideways.
  • Manually verify characters with old zoom-style crops, no avatar, and a broken avatar link.
  • Manually verify light and dark mode, and the Default, Dottore and Mari chat widget styles.
  • Manually verify keyboard use: Tab through the picker rows; Enter and Space still select.

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)

Note: no doc describes this picker; only CHANGELOG.md changed.

UI evidence (if applicable)

Attach before/after screenshots from a manual run. The e2e saves setup-folder-open.png and settings-folder-open.png in its test output.

Follow-up (not in this PR): CharacterScheduleManagerModal.tsx puts a cropped avatar straight into a row with no slot. It's the same kind of bug and should get its own issue.


🔄 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/7096 **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/play-as-character-folder-7093` --- ### 📝 Commits (2) - [`8fb214f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8fb214f5dac319899a0e5f9808dadc9b0dfbc7c6) fix(chat): keep Play as a character portraits inside the persona pickers (#7093) - [`bf0cf26`](https://github.com/Pasta-Devs/Marinara-Engine/commit/bf0cf26a0e6fd858c910c112fdc33247105d98bd) Merge remote-tracking branch 'origin/staging' into fix/play-as-character-folder-7093 ### 📊 Changes **4 files changed** (+230 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -0) ➕ `e2e/play-as-character-folder.e2e.ts` (+220 -0) 📝 `packages/client/src/components/chat/ChatSettingsDrawer.tsx` (+5 -5) 📝 `packages/client/src/components/chat/ChatSetupWizard.tsx` (+3 -3) </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 #7093 ## Why this change - With **Settings → Advanced → Show characters in Persona pickers** on, opening **Play as a character** and then a folder made a character's portrait fill the whole persona picker, in new chat setup and in Chat Settings, so nothing else could be seen or clicked (reported on 2.4.6, Chrome on Windows). - Cause: `getAvatarCropStyle()` places saved avatar crops with absolute positioning and percentage sizes, so the image needs a `relative overflow-hidden` slot. The setup wizard's `PersonaPicker` put the `<img>` straight in the row button, and Chat Settings wrapped it in an `overflow-hidden` div that wasn't positioned. The image was sized against the setup dialog or the Chat Settings window instead of its 28px slot. Only characters with a saved crop triggered it. ## What changed - `ChatSetupWizard.tsx`: the Play-as-character row uses the file's existing `CroppedAvatarImage` slot. This covers every place `PersonaPicker` appears: Roleplay setup, Conversation setup and Use a Profile. - `ChatSettingsDrawer.tsx`: `relative` on the Play-as-character row avatar and the chosen-character avatar, matching the drawer's other character avatars. - `ChatSettingsDrawer.tsx`: `w-full` on the persona picker's None, persona and character rows, matching the drawer's other pickers. Long names now truncate instead of making the list scroll sideways on phones. - New `e2e/play-as-character-folder.e2e.ts` covering both pickers. CHANGELOG entry. ## 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 (for reference, not a substitute for the boxes above): - `e2e/play-as-character-folder.e2e.ts` on desktop-chromium, mobile-chromium and mobile-webkit: 6/6 fail on unmodified staging (portrait 1084px and 1152px wide on desktop, 725–748px on a 390px phone); 6/6 pass with this change. - `pnpm check` passes. - Regressions `character-identity`, `open-issues`, `issue-sweep-chat` and `chat-persona-macros` pass. - Local CodeRabbit review: 0 findings. ### Manual verification notes - [ ] Manually verify in a browser: with Show characters in Persona pickers on, start a new Roleplay chat, go to Persona & Characters, click Play as a character and open a folder containing a character with a cropped avatar. Portraits are small circles; search, rows and Next stay clickable. - [ ] Manually verify the same in a new Conversation chat's Persona & Characters step and on the Use a Profile page. - [ ] Manually verify in an existing chat: Chat Settings, Persona, Choose Persona, Play as a character, then a folder. Pick the character and check that the chosen-character row shows a small round portrait. - [ ] Manually verify on a phone that a character with a long name shows "…" and the persona list does not scroll sideways. - [ ] Manually verify characters with old zoom-style crops, no avatar, and a broken avatar link. - [ ] Manually verify light and dark mode, and the Default, Dottore and Mari chat widget styles. - [ ] Manually verify keyboard use: Tab through the picker rows; Enter and Space still select. ## 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) Note: no doc describes this picker; only `CHANGELOG.md` changed. ## UI evidence (if applicable) Attach before/after screenshots from a manual run. The e2e saves `setup-folder-open.png` and `settings-folder-open.png` in its test output. Follow-up (not in this PR): `CharacterScheduleManagerModal.tsx` puts a cropped avatar straight into a row with no slot. It's the same kind of bug and should get its own issue. --- <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:08 +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#7472
No description provided.