Skip to content

Conversation

@uinstinct
Copy link
Contributor

@uinstinct uinstinct commented Nov 11, 2025

Description

Makes thinking blocks occupy less space using the same design as tool calls.

  • makes thinking block same as simple tool call ui
  • replaces reasoning with thinking block peek

resolves CON-4521

AI Code Review

  • Team members only: AI review runs automatically when PR is opened or marked ready for review
  • Team members can also trigger a review by commenting @continue-review

Checklist

  • [] I've read the contributing guide
  • [] The relevant docs, if any, have been updated or created
  • [] The relevant tests, if any, have been updated or created

Screen recording or screenshot

before

image image

after

image image

Tests

[ What tests were added or updated to ensure the changes work as expected? ]


Summary by cubic

Make thinking blocks more compact by matching the simple tool call UI, reducing vertical space and improving readability. Addresses CON-4521.

  • Refactors
    • Replace Reasoning with ThinkingBlockPeek in StepContainer; remove Reasoning.tsx.
    • Restyle ThinkingBlockPeek to match tool call UI; collapsed by default with a small toggle.
    • Keep behavior: animated thinking state, elapsed time, token count, and redacted messaging.
    • Avoid duplicate redacted blocks and cap expanded height.

Written for commit 302ffb8. Summary will update automatically on new commits.

@uinstinct uinstinct requested a review from a team as a code owner November 11, 2025 10:15
@uinstinct uinstinct requested review from sestinj and removed request for a team November 11, 2025 10:15
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Nov 11, 2025
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 3 files

Prompt for AI agents (all 2 issues)

Understand the root cause of the following 2 issues and fix them.


<file name="gui/src/components/StepContainer/StepContainer.tsx">

<violation number="1" location="gui/src/components/StepContainer/StepContainer.tsx:92">
Passing the current item as prevItem breaks ThinkingBlockPeek’s duplicate-suppression logic, so assistant steps will render an extra thinking block whenever a standalone thinking message precedes them.</violation>
</file>

<file name="gui/src/components/mainInput/belowMainInput/ThinkingBlockPeek.tsx">

<violation number="1" location="gui/src/components/mainInput/belowMainInput/ThinkingBlockPeek.tsx:61">
Replacing the toggle with a plain div drops button semantics and keyboard support, so keyboard users can’t open the thinking block. Please keep this control as a button (or add appropriate semantics and key handling).</violation>
</file>

React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.

<ThinkingBlockPeek
content={props.item.reasoning.text}
index={props.index}
prevItem={props.index > 0 ? props.item : null}
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Nov 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passing the current item as prevItem breaks ThinkingBlockPeek’s duplicate-suppression logic, so assistant steps will render an extra thinking block whenever a standalone thinking message precedes them.

Prompt for AI agents
Address the following comment on gui/src/components/StepContainer/StepContainer.tsx at line 92:

<comment>Passing the current item as prevItem breaks ThinkingBlockPeek’s duplicate-suppression logic, so assistant steps will render an extra thinking block whenever a standalone thinking message precedes them.</comment>

<file context>
@@ -85,7 +85,14 @@ export default function StepContainer(props: StepContainerProps) {
+              &lt;ThinkingBlockPeek
+                content={props.item.reasoning.text}
+                index={props.index}
+                prevItem={props.index &gt; 0 ? props.item : null}
+                inProgress={!props.item.reasoning?.endAt}
+              /&gt;
</file context>
Fix with Cubic

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will never be true because redactedThinking in props is always passed as undefined

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback! I've saved this as a new learning to improve future reviews.

</SpoilerButton>
<div className="mt-1 flex flex-col px-4">
<div className="flex min-w-0 flex-row items-center justify-between gap-2">
<div
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Nov 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replacing the toggle with a plain div drops button semantics and keyboard support, so keyboard users can’t open the thinking block. Please keep this control as a button (or add appropriate semantics and key handling).

Prompt for AI agents
Address the following comment on gui/src/components/mainInput/belowMainInput/ThinkingBlockPeek.tsx at line 61:

<comment>Replacing the toggle with a plain div drops button semantics and keyboard support, so keyboard users can’t open the thinking block. Please keep this control as a button (or add appropriate semantics and key handling).</comment>

<file context>
@@ -66,58 +56,49 @@ function ThinkingBlockPeek({
-          &lt;/SpoilerButton&gt;
+      &lt;div className=&quot;mt-1 flex flex-col px-4&quot;&gt;
+        &lt;div className=&quot;flex min-w-0 flex-row items-center justify-between gap-2&quot;&gt;
+          &lt;div
+            className=&quot;text-description flex min-w-0 cursor-pointer flex-row items-center gap-1.5 text-xs transition-colors duration-200 ease-in-out hover:brightness-125&quot;
+            data-testid=&quot;thinking-block-peek&quot;
</file context>

✅ Addressed in 302ffb8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant