[PR #1118] [MERGED] Fix thinking button on multiline conversation messages #4933

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1118
Author: @cha1latte
Created: 5/23/2026
Status: ✅ Merged
Merged: 5/23/2026
Merged by: @cha1latte

Base: staging ← Head: fix/issue-1106-thinking-button


📝 Commits (1)

  • 467e4f5 Fix thinking button on multiline conversation messages

📊 Changes

3 files changed (+20 additions, -3 deletions)

View changed files

➕ docs/evidence/issue-1106/thinking-button-after.png (+0 -0)
➕ docs/evidence/issue-1106/thinking-button-before.png (+0 -0)
📝 packages/client/src/components/chat/ConversationView.tsx (+20 -3)

📄 Description

Linked issue

Closes #1106

Why this change

  • In 1:1 Conversation Mode, character messages with actual newline-separated lines were split into visual blocks. The stored extra.thinking metadata stayed on the last split block, while the visible hover action bar lived on the first block, so the thinking button disappeared.

What changed

  • Reuses the existing message-extra parser for hidden-message checks and thinking metadata reads.
  • Carries extra.thinking onto the first visual block of split assistant messages so the first block's action bar can open the Model Thoughts modal.
  • Keeps non-thinking multiline messages from showing a thinking button.

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

  • Codex Playwright repro before the fix: seeded a 1:1 conversation with a single-line assistant message and an actual-newline multiline assistant message, both with extra.thinking. The single-line message had one View thoughts button; the multiline split message had zero.
  • Codex Playwright verification after the fix: the multiline split message rendered two visual blocks, had one View thoughts button on the first block, and opened the Model Thoughts modal with the expected thinking text.
  • Codex Playwright edge cases: single-line thinking message still shows the button; blank-line-separated multiline thinking message shows one button; multiline message without extra.thinking shows no thinking button.
  • Codex Playwright edit-cycle check: the same message kept one thinking button when changed from one line to actual-newline multiline content and back again through the message PATCH route.
  • pnpm check passed locally after the code change.
  • node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json passed locally.
  • Bunny review pass completed before opening this PR.
  • No true human-only verification blockers remain for the core claim.

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)

UI evidence (if applicable)

Before:

Before: multiline thinking message missing the thinking button

After:

After: multiline thinking message exposes the thinking button and modal

Summary by CodeRabbit

  • Refactor
    • Improved message parsing logic by centralizing handling of additional message data with safer fallback mechanisms.
    • Enhanced processing of thinking content from AI responses for more reliable display in conversations.

Review Change Stack


🔄 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/1118 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/23/2026 **Status:** ✅ Merged **Merged:** 5/23/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `staging` ← **Head:** `fix/issue-1106-thinking-button` --- ### 📝 Commits (1) - [`467e4f5`](https://github.com/Pasta-Devs/Marinara-Engine/commit/467e4f5aa18ef82b27346686f30e222864ea6269) Fix thinking button on multiline conversation messages ### 📊 Changes **3 files changed** (+20 additions, -3 deletions) <details> <summary>View changed files</summary> ➕ `docs/evidence/issue-1106/thinking-button-after.png` (+0 -0) ➕ `docs/evidence/issue-1106/thinking-button-before.png` (+0 -0) 📝 `packages/client/src/components/chat/ConversationView.tsx` (+20 -3) </details> ### 📄 Description <!-- Target branch: `staging`. The default base in this UI is `main` (release branch). --> <!-- Change the base to `staging` before submitting unless this is a maintainer-approved mainline change. --> <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue <!-- Every PR should reference a feature request or issue report. If there isn't one yet, open one first to gather opinions: --> <!-- https://github.com/Pasta-Devs/Marinara-Engine/issues/new/choose --> Closes #1106 ## Why this change <!-- What user problem, bug, or goal does this solve? --> - In 1:1 Conversation Mode, character messages with actual newline-separated lines were split into visual blocks. The stored `extra.thinking` metadata stayed on the last split block, while the visible hover action bar lived on the first block, so the thinking button disappeared. ## What changed <!-- List the key changes in this PR --> - Reuses the existing message-extra parser for hidden-message checks and thinking metadata reads. - Carries `extra.thinking` onto the first visual block of split assistant messages so the first block's action bar can open the Model Thoughts modal. - Keeps non-thinking multiline messages from showing a thinking button. ## Validation <!-- Required: include commands run and/or manual checks performed --> - [ ] `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 <!-- Describe exactly what you tested in a real browser/app, step by step. --> <!-- ⚠️ If an AI agent filled out or ticked these boxes for you, treat them --> <!-- as a TO-DO LIST, not as proof the work is done. Verify each item yourself --> <!-- before submitting. If you haven't verified it, untick the box. --> - Codex Playwright repro before the fix: seeded a 1:1 conversation with a single-line assistant message and an actual-newline multiline assistant message, both with `extra.thinking`. The single-line message had one `View thoughts` button; the multiline split message had zero. - Codex Playwright verification after the fix: the multiline split message rendered two visual blocks, had one `View thoughts` button on the first block, and opened the Model Thoughts modal with the expected thinking text. - Codex Playwright edge cases: single-line thinking message still shows the button; blank-line-separated multiline thinking message shows one button; multiline message without `extra.thinking` shows no thinking button. - Codex Playwright edit-cycle check: the same message kept one thinking button when changed from one line to actual-newline multiline content and back again through the message PATCH route. - `pnpm check` passed locally after the code change. - `node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json` passed locally. - Bunny review pass completed before opening this PR. - No true human-only verification blockers remain for the core claim. ## 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) ## UI evidence (if applicable) <!-- Add before/after screenshots or recordings for UI changes --> Before: ![Before: multiline thinking message missing the thinking button](https://raw.githubusercontent.com/cha1latte/Marinara-Engine/fix/issue-1106-thinking-button/docs/evidence/issue-1106/thinking-button-before.png) After: ![After: multiline thinking message exposes the thinking button and modal](https://raw.githubusercontent.com/cha1latte/Marinara-Engine/fix/issue-1106-thinking-button/docs/evidence/issue-1106/thinking-button-after.png) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Refactor** * Improved message parsing logic by centralizing handling of additional message data with safer fallback mechanisms. * Enhanced processing of thinking content from AI responses for more reliable display in conversations. <!-- review_stack_entry_start --> [![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/Pasta-Devs/Marinara-Engine/pull/1118?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- 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:11:49 +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#4933
No description provided.