[PR #3374] [MERGED] feat(convo): Conversation-mode profiles — display name, about-me, and behavior directive #5910

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

📋 Pull Request Information

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

Base: staging ← Head: feat/convo-mode-profiles


📝 Commits (10+)

  • abec542 feat(convo): add display name, about-me, and behavior fields (Conversation-only foundation)
  • cbe8a4e feat(convo): about-me viewer + per-chat override editing
  • 56f0c4b feat(convo): add About Me Keeper agent (self-updating about-me)
  • 7312018 feat(convo): add update_about_me tool (in-character self-update)
  • bc13878 fix(convo): address adversarial review of the Convo-profiles branch
  • 528af6a feat(convo): make the about-me viewer a Discord-style profile popout
  • e87a4d3 feat(convo): simplify about-me edit label + custom emoji in the profile popout
  • 8008a58 fix(convo): emoji picker layering + keep the profile popout open while editing
  • b5d3275 fix(convo): stop the emoji panel being clipped by the profile card
  • 6d102e2 fix(convo): enlarge the about-me emoji panel to match the standard picker

📊 Changes

44 files changed (+2001 additions, -71 deletions)

View changed files

📝 CHANGELOG.md (+4 -0)
📝 docs/card-css-theming-guide.md (+59 -0)
📝 packages/client/src/components/characters/CharacterEditor.tsx (+39 -0)
➕ packages/client/src/components/characters/ConvoProfileFields.tsx (+185 -0)
📝 packages/client/src/components/chat/ChatArea.tsx (+14 -1)
📝 packages/client/src/components/chat/ChatSettingsDrawer.tsx (+4 -1)
📝 packages/client/src/components/chat/ConversationMessage.tsx (+30 -0)
📝 packages/client/src/components/chat/ConversationMessageBubble.tsx (+41 -21)
📝 packages/client/src/components/chat/ConversationMessageLine.tsx (+32 -13)
📝 packages/client/src/components/chat/ConversationMessageShared.tsx (+57 -0)
📝 packages/client/src/components/chat/CreatorNotesCssInjector.tsx (+40 -18)
📝 packages/client/src/components/layout/ModalRenderer.tsx (+28 -0)
➕ packages/client/src/components/modals/AboutMeViewerModal.tsx (+533 -0)
📝 packages/client/src/components/modals/CharacterCardUpdateModal.tsx (+26 -11)
📝 packages/client/src/components/modals/ImportPersonaModal.tsx (+3 -0)
📝 packages/client/src/components/personas/PersonaEditor.tsx (+67 -1)
📝 packages/client/src/hooks/use-characters.ts (+22 -0)
📝 packages/client/src/lib/agent-cadence.ts (+8 -0)
📝 packages/server/src/db/migrate.ts (+18 -0)
📝 packages/server/src/db/schema/characters.ts (+6 -0)

...and 24 more files

📄 Description

INCOMPLETE, DO NOT MERGE

Linked issue

Closes #3368

Why this change

Conversation mode is Marinara's casual, messaging-style surface, but characters and personas have no way to present a Convo-appropriate identity: no separate display name, no "about me"/profile, and no Convo-specific behavior guidance that stays out of serious roleplay. Everything is driven by the same card fields RP and Game use, so tuning a character for Convo compromises them elsewhere. This adds Convo-mode-only profile + behavior features, provably isolated from Roleplay, Visual Novel, and Game modes.

What changed

Built as one PR in stacked, independently-testable commits:

  1. Foundation + isolation. Convo fields on character cards (under extensions, so they round-trip export/import) and personas (new columns, fully plumbed): a Convo display name, an "about me", and a behavior directive { instruction, insertionStrategy } (constant before/after the card, replace / append-around post-history, or macro-placeable). All composed only inside the generate route's if (chatMode === "conversation") branch. New Convo macros ({{convo_display}}, {{char_about}}, {{persona_about}}, {{convo_behavior}}) read a dedicated MacroContext.convoFields bucket assigned in exactly one place — inside that branch — so they resolve to empty string in RP/VN/Game even if pasted into a shared card/lorebook surface. Includes an AI-write button that drafts an in-character about-me (deliberately allowed to be sparse, an emoji, or empty — authentic, not a forced polished bio).
  2. Avatar viewer + per-chat override. Clicking a participant's avatar in Convo opens an about-me card showing the effective value (per-chat override, else the card/persona default) and lets you set / edit / clear a chat-specific override (Discord "per-server profile" style). The override wins in the prompt.
  3. About Me Keeper agent. An opt-in, Conversation-only post-processing agent (user-configurable cadence) that lets characters keep their own about-me current — updating either their public (card) profile through the existing character-card approval modal, or a chat-specific override (auto-applied). The prompt makes the public/private distinction explicit and preserves authenticity.
  4. update_about_me command. The in-character version: an opt-in function-call tool in the Function Calling section of Chat Settings that a character can call mid-turn to update its own about-me (scope: public | chat). Conversation-only and strictly opt-in.
  5. CSS-themable popout. The about-me profile popout is now customizable through the existing card-CSS system, from a character's or persona's Creator Notes (personas previously had no CSS path — the injector was extended to scope their creator-notes CSS to the popout). New stable mari-about-me-* hooks (popout, banner, avatar, status, name, handle, presence, box, label, badge, text) are documented in the Card CSS Theming Guide with a paste-ready example, and added to the guide's AI-assistant prompt constraints. Conversation-only, like the popout itself.

The about-me delivery is auto-injected for all present participants plus the macros, with a per-chat off-switch.

Review

The branch went through a four-dimension adversarial review (mode isolation, self-update logic, persona persistence round-trip, client UI). Isolation verdict: airtight — no Convo field/macro/agent/tool can reach an RP/VN/Game prompt. Confirmed findings were fixed in the last commit:

  • Data loss: compatible-JSON persona import + full-backup restore now carry the new persona fields (hand-maintained whitelists that were missed).
  • The update_about_me tool refuses in ambiguous merged-group turns rather than writing the wrong character's about-me.
  • The card-update modal handles populating an empty about-me from scratch as a one-click Approve and guards against an empty-oldText prepend on concurrent edits.
  • The agent's chat-override write uses the queued atomic patchMetadata like the tool path.

Known limitations

  • The grouped multi-speaker message layout doesn't yet make per-segment avatars open the viewer (its per-segment identity carries no id) — the line and bubble layouts do. Follow-up.
  • In a merged group conversation, update_about_me can't attribute the call to a specific speaker, so it declines (the About Me Keeper agent is unaffected — it names the character per update). Single-character and manual/individual group convos work.
  • "Commands" here means the Function Calling section (function-call tools), not the separate bracket-tag "Character Commands" system.

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 so far: shared/server/client typechecks pass; pnpm lint clean; pnpm regression:prompt passes (55 checks, incl. "mode-specific prompt gates keep known behavior stable"); client production build passes. pnpm check's full build step is blocked on this dev machine by a pre-existing Windows-only build-script bug (#3162 / fix PR #3163); the server tsc it wraps passes. Commit 1 was playtested in the running app.

To verify before un-drafting (human, in a real browser):

  • Isolation (the load-bearing check): set a Convo display name + about-me + behavior on a character and a persona; confirm they appear in a Conversation chat's prompt (peek-prompt) and are absent from the same characters used in a Roleplay and a Game chat. Confirm {{char_about}}/{{convo_behavior}} pasted into a card description render in Convo but resolve to empty in RP/Game.
  • Editors: each behavior insertion strategy; the AI-write button with a real connection (confirm sparse/empty results are allowed and don't silently wipe existing text).
  • Viewer: click character and persona avatars in Convo (line + bubble layouts); set/edit/clear a per-chat override; confirm it wins in the prompt and clearing reverts to default.
  • About Me Keeper agent: enable it, set a short cadence, converse; confirm a public update opens the approval modal (including populating an empty about-me from scratch as one-click Approve) and a chat update auto-applies to this chat only.
  • update_about_me tool: enable it in Function Calling in a single-character convo; confirm it's absent outside Conversation and in the Function Calling picker in other modes.
  • Round-trip: character card export → re-import (native + SillyTavern/PNG) keeps the new fields; persona native + compatible export/import; a full backup → restore keeps the persona fields.
  • CSS theming: paste the example <style> from the Card CSS Theming Guide into a character's and a persona's Creator Notes, enable Card CSS, and confirm the popout restyles in Conversation (and that the CSS does not leak into RP/Game or other chat surfaces).
  • Light + dark mode; mobile viewport (~400px); empty states.

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: CHANGELOG.md (feature entry under Unreleased); docs/card-css-theming-guide.md (new "About Me Profile Popout" section with the mari-about-me-* hooks + example, and the new hooks noted in the AI-assistant prompt template).

UI evidence (if applicable)

Screenshots pending the manual verification pass.


🔄 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/3374 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 7/8/2026 **Status:** ✅ Merged **Merged:** 7/8/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `feat/convo-mode-profiles` --- ### 📝 Commits (10+) - [`abec542`](https://github.com/Pasta-Devs/Marinara-Engine/commit/abec542569f037458b8ba17cfe4409cfb65ce141) feat(convo): add display name, about-me, and behavior fields (Conversation-only foundation) - [`cbe8a4e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/cbe8a4e4918fbe8d2001ad6c34f0c7c2a42a7a86) feat(convo): about-me viewer + per-chat override editing - [`56f0c4b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/56f0c4b487e07e96b5d5afcc84de0bab2570b876) feat(convo): add About Me Keeper agent (self-updating about-me) - [`7312018`](https://github.com/Pasta-Devs/Marinara-Engine/commit/73120182703b112bc2edd3fb4c547c9ea2157689) feat(convo): add update_about_me tool (in-character self-update) - [`bc13878`](https://github.com/Pasta-Devs/Marinara-Engine/commit/bc1387869236b1c30a7c630747bf72b192800d75) fix(convo): address adversarial review of the Convo-profiles branch - [`528af6a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/528af6aa9a1976c600984e1e25b4cfb58001750a) feat(convo): make the about-me viewer a Discord-style profile popout - [`e87a4d3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e87a4d3796a8e65720d9cd8e8c02daffe769184d) feat(convo): simplify about-me edit label + custom emoji in the profile popout - [`8008a58`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8008a580536a897eae908ec2b2d0342ce3fe67ec) fix(convo): emoji picker layering + keep the profile popout open while editing - [`b5d3275`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b5d3275c688950ac8f889c0e4850fe8361aa3445) fix(convo): stop the emoji panel being clipped by the profile card - [`6d102e2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6d102e2adc9416a62ccc4830071d8bfbb03475c1) fix(convo): enlarge the about-me emoji panel to match the standard picker ### 📊 Changes **44 files changed** (+2001 additions, -71 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+4 -0) 📝 `docs/card-css-theming-guide.md` (+59 -0) 📝 `packages/client/src/components/characters/CharacterEditor.tsx` (+39 -0) ➕ `packages/client/src/components/characters/ConvoProfileFields.tsx` (+185 -0) 📝 `packages/client/src/components/chat/ChatArea.tsx` (+14 -1) 📝 `packages/client/src/components/chat/ChatSettingsDrawer.tsx` (+4 -1) 📝 `packages/client/src/components/chat/ConversationMessage.tsx` (+30 -0) 📝 `packages/client/src/components/chat/ConversationMessageBubble.tsx` (+41 -21) 📝 `packages/client/src/components/chat/ConversationMessageLine.tsx` (+32 -13) 📝 `packages/client/src/components/chat/ConversationMessageShared.tsx` (+57 -0) 📝 `packages/client/src/components/chat/CreatorNotesCssInjector.tsx` (+40 -18) 📝 `packages/client/src/components/layout/ModalRenderer.tsx` (+28 -0) ➕ `packages/client/src/components/modals/AboutMeViewerModal.tsx` (+533 -0) 📝 `packages/client/src/components/modals/CharacterCardUpdateModal.tsx` (+26 -11) 📝 `packages/client/src/components/modals/ImportPersonaModal.tsx` (+3 -0) 📝 `packages/client/src/components/personas/PersonaEditor.tsx` (+67 -1) 📝 `packages/client/src/hooks/use-characters.ts` (+22 -0) 📝 `packages/client/src/lib/agent-cadence.ts` (+8 -0) 📝 `packages/server/src/db/migrate.ts` (+18 -0) 📝 `packages/server/src/db/schema/characters.ts` (+6 -0) _...and 24 more files_ </details> ### 📄 Description # INCOMPLETE, DO NOT MERGE ## Linked issue Closes #3368 ## Why this change Conversation mode is Marinara's casual, messaging-style surface, but characters and personas have no way to present a Convo-appropriate identity: no separate display name, no "about me"/profile, and no Convo-specific behavior guidance that stays out of serious roleplay. Everything is driven by the same card fields RP and Game use, so tuning a character for Convo compromises them elsewhere. This adds Convo-mode-only profile + behavior features, **provably isolated** from Roleplay, Visual Novel, and Game modes. ## What changed Built as one PR in stacked, independently-testable commits: 1. **Foundation + isolation.** Convo fields on character cards (under `extensions`, so they round-trip export/import) and personas (new columns, fully plumbed): a Convo display name, an "about me", and a behavior directive `{ instruction, insertionStrategy }` (constant before/after the card, replace / append-around post-history, or macro-placeable). All composed **only** inside the generate route's `if (chatMode === "conversation")` branch. New Convo macros (`{{convo_display}}`, `{{char_about}}`, `{{persona_about}}`, `{{convo_behavior}}`) read a dedicated `MacroContext.convoFields` bucket assigned in exactly one place — inside that branch — so they resolve to empty string in RP/VN/Game even if pasted into a shared card/lorebook surface. Includes an **AI-write** button that drafts an in-character about-me (deliberately allowed to be sparse, an emoji, or empty — authentic, not a forced polished bio). 2. **Avatar viewer + per-chat override.** Clicking a participant's avatar in Convo opens an about-me card showing the effective value (per-chat override, else the card/persona default) and lets you set / edit / clear a chat-specific override (Discord "per-server profile" style). The override wins in the prompt. 3. **About Me Keeper agent.** An opt-in, Conversation-only post-processing agent (user-configurable cadence) that lets characters keep their own about-me current — updating either their **public** (card) profile through the existing character-card approval modal, or a **chat-specific** override (auto-applied). The prompt makes the public/private distinction explicit and preserves authenticity. 4. **`update_about_me` command.** The in-character version: an opt-in function-call tool in the **Function Calling** section of Chat Settings that a character can call mid-turn to update its own about-me (`scope: public | chat`). Conversation-only and strictly opt-in. 5. **CSS-themable popout.** The about-me profile popout is now customizable through the existing card-CSS system, from a character's **or persona's** Creator Notes (personas previously had no CSS path — the injector was extended to scope their creator-notes CSS to the popout). New stable `mari-about-me-*` hooks (popout, banner, avatar, status, name, handle, presence, box, label, badge, text) are documented in the Card CSS Theming Guide with a paste-ready example, and added to the guide's AI-assistant prompt constraints. Conversation-only, like the popout itself. The about-me delivery is auto-injected for all present participants plus the macros, with a per-chat off-switch. ## Review The branch went through a four-dimension adversarial review (mode isolation, self-update logic, persona persistence round-trip, client UI). **Isolation verdict: airtight** — no Convo field/macro/agent/tool can reach an RP/VN/Game prompt. Confirmed findings were fixed in the last commit: - Data loss: compatible-JSON persona import + full-backup restore now carry the new persona fields (hand-maintained whitelists that were missed). - The `update_about_me` tool refuses in ambiguous merged-group turns rather than writing the wrong character's about-me. - The card-update modal handles populating an empty about-me from scratch as a one-click Approve and guards against an empty-`oldText` prepend on concurrent edits. - The agent's chat-override write uses the queued atomic `patchMetadata` like the tool path. ## Known limitations - The **grouped multi-speaker** message layout doesn't yet make per-segment avatars open the viewer (its per-segment identity carries no id) — the line and bubble layouts do. Follow-up. - In a **merged** group conversation, `update_about_me` can't attribute the call to a specific speaker, so it declines (the About Me Keeper agent is unaffected — it names the character per update). Single-character and manual/individual group convos work. - "Commands" here means the **Function Calling** section (function-call tools), not the separate bracket-tag "Character Commands" system. ## 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 so far: shared/server/client typechecks pass; `pnpm lint` clean; `pnpm regression:prompt` passes (55 checks, incl. "mode-specific prompt gates keep known behavior stable"); client production build passes. `pnpm check`'s full build step is blocked on this dev machine by a pre-existing Windows-only build-script bug (#3162 / fix PR #3163); the server `tsc` it wraps passes. Commit 1 was playtested in the running app. To verify before un-drafting (human, in a real browser): - **Isolation (the load-bearing check):** set a Convo display name + about-me + behavior on a character and a persona; confirm they appear in a **Conversation** chat's prompt (peek-prompt) and are **absent** from the same characters used in a **Roleplay** and a **Game** chat. Confirm `{{char_about}}`/`{{convo_behavior}}` pasted into a card description render in Convo but resolve to empty in RP/Game. - Editors: each behavior insertion strategy; the AI-write button with a real connection (confirm sparse/empty results are allowed and don't silently wipe existing text). - Viewer: click character and persona avatars in Convo (line + bubble layouts); set/edit/clear a per-chat override; confirm it wins in the prompt and clearing reverts to default. - About Me Keeper agent: enable it, set a short cadence, converse; confirm a public update opens the approval modal (including populating an empty about-me from scratch as one-click Approve) and a chat update auto-applies to this chat only. - `update_about_me` tool: enable it in Function Calling in a single-character convo; confirm it's absent outside Conversation and in the Function Calling picker in other modes. - Round-trip: character card export → re-import (native + SillyTavern/PNG) keeps the new fields; persona native + compatible export/import; a full backup → restore keeps the persona fields. - CSS theming: paste the example `<style>` from the Card CSS Theming Guide into a character's and a persona's Creator Notes, enable Card CSS, and confirm the popout restyles in Conversation (and that the CSS does **not** leak into RP/Game or other chat surfaces). - Light + dark mode; mobile viewport (~400px); empty states. ## 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: `CHANGELOG.md` (feature entry under Unreleased); `docs/card-css-theming-guide.md` (new "About Me Profile Popout" section with the `mari-about-me-*` hooks + example, and the new hooks noted in the AI-assistant prompt template). ## UI evidence (if applicable) _Screenshots pending the manual verification pass._ --- <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:02 +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#5910
No description provided.