[PR #1786] [MERGED] Organize lorebook UI components #5283

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

📋 Pull Request Information

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

Base: refactor ← Head: lorebooks-editor-file-split


📝 Commits (3)

  • 6983a06 Organize lorebook UI components
  • a80c018 Address lorebook editor review findings
  • a52a594 Clamp lorebook numeric settings

📊 Changes

31 files changed (+4762 additions, -3850 deletions)

View changed files

➖ src/features/catalog/lorebooks/components/LorebookEditor.tsx (+0 -2362)
➖ src/features/catalog/lorebooks/components/LorebookEntryRow.tsx (+0 -1437)
📝 src/features/catalog/lorebooks/components/dialogs/CreateLorebookModal.tsx (+3 -3)
📝 src/features/catalog/lorebooks/components/dialogs/ImportLorebookModal.tsx (+2 -2)
📝 src/features/catalog/lorebooks/components/dialogs/LorebookKeeperReviewModal.tsx (+4 -4)
📝 src/features/catalog/lorebooks/components/dialogs/LorebookMakerModal.tsx (+10 -10)
➕ src/features/catalog/lorebooks/components/editor/LinkedResourcePicker.tsx (+176 -0)
➕ src/features/catalog/lorebooks/components/editor/LorebookEditor.tsx (+720 -0)
➕ src/features/catalog/lorebooks/components/editor/LorebookEditorHeader.tsx (+63 -0)
➕ src/features/catalog/lorebooks/components/editor/LorebookEditorTabs.tsx (+47 -0)
➕ src/features/catalog/lorebooks/components/editor/LorebookEntriesTab.tsx (+462 -0)
➕ src/features/catalog/lorebooks/components/editor/LorebookEntriesToolbar.tsx (+199 -0)
➕ src/features/catalog/lorebooks/components/editor/LorebookKeywordTestPanel.tsx (+84 -0)
➕ src/features/catalog/lorebooks/components/editor/LorebookOverviewTab.tsx (+489 -0)
➕ src/features/catalog/lorebooks/components/editor/LorebookUnsavedWarning.tsx (+36 -0)
➕ src/features/catalog/lorebooks/components/editor/LorebookVectorizeSection.tsx (+228 -0)
➕ src/features/catalog/lorebooks/components/editor/lorebook-editor-utils.ts (+9 -0)
➕ src/features/catalog/lorebooks/components/editor/use-lorebook-editor-drag-drop.ts (+283 -0)
➕ src/features/catalog/lorebooks/components/editor/use-lorebook-entry-selection.ts (+190 -0)
➕ src/features/catalog/lorebooks/components/editor/use-lorebook-overview-form.ts (+255 -0)

...and 11 more files

📄 Description

Linked issue

N/A

Why this change

  • The lorebooks catalog component folder had become a flat mixed bucket covering dialogs, panel rows, editor shell, entry rows, form primitives, DnD hooks, and review modals.
  • The refactor plan called for splitting stable UI responsibilities after the engine behavior slices landed.

What changed

  • Grouped lorebook components into components/dialogs, components/panel, components/editor, components/entries, and components/shared.
  • Split LorebookEditor responsibilities into focused editor tabs, toolbar/header pieces, DnD, selection, and overview-form hooks.
  • Split LorebookEntryRow drawer/autosave content, row controls, and status helpers into focused entry modules.
  • Updated lorebook shell exports to point at the new component paths.

Refactor impact

Primary owner:

catalog lorebooks UI

Impact areas reviewed:

  • Lorebook public shell exports
  • Lorebooks panel/card rendering helpers
  • Lorebook editor overview and entries tabs
  • Entry row, drawer/autosave, selection, DnD, and form primitive imports

Boundary notes:

  • React feature-only refactor under src/features/catalog/lorebooks.
  • No product behavior moved into or out of src/engine.
  • No shared API, Rust, provider, storage, import/export, or remote-runtime behavior changes.

Pressure points touched:

  • None. No ModeSurface, GameSurface, Tauri command registration, or import modules touched.

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

  • Command validation run locally: pnpm check, pnpm typecheck, pnpm exec eslint src/features/catalog/lorebooks/components src/features/catalog/lorebooks/shell.ts, git diff --check, pnpm check:architecture, and pnpm build.
  • Native Tauri UI QA was not run for the lorebook editor/panel flows.

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:

  • Internal UI component organization only; no new user-discoverable feature or workflow.

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 changes needed; this is an internal lorebooks UI refactor.

UI evidence

No screenshots. Visible behavior is intended unchanged; native Tauri UI QA remains a manual follow-up.

Summary by CodeRabbit

  • New Features

    • Added comprehensive lorebook editor with tabbed interface (Overview and Entries tabs)
    • Introduced keyword testing panel for preview matching
    • Added entry inline controls with drag-and-drop reordering
    • Implemented vectorization management for entries
    • Added linked resource selection for characters and personas
    • Introduced bulk entry operations (copy, move, unvectorize)
  • Refactor

    • Reorganized lorebook components into logical subdirectories (dialogs, editor, panel, entries)

🔄 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/1786 **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:** `lorebooks-editor-file-split` --- ### 📝 Commits (3) - [`6983a06`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6983a069151fa5b973914454080c04ef1188896f) Organize lorebook UI components - [`a80c018`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a80c018f6a1a05e6f0762ae84da3da677725abbf) Address lorebook editor review findings - [`a52a594`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a52a594c6566e7a7f8e2490c0cf2d1f58a1ba1dc) Clamp lorebook numeric settings ### 📊 Changes **31 files changed** (+4762 additions, -3850 deletions) <details> <summary>View changed files</summary> ➖ `src/features/catalog/lorebooks/components/LorebookEditor.tsx` (+0 -2362) ➖ `src/features/catalog/lorebooks/components/LorebookEntryRow.tsx` (+0 -1437) 📝 `src/features/catalog/lorebooks/components/dialogs/CreateLorebookModal.tsx` (+3 -3) 📝 `src/features/catalog/lorebooks/components/dialogs/ImportLorebookModal.tsx` (+2 -2) 📝 `src/features/catalog/lorebooks/components/dialogs/LorebookKeeperReviewModal.tsx` (+4 -4) 📝 `src/features/catalog/lorebooks/components/dialogs/LorebookMakerModal.tsx` (+10 -10) ➕ `src/features/catalog/lorebooks/components/editor/LinkedResourcePicker.tsx` (+176 -0) ➕ `src/features/catalog/lorebooks/components/editor/LorebookEditor.tsx` (+720 -0) ➕ `src/features/catalog/lorebooks/components/editor/LorebookEditorHeader.tsx` (+63 -0) ➕ `src/features/catalog/lorebooks/components/editor/LorebookEditorTabs.tsx` (+47 -0) ➕ `src/features/catalog/lorebooks/components/editor/LorebookEntriesTab.tsx` (+462 -0) ➕ `src/features/catalog/lorebooks/components/editor/LorebookEntriesToolbar.tsx` (+199 -0) ➕ `src/features/catalog/lorebooks/components/editor/LorebookKeywordTestPanel.tsx` (+84 -0) ➕ `src/features/catalog/lorebooks/components/editor/LorebookOverviewTab.tsx` (+489 -0) ➕ `src/features/catalog/lorebooks/components/editor/LorebookUnsavedWarning.tsx` (+36 -0) ➕ `src/features/catalog/lorebooks/components/editor/LorebookVectorizeSection.tsx` (+228 -0) ➕ `src/features/catalog/lorebooks/components/editor/lorebook-editor-utils.ts` (+9 -0) ➕ `src/features/catalog/lorebooks/components/editor/use-lorebook-editor-drag-drop.ts` (+283 -0) ➕ `src/features/catalog/lorebooks/components/editor/use-lorebook-entry-selection.ts` (+190 -0) ➕ `src/features/catalog/lorebooks/components/editor/use-lorebook-overview-form.ts` (+255 -0) _...and 11 more files_ </details> ### 📄 Description ## Linked issue N/A ## Why this change - The lorebooks catalog component folder had become a flat mixed bucket covering dialogs, panel rows, editor shell, entry rows, form primitives, DnD hooks, and review modals. - The refactor plan called for splitting stable UI responsibilities after the engine behavior slices landed. ## What changed - Grouped lorebook components into `components/dialogs`, `components/panel`, `components/editor`, `components/entries`, and `components/shared`. - Split `LorebookEditor` responsibilities into focused editor tabs, toolbar/header pieces, DnD, selection, and overview-form hooks. - Split `LorebookEntryRow` drawer/autosave content, row controls, and status helpers into focused entry modules. - Updated lorebook shell exports to point at the new component paths. ## Refactor impact Primary owner: catalog lorebooks UI Impact areas reviewed: - Lorebook public shell exports - Lorebooks panel/card rendering helpers - Lorebook editor overview and entries tabs - Entry row, drawer/autosave, selection, DnD, and form primitive imports Boundary notes: - React feature-only refactor under `src/features/catalog/lorebooks`. - No product behavior moved into or out of `src/engine`. - No shared API, Rust, provider, storage, import/export, or remote-runtime behavior changes. Pressure points touched: - None. No ModeSurface, GameSurface, Tauri command registration, or import modules touched. ## Validation - [x] 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 - Command validation run locally: `pnpm check`, `pnpm typecheck`, `pnpm exec eslint src/features/catalog/lorebooks/components src/features/catalog/lorebooks/shell.ts`, `git diff --check`, `pnpm check:architecture`, and `pnpm build`. - Native Tauri UI QA was not run for the lorebook editor/panel flows. ## 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: - Internal UI component organization only; no new user-discoverable feature or workflow. ## 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 changes needed; this is an internal lorebooks UI refactor. ## UI evidence No screenshots. Visible behavior is intended unchanged; native Tauri UI QA remains a manual follow-up. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added comprehensive lorebook editor with tabbed interface (Overview and Entries tabs) * Introduced keyword testing panel for preview matching * Added entry inline controls with drag-and-drop reordering * Implemented vectorization management for entries * Added linked resource selection for characters and personas * Introduced bulk entry operations (copy, move, unvectorize) * **Refactor** * Reorganized lorebook components into logical subdirectories (dialogs, editor, panel, entries) <!-- 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:54 +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#5283
No description provided.