[PR #1210] [MERGED] Migrate storage JSON fields to typed values #4984

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1210
Author: @ghost
Created: 5/25/2026
Status: ✅ Merged
Merged: 5/25/2026
Merged by: @undefined

Base: refactor ← Head: storage-raw-json-migration


📝 Commits (3)

  • 2deeeff Migrate storage JSON fields to typed values
  • 5e7c26b Keep Marinara import module within structure limit
  • 55639d2 Allow nullable connection JSON fields

📊 Changes

43 files changed (+561 additions, -505 deletions)

View changed files

📝 src-tauri/src/commands/storage/commands/entities.rs (+1 -1)
📝 src-tauri/src/commands/storage/exports.rs (+3 -7)
📝 src-tauri/src/commands/storage/imports/bulk_imports.rs (+1 -1)
📝 src-tauri/src/commands/storage/imports/marinara.rs (+12 -14)
📝 src-tauri/src/commands/storage/imports/service.rs (+5 -11)
📝 src-tauri/src/commands/storage/imports/st_preset.rs (+1 -1)
📝 src-tauri/src/commands/storage/profile.rs (+28 -1)
📝 src-tauri/src/commands/storage/profile/legacy.rs (+37 -1)
📝 src-tauri/src/commands/storage/shared.rs (+169 -50)
📝 src-tauri/src/http_dispatch.rs (+1 -1)
📝 src-tauri/src/state.rs (+63 -0)
📝 src/app/shell/ChatSidebar.tsx (+12 -19)
📝 src/engine/generation/generate-route-utils.ts (+4 -4)
📝 src/features/catalog/agents/components/AgentEditor.tsx (+1 -1)
📝 src/features/catalog/agents/components/AgentsPanel.tsx (+1 -7)
📝 src/features/catalog/agents/components/RegexScriptEditor.tsx (+6 -2)
📝 src/features/catalog/agents/components/ToolEditor.tsx (+14 -19)
📝 src/features/catalog/agents/hooks/use-custom-tools.ts (+1 -1)
📝 src/features/catalog/agents/hooks/use-regex-scripts.ts (+2 -2)
📝 src/features/catalog/agents/regex-application.ts (+3 -8)

...and 23 more files

📄 Description

Summary

  • migrate file-backed storage JSON-string fields to typed JSON values across characters, personas, prompts, chats/messages, groups, lorebooks, agents/tools/regex scripts, connections, and game snapshots/checkpoints
  • normalize typed JSON fields on storage create/update plus startup/profile/legacy import migration
  • update primary frontend access points to consume typed storage values without JSON-string conversion

Verification

  • cargo check --manifest-path src-tauri/Cargo.toml
  • pnpm typecheck
  • pnpm check:architecture

Notes

  • JSON.stringify/JSON.parse remain where they are true boundaries (imports/exports, localStorage, LLM/prompt payloads, editable JSON text). Storage-backed typed fields are migrated away from stringified JSON.

🔄 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/1210 **Author:** [@ghost](https://github.com/ghost) **Created:** 5/25/2026 **Status:** ✅ Merged **Merged:** 5/25/2026 **Merged by:** [@undefined](undefined) **Base:** `refactor` ← **Head:** `storage-raw-json-migration` --- ### 📝 Commits (3) - [`2deeeff`](https://github.com/Pasta-Devs/Marinara-Engine/commit/2deeefff6b4c73223cb381eecf219ba6b6419ae8) Migrate storage JSON fields to typed values - [`5e7c26b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5e7c26b9bdcdf838dcb4a86e27a9a75e45d4ab30) Keep Marinara import module within structure limit - [`55639d2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/55639d2c288d0f8ed996f32f5b8fdf5ca25c4870) Allow nullable connection JSON fields ### 📊 Changes **43 files changed** (+561 additions, -505 deletions) <details> <summary>View changed files</summary> 📝 `src-tauri/src/commands/storage/commands/entities.rs` (+1 -1) 📝 `src-tauri/src/commands/storage/exports.rs` (+3 -7) 📝 `src-tauri/src/commands/storage/imports/bulk_imports.rs` (+1 -1) 📝 `src-tauri/src/commands/storage/imports/marinara.rs` (+12 -14) 📝 `src-tauri/src/commands/storage/imports/service.rs` (+5 -11) 📝 `src-tauri/src/commands/storage/imports/st_preset.rs` (+1 -1) 📝 `src-tauri/src/commands/storage/profile.rs` (+28 -1) 📝 `src-tauri/src/commands/storage/profile/legacy.rs` (+37 -1) 📝 `src-tauri/src/commands/storage/shared.rs` (+169 -50) 📝 `src-tauri/src/http_dispatch.rs` (+1 -1) 📝 `src-tauri/src/state.rs` (+63 -0) 📝 `src/app/shell/ChatSidebar.tsx` (+12 -19) 📝 `src/engine/generation/generate-route-utils.ts` (+4 -4) 📝 `src/features/catalog/agents/components/AgentEditor.tsx` (+1 -1) 📝 `src/features/catalog/agents/components/AgentsPanel.tsx` (+1 -7) 📝 `src/features/catalog/agents/components/RegexScriptEditor.tsx` (+6 -2) 📝 `src/features/catalog/agents/components/ToolEditor.tsx` (+14 -19) 📝 `src/features/catalog/agents/hooks/use-custom-tools.ts` (+1 -1) 📝 `src/features/catalog/agents/hooks/use-regex-scripts.ts` (+2 -2) 📝 `src/features/catalog/agents/regex-application.ts` (+3 -8) _...and 23 more files_ </details> ### 📄 Description ## Summary - migrate file-backed storage JSON-string fields to typed JSON values across characters, personas, prompts, chats/messages, groups, lorebooks, agents/tools/regex scripts, connections, and game snapshots/checkpoints - normalize typed JSON fields on storage create/update plus startup/profile/legacy import migration - update primary frontend access points to consume typed storage values without JSON-string conversion ## Verification - cargo check --manifest-path src-tauri/Cargo.toml - pnpm typecheck - pnpm check:architecture ## Notes - JSON.stringify/JSON.parse remain where they are true boundaries (imports/exports, localStorage, LLM/prompt payloads, editable JSON text). Storage-backed typed fields are migrated away from stringified JSON. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:12:14 +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#4984
No description provided.