mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #222] [CLOSED] feat(chat): add "Mari is thinking…" indicator for command execution #4513
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#4513
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/222
Author: @cha1latte
Created: 4/24/2026
Status: ❌ Closed
Base:
main← Head:feat/mari-thinking-indicator📝 Commits (4)
33abfd2feat(chat): add "Mari is thinking…" indicator for command execution17b594afix(chat): address review comments on Mari thinking indicator4001226fix(chat): hide Mari indicator immediately on chat switchc1a07d6chore(chat): skip idle hide timer when pill has no owner📊 Changes
7 files changed (+222 additions, -0 deletions)
View changed files
📝
CHANGELOG.md(+6 -0)📝
packages/client/src/components/chat/ChatInput.tsx(+4 -0)📝
packages/client/src/components/chat/ConversationInput.tsx(+4 -0)➕
packages/client/src/components/chat/MariThinkingIndicator.tsx(+150 -0)📝
packages/client/src/hooks/use-generate.ts(+22 -0)📝
packages/client/src/stores/chat.store.ts(+25 -0)📝
packages/server/src/routes/generate.routes.ts(+11 -0)📄 Description
Summary
Adds a small "Mari is thinking…" pill with pulsing dots above the composer whenever Professor Mari is executing one of her embedded commands (create/update character, fetch, create chat, navigate). Shows only in chats where Mari is a participant.
Why
From the Discord feature-request thread — users can't tell whether Mari is still working on a task or stalled, because her commands run after her reply finishes streaming and there's no visible signal during that window. Quote: "I don't know if asking the assistant to work on my cards is happening, or if it's frozen, or what."
Toasts fire only after each command completes, so they're confirmation after-the-fact, not reassurance during-the-wait.
How it works
generate.routes.ts)assistant_commands_start(before the command loop) andassistant_commands_end(after), with no filtering — any conversation-mode character's commands emit them.chat.store.ts)commandsExecutingChatId: string | nullmirroring the server-side window, set by SSE handlers inuse-generate.ts.use-generate.ts)done/erroras a safety net.MariThinkingIndicator.tsx)isMariChatfrom the active chat'scharacterIds(so the pill is Mari-scoped on the client, keeping the server event neutral). Mounted in bothChatInput(roleplay) andConversationInput(conversation).Two notable implementation details:
Known limitations
schedule_update,cross_post). The Mari gate lives on the client, so those cases don't show a pill — but if a future feature wants a generic "assistant is working" indicator for non-Mari commands, the plumbing is already there.done/errorhandle cleanup, but theassistant_commands_endevent won't be received. Behavior: pill disappears when the stream errors, which is correct but means the user doesn't see a natural "finished" signal if the server crashes mid-loop. Acceptable.Test plan
Manually verified in dev against a Mari conversation chat:
pnpm checkclean (lint + production build, no new warnings)pnpm version:checkpassespnpm guard:installer-artifactspassesScreenshot of the pill mid-execution attached.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.