[PR #1775] [MERGED] Split lorebooks panel helpers #5278

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/1775
Author: @Xelvanis
Created: 6/1/2026
Status: ✅ Merged
Merged: 6/1/2026
Merged by: @Xelvanis

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


📝 Commits (2)

  • e3bfa36 Split lorebooks panel helpers
  • 96dc064 Harden lorebook tag parsing

📊 Changes

4 files changed (+305 additions, -237 deletions)

View changed files

➕ src/features/catalog/lorebooks/components/LorebookRow.tsx (+144 -0)
📝 src/features/catalog/lorebooks/components/LorebooksPanel.tsx (+32 -237)
➕ src/features/catalog/lorebooks/components/lorebook-panel-config.ts (+29 -0)
➕ src/features/catalog/lorebooks/components/lorebook-panel-model.ts (+100 -0)

📄 Description

Linked issue

N/A

Why this change

  • Reduce LorebooksPanel.tsx bloat by extracting stable row rendering and panel helper responsibilities without changing Lorebooks panel behavior.

What changed

  • Moved lorebook row image/select/delete rendering into LorebookRow.tsx.
  • Moved panel category/color constants into lorebook-panel-config.ts.
  • Moved tag parsing, collection, filtering, sorting, and grouping helpers into lorebook-panel-model.ts.
  • Kept the submitted diff free of *.test.ts / *.test.tsx proof files.

Refactor impact

Primary owner:

catalog lorebooks UI

Impact areas reviewed:

  • Lorebooks panel category tabs, active filter, tag filter, search, sort, grouped view, selection mode, delete, and image-pick wiring.

Boundary notes:

  • Feature-layer refactor only.
  • Existing engine scope helper import remains through lorebook-panel-model.ts.
  • No shared API, Rust, storage, or remote-runtime boundary changes.

Pressure points touched:

  • None of the named pressure points are 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

  • pnpm check passed locally after the final diff.
  • pnpm build passed locally before the final PR gate.
  • Touched-file ESLint passed locally for the lorebooks panel split files.
  • git diff --cached --check passed before commit.
  • Confirmed submitted diff contains no *.test.ts(x) or scratch/ files.
  • No native Tauri UI pass was run; this is a behavior-preserving refactor.

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 catalog UI refactor only; no new user-discoverable workflow or 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 and public workflow are unchanged.

UI evidence

No screenshots added; no visible UI change intended.

Summary by CodeRabbit

  • New Features

    • Enhanced lorebook panel with improved categorization and filtering options
    • Multiple sorting capabilities including name, creation date, and token count
  • Improvements

    • Better visual organization with category-specific colors and icons
    • Streamlined lorebook management interface

🔄 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/1775 **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-ui-file-split` --- ### 📝 Commits (2) - [`e3bfa36`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e3bfa36b3f5b2b8dea937524cb4a3de9e5914cf0) Split lorebooks panel helpers - [`96dc064`](https://github.com/Pasta-Devs/Marinara-Engine/commit/96dc06415c1fbaf5844ac0db84792c33e72ff4b2) Harden lorebook tag parsing ### 📊 Changes **4 files changed** (+305 additions, -237 deletions) <details> <summary>View changed files</summary> ➕ `src/features/catalog/lorebooks/components/LorebookRow.tsx` (+144 -0) 📝 `src/features/catalog/lorebooks/components/LorebooksPanel.tsx` (+32 -237) ➕ `src/features/catalog/lorebooks/components/lorebook-panel-config.ts` (+29 -0) ➕ `src/features/catalog/lorebooks/components/lorebook-panel-model.ts` (+100 -0) </details> ### 📄 Description ## Linked issue N/A ## Why this change - Reduce `LorebooksPanel.tsx` bloat by extracting stable row rendering and panel helper responsibilities without changing Lorebooks panel behavior. ## What changed - Moved lorebook row image/select/delete rendering into `LorebookRow.tsx`. - Moved panel category/color constants into `lorebook-panel-config.ts`. - Moved tag parsing, collection, filtering, sorting, and grouping helpers into `lorebook-panel-model.ts`. - Kept the submitted diff free of `*.test.ts` / `*.test.tsx` proof files. ## Refactor impact Primary owner: catalog lorebooks UI Impact areas reviewed: - Lorebooks panel category tabs, active filter, tag filter, search, sort, grouped view, selection mode, delete, and image-pick wiring. Boundary notes: - Feature-layer refactor only. - Existing engine scope helper import remains through `lorebook-panel-model.ts`. - No shared API, Rust, storage, or remote-runtime boundary changes. Pressure points touched: - None of the named pressure points are 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) - [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 - `pnpm check` passed locally after the final diff. - `pnpm build` passed locally before the final PR gate. - Touched-file ESLint passed locally for the lorebooks panel split files. - `git diff --cached --check` passed before commit. - Confirmed submitted diff contains no `*.test.ts(x)` or `scratch/` files. - No native Tauri UI pass was run; this is a behavior-preserving refactor. ## 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 catalog UI refactor only; no new user-discoverable workflow or 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 and public workflow are unchanged. ## UI evidence No screenshots added; no visible UI change intended. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Enhanced lorebook panel with improved categorization and filtering options * Multiple sorting capabilities including name, creation date, and token count * **Improvements** * Better visual organization with category-specific colors and icons * Streamlined lorebook management interface <!-- 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: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#5278
No description provided.