[PR #3395] [MERGED] Conversation-mode profiles: follow-up fixes + configurable AI-write sources #5917

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3395
Author: @kolacheee
Created: 7/8/2026
Status: ✅ Merged
Merged: 7/9/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/convo-profiles-followups


📝 Commits (10+)

  • de84b00 fix(convo): show the convo display name above messages
  • e77bfdc fix(convo): keep chat-specific about-me across reloads
  • 78da5cc feat(convo): add an emoji picker to the About Me editor
  • 206541c fix(convo): stop AI-write about-me failing on thinking models
  • f90e969 fix(convo): stop labeling the persona as "the user" in profiles
  • f4124da feat(convo): optionally declare the display name on a character's card
  • 9eab535 feat(convo): configurable sources for AI-write about-me
  • 7a0c733 fix(ui): only one help tooltip open at a time
  • 52a684a feat(convo): revert about-me + per-entry lorebook source selection
  • 967849f fix(convo): show embedded lorebook entries in the source picker

📊 Changes

22 files changed (+1087 additions, -115 deletions)

View changed files

📝 CHANGELOG.md (+16 -0)
📝 README.md (+1 -1)
📝 docs/CONVERSATION.md (+68 -0)
📝 docs/MACROS.md (+11 -0)
📝 docs/card-css-theming-guide.md (+163 -59)
➕ packages/client/src/components/characters/AboutMeSourcePicker.tsx (+183 -0)
📝 packages/client/src/components/characters/CharacterEditor.tsx (+18 -1)
📝 packages/client/src/components/characters/ConvoProfileFields.tsx (+149 -7)
📝 packages/client/src/components/chat/ChatArea.tsx (+4 -0)
📝 packages/client/src/components/chat/ConversationMessage.tsx (+17 -2)
📝 packages/client/src/components/chat/chat-area.types.ts (+4 -0)
📝 packages/client/src/components/modals/AboutMeViewerModal.tsx (+171 -12)
📝 packages/client/src/components/personas/PersonaEditor.tsx (+13 -1)
📝 packages/client/src/components/ui/HelpTooltip.tsx (+55 -8)
📝 packages/client/src/components/ui/MacroTextarea.tsx (+5 -1)
📝 packages/client/src/hooks/use-characters.ts (+16 -0)
📝 packages/server/src/routes/characters.routes.ts (+93 -9)
📝 packages/server/src/routes/generate.routes.ts (+1 -0)
📝 packages/server/src/services/conversation/conversation-profiles.ts (+6 -4)
📝 packages/server/src/services/generation/character-prompt-context.ts (+30 -10)

...and 2 more files

📄 Description

Linked issue

Closes #3368 (Conversation-mode profiles). These are post-merge follow-ups to #3374 — which closed #3368 — surfaced by playtesting the merged feature. No dedicated issue was opened for this batch; happy to file a tracking issue if maintainers prefer.

Why this change

#3374 shipped Conversation-mode profiles (display name, about me, behavior) to staging. Playtesting the merged feature turned up gaps and rough edges: the display name never actually appeared above messages, chat-specific about-me overrides didn't survive a reload, AI-write failed outright on Gemini 3.x "thinking" models, and the mobile popout overlapped its own keyboard. This PR fixes those and rounds the feature out — configurable AI-write sources, a Revert control, an emoji picker, and full documentation. Everything stays Conversation-only; none of it can reach a Roleplay, Visual Novel, or Game prompt.

What changed

Fixes:

  • The Convo display name is now shown as the sender label above messages (read live, so renames reflect immediately) — previously it only existed in the prompt and the profile popout.
  • Chat-specific about-me overrides survive reloads/refetches. The popout read chat.metadata without parsing it (it arrives as a JSON string on a fresh fetch), so the override reset to the card default and, on save, could drop other characters' overrides.
  • AI-write about-me no longer fails on "thinking" models (e.g. Gemini 3.x) that spent the whole output budget on reasoning and returned no content (MAX_TOKENS); raised the output ceiling and lowered reasoning effort.
  • The participant-profiles block no longer labels the persona as "the user" (which nudged some models toward sycophancy) — it's presented as just another participant.
  • The AI-write source picker lists a character's embedded lorebook entries, not only "linked" ones, so embedded-only cards can select entries.
  • The profile popout is a full-height sheet on mobile (keyboard/emoji picker no longer overlap the field) and re-clamps on desktop when the source panel opens.
  • Help tooltips no longer stack — opening one closes any other.
  • Card CSS avatar hook corrected: the clipped avatar is a <button> (nested under a glow wrapper in roleplay), so the ring now hugs the picture instead of the wrapper.

Additions:

  • A configurable source picker (⚙️) for the AI-write about-me, in both the card editor and the in-chat popout: card fields (description/personality/scenario/backstory/appearance), the Convo behavior directive, the character's lorebook entries (with per-entry selection in the card editor), and recent chat context. Defaults to personality only.
  • A Revert control and an emoji picker in the about-me editor.
  • An optional per-character "declare display name on the card" toggle so the model can map the display name to the right card in group chats.

Docs: new Conversation profiles section in docs/CONVERSATION.md, the Conversation macros in docs/MACROS.md, an expanded all-modes Card CSS showcase, plus README and CHANGELOG.

Isolation: the display-name-on-card line is injected inside the identity-fallback per-character loop gated on isConversation; the profile blocks and macros are composed only in the conversation branch of the generate route; and the new convoDisplayNameInCard / aboutMeSources fields ride through export/import inside extensions (verified end-to-end). Nothing leaks into RP/VN/Game.

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

Automated on the dev machine: pnpm lint clean (shared + server + client typechecks + eslint); client production build clean; pnpm regression:prompt passes (58 checks, including the mode-isolation gate); pnpm version:check in sync. pnpm check's full build step is blocked on this Windows dev machine by a pre-existing build-script bug (#3162 / fix PR #3163); the server tsc it wraps passes. Commits were playtested in the running app throughout.

Manually completed:

  • Isolation (load-bearing): Convo display name shows above messages and updates live on rename; confirm it is absent from the same character used in a Roleplay and a Game chat, and that {{convo_display}} / {{char_about}} / {{convo_behavior}} resolve to empty in RP/Game.
  • Persistence: set a chat-specific about-me, hard-reload (Ctrl+Shift+R), confirm it survives; with two characters each holding an override, save one and confirm the other's isn't wiped.
  • AI-write: with a Gemini 3.x connection it returns text (not an Internal Server Error); the ⚙️ source picker (card fields, convo behavior, embedded + linked lorebook entries with per-entry selection, chat context in the in-chat editor only); Revert undoes a manual/AI edit; the emoji picker inserts at the caret.
  • Declare-on-card: the toggle prepends the line to the card in a Conversation prompt (peek-prompt) and never in RP/Game.
  • Popout: full sheet on mobile; no overflow on desktop with the source panel open. About Me Keeper agent + update_about_me tool still function. Help tooltips don't stack.
  • Round-trip: character export -> re-import (native + SillyTavern/PNG) keeps the new extensions fields; a full backup -> restore keeps persona convo fields.
  • Card CSS: paste the "Eldritch Grimoire" showcase into Creator Notes, enable card CSS, confirm the avatar ring hugs the picture in both Roleplay and Conversation.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

Docs touched: docs/CONVERSATION.md (profiles section), docs/MACROS.md (Conversation macros), docs/card-css-theming-guide.md (about-me popout hooks, all-modes showcase, avatar hook fix), README.md (doc-index description), CHANGELOG.md ([Unreleased]). No version bump.

UI evidence (if applicable)

{3AF048B0-B864-45C7-8282-B3F7B50ACED5} {CF155A78-0D71-48D0-8374-76E9C91678AF} {204EF183-DDC9-47E5-92C0-DCDFA7F4D1FD}

Summary by CodeRabbit

  • New Features

    • Added Conversation “about me” profile controls: configurable AI source selection (with updated defaults), display-name mapping, behavior directive placement, emoji insert, and revert.
    • Conversation mode now shows the selected display name live above messages.
    • Documented new Conversation-only macros and updated Conversation profile guidance.
  • Bug Fixes

    • Restored chat-specific “about me” overrides after reload/refetch.
    • Improved AI-write reliability for “thinking” models and preserved drafts when results are blank.
    • Expanded lorebook sourcing (including embedded) and fixed participant/persona labeling.
    • Improved mobile “about me” popout layout and fixed help tooltip stacking (only one open).

🔄 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/3395 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 7/8/2026 **Status:** ✅ Merged **Merged:** 7/9/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/convo-profiles-followups` --- ### 📝 Commits (10+) - [`de84b00`](https://github.com/Pasta-Devs/Marinara-Engine/commit/de84b008c0479bb37d78b794337b24f33455e439) fix(convo): show the convo display name above messages - [`e77bfdc`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e77bfdc99c31ad216d25bdebfe0cec9cbe5945ab) fix(convo): keep chat-specific about-me across reloads - [`78da5cc`](https://github.com/Pasta-Devs/Marinara-Engine/commit/78da5ccba1bb48b97cf95b7b1d6d9192ed1b3a81) feat(convo): add an emoji picker to the About Me editor - [`206541c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/206541cdcf3a266ff64b6cafb00332a590231c1b) fix(convo): stop AI-write about-me failing on thinking models - [`f90e969`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f90e969e970280d36fd53cb6976d51d483506e92) fix(convo): stop labeling the persona as "the user" in profiles - [`f4124da`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f4124da8f1734eb1c47d2809871a6e866e5a233e) feat(convo): optionally declare the display name on a character's card - [`9eab535`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9eab535a2c899e6a47ca22150f41ee441537d826) feat(convo): configurable sources for AI-write about-me - [`7a0c733`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7a0c73323f090c1ce996d3849bb2f2920aa00c7e) fix(ui): only one help tooltip open at a time - [`52a684a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/52a684aefd3e82addb5a55ff689e8bdcd17d19ae) feat(convo): revert about-me + per-entry lorebook source selection - [`967849f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/967849facea2b86f8214b6de76b06a75970c7400) fix(convo): show embedded lorebook entries in the source picker ### 📊 Changes **22 files changed** (+1087 additions, -115 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+16 -0) 📝 `README.md` (+1 -1) 📝 `docs/CONVERSATION.md` (+68 -0) 📝 `docs/MACROS.md` (+11 -0) 📝 `docs/card-css-theming-guide.md` (+163 -59) ➕ `packages/client/src/components/characters/AboutMeSourcePicker.tsx` (+183 -0) 📝 `packages/client/src/components/characters/CharacterEditor.tsx` (+18 -1) 📝 `packages/client/src/components/characters/ConvoProfileFields.tsx` (+149 -7) 📝 `packages/client/src/components/chat/ChatArea.tsx` (+4 -0) 📝 `packages/client/src/components/chat/ConversationMessage.tsx` (+17 -2) 📝 `packages/client/src/components/chat/chat-area.types.ts` (+4 -0) 📝 `packages/client/src/components/modals/AboutMeViewerModal.tsx` (+171 -12) 📝 `packages/client/src/components/personas/PersonaEditor.tsx` (+13 -1) 📝 `packages/client/src/components/ui/HelpTooltip.tsx` (+55 -8) 📝 `packages/client/src/components/ui/MacroTextarea.tsx` (+5 -1) 📝 `packages/client/src/hooks/use-characters.ts` (+16 -0) 📝 `packages/server/src/routes/characters.routes.ts` (+93 -9) 📝 `packages/server/src/routes/generate.routes.ts` (+1 -0) 📝 `packages/server/src/services/conversation/conversation-profiles.ts` (+6 -4) 📝 `packages/server/src/services/generation/character-prompt-context.ts` (+30 -10) _...and 2 more files_ </details> ### 📄 Description ## Linked issue Closes #3368 (Conversation-mode profiles). These are post-merge follow-ups to #3374 — which closed #3368 — surfaced by playtesting the merged feature. No dedicated issue was opened for this batch; happy to file a tracking issue if maintainers prefer. ## Why this change #3374 shipped Conversation-mode profiles (display name, about me, behavior) to `staging`. Playtesting the merged feature turned up gaps and rough edges: the display name never actually appeared above messages, chat-specific about-me overrides didn't survive a reload, AI-write failed outright on Gemini 3.x "thinking" models, and the mobile popout overlapped its own keyboard. This PR fixes those and rounds the feature out — configurable AI-write sources, a Revert control, an emoji picker, and full documentation. Everything stays **Conversation-only**; none of it can reach a Roleplay, Visual Novel, or Game prompt. ## What changed Fixes: - The Convo display name is now shown as the sender label above messages (read live, so renames reflect immediately) — previously it only existed in the prompt and the profile popout. - Chat-specific about-me overrides survive reloads/refetches. The popout read `chat.metadata` without parsing it (it arrives as a JSON string on a fresh fetch), so the override reset to the card default and, on save, could drop other characters' overrides. - AI-write about-me no longer fails on "thinking" models (e.g. Gemini 3.x) that spent the whole output budget on reasoning and returned no content (`MAX_TOKENS`); raised the output ceiling and lowered reasoning effort. - The participant-profiles block no longer labels the persona as "the user" (which nudged some models toward sycophancy) — it's presented as just another participant. - The AI-write source picker lists a character's embedded lorebook entries, not only "linked" ones, so embedded-only cards can select entries. - The profile popout is a full-height sheet on mobile (keyboard/emoji picker no longer overlap the field) and re-clamps on desktop when the source panel opens. - Help tooltips no longer stack — opening one closes any other. - Card CSS avatar hook corrected: the clipped avatar is a `<button>` (nested under a glow wrapper in roleplay), so the ring now hugs the picture instead of the wrapper. Additions: - A configurable **source picker (⚙️)** for the AI-write about-me, in both the card editor and the in-chat popout: card fields (description/personality/scenario/backstory/appearance), the Convo behavior directive, the character's lorebook entries (with per-entry selection in the card editor), and recent chat context. Defaults to personality only. - A **Revert** control and an **emoji picker** in the about-me editor. - An optional per-character **"declare display name on the card"** toggle so the model can map the display name to the right card in group chats. Docs: new Conversation profiles section in `docs/CONVERSATION.md`, the Conversation macros in `docs/MACROS.md`, an expanded all-modes Card CSS showcase, plus README and CHANGELOG. Isolation: the display-name-on-card line is injected inside the identity-fallback per-character loop gated on `isConversation`; the profile blocks and macros are composed only in the conversation branch of the generate route; and the new `convoDisplayNameInCard` / `aboutMeSources` fields ride through export/import inside `extensions` (verified end-to-end). Nothing leaks into RP/VN/Game. ## Validation - [x] `pnpm check` passes locally - [x] Container (Docker / Podman) built and ran without issue - [x] Ran the app, clicked through the changes manually - [x] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [x] Above manual verification completed (describe below) - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes Automated on the dev machine: `pnpm lint` clean (shared + server + client typechecks + eslint); client production build clean; `pnpm regression:prompt` passes (58 checks, including the mode-isolation gate); `pnpm version:check` in sync. `pnpm check`'s full build step is blocked on this Windows dev machine by a pre-existing build-script bug (#3162 / fix PR #3163); the server `tsc` it wraps passes. Commits were playtested in the running app throughout. Manually completed: - **Isolation (load-bearing):** Convo display name shows above messages and updates live on rename; confirm it is absent from the same character used in a Roleplay and a Game chat, and that `{{convo_display}}` / `{{char_about}}` / `{{convo_behavior}}` resolve to empty in RP/Game. - **Persistence:** set a chat-specific about-me, hard-reload (Ctrl+Shift+R), confirm it survives; with two characters each holding an override, save one and confirm the other's isn't wiped. - **AI-write:** with a Gemini 3.x connection it returns text (not an Internal Server Error); the ⚙️ source picker (card fields, convo behavior, embedded + linked lorebook entries with per-entry selection, chat context in the in-chat editor only); Revert undoes a manual/AI edit; the emoji picker inserts at the caret. - **Declare-on-card:** the toggle prepends the line to the card in a Conversation prompt (peek-prompt) and never in RP/Game. - **Popout:** full sheet on mobile; no overflow on desktop with the source panel open. About Me Keeper agent + `update_about_me` tool still function. Help tooltips don't stack. - **Round-trip:** character export -> re-import (native + SillyTavern/PNG) keeps the new `extensions` fields; a full backup -> restore keeps persona convo fields. - **Card CSS:** paste the "Eldritch Grimoire" showcase into Creator Notes, enable card CSS, confirm the avatar ring hugs the picture in both Roleplay and Conversation. ## Docs and release impact - [ ] No docs changes needed - [x] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) Docs touched: `docs/CONVERSATION.md` (profiles section), `docs/MACROS.md` (Conversation macros), `docs/card-css-theming-guide.md` (about-me popout hooks, all-modes showcase, avatar hook fix), `README.md` (doc-index description), `CHANGELOG.md` (`[Unreleased]`). No version bump. ## UI evidence (if applicable) <img width="809" height="599" alt="{3AF048B0-B864-45C7-8282-B3F7B50ACED5}" src="https://github.com/user-attachments/assets/1c1b7200-5b90-4650-8731-37a31a2da901" /> <img width="808" height="559" alt="{CF155A78-0D71-48D0-8374-76E9C91678AF}" src="https://github.com/user-attachments/assets/900a373c-8d75-41c0-96be-f3a1f412c78e" /> <img width="800" height="557" alt="{204EF183-DDC9-47E5-92C0-DCDFA7F4D1FD}" src="https://github.com/user-attachments/assets/1994d256-f648-4e60-8ffc-6e99dd60b3fe" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added Conversation “about me” profile controls: configurable AI source selection (with updated defaults), display-name mapping, behavior directive placement, emoji insert, and revert. * Conversation mode now shows the selected display name live above messages. * Documented new Conversation-only macros and updated Conversation profile guidance. * **Bug Fixes** * Restored chat-specific “about me” overrides after reload/refetch. * Improved AI-write reliability for “thinking” models and preserved drafts when results are blank. * Expanded lorebook sourcing (including embedded) and fixed participant/persona labeling. * Improved mobile “about me” popout layout and fixed help tooltip stacking (only one open). <!-- 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:05:07 +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#5917
No description provided.