[PR #4016] [MERGED] Restore live reasoning indicators in Roleplay and Conversation #6204

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

📋 Pull Request Information

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

Base: staging ← Head: fix/3963-reasoning-indicators


📝 Commits (2)

  • 0b4c892 Restore live reasoning indicators
  • 5e2709f fix(ui): address reasoning modal review

📊 Changes

13 files changed (+357 additions, -161 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 e2e/core-flows.e2e.ts (+161 -0)
📝 packages/client/src/components/chat/ChatMessage.tsx (+81 -84)
📝 packages/client/src/components/chat/ChatRoleplaySurface.tsx (+9 -4)
📝 packages/client/src/components/chat/ConversationMessage.tsx (+22 -63)
📝 packages/client/src/components/chat/ConversationMessageActions.tsx (+16 -1)
📝 packages/client/src/components/chat/ConversationMessageGrouped.tsx (+7 -2)
📝 packages/client/src/components/chat/ConversationMessageShared.tsx (+4 -0)
📝 packages/client/src/components/chat/ConversationView.tsx (+3 -4)
➕ packages/client/src/components/chat/MessageThinkingModal.tsx (+40 -0)
📝 packages/client/src/components/ui/Modal.tsx (+1 -1)
📝 packages/client/src/hooks/use-dialog-focus-scope.ts (+8 -2)
📝 packages/client/src/localization/locales/en.json (+4 -0)

📄 Description

Why

Issue #3963 was reopened because the previous reasoning UI change removed Roleplay's immediate Thinking… state and made the reasoning control disappear during Conversation renderer transitions. Users could no longer reliably open reasoning beneath the active message.

What changed

  • Restores an immediate localized Thinking… placeholder in Roleplay, including regeneration.
  • Shows exactly one reasoning control as soon as the first real reasoning delta arrives; no empty reasoning control appears before then.
  • Uses one shared Model Thoughts viewer for Roleplay and Conversation, and keeps its contents updating while additional reasoning deltas arrive.
  • Preserves the reasoning control when a live Conversation response transitions into the grouped multi-speaker renderer.
  • Prevents stale reasoning from the previous swipe appearing during regeneration.
  • Retains saved reasoning controls on completed messages.
  • Adds semantic localization keys and an Unreleased changelog entry.

Root cause

The earlier implementation added a separate Conversation-only overlay action outside the normal message action system. That action was not carried into the grouped renderer, while Roleplay's placeholder only rendered after a reasoning buffer already existed. Regeneration could also fall back to the previous swipe's saved reasoning before the new swipe produced any.

Validation

  • pnpm check
  • pnpm exec playwright test -c playwright.config.ts -g 'exposes reasoning on its first live chunk' (4 passed: Roleplay and Conversation on desktop and mobile)
  • git diff --check

Manual verification

  • Manually verify Roleplay shows Thinking… immediately after generation begins.
  • Manually verify the reasoning icon appears on the first reasoning delta and the open viewer updates on later deltas.
  • Manually verify Conversation retains the icon when streamed text becomes a grouped multi-speaker response.
  • Manually verify saved reasoning remains available after completion and after regeneration.

Closes #3963

Summary by CodeRabbit

  • New Features

    • Added a live Model Thoughts viewer for Conversation and Roleplay chats.
    • Reasoning now appears progressively as it streams and remains available after messages complete.
    • Added localized labels, titles, and controls for viewing and closing model thoughts.
  • Bug Fixes

    • Restored the immediate “Thinking…” placeholder during Roleplay responses.
    • Ensured only the relevant reasoning control is shown while thoughts are streaming.

🔄 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/4016 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/23/2026 **Status:** ✅ Merged **Merged:** 7/23/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/3963-reasoning-indicators` --- ### 📝 Commits (2) - [`0b4c892`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0b4c892ca5506e7032e34d2b9e4be64d49967fa0) Restore live reasoning indicators - [`5e2709f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5e2709f5ccd6cef8ae46e996e283c8ece6138879) fix(ui): address reasoning modal review ### 📊 Changes **13 files changed** (+357 additions, -161 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `e2e/core-flows.e2e.ts` (+161 -0) 📝 `packages/client/src/components/chat/ChatMessage.tsx` (+81 -84) 📝 `packages/client/src/components/chat/ChatRoleplaySurface.tsx` (+9 -4) 📝 `packages/client/src/components/chat/ConversationMessage.tsx` (+22 -63) 📝 `packages/client/src/components/chat/ConversationMessageActions.tsx` (+16 -1) 📝 `packages/client/src/components/chat/ConversationMessageGrouped.tsx` (+7 -2) 📝 `packages/client/src/components/chat/ConversationMessageShared.tsx` (+4 -0) 📝 `packages/client/src/components/chat/ConversationView.tsx` (+3 -4) ➕ `packages/client/src/components/chat/MessageThinkingModal.tsx` (+40 -0) 📝 `packages/client/src/components/ui/Modal.tsx` (+1 -1) 📝 `packages/client/src/hooks/use-dialog-focus-scope.ts` (+8 -2) 📝 `packages/client/src/localization/locales/en.json` (+4 -0) </details> ### 📄 Description ## Why Issue #3963 was reopened because the previous reasoning UI change removed Roleplay's immediate **Thinking…** state and made the reasoning control disappear during Conversation renderer transitions. Users could no longer reliably open reasoning beneath the active message. ## What changed - Restores an immediate localized **Thinking…** placeholder in Roleplay, including regeneration. - Shows exactly one reasoning control as soon as the first real reasoning delta arrives; no empty reasoning control appears before then. - Uses one shared Model Thoughts viewer for Roleplay and Conversation, and keeps its contents updating while additional reasoning deltas arrive. - Preserves the reasoning control when a live Conversation response transitions into the grouped multi-speaker renderer. - Prevents stale reasoning from the previous swipe appearing during regeneration. - Retains saved reasoning controls on completed messages. - Adds semantic localization keys and an Unreleased changelog entry. ## Root cause The earlier implementation added a separate Conversation-only overlay action outside the normal message action system. That action was not carried into the grouped renderer, while Roleplay's placeholder only rendered after a reasoning buffer already existed. Regeneration could also fall back to the previous swipe's saved reasoning before the new swipe produced any. ## Validation - `pnpm check` - `pnpm exec playwright test -c playwright.config.ts -g 'exposes reasoning on its first live chunk'` (4 passed: Roleplay and Conversation on desktop and mobile) - `git diff --check` ## Manual verification - [ ] Manually verify Roleplay shows **Thinking…** immediately after generation begins. - [ ] Manually verify the reasoning icon appears on the first reasoning delta and the open viewer updates on later deltas. - [ ] Manually verify Conversation retains the icon when streamed text becomes a grouped multi-speaker response. - [ ] Manually verify saved reasoning remains available after completion and after regeneration. Closes #3963 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a live Model Thoughts viewer for Conversation and Roleplay chats. * Reasoning now appears progressively as it streams and remains available after messages complete. * Added localized labels, titles, and controls for viewing and closing model thoughts. * **Bug Fixes** * Restored the immediate “Thinking…” placeholder during Roleplay responses. * Ensured only the relevant reasoning control is shown while thoughts are streaming. <!-- 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:08:08 +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#6204
No description provided.