[GH-ISSUE #7464] [Feature]: A way to view lorebook entries quickly #4158

Closed
opened 2026-10-21 06:11:57 +07:00 by bsakaguchi · 5 comments
Owner

Originally created by @badingots on GitHub (Oct 12, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7464

Originally assigned to: @SpicyMarinara on GitHub.

What problem does this solve?

Give users a way to view lorebook entry content quickly while chatting.

Lorebooks can be used for two things at once: context for the model, and reference material for the human player. For example, my persona might have a college class schedule stored as a lorebook entry, and mid-roleplay I want to glance at it.

As far as I can tell, all current lorebook UI is built around the first use. The lorebook editor and the chat's Active Context view show keys, activation settings and what was sent to the model, which is the right focus for authoring and debugging. But reading an entry as a player means leaving the chat for the full editor and scrolling through settings to get to the content (this is even more of an issue on mobile where space is limited).

Proposed solution

A Lorebook Reader chat tool for Roleplay and Conversation chats: a lightweight window for reading entries at will, without the technical details.

v1 scope:

  • Opens from the chat tools like the other chat windows: a bubble that opens a floating window on desktop, and a full sheet in the Chat tools menu on phones. It appears only when the chat has a lorebook.
  • Lists entries from every lorebook attached to the current chat (chat, Character, Persona and global), grouped by lorebook.
  • Includes disabled entries, shown dimmed with an OFF label, since some reference entries are kept disabled on purpose so they never reach the model.
  • Opening an entry swaps the list for that entry's own view: its name, its lorebook, and its content rendered as Markdown (reusing the same renderer as the lorebook editor's content preview). Back returns to the list at the same scroll position. Keys, depth, order, position and other prompt settings are not shown.
  • Replaces macros such as {{user}} and {{char}} with the chat's actual names, in both entry names and content, the same way chat messages display them. (This is a display-only change, entries are not edited)
  • Search across entry names and content, matching the text as the Reader shows it.
  • Pinning: pinned entries are listed first in the Reader for that chat. Pins are saved with the chat, so they follow it across devices and into backups.
  • An "Open in editor" button on each entry for when you do want to edit. This opens the entry in the existing lorebook UI.
  • Read-only. Editing stays in the lorebook editor.

Alternatives considered

  • A Personal Extension. Sandboxed extensions can't read lorebook data: the context API exposes only active Character and Persona fields. The only way around that is a "full page access" External Extension, which is unsandboxed and inappropriate for something meant to be shared.
  • Extending the Active Context popover. It's tied to the activation scan (only entries that fired, shown with match details), which is the right view for debugging prompts but not for reading entries on demand. Keeping the Reader separate leaves both views focused.

Additional context

Possibly related: #6698. Its per-chat private notebook (player notes that are never sent to the model) is a similar player-facing reading feature (I had even considered whether a scratchpad should be part of my proposal before seeing this). Anyway I wanted to bring it up since there could be overlap.

Rough implementation outline, for discussion:

  • Client-only reading through existing hooks (useEntriesAcrossLorebooks, the chat-lorebook helpers in lib/chat-lorebooks.ts), the existing message macro resolver and renderMarkdownBlocks. No new server routes.
  • A standalone ChatControlWindow, with a phone Chat tools menu entry.
  • Pins stored as lorebookPinnedEntryIds: string[] in the chat's metadata, saved through useUpdateChatMetadata. The server checks it's a deduplicated list of strings. It's treated as a view-only key, like windowLayout, so pinning doesn't change the chat's last-updated time or re-run the lorebook scan, and it's kept out of chat settings profiles.
  • Localized UI copy, a CHANGELOG entry, and a regression test for the Reader's list logic and the pin key.

I have a working implementation and am happy to open a PR against staging.

Image Image

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @badingots on GitHub (Oct 12, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7464 Originally assigned to: @SpicyMarinara on GitHub. ## What problem does this solve? **Give users a way to view lorebook entry content quickly while chatting.** Lorebooks can be used for two things at once: context for the model, and reference material for the human player. For example, my persona might have a college class schedule stored as a lorebook entry, and mid-roleplay I want to glance at it. As far as I can tell, all current lorebook UI is built around the first use. The lorebook editor and the chat's Active Context view show keys, activation settings and what was sent to the model, which is the right focus for authoring and debugging. But reading an entry as a player means leaving the chat for the full editor and scrolling through settings to get to the content (this is even more of an issue on mobile where space is limited). ## Proposed solution A **Lorebook Reader** chat tool for Roleplay and Conversation chats: a lightweight window for reading entries at will, without the technical details. v1 scope: - Opens from the chat tools like the other chat windows: a bubble that opens a floating window on desktop, and a full sheet in the Chat tools menu on phones. It appears only when the chat has a lorebook. - Lists entries from every lorebook attached to the current chat (chat, Character, Persona and global), grouped by lorebook. - Includes disabled entries, shown dimmed with an **OFF** label, since some reference entries are kept disabled on purpose so they never reach the model. - Opening an entry swaps the list for that entry's own view: its name, its lorebook, and its content rendered as Markdown (reusing the same renderer as the lorebook editor's content preview). **Back** returns to the list at the same scroll position. Keys, depth, order, position and other prompt settings are not shown. - Replaces macros such as `{{user}}` and `{{char}}` with the chat's actual names, in both entry names and content, the same way chat messages display them. (This is a display-only change, entries are **not** edited) - Search across entry names and content, matching the text as the Reader shows it. - **Pinning:** pinned entries are listed first in the Reader for that chat. Pins are saved with the chat, so they follow it across devices and into backups. - An "Open in editor" button on each entry for when you do want to edit. This opens the entry in the existing lorebook UI. - Read-only. Editing stays in the lorebook editor. ## Alternatives considered - **A Personal Extension.** Sandboxed extensions can't read lorebook data: the context API exposes only active Character and Persona fields. The only way around that is a "full page access" External Extension, which is unsandboxed and inappropriate for something meant to be shared. - **Extending the Active Context popover.** It's tied to the activation scan (only entries that fired, shown with match details), which is the right view for debugging prompts but not for reading entries on demand. Keeping the Reader separate leaves both views focused. ## Additional context Possibly related: #6698. Its per-chat private notebook (player notes that are never sent to the model) is a similar player-facing reading feature (I had even considered whether a scratchpad should be part of my proposal before seeing this). Anyway I wanted to bring it up since there could be overlap. Rough implementation outline, for discussion: - Client-only reading through existing hooks (`useEntriesAcrossLorebooks`, the chat-lorebook helpers in `lib/chat-lorebooks.ts`), the existing message macro resolver and `renderMarkdownBlocks`. No new server routes. - A standalone `ChatControlWindow`, with a phone Chat tools menu entry. - Pins stored as `lorebookPinnedEntryIds: string[]` in the chat's metadata, saved through `useUpdateChatMetadata`. The server checks it's a deduplicated list of strings. It's treated as a view-only key, like `windowLayout`, so pinning doesn't change the chat's last-updated time or re-run the lorebook scan, and it's kept out of chat settings profiles. - Localized UI copy, a CHANGELOG entry, and a regression test for the Reader's list logic and the pin key. I have a working implementation and am happy to open a PR against `staging`. <img width="680" height="880" alt="Image" src="https://github.com/user-attachments/assets/5a7b5f0c-0aa2-47bd-9e70-e3e004f1c9da" /> <img width="680" height="880" alt="Image" src="https://github.com/user-attachments/assets/6fee69fa-4862-4e5d-8c46-c3a698be9802" /> ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 06:11:57 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Oct 12, 2026):

Work on this is in #7494, owned by @SpicyMarinara. It follows the v1 list above. @badingots, since you mentioned a working implementation: please compare notes on that PR instead of opening a second one.

<!-- gh-comment-id:6130774031 --> @SpicyMarinara commented on GitHub (Oct 12, 2026): Work on this is in #7494, owned by @SpicyMarinara. It follows the v1 list above. @badingots, since you mentioned a working implementation: please compare notes on that PR instead of opening a second one.
Author
Owner

@badingots commented on GitHub (Oct 12, 2026):

Thank you! I'm taking a look right now. 😊

<!-- gh-comment-id:6131242836 --> @badingots commented on GitHub (Oct 12, 2026): Thank you! I'm taking a look right now. 😊
Author
Owner

@SpicyMarinara commented on GitHub (Oct 12, 2026):

Fixed on staging by #7494.

<!-- gh-comment-id:6131791559 --> @SpicyMarinara commented on GitHub (Oct 12, 2026): Fixed on staging by #7494.
Author
Owner

@SpicyMarinara commented on GitHub (Oct 12, 2026):

Thank you for the detailed proposal! After trying it, we decided not to ship a separate reader: Active Context already shows lorebook entries in the chat, and two places for the same thing would be confusing. The Reader is being removed before release.

<!-- gh-comment-id:6132913796 --> @SpicyMarinara commented on GitHub (Oct 12, 2026): Thank you for the detailed proposal! After trying it, we decided not to ship a separate reader: **Active Context** already shows lorebook entries in the chat, and two places for the same thing would be confusing. The Reader is being removed before release.
Author
Owner

@badingots commented on GitHub (Oct 12, 2026):

Understood, though I'd argue they solve two different problems. Active Context can't be relied on for my use-case. If the "class schedule" entry wasn't triggered it's not visible in the Active Context UI. Entry rendering in Active Context is also much less readable than a rendered markdown view—important as this is more of a user-facing feature than a debugging tool.

<!-- gh-comment-id:6133070456 --> @badingots commented on GitHub (Oct 12, 2026): Understood, though I'd argue they solve two different problems. Active Context can't be relied on for my use-case. If the "class schedule" entry wasn't triggered it's not visible in the Active Context UI. Entry rendering in Active Context is also much less readable than a rendered markdown view—important as this is more of a user-facing feature than a debugging tool.
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#4158
No description provided.