[PR #3942] [MERGED] fix: contain cropped avatar upload targets #6169

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3942
Author: @SpicyMarinara
Created: 7/22/2026
Status: ✅ Merged
Merged: 7/22/2026
Merged by: @SpicyMarinara

Base: staging ← Head: agent/fix-portrait-crop-overlay


📝 Commits (1)

  • 810d714 fix: harden cropped avatar upload targets

📊 Changes

5 files changed (+20 additions, -4 deletions)

View changed files

📝 CHANGELOG.md (+1 -1)
📝 packages/client/src/components/characters/CharacterEditor.tsx (+2 -2)
📝 packages/client/src/components/personas/PersonaEditor.tsx (+1 -1)
📝 packages/client/src/styles/globals.css (+1 -0)
📝 scripts/regressions/open-issues.regression.ts (+15 -0)

📄 Description

Why

In v2.3.3, changing a current-format avatar crop could let an absolutely positioned preview image escape its upload thumbnail. The escaped image covered the editor and clicks bubbled to the upload target, repeatedly opening the file picker. Staging already contains the original Metadata containment fix from #3741; this follow-up hardens every editor upload thumbnail involved in the report.

Fixes #3939.

What changed

  • enforce the shared Character and Persona header avatar tile as a positioning context
  • prevent cropped image layers inside upload targets from receiving pointer events
  • extend the open-issue regression guard for containment and click interception
  • update the Unreleased changelog entry to include #3939

Impact

Character and Persona crop previews remain visually contained, while normal editor clicks cannot be redirected into the avatar file picker by an escaped image layer.

Checks

  • pnpm check
  • pnpm regression:issues
  • pnpm smoke:ui (82 passed, 52 viewport-specific skips)
  • git diff --check

Manual verification

  • Manually open a Character with an existing crop and drag or resize the crop on desktop
  • Manually click elsewhere in the editor after changing the crop and confirm no file picker opens
  • Manually repeat the crop interaction at a mobile viewport
  • Manually spot-check the Persona header avatar upload target

Summary by CodeRabbit

  • Bug Fixes

    • Fixed Character and Persona avatar previews so they remain contained within editor upload areas.
    • Prevented avatar images from intercepting clicks intended for upload controls or surrounding page elements.
  • Tests

    • Added regression coverage to verify avatar containment, positioning, and click behavior.

🔄 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/3942 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/22/2026 **Status:** ✅ Merged **Merged:** 7/22/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `agent/fix-portrait-crop-overlay` --- ### 📝 Commits (1) - [`810d714`](https://github.com/Pasta-Devs/Marinara-Engine/commit/810d7147683619c799a2be28fcf7b4b57f6d4e8b) fix: harden cropped avatar upload targets ### 📊 Changes **5 files changed** (+20 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -1) 📝 `packages/client/src/components/characters/CharacterEditor.tsx` (+2 -2) 📝 `packages/client/src/components/personas/PersonaEditor.tsx` (+1 -1) 📝 `packages/client/src/styles/globals.css` (+1 -0) 📝 `scripts/regressions/open-issues.regression.ts` (+15 -0) </details> ### 📄 Description ## Why In v2.3.3, changing a current-format avatar crop could let an absolutely positioned preview image escape its upload thumbnail. The escaped image covered the editor and clicks bubbled to the upload target, repeatedly opening the file picker. Staging already contains the original Metadata containment fix from #3741; this follow-up hardens every editor upload thumbnail involved in the report. Fixes #3939. ## What changed - enforce the shared Character and Persona header avatar tile as a positioning context - prevent cropped image layers inside upload targets from receiving pointer events - extend the open-issue regression guard for containment and click interception - update the Unreleased changelog entry to include #3939 ## Impact Character and Persona crop previews remain visually contained, while normal editor clicks cannot be redirected into the avatar file picker by an escaped image layer. ## Checks - pnpm check - pnpm regression:issues - pnpm smoke:ui (82 passed, 52 viewport-specific skips) - git diff --check ## Manual verification - [ ] Manually open a Character with an existing crop and drag or resize the crop on desktop - [ ] Manually click elsewhere in the editor after changing the crop and confirm no file picker opens - [ ] Manually repeat the crop interaction at a mobile viewport - [ ] Manually spot-check the Persona header avatar upload target <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Fixed Character and Persona avatar previews so they remain contained within editor upload areas. * Prevented avatar images from intercepting clicks intended for upload controls or surrounding page elements. * **Tests** * Added regression coverage to verify avatar containment, positioning, and click behavior. <!-- 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:07:45 +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#6169
No description provided.