[PR #388] [MERGED] feat(assistant): warn users that Mari can edit characters and personas #4599

Closed
opened 2026-10-22 04:09:03 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/388
Author: @LukaTheHero
Created: 5/4/2026
Status: ✅ Merged
Merged: 5/4/2026
Merged by: @SpicyMarinara

Base: main ← Head: feat/mari-capability-warning


📝 Commits (1)

  • 7849940 feat(assistant): warn users that Mari can edit characters and personas

📊 Changes

5 files changed (+98 additions, -3 deletions)

View changed files

📝 packages/client/src/components/chat/ChatInput.tsx (+3 -1)
📝 packages/client/src/components/chat/ConversationInput.tsx (+3 -1)
➕ packages/client/src/components/chat/MariCapabilityNotice.tsx (+89 -0)
📝 packages/client/src/components/onboarding/OnboardingTutorial.tsx (+1 -1)
📝 packages/server/src/db/seed-mari.ts (+2 -0)

📄 Description

Why this change

Professor Mari (the built-in assistant) executes [update_character] and [update_persona] commands as soon as the user asks her to edit something — no preview, no confirmation prompt. There is asymmetric data-loss risk between the two paths:

  • update_character calls chars.update(...) with versionSource: \"command\", which creates a recoverable version snapshot before overwriting the active card (packages/server/src/services/storage/characters.storage.ts:128-139). The user can roll back from the character's version history.
  • updatePersona (characters.storage.ts:309-343) just writes the new fields straight to the personas table. No snapshot, no rollback path. This is the case users actually hit when they lose data.

Audited Mari's full command surface (packages/server/src/services/conversation/character-commands.ts:209-215 + handlers in packages/server/src/routes/generate.routes.ts:7651-7806) to confirm the warning copy is accurate. Mari can:

  • Create personas / characters / chats (additive, safe)
  • Update characters (creates version snapshot — recoverable)
  • Update personas (overwrites with no snapshot — irrecoverable)
  • Fetch / navigate (read-only)

She cannot update lorebooks, presets, chats, agents, connections, settings, or regex scripts, and there are no delete commands. So the warning scopes correctly to characters + personas with the asymmetry called out.

What changed

Three places now surface the same callout, sized for the audience that hits each one:

  • packages/client/src/components/onboarding/OnboardingTutorial.tsx — Step 5 ("Meet Professor Mari!") body now includes a Heads up paragraph spelling out the character-vs-persona difference. Every new user sees this during the tour.
  • packages/server/src/db/seed-mari.ts — Mari's first_mes opens with a one-line ⚠️ explaining the same. seedProfessorMari already re-applies the seed when the character data hash changes (line 444-453), so the updated card propagates on app start. The new first_mes only affects new chats with Mari, not existing ones already populated by the previous greeting — the in-app banner below covers existing users.
  • New packages/client/src/components/chat/MariCapabilityNotice.tsx — dismissible amber banner that renders above the input bar in any chat where PROFESSOR_MARI_ID is in characterIds. Detection mirrors the existing MariThinkingIndicator pattern. Dismissal persists under localStorage key mari-capability-notice-dismissed-v1, so it shows at most once across all of the user's Mari chats. Re-checks storage on chat-switch to handle cross-tab dismissal.

Wired into both ConversationInput.tsx and ChatInput.tsx directly above <MariThinkingIndicator /> so the new notice and the existing thinking pill share one "Mari status" area.

Compatibility

  • Existing Mari chats are unchanged at the data layer — the banner is the only thing that changes for them.
  • No new server routes, no schema changes, no backend behavior change. The destructive commands themselves are not modified — this PR is purely informational.
  • Banner styling matches existing alert patterns in the codebase (rounded-lg, amber accent, inline X dismiss). Tested in both light and dark themes and at mobile widths.

Closes / refs

User report from Discord (general). No tracking issue yet — happy to file one if reviewers prefer it linked.

Summary by CodeRabbit

  • New Features

    • Added a one-time capability notice that displays in Professor Mari conversations, informing users about persona editing behavior with a dismissal option.
  • UI/UX Updates

    • Enhanced the "Meet Professor Mari!" onboarding step with additional guidance about persona editing behavior.
    • Updated Professor Mari's initial greeting message to include important information regarding persona edits versus character edits.

🔄 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/388 **Author:** [@LukaTheHero](https://github.com/LukaTheHero) **Created:** 5/4/2026 **Status:** ✅ Merged **Merged:** 5/4/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `main` ← **Head:** `feat/mari-capability-warning` --- ### 📝 Commits (1) - [`7849940`](https://github.com/Pasta-Devs/Marinara-Engine/commit/784994008d08b37da90961e520d5c97f79d2ad6e) feat(assistant): warn users that Mari can edit characters and personas ### 📊 Changes **5 files changed** (+98 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/chat/ChatInput.tsx` (+3 -1) 📝 `packages/client/src/components/chat/ConversationInput.tsx` (+3 -1) ➕ `packages/client/src/components/chat/MariCapabilityNotice.tsx` (+89 -0) 📝 `packages/client/src/components/onboarding/OnboardingTutorial.tsx` (+1 -1) 📝 `packages/server/src/db/seed-mari.ts` (+2 -0) </details> ### 📄 Description ## Why this change Professor Mari (the built-in assistant) executes `[update_character]` and `[update_persona]` commands as soon as the user asks her to edit something — no preview, no confirmation prompt. There is asymmetric data-loss risk between the two paths: - `update_character` calls `chars.update(...)` with `versionSource: \"command\"`, which creates a recoverable version snapshot before overwriting the active card (`packages/server/src/services/storage/characters.storage.ts:128-139`). The user can roll back from the character's version history. - `updatePersona` (`characters.storage.ts:309-343`) just writes the new fields straight to the personas table. **No snapshot, no rollback path.** This is the case users actually hit when they lose data. Audited Mari's full command surface (`packages/server/src/services/conversation/character-commands.ts:209-215` + handlers in `packages/server/src/routes/generate.routes.ts:7651-7806`) to confirm the warning copy is accurate. Mari can: - Create personas / characters / chats (additive, safe) - Update characters (creates version snapshot — recoverable) - Update personas (overwrites with no snapshot — irrecoverable) - Fetch / navigate (read-only) She cannot update lorebooks, presets, chats, agents, connections, settings, or regex scripts, and there are no delete commands. So the warning scopes correctly to characters + personas with the asymmetry called out. ## What changed Three places now surface the same callout, sized for the audience that hits each one: - **`packages/client/src/components/onboarding/OnboardingTutorial.tsx`** — Step 5 (\"Meet Professor Mari!\") body now includes a Heads up paragraph spelling out the character-vs-persona difference. Every new user sees this during the tour. - **`packages/server/src/db/seed-mari.ts`** — Mari's `first_mes` opens with a one-line ⚠️ explaining the same. `seedProfessorMari` already re-applies the seed when the character data hash changes (line 444-453), so the updated card propagates on app start. The new `first_mes` only affects *new* chats with Mari, not existing ones already populated by the previous greeting — the in-app banner below covers existing users. - **New `packages/client/src/components/chat/MariCapabilityNotice.tsx`** — dismissible amber banner that renders above the input bar in any chat where `PROFESSOR_MARI_ID` is in `characterIds`. Detection mirrors the existing `MariThinkingIndicator` pattern. Dismissal persists under `localStorage` key `mari-capability-notice-dismissed-v1`, so it shows at most once across all of the user's Mari chats. Re-checks storage on chat-switch to handle cross-tab dismissal. Wired into both `ConversationInput.tsx` and `ChatInput.tsx` directly above `<MariThinkingIndicator />` so the new notice and the existing thinking pill share one \"Mari status\" area. ## Compatibility - Existing Mari chats are unchanged at the data layer — the banner is the only thing that changes for them. - No new server routes, no schema changes, no backend behavior change. The destructive commands themselves are not modified — this PR is purely informational. - Banner styling matches existing alert patterns in the codebase (rounded-lg, amber accent, inline X dismiss). Tested in both light and dark themes and at mobile widths. ## Closes / refs User report from Discord (general). No tracking issue yet — happy to file one if reviewers prefer it linked. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a one-time capability notice that displays in Professor Mari conversations, informing users about persona editing behavior with a dismissal option. * **UI/UX Updates** * Enhanced the "Meet Professor Mari!" onboarding step with additional guidance about persona editing behavior. * Updated Professor Mari's initial greeting message to include important information regarding persona edits versus character edits. <!-- 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-22 04:09:03 +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#4599
No description provided.