[GH-ISSUE #6698] [Feature]: Library, chat and accessibility: lorebook tools, nested folders, chat search, exports, bookmarks, trash and touch targets #3753

Closed
opened 2026-10-21 06:06:52 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @SirAdoni on GitHub (Sep 26, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6698

Originally assigned to: @SpicyMarinara on GitHub.

Part of the contribution roadmap in #6624 (theme 3 of 3).

What problem does this solve?

  • Big libraries are hard to organize. Folders are one level deep, lorebooks can't be checked or tested before use, and there's no easy way to find unused or duplicate cards.
  • Old chats are hard to find and reuse. There's no search across all chats, no way to bookmark or annotate a message, and no readable story export.
  • Deleting a message is final, and useful messages fall out of context once the chat grows past the message limit.
  • Touch screens are cramped in side panels, editors and dialogs, and some dialogs trap focus or close at the wrong time.

Proposed solution

These build on the existing Library panels, lorebook editor, chat search, branch menu and settings.

Library and lorebooks

  • Nested folders (up to six levels) for lorebooks and characters, and optional campaign links and sections for Game Mode users.
  • Check lorebook (empty, duplicate, weak or unsafe keys), a scan test that runs the real scanner on pasted text and explains each hit, activation stats (fired count, last activation, never fired, stale), bulk edit, Markdown and CSV import and export, a folder power switch with exact Undo.
  • Character tools: a duplicate finder with field-by-field compare (nothing deleted automatically), bulk tags, "used in" and unused characters, a tag filter that covers the whole library, and an optional quick reference card on hover.

Chat

  • Search All Chats with phrases and filters (Ctrl+Shift+F), Markdown and HTML story exports, chat stats and an activity overview.
  • Message bookmarks, private message notes and chapter markers (none sent to the model), pin to context (up to 10 messages kept past the message limit), a per-chat private notebook, and a paged reading mode.
  • Message Trash with restore and a 30-day purge, text snippets (;ooc then Space), a usage dashboard with reported tokens per connection and chat, and parameter panels that show only what the selected provider and model use.
  • A setting for message actions on touch screens: today's inline row, or a single menu button.

Accessibility and polish

  • Touch targets of at least 36px in side panels, editors and dialogs, and a phone top bar with a More menu.
  • Focus moves into a side panel and back on Escape; only the top dialog traps Tab; Escape during IME composition doesn't close a dialog.
  • Shared loading and error states with Retry, placeholder avatars instead of broken images, settings strings moved into en.json, keyboard-reachable imports, and client performance fixes for large libraries and long lorebooks.
  • Optional client error reports to the server log.

How it's switched: Message trash, Usage and activation stats and Send client error reports are switches; the quick reference is off by default; text snippets do nothing until one is defined; touch message actions default to today's inline row. The tools that only open from a button or menu add nothing to existing screens until used. Layout and touch-size changes to existing screens will go behind a switch or come as small separate PRs, so they can be judged one at a time. The fork turns its switches on; upstream versions default off, and off keeps today's behaviour.

  • Areas touched (for spotting overlap):
    • Client components/panels/library and lorebook editor: folder tree, campaign bar, lint, scan test, bulk edit, text import, duplicates, bulk tags, usage
    • Client components/modals: global search, chat stats, activity overview, reading mode; components/chat: marks, notes, chapters, actions menu, notebook
    • Client components/layout (top bar, panel focus), components/ui (panel states, dialogs), settings panels, stores/ui.store.ts, styles/globals.css, en.json
    • packages/server/src/routes: new chat insights, usage, private notebook, library campaign, character usage and lorebook text routes; bulk lorebook enable
    • packages/server/src/services: chat insights and transcripts, usage aggregation, lorebook activation stats and test scan, message trash storage, character folders
    • packages/server/src/db/schema: folder parent ids and a few new tables (usage, activation stats, message trash, campaign links)
    • packages/shared/src/utils: search query, chat stats, message marks, lorebook lint, bulk edit and text formats, library folder tree
  • Size: about 500 files and 55,000 added lines, including regressions and many small UI touch-ups. It will be split into several PRs of well under 150 files each (library, lorebook tools, chat tools, accessibility).
  • Status: implemented and tested in a fork, at phone, tablet and desktop sizes.

Alternatives considered

  • Hard delete with a confirmation: kept for Game and helper chats, but a trash is safer for Roleplay and Conversation, where one tap can remove a long reply.
  • Sending bookmarks and notes to the model: rejected; they are for the reader, and pinning to context is its own explicit action.
  • Making touch sizes global: the floor applies only on narrow or touch screens, so desktop layouts stay exactly as they are.

Additional context

  • The fork also registers commands for these tools in its own palette. Since the command palette is now handled by the Omnibar work, those commands can be offered there instead once it lands.
  • Implementation depends on #6647 (foundations); PRs will follow once it merges, one package at a time.
  • If you're working in any of these areas, please comment so we can coordinate before a PR.

Screenshots

Taken from the fork build with invented demo data (characters, lorebooks and a campaign made up for these shots). Model replies and token counts come from a local test stub, so no real model was called.

Check lorebook (unused, common-word and shared keys) and activation stats (never fired, stale) in the lorebook editor.

Check lorebook (unused, common-word and shared keys) and activation stats (never fired, stale) in the lorebook editor

Nested lorebook folders, with the folder power switch and folder actions.

Nested lorebook folders, with the folder power switch and folder actions

Search All Chats (Ctrl+Shift+F) across Roleplay and Game chats.

Search All Chats (Ctrl+Shift+F) across Roleplay and Game chats

Message bookmarks, and the message Trash with restore and the 30-day purge.

Message bookmarks, and the message Trash with restore and the 30-day purge

Paged reading mode.

Paged reading mode

Usage dashboard: reported tokens per connection and per chat.

Usage dashboard

Phone, 390x844: the one-row top bar and its More menu.

Phone, 390x844

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @SirAdoni on GitHub (Sep 26, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6698 Originally assigned to: @SpicyMarinara on GitHub. <!-- roadmap theme issue 3, draft v1.0 --> Part of the contribution roadmap in #6624 (theme 3 of 3). ## What problem does this solve? - **Big libraries are hard to organize.** Folders are one level deep, lorebooks can't be checked or tested before use, and there's no easy way to find unused or duplicate cards. - **Old chats are hard to find and reuse.** There's no search across all chats, no way to bookmark or annotate a message, and no readable story export. - **Deleting a message is final**, and useful messages fall out of context once the chat grows past the message limit. - **Touch screens are cramped** in side panels, editors and dialogs, and some dialogs trap focus or close at the wrong time. ## Proposed solution These build on the existing Library panels, lorebook editor, chat search, branch menu and settings. **Library and lorebooks** - Nested folders (up to six levels) for lorebooks and characters, and optional campaign links and sections for Game Mode users. - Check lorebook (empty, duplicate, weak or unsafe keys), a scan test that runs the real scanner on pasted text and explains each hit, activation stats (fired count, last activation, never fired, stale), bulk edit, Markdown and CSV import and export, a folder power switch with exact Undo. - Character tools: a duplicate finder with field-by-field compare (nothing deleted automatically), bulk tags, "used in" and unused characters, a tag filter that covers the whole library, and an optional quick reference card on hover. **Chat** - Search All Chats with phrases and filters (Ctrl+Shift+F), Markdown and HTML story exports, chat stats and an activity overview. - Message bookmarks, private message notes and chapter markers (none sent to the model), pin to context (up to 10 messages kept past the message limit), a per-chat private notebook, and a paged reading mode. - Message Trash with restore and a 30-day purge, text snippets (`;ooc` then Space), a usage dashboard with reported tokens per connection and chat, and parameter panels that show only what the selected provider and model use. - A setting for message actions on touch screens: today's inline row, or a single menu button. **Accessibility and polish** - Touch targets of at least 36px in side panels, editors and dialogs, and a phone top bar with a More menu. - Focus moves into a side panel and back on Escape; only the top dialog traps Tab; Escape during IME composition doesn't close a dialog. - Shared loading and error states with Retry, placeholder avatars instead of broken images, settings strings moved into `en.json`, keyboard-reachable imports, and client performance fixes for large libraries and long lorebooks. - Optional client error reports to the server log. **How it's switched:** **Message trash**, **Usage and activation stats** and **Send client error reports** are switches; the quick reference is off by default; text snippets do nothing until one is defined; touch message actions default to today's inline row. The tools that only open from a button or menu add nothing to existing screens until used. Layout and touch-size changes to existing screens will go behind a switch or come as small separate PRs, so they can be judged one at a time. The fork turns its switches on; upstream versions default off, and off keeps today's behaviour. - **Areas touched (for spotting overlap):** - Client `components/panels/library` and lorebook editor: folder tree, campaign bar, lint, scan test, bulk edit, text import, duplicates, bulk tags, usage - Client `components/modals`: global search, chat stats, activity overview, reading mode; `components/chat`: marks, notes, chapters, actions menu, notebook - Client `components/layout` (top bar, panel focus), `components/ui` (panel states, dialogs), settings panels, `stores/ui.store.ts`, `styles/globals.css`, `en.json` - `packages/server/src/routes`: new chat insights, usage, private notebook, library campaign, character usage and lorebook text routes; bulk lorebook enable - `packages/server/src/services`: chat insights and transcripts, usage aggregation, lorebook activation stats and test scan, message trash storage, character folders - `packages/server/src/db/schema`: folder parent ids and a few new tables (usage, activation stats, message trash, campaign links) - `packages/shared/src/utils`: search query, chat stats, message marks, lorebook lint, bulk edit and text formats, library folder tree - **Size:** about 500 files and 55,000 added lines, including regressions and many small UI touch-ups. It will be split into several PRs of well under 150 files each (library, lorebook tools, chat tools, accessibility). - **Status:** implemented and tested in a fork, at phone, tablet and desktop sizes. ## Alternatives considered - **Hard delete with a confirmation:** kept for Game and helper chats, but a trash is safer for Roleplay and Conversation, where one tap can remove a long reply. - **Sending bookmarks and notes to the model:** rejected; they are for the reader, and pinning to context is its own explicit action. - **Making touch sizes global:** the floor applies only on narrow or touch screens, so desktop layouts stay exactly as they are. ## Additional context - The fork also registers commands for these tools in its own palette. Since the command palette is now handled by the Omnibar work, those commands can be offered there instead once it lands. - Implementation depends on #6647 (foundations); PRs will follow once it merges, one package at a time. - If you're working in any of these areas, please comment so we can coordinate before a PR. ## Screenshots Taken from the fork build with invented demo data (characters, lorebooks and a campaign made up for these shots). Model replies and token counts come from a local test stub, so no real model was called. **Check lorebook (unused, common-word and shared keys) and activation stats (never fired, stale) in the lorebook editor.** ![Check lorebook (unused, common-word and shared keys) and activation stats (never fired, stale) in the lorebook editor](https://raw.githubusercontent.com/SirAdoni/Marinara-Engine-contrib/e98c448478676a9b4a6fad4bed1b6c29c046e9a4/roadmap/T3-1-lorebook-check-and-stats.png) **Nested lorebook folders, with the folder power switch and folder actions.** ![Nested lorebook folders, with the folder power switch and folder actions](https://raw.githubusercontent.com/SirAdoni/Marinara-Engine-contrib/e98c448478676a9b4a6fad4bed1b6c29c046e9a4/roadmap/T3-2-nested-folders.png) **Search All Chats (Ctrl+Shift+F) across Roleplay and Game chats.** ![Search All Chats (Ctrl+Shift+F) across Roleplay and Game chats](https://raw.githubusercontent.com/SirAdoni/Marinara-Engine-contrib/e98c448478676a9b4a6fad4bed1b6c29c046e9a4/roadmap/T3-3-search-all-chats.png) **Message bookmarks, and the message Trash with restore and the 30-day purge.** ![Message bookmarks, and the message Trash with restore and the 30-day purge](https://raw.githubusercontent.com/SirAdoni/Marinara-Engine-contrib/e98c448478676a9b4a6fad4bed1b6c29c046e9a4/roadmap/T3-4-bookmarks-and-trash.png) **Paged reading mode.** ![Paged reading mode](https://raw.githubusercontent.com/SirAdoni/Marinara-Engine-contrib/e98c448478676a9b4a6fad4bed1b6c29c046e9a4/roadmap/T3-5-reading-mode.png) **Usage dashboard: reported tokens per connection and per chat.** ![Usage dashboard](https://raw.githubusercontent.com/SirAdoni/Marinara-Engine-contrib/e98c448478676a9b4a6fad4bed1b6c29c046e9a4/roadmap/T3-6-usage-dashboard.png) **Phone, 390x844: the one-row top bar and its More menu.** ![Phone, 390x844](https://raw.githubusercontent.com/SirAdoni/Marinara-Engine-contrib/e98c448478676a9b4a6fad4bed1b6c29c046e9a4/roadmap/T3-7-phone-390x844-more-menu.png) ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 06:06:52 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Sep 27, 2026):

Awaiting PR. I approve of everything except for the top bar change. Search and commands, as well as Generation jobs, should be part of the chat menu, not on the top bar. We can leave the Home page and Chats icons there, but fold Characters and Settings into the three-dots icon.

<!-- gh-comment-id:5855496269 --> @SpicyMarinara commented on GitHub (Sep 27, 2026): Awaiting PR. I approve of everything except for the top bar change. Search and commands, as well as Generation jobs, should be part of the chat menu, not on the top bar. We can leave the Home page and Chats icons there, but fold Characters and Settings into the three-dots icon.
Author
Owner

@SirAdoni commented on GitHub (Sep 27, 2026):

I am preparing this as focused contributions against current staging: library organization and character tools; lorebook tools; chat discovery and productivity; message tools; and accessibility/menu changes. The menu work will follow your requested placement: search and commands in the chat menu, Home and Chats retained, and Characters and Settings inside More. I will preserve the current upstream systems and keep each PR scoped to its feature group.

<!-- gh-comment-id:5857710880 --> @SirAdoni commented on GitHub (Sep 27, 2026): I am preparing this as focused contributions against current staging: library organization and character tools; lorebook tools; chat discovery and productivity; message tools; and accessibility/menu changes. The menu work will follow your requested placement: search and commands in the chat menu, Home and Chats retained, and Characters and Settings inside More. I will preserve the current upstream systems and keep each PR scoped to its feature group.
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#3753
No description provided.