[PR #1064] [MERGED] Add character avatar removal #4909

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

📋 Pull Request Information

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

Base: staging ← Head: feature/issue-994-avatar-remove


📝 Commits (1)

  • 18129ba Add character avatar removal

📊 Changes

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

View changed files

📝 packages/client/src/components/characters/CharacterEditor.tsx (+39 -0)
📝 packages/client/src/components/ui/AvatarCropWidget.tsx (+15 -2)
📝 packages/client/src/hooks/use-characters.ts (+11 -0)
📝 packages/server/src/routes/characters.routes.ts (+9 -0)
📝 packages/server/src/services/storage/characters.storage.ts (+2 -2)

📄 Description

Linked issue

Closes #994

Why this change

  • Users can upload and crop character avatars, but there was no obvious way to remove an avatar from an existing character card, especially after importing cards with unwanted placeholder avatars.

What changed

  • Added a Remove action beside the avatar crop controls.
  • Added a character avatar removal mutation on the client.
  • Added DELETE /api/characters/:id/avatar on the server.
  • Updated character avatar storage so the avatar path can be cleared to null and recorded in version history as “Avatar removed.”

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

  • Codex ran pnpm check successfully in a clean upstream/staging worktree.
  • Codex ran scratch/issue-994-avatar-remove-repro.mjs against the real local app. The script created a character, uploaded an avatar, opened the character editor, verified Full image, Reset, and Remove appeared in the avatar crop controls, clicked Remove, confirmed the dialog, and verified the character API returned avatarPath: null.
  • Bunny review passed on the current diff before PR creation.

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)

The avatar removal flow was verified with an automated browser proof against the real app. No GitHub-renderable screenshot is attached yet.


🔄 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/1064 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/21/2026 **Status:** ✅ Merged **Merged:** 5/21/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `staging` ← **Head:** `feature/issue-994-avatar-remove` --- ### 📝 Commits (1) - [`18129ba`](https://github.com/Pasta-Devs/Marinara-Engine/commit/18129bac915513e3cc25d51df40cd7b3de224faa) Add character avatar removal ### 📊 Changes **5 files changed** (+76 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/characters/CharacterEditor.tsx` (+39 -0) 📝 `packages/client/src/components/ui/AvatarCropWidget.tsx` (+15 -2) 📝 `packages/client/src/hooks/use-characters.ts` (+11 -0) 📝 `packages/server/src/routes/characters.routes.ts` (+9 -0) 📝 `packages/server/src/services/storage/characters.storage.ts` (+2 -2) </details> ### 📄 Description ## Linked issue Closes #994 ## Why this change - Users can upload and crop character avatars, but there was no obvious way to remove an avatar from an existing character card, especially after importing cards with unwanted placeholder avatars. ## What changed - Added a Remove action beside the avatar crop controls. - Added a character avatar removal mutation on the client. - Added `DELETE /api/characters/:id/avatar` on the server. - Updated character avatar storage so the avatar path can be cleared to `null` and recorded in version history as “Avatar removed.” ## 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 - Codex ran `pnpm check` successfully in a clean `upstream/staging` worktree. - Codex ran `scratch/issue-994-avatar-remove-repro.mjs` against the real local app. The script created a character, uploaded an avatar, opened the character editor, verified `Full image`, `Reset`, and `Remove` appeared in the avatar crop controls, clicked `Remove`, confirmed the dialog, and verified the character API returned `avatarPath: null`. - Bunny review passed on the current diff before PR creation. ## Docs and release impact - [x] 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) The avatar removal flow was verified with an automated browser proof against the real app. No GitHub-renderable screenshot is attached yet. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:11:38 +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#4909
No description provided.