[PR #1714] [MERGED] [codex] Refactor characters catalog modules #5228

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1714
Author: @Xelvanis
Created: 5/31/2026
Status: ✅ Merged
Merged: 5/31/2026
Merged by: @Xelvanis

Base: refactor ← Head: codex/characters-feature-audit


📝 Commits (3)

  • 332e2a2 Refactor characters catalog modules
  • 55f4c2d Address character catalog review feedback
  • 724fb43 Surface partial import cleanup failures

📊 Changes

74 files changed (+8518 additions, -6020 deletions)

View changed files

📝 src-tauri/src/commands/storage.rs (+2 -0)
📝 src-tauri/src/commands/storage/characters.rs (+0 -16)
📝 src-tauri/src/commands/storage/commands/media.rs (+4 -2)
➕ src-tauri/src/commands/storage/personas.rs (+30 -0)
📝 src-tauri/src/http_dispatch.rs (+3 -3)
➕ src/features/catalog/characters/components/CharacterAdvancedTab.tsx (+153 -0)
➕ src/features/catalog/characters/components/CharacterColorsTab.tsx (+155 -0)
➕ src/features/catalog/characters/components/CharacterDescriptionTab.tsx (+183 -0)
➕ src/features/catalog/characters/components/CharacterDialogueTab.tsx (+167 -0)
📝 src/features/catalog/characters/components/CharacterEditor.tsx (+133 -3164)
➕ src/features/catalog/characters/components/CharacterEditorDialogs.tsx (+69 -0)
➕ src/features/catalog/characters/components/CharacterEditorHeader.tsx (+233 -0)
➕ src/features/catalog/characters/components/CharacterEditorSectionHeader.tsx (+8 -0)
➕ src/features/catalog/characters/components/CharacterEditorTabContent.tsx (+132 -0)
➕ src/features/catalog/characters/components/CharacterEditorTabRail.tsx (+66 -0)
➕ src/features/catalog/characters/components/CharacterEditorUnsavedWarning.tsx (+45 -0)
➕ src/features/catalog/characters/components/CharacterFirstMessageDialog.tsx (+58 -0)
➕ src/features/catalog/characters/components/CharacterGalleryTab.tsx (+225 -0)
➕ src/features/catalog/characters/components/CharacterGroupsSection.tsx (+349 -0)
➕ src/features/catalog/characters/components/CharacterImportDropZone.tsx (+69 -0)

...and 54 more files

📄 Description

Linked issue

N/A - no linked issue.

Why this change

  • Prepare the Characters catalog for follow-on refactor work by splitting large mixed files into focused modules under src/features/catalog/characters.

What changed

  • Split Characters panel, editor, import, library, sprite, and maker logic into focused components, hooks, and model helpers.
  • Moved persona storage commands into a focused Rust storage module while preserving the existing command surface.
  • Added focused tests for extracted Characters model/import/library/sprite helpers.
  • Tightened extracted Characters lib exports after unused-export review.

Refactor impact

Primary owner:

  • Catalog Characters (src/features/catalog/characters) with adjacent Rust storage command organization.

Impact areas reviewed:

  • Characters panel filtering, selection, groups, and chat actions.
  • Character editor tabs, dialogs, avatar handling, persona import, stats, sprites, gallery, colors, lorebook, and metadata.
  • Character import classification, import result handling, and update planning.
  • Character library and AI maker model helpers.
  • Rust storage command organization for persona-related commands.

Boundary notes:

  • Character UI and hooks remain in the catalog Characters feature owner.
  • Engine contracts stay React-free.
  • Feature code continues through existing shared API wrappers/hooks; no new raw Tauri or raw remote-runtime fetch sites were added.
  • Rust command routing was kept equivalent while storage command modules were reorganized.

Pressure points touched:

  • Import modules.
  • src-tauri storage command organization.

Validation

  • pnpm check passes locally
  • pnpm typecheck passes locally
  • pnpm build passes locally
  • pnpm check:architecture passes locally
  • pnpm check:docs passes locally
  • cargo check --manifest-path src-tauri/Cargo.toml --workspace passes locally
  • Rust clippy/tests were run for Rust behavior changes
  • Browser or Tauri app manual verification completed
  • Playwright, screenshot, or recording evidence added for UI changes
  • Remote runtime smoke checked when relevant

Manual verification notes

Agent-run validation:

  • pnpm check passed after local checkout line endings were refreshed to match repo LF attributes.
  • pnpm check:frontend passed.
  • pnpm check:architecture passed.
  • pnpm check:rust passed.
  • pnpm check:docs passed.
  • pnpm check:unused passed after tightening private Characters exports.
  • pnpm vitest run src/features/catalog/characters passed, 12 files / 55 tests.
  • git diff --check origin/refactor...HEAD passed.

Native Tauri QA completed locally:

  • Launched pnpm tauri dev --no-watch with a QA config.
  • Verified the native WebView mounted and exercised Characters side panel, side-panel search, Import Character modal, AI Character Maker modal, Character Library, editor metadata, and editor tabs for Description, Dialogue, Sprites, Gallery, Colors, Stats, Advanced, Lorebook, and Metadata.
  • No console or network events appeared during checked flows.

Manual gap:

  • OS file dialogs, real file uploads/imports, and save-mutating flows were not exercised.

Docs and release impact

  • No docs changes needed
  • Updated README.md
  • Updated CONTRIBUTING.md
  • Updated docs/developer/
  • Updated repo skills or AGENTS.md
  • Confirmed this PR does not restore old staging/package-workspace/release claims

No docs or changelog update was made; this is a refactor-only change with no intended user-facing behavior change.

UI evidence

Native Tauri QA was completed locally. No screenshots or recordings are attached to this PR body.

Summary by CodeRabbit

Release Notes

  • New Features

    • Added comprehensive character editor with tabbed interface for editing advanced prompts, colors, dialogue, metadata, stats, lorebooks, and sprites.
    • Introduced character library UI with improved filtering, sorting, favorites, and group management capabilities.
    • Added character import workflow with validation, options panel, and status tracking.
    • Launched RPG stats system for characters with HP and custom attributes support.
    • Added sprite management with upload, editing, cleanup, and restoration features.
  • Improvements

    • Reorganized character data and persona management for better backend modularity.
    • Enhanced character grouping and bulk operations in the catalog panel.

🔄 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/1714 **Author:** [@Xelvanis](https://github.com/Xelvanis) **Created:** 5/31/2026 **Status:** ✅ Merged **Merged:** 5/31/2026 **Merged by:** [@Xelvanis](https://github.com/Xelvanis) **Base:** `refactor` ← **Head:** `codex/characters-feature-audit` --- ### 📝 Commits (3) - [`332e2a2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/332e2a226311ad27ecdc17120a36071a31508126) Refactor characters catalog modules - [`55f4c2d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/55f4c2d803e49766d6daf59959ed88ef2cbdf8d8) Address character catalog review feedback - [`724fb43`](https://github.com/Pasta-Devs/Marinara-Engine/commit/724fb4396c8de026cfaa4a651faf8826910dd178) Surface partial import cleanup failures ### 📊 Changes **74 files changed** (+8518 additions, -6020 deletions) <details> <summary>View changed files</summary> 📝 `src-tauri/src/commands/storage.rs` (+2 -0) 📝 `src-tauri/src/commands/storage/characters.rs` (+0 -16) 📝 `src-tauri/src/commands/storage/commands/media.rs` (+4 -2) ➕ `src-tauri/src/commands/storage/personas.rs` (+30 -0) 📝 `src-tauri/src/http_dispatch.rs` (+3 -3) ➕ `src/features/catalog/characters/components/CharacterAdvancedTab.tsx` (+153 -0) ➕ `src/features/catalog/characters/components/CharacterColorsTab.tsx` (+155 -0) ➕ `src/features/catalog/characters/components/CharacterDescriptionTab.tsx` (+183 -0) ➕ `src/features/catalog/characters/components/CharacterDialogueTab.tsx` (+167 -0) 📝 `src/features/catalog/characters/components/CharacterEditor.tsx` (+133 -3164) ➕ `src/features/catalog/characters/components/CharacterEditorDialogs.tsx` (+69 -0) ➕ `src/features/catalog/characters/components/CharacterEditorHeader.tsx` (+233 -0) ➕ `src/features/catalog/characters/components/CharacterEditorSectionHeader.tsx` (+8 -0) ➕ `src/features/catalog/characters/components/CharacterEditorTabContent.tsx` (+132 -0) ➕ `src/features/catalog/characters/components/CharacterEditorTabRail.tsx` (+66 -0) ➕ `src/features/catalog/characters/components/CharacterEditorUnsavedWarning.tsx` (+45 -0) ➕ `src/features/catalog/characters/components/CharacterFirstMessageDialog.tsx` (+58 -0) ➕ `src/features/catalog/characters/components/CharacterGalleryTab.tsx` (+225 -0) ➕ `src/features/catalog/characters/components/CharacterGroupsSection.tsx` (+349 -0) ➕ `src/features/catalog/characters/components/CharacterImportDropZone.tsx` (+69 -0) _...and 54 more files_ </details> ### 📄 Description ## Linked issue N/A - no linked issue. ## Why this change - Prepare the Characters catalog for follow-on refactor work by splitting large mixed files into focused modules under `src/features/catalog/characters`. ## What changed - Split Characters panel, editor, import, library, sprite, and maker logic into focused components, hooks, and model helpers. - Moved persona storage commands into a focused Rust storage module while preserving the existing command surface. - Added focused tests for extracted Characters model/import/library/sprite helpers. - Tightened extracted Characters lib exports after unused-export review. ## Refactor impact Primary owner: - Catalog Characters (`src/features/catalog/characters`) with adjacent Rust storage command organization. Impact areas reviewed: - Characters panel filtering, selection, groups, and chat actions. - Character editor tabs, dialogs, avatar handling, persona import, stats, sprites, gallery, colors, lorebook, and metadata. - Character import classification, import result handling, and update planning. - Character library and AI maker model helpers. - Rust storage command organization for persona-related commands. Boundary notes: - Character UI and hooks remain in the catalog Characters feature owner. - Engine contracts stay React-free. - Feature code continues through existing shared API wrappers/hooks; no new raw Tauri or raw remote-runtime fetch sites were added. - Rust command routing was kept equivalent while storage command modules were reorganized. Pressure points touched: - Import modules. - `src-tauri` storage command organization. ## Validation - [x] `pnpm check` passes locally - [x] `pnpm typecheck` passes locally - [x] `pnpm build` passes locally - [x] `pnpm check:architecture` passes locally - [x] `pnpm check:docs` passes locally - [ ] `cargo check --manifest-path src-tauri/Cargo.toml --workspace` passes locally - [ ] Rust clippy/tests were run for Rust behavior changes - [x] Browser or Tauri app manual verification completed - [ ] Playwright, screenshot, or recording evidence added for UI changes - [ ] Remote runtime smoke checked when relevant ### Manual verification notes Agent-run validation: - `pnpm check` passed after local checkout line endings were refreshed to match repo LF attributes. - `pnpm check:frontend` passed. - `pnpm check:architecture` passed. - `pnpm check:rust` passed. - `pnpm check:docs` passed. - `pnpm check:unused` passed after tightening private Characters exports. - `pnpm vitest run src/features/catalog/characters` passed, 12 files / 55 tests. - `git diff --check origin/refactor...HEAD` passed. Native Tauri QA completed locally: - Launched `pnpm tauri dev --no-watch` with a QA config. - Verified the native WebView mounted and exercised Characters side panel, side-panel search, Import Character modal, AI Character Maker modal, Character Library, editor metadata, and editor tabs for Description, Dialogue, Sprites, Gallery, Colors, Stats, Advanced, Lorebook, and Metadata. - No console or network events appeared during checked flows. Manual gap: - OS file dialogs, real file uploads/imports, and save-mutating flows were not exercised. ## Docs and release impact - [x] No docs changes needed - [ ] Updated `README.md` - [ ] Updated `CONTRIBUTING.md` - [ ] Updated `docs/developer/` - [ ] Updated repo skills or `AGENTS.md` - [x] Confirmed this PR does not restore old staging/package-workspace/release claims No docs or changelog update was made; this is a refactor-only change with no intended user-facing behavior change. ## UI evidence Native Tauri QA was completed locally. No screenshots or recordings are attached to this PR body. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **New Features** * Added comprehensive character editor with tabbed interface for editing advanced prompts, colors, dialogue, metadata, stats, lorebooks, and sprites. * Introduced character library UI with improved filtering, sorting, favorites, and group management capabilities. * Added character import workflow with validation, options panel, and status tracking. * Launched RPG stats system for characters with HP and custom attributes support. * Added sprite management with upload, editing, cleanup, and restoration features. * **Improvements** * Reorganized character data and persona management for better backend modularity. * Enhanced character grouping and bulk operations in the catalog panel. <!-- 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-22 04:14:25 +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#5228
No description provided.