[PR #4209] [MERGED] Add bulk move-to-folder action to character selection bar #6281

Closed
opened 2026-10-23 04:08:55 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/4209
Author: @Gunterlie
Created: 7/28/2026
Status: ✅ Merged
Merged: 7/28/2026
Merged by: @SpicyMarinara

Base: staging ← Head: character-folder-move


📝 Commits (4)

  • 8208c38 Add bulk move-to-folder action to character selection bar
  • bff4df5 Shorten move action label and scroll long choice dialogs
  • a9d02b9 Shorten move action label and drop the highlighted folder default
  • 2d36654 Prevent duplicate bulk moves, add error handling, and fix dialog layout

📊 Changes

4 files changed (+77 additions, -21 deletions)

View changed files

📝 packages/client/src/components/panels/CharactersPanel.tsx (+51 -5)
📝 packages/client/src/components/ui/AppDialogRenderer.tsx (+18 -16)
📝 packages/client/src/components/ui/SelectionActionBar.tsx (+5 -0)
📝 packages/client/src/localization/locales/en.json (+3 -0)

📄 Description

Linked issue

No issue exists for this yet — one should be opened before this PR is merged.

Closes #

Why this change

  • Searching in the Characters panel filters the list to matches, which hides every folder that has no matching character. Drag-and-drop is the only way to file a character into a folder, so the moment you search for the character you want to organize, there is nothing left to drop it onto.
  • The common flow ("find this character, put it in that folder") therefore requires clearing the search and hunting for the character by hand.

What changed

  • SelectionActionBar gained an optional extraAction slot rendered before Export, so panels can add a third bulk action.
  • CharactersPanel: selection mode now shows a Move button next to Export and Delete. It opens the existing choice dialog listing every folder plus a "No folder" option, and routes through the same moveCharactersToFolder helper drag-and-drop uses, so multi-select moves and folder-to-folder moves work identically.
  • Folder entries in that dialog all render with the same tone — no folder is pre-highlighted as a default target.
  • AppDialogRenderer: choice dialogs scroll (max-h-[50vh]) so a long folder list stays inside the modal.
  • Label kept short ("Move") so the three-button action bar stays on one line; the dialog title carries the context.
  • Added two en.json keys and reused the existing lorebook.editor.batch.move label. Other locales fall back to English.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

Driven in headless Chromium (desktop 1440x900 and Pixel 7 viewports) via a throwaway Playwright spec that was not kept: search for a character, select it, press Move, choose a folder, then assert via /api/characters/groups/list that the character ends up in exactly the target folder — including the case where it already belonged to another folder, and with 12 folders in the dialog. Both viewports passed. pnpm check passes.

Still worth checking by hand in a real browser:

  • Manually verify: multi-select several characters across different folders and move them in one action.
  • Manually verify: "No folder" removes the selected characters from whatever folder they were in.
  • Manually verify: the Move button state when no folders exist (currently disabled).
  • Manually verify: light mode appearance of the action bar and the folder dialog.
  • Manually verify: dialog scrolling with a very long folder list on a small phone viewport.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

Bildschirmfoto 2026-07-28 um 13 43 42 Bildschirmfoto 2026-07-28 um 13 43 35

Summary by CodeRabbit

  • New Features
    • Added batch movement for selected characters, allowing them to be placed in a chosen folder or removed from folders.
    • Added a move action to the character selection toolbar.
  • Usability Improvements
    • Choice dialogs now have a maximum height and scroll when displaying many options.
    • Updated labels to clearly identify the option for leaving characters without a folder.

🔄 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/4209 **Author:** [@Gunterlie](https://github.com/Gunterlie) **Created:** 7/28/2026 **Status:** ✅ Merged **Merged:** 7/28/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `character-folder-move` --- ### 📝 Commits (4) - [`8208c38`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8208c38272374d6688ecc7046290ac90f06d187c) Add bulk move-to-folder action to character selection bar - [`bff4df5`](https://github.com/Pasta-Devs/Marinara-Engine/commit/bff4df569681eaa56f91133642002b7844e533bd) Shorten move action label and scroll long choice dialogs - [`a9d02b9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a9d02b9392d5a48ff1a98577400d01e9a5b24bc7) Shorten move action label and drop the highlighted folder default - [`2d36654`](https://github.com/Pasta-Devs/Marinara-Engine/commit/2d366540be201644a52dccd2d6ba48ad6988c8b9) Prevent duplicate bulk moves, add error handling, and fix dialog layout ### 📊 Changes **4 files changed** (+77 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/panels/CharactersPanel.tsx` (+51 -5) 📝 `packages/client/src/components/ui/AppDialogRenderer.tsx` (+18 -16) 📝 `packages/client/src/components/ui/SelectionActionBar.tsx` (+5 -0) 📝 `packages/client/src/localization/locales/en.json` (+3 -0) </details> ### 📄 Description ## Linked issue No issue exists for this yet — one should be opened before this PR is merged. Closes # ## Why this change - Searching in the Characters panel filters the list to matches, which hides every folder that has no matching character. Drag-and-drop is the only way to file a character into a folder, so the moment you search for the character you want to organize, there is nothing left to drop it onto. - The common flow ("find this character, put it in that folder") therefore requires clearing the search and hunting for the character by hand. ## What changed - `SelectionActionBar` gained an optional `extraAction` slot rendered before Export, so panels can add a third bulk action. - `CharactersPanel`: selection mode now shows a **Move** button next to Export and Delete. It opens the existing choice dialog listing every folder plus a "No folder" option, and routes through the same `moveCharactersToFolder` helper drag-and-drop uses, so multi-select moves and folder-to-folder moves work identically. - Folder entries in that dialog all render with the same tone — no folder is pre-highlighted as a default target. - `AppDialogRenderer`: choice dialogs scroll (`max-h-[50vh]`) so a long folder list stays inside the modal. - Label kept short ("Move") so the three-button action bar stays on one line; the dialog title carries the context. - Added two `en.json` keys and reused the existing `lorebook.editor.batch.move` label. Other locales fall back to English. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes Driven in headless Chromium (desktop 1440x900 and Pixel 7 viewports) via a throwaway Playwright spec that was not kept: search for a character, select it, press Move, choose a folder, then assert via `/api/characters/groups/list` that the character ends up in exactly the target folder — including the case where it already belonged to another folder, and with 12 folders in the dialog. Both viewports passed. `pnpm check` passes. Still worth checking by hand in a real browser: - Manually verify: multi-select several characters across different folders and move them in one action. - Manually verify: "No folder" removes the selected characters from whatever folder they were in. - Manually verify: the Move button state when no folders exist (currently disabled). - Manually verify: light mode appearance of the action bar and the folder dialog. - Manually verify: dialog scrolling with a very long folder list on a small phone viewport. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) <img width="404" height="275" alt="Bildschirmfoto 2026-07-28 um 13 43 42" src="https://github.com/user-attachments/assets/1b42ff2c-1532-476d-9ed7-f6658041af1f" /> <img width="357" height="90" alt="Bildschirmfoto 2026-07-28 um 13 43 35" src="https://github.com/user-attachments/assets/c36fd539-2cdb-4031-a572-4acb390fdb5c" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added batch movement for selected characters, allowing them to be placed in a chosen folder or removed from folders. * Added a move action to the character selection toolbar. * **Usability Improvements** * Choice dialogs now have a maximum height and scroll when displaying many options. * Updated labels to clearly identify the option for leaving characters without a folder. <!-- 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-23 04:08:55 +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#6281
No description provided.