[PR #1776] [MERGED] Fix persona stats import and organize persona components #5277

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1776
Author: @Xelvanis
Created: 6/1/2026
Status: ✅ Merged
Merged: 6/1/2026
Merged by: @Xelvanis

Base: refactor ← Head: fix/persona-stats-json-import


📝 Commits (1)

  • 35bb85c Fix persona stats import and organize persona components

📊 Changes

19 files changed (+78 additions, -72 deletions)

View changed files

📝 src/features/catalog/personas/components/editor/PersonaColorsTab.tsx (+4 -4)
📝 src/features/catalog/personas/components/editor/PersonaDescriptionTab.tsx (+5 -5)
📝 src/features/catalog/personas/components/editor/PersonaEditor.tsx (+12 -12)
📝 src/features/catalog/personas/components/editor/PersonaEditorSectionHeader.tsx (+0 -0)
📝 src/features/catalog/personas/components/editor/PersonaStatsTab.tsx (+1 -1)
📝 src/features/catalog/personas/components/modals/CreatePersonaModal.tsx (+3 -3)
📝 src/features/catalog/personas/components/modals/ImportPersonaModal.tsx (+11 -5)
📝 src/features/catalog/personas/components/modals/PersonaMakerModal.tsx (+7 -7)
📝 src/features/catalog/personas/components/panel/PersonaGroupsSection.tsx (+3 -3)
📝 src/features/catalog/personas/components/panel/PersonaListItem.tsx (+2 -2)
📝 src/features/catalog/personas/components/panel/PersonasFilterBar.tsx (+3 -3)
📝 src/features/catalog/personas/components/panel/PersonasPanel.tsx (+7 -7)
📝 src/features/catalog/personas/components/panel/PersonasSelectionToolbar.tsx (+0 -0)
📝 src/features/catalog/personas/components/sprites/PersonaSpriteDeleteDialog.tsx (+3 -3)
📝 src/features/catalog/personas/components/sprites/PersonaSpriteEditors.tsx (+3 -3)
📝 src/features/catalog/personas/components/sprites/PersonaSpriteGrid.tsx (+2 -2)
📝 src/features/catalog/personas/components/sprites/PersonaSpriteUploadPanel.tsx (+1 -1)
📝 src/features/catalog/personas/components/sprites/PersonaSpritesTab.tsx (+6 -6)
📝 src/features/catalog/personas/shell.ts (+5 -5)

📄 Description

Linked issue

N/A

Why this change

  • Compatible JSON persona imports could drop object-shaped personaStats before the storage normalizer saw the value.
  • The persona components folder had grown flat enough that related editor, sprite, panel, and modal files were harder to scan.

What changed

  • Preserved object-shaped personaStats during compatible persona JSON import while keeping legacy string stats supported.
  • Kept invalid array/non-object personaStats on the existing empty fallback path.
  • Grouped persona components into editor, sprites, panel, and modals subfolders and updated shell exports/imports.

Refactor impact

Primary owner:

Catalog personas UI

Impact areas reviewed:

  • Compatible persona JSON import path
  • Persona component shell exports
  • Persona editor, sprite, panel, and modal relative imports

Boundary notes:

  • Feature-only change under src/features/catalog/personas.
  • No engine, shared API, Rust, storage normalizer, or remote runtime behavior changed.

Pressure points touched:

  • Import modal touched for compatibility fix.
  • No ModeSurface, GameSurface, shared mode UI, or Tauri command registration changes.

Validation

  • Matching validation command passes locally (for example pnpm typecheck, pnpm build, pnpm check:architecture, pnpm check:docs, or full pnpm check when warranted)
  • pnpm check passes locally before PR push/handoff, including the unused-code check
  • 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
  • Browser screenshot/recording evidence added when UI/browser state is the claim
  • Remote runtime smoke checked when relevant

Manual verification notes

  • Ran pnpm check locally after rebasing onto latest origin/refactor; it passed.
  • Ran a helper proof for personaStats conversion: object and string values preserve importable JSON, while array and missing values return the existing empty fallback.
  • Native app manual import QA not run.

Feature Discoverability

Check exactly one:

  • Updated src/features/shell/discovery/ because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool.
  • N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find.

Reason:

  • Compatibility fix and component organization only; no new discoverable feature.

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 changes needed; behavior is a narrow import compatibility fix plus internal folder organization.

UI evidence

N/A. No visible UI layout change intended.


🔄 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/1776 **Author:** [@Xelvanis](https://github.com/Xelvanis) **Created:** 6/1/2026 **Status:** ✅ Merged **Merged:** 6/1/2026 **Merged by:** [@Xelvanis](https://github.com/Xelvanis) **Base:** `refactor` ← **Head:** `fix/persona-stats-json-import` --- ### 📝 Commits (1) - [`35bb85c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/35bb85c6100f83bda5a8a4e369de4dc72b47a862) Fix persona stats import and organize persona components ### 📊 Changes **19 files changed** (+78 additions, -72 deletions) <details> <summary>View changed files</summary> 📝 `src/features/catalog/personas/components/editor/PersonaColorsTab.tsx` (+4 -4) 📝 `src/features/catalog/personas/components/editor/PersonaDescriptionTab.tsx` (+5 -5) 📝 `src/features/catalog/personas/components/editor/PersonaEditor.tsx` (+12 -12) 📝 `src/features/catalog/personas/components/editor/PersonaEditorSectionHeader.tsx` (+0 -0) 📝 `src/features/catalog/personas/components/editor/PersonaStatsTab.tsx` (+1 -1) 📝 `src/features/catalog/personas/components/modals/CreatePersonaModal.tsx` (+3 -3) 📝 `src/features/catalog/personas/components/modals/ImportPersonaModal.tsx` (+11 -5) 📝 `src/features/catalog/personas/components/modals/PersonaMakerModal.tsx` (+7 -7) 📝 `src/features/catalog/personas/components/panel/PersonaGroupsSection.tsx` (+3 -3) 📝 `src/features/catalog/personas/components/panel/PersonaListItem.tsx` (+2 -2) 📝 `src/features/catalog/personas/components/panel/PersonasFilterBar.tsx` (+3 -3) 📝 `src/features/catalog/personas/components/panel/PersonasPanel.tsx` (+7 -7) 📝 `src/features/catalog/personas/components/panel/PersonasSelectionToolbar.tsx` (+0 -0) 📝 `src/features/catalog/personas/components/sprites/PersonaSpriteDeleteDialog.tsx` (+3 -3) 📝 `src/features/catalog/personas/components/sprites/PersonaSpriteEditors.tsx` (+3 -3) 📝 `src/features/catalog/personas/components/sprites/PersonaSpriteGrid.tsx` (+2 -2) 📝 `src/features/catalog/personas/components/sprites/PersonaSpriteUploadPanel.tsx` (+1 -1) 📝 `src/features/catalog/personas/components/sprites/PersonaSpritesTab.tsx` (+6 -6) 📝 `src/features/catalog/personas/shell.ts` (+5 -5) </details> ### 📄 Description <!-- Target branch: `refactor`. Change the base to `refactor` before submitting unless a maintainer explicitly asked for another base. --> <!-- Keep all checkboxes unchecked until a human has actually verified them. --> ## Linked issue N/A ## Why this change - Compatible JSON persona imports could drop object-shaped `personaStats` before the storage normalizer saw the value. - The persona components folder had grown flat enough that related editor, sprite, panel, and modal files were harder to scan. ## What changed - Preserved object-shaped `personaStats` during compatible persona JSON import while keeping legacy string stats supported. - Kept invalid array/non-object `personaStats` on the existing empty fallback path. - Grouped persona components into `editor`, `sprites`, `panel`, and `modals` subfolders and updated shell exports/imports. ## Refactor impact Primary owner: Catalog personas UI Impact areas reviewed: - Compatible persona JSON import path - Persona component shell exports - Persona editor, sprite, panel, and modal relative imports Boundary notes: - Feature-only change under `src/features/catalog/personas`. - No engine, shared API, Rust, storage normalizer, or remote runtime behavior changed. Pressure points touched: - Import modal touched for compatibility fix. - No ModeSurface, GameSurface, shared mode UI, or Tauri command registration changes. ## Validation <!-- Check only what you personally ran or manually verified. Treat unchecked items as explicit TODOs. --> <!-- Do not submit *.test.ts or *.test.tsx files as PR proof; cite existing checks, command output, app/browser/Tauri verification, or manual notes instead. --> - [x] Matching validation command passes locally (for example `pnpm typecheck`, `pnpm build`, `pnpm check:architecture`, `pnpm check:docs`, or full `pnpm check` when warranted) - [x] `pnpm check` passes locally before PR push/handoff, including the unused-code check - [x] `pnpm typecheck` passes locally - [x] `pnpm build` passes locally - [x] `pnpm check:architecture` passes locally - [x] `pnpm check:docs` passes locally - [x] `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 - [ ] Browser screenshot/recording evidence added when UI/browser state is the claim - [ ] Remote runtime smoke checked when relevant ### Manual verification notes - Ran `pnpm check` locally after rebasing onto latest `origin/refactor`; it passed. - Ran a helper proof for `personaStats` conversion: object and string values preserve importable JSON, while array and missing values return the existing empty fallback. - Native app manual import QA not run. ## Feature Discoverability Check exactly one: - [ ] Updated `src/features/shell/discovery/` because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool. - [x] N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find. Reason: - Compatibility fix and component organization only; no new discoverable feature. ## 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 changes needed; behavior is a narrow import compatibility fix plus internal folder organization. ## UI evidence N/A. No visible UI layout change intended. --- <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:51 +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#5277
No description provided.