[PR #5576] [MERGED] feat: allow renaming character sprites #6832

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/5576
Author: @Gunterlie
Created: 8/27/2026
Status: ✅ Merged
Merged: 8/27/2026
Merged by: @Gunterlie

Base: staging ← Head: the-emotion-formerly-known-as


📝 Commits (4)

  • e7452d8 feat: allow renaming character sprites
  • e20dd07 fix: reject duplicate sprite names across extensions
  • cd5900f fix: rate limit sprite renames
  • 80615f9 fix: serialize sprite rename operations

📊 Changes

6 files changed (+155 additions, -4 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 packages/client/src/components/characters/CharacterEditor.tsx (+44 -3)
📝 packages/client/src/hooks/use-characters.ts (+21 -0)
📝 packages/client/src/localization/locales/en.json (+5 -0)
📝 packages/server/src/middleware/rate-limit.ts (+5 -0)
📝 packages/server/src/routes/sprites.routes.ts (+79 -1)

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

Why this change

Character card users currently must delete and re-upload a sprite to correct its emotion name. This change lets them rename the saved image in place.

What changed

  • Added a validated sprite rename API that preserves the image and extension.
  • Added a rename action to the Character Editor sprite grid.
  • Added duplicate-name handling and localized English UI copy.

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

  • Automated validation completed with pnpm check, including TypeScript, ESLint, localization checks, formatting, and client/server production builds.
  • Manual browser verification remains for the maintainer.

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)

UI evidence (if applicable)

  • Character Editor sprite-grid rename control is included in the changed files.

Proof

  • pnpm check passed locally.
  • git diff --check passed.
  • No manual browser or container verification was claimed.

Summary by CodeRabbit

  • New Features
    • Character card sprites can now be renamed after upload without replacing the image.
    • Added a rename action with prompts, validation, and success or error feedback.
    • Sprite file extensions are preserved when names change.
    • Duplicate sprite names are prevented, and updated sprites appear immediately.
  • Documentation
    • Added an Unreleased changelog entry describing sprite renaming support.

🔄 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/5576 **Author:** [@Gunterlie](https://github.com/Gunterlie) **Created:** 8/27/2026 **Status:** ✅ Merged **Merged:** 8/27/2026 **Merged by:** [@Gunterlie](https://github.com/Gunterlie) **Base:** `staging` ← **Head:** `the-emotion-formerly-known-as` --- ### 📝 Commits (4) - [`e7452d8`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e7452d8e392f174c50899becf4ba18f08b10cdd3) feat: allow renaming character sprites - [`e20dd07`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e20dd07dce7a60ad8c610a461d373f546396f800) fix: reject duplicate sprite names across extensions - [`cd5900f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/cd5900f2af932083bea1dee8736e64a5eb098680) fix: rate limit sprite renames - [`80615f9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/80615f967c22b92d7abba305f67ec6bcdbbdaf8d) fix: serialize sprite rename operations ### 📊 Changes **6 files changed** (+155 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `packages/client/src/components/characters/CharacterEditor.tsx` (+44 -3) 📝 `packages/client/src/hooks/use-characters.ts` (+21 -0) 📝 `packages/client/src/localization/locales/en.json` (+5 -0) 📝 `packages/server/src/middleware/rate-limit.ts` (+5 -0) 📝 `packages/server/src/routes/sprites.routes.ts` (+79 -1) </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`. <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue Closes #5575 ## Why this change Character card users currently must delete and re-upload a sprite to correct its emotion name. This change lets them rename the saved image in place. ## What changed - Added a validated sprite rename API that preserves the image and extension. - Added a rename action to the Character Editor sprite grid. - Added duplicate-name handling and localized English UI copy. ## 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 - Automated validation completed with `pnpm check`, including TypeScript, ESLint, localization checks, formatting, and client/server production builds. - Manual browser verification remains for the maintainer. ## 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) ## UI evidence (if applicable) - Character Editor sprite-grid rename control is included in the changed files. ## Proof - `pnpm check` passed locally. - `git diff --check` passed. - No manual browser or container verification was claimed. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Character card sprites can now be renamed after upload without replacing the image. - Added a rename action with prompts, validation, and success or error feedback. - Sprite file extensions are preserved when names change. - Duplicate sprite names are prevented, and updated sprites appear immediately. - **Documentation** - Added an Unreleased changelog entry describing sprite renaming support. <!-- 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:14:07 +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#6832
No description provided.