Skip to content

Refine thinking content#441

Merged
iceljc merged 2 commits intoSciSharp:mainfrom
iceljc:main
Apr 17, 2026
Merged

Refine thinking content#441
iceljc merged 2 commits intoSciSharp:mainfrom
iceljc:main

Conversation

@iceljc
Copy link
Copy Markdown
Collaborator

@iceljc iceljc commented Apr 17, 2026

No description provided.

@qodo-code-review
Copy link
Copy Markdown

Review Summary by Qodo

Add animations and transitions to thinking content display

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Add smooth slide and fade transitions to thinking content
• Implement pulsing animation for sparkle icon during thinking
• Improve chevron rotation transition with cubic-bezier easing
• Enhance visual feedback for active thinking state
Diagram
flowchart LR
  A["Thinking Content"] -->|slide transition| B["Expanded View"]
  C["Sparkle Icon"] -->|pulsing animation| D["Active Thinking State"]
  E["Chevron Icon"] -->|cubic-bezier easing| F["Smooth Rotation"]
Loading

Grey Divider

File Changes

1. src/routes/chat/[agentId]/[conversationId]/rich-content/rc-message.svelte ✨ Enhancement +26/-4

Add animations and transitions to thinking UI

• Import slide and fade transitions from svelte/transition and cubicOut easing function
• Add pulsing class binding to thinking sparkle icon when actively thinking
• Wrap thinking content with slide transition (200ms duration) and fade inner content (200ms with
 80ms delay)
• Add thinking-sparkle-pulse keyframe animation with opacity and scale effects
• Update chevron transition to use cubic-bezier easing for smoother rotation

src/routes/chat/[agentId]/[conversationId]/rich-content/rc-message.svelte


Grey Divider

Qodo Logo

@iceljc iceljc merged commit 64c6a64 into SciSharp:main Apr 17, 2026
1 of 2 checks passed
@qodo-code-review
Copy link
Copy Markdown

qodo-code-review bot commented Apr 17, 2026

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Remediation recommended

1. No reduced-motion handling 🐞 Bug ➹ Performance
Description
The new pulsing sparkle animation and slide/fade transitions always run, but the component provides
no prefers-reduced-motion fallback, so users who request reduced motion will still see motion and
the UI will spend CPU animating. This affects the thinking toggle UI in rc-message.svelte.
Code

src/routes/chat/[agentId]/[conversationId]/rich-content/rc-message.svelte[R71-80]

+                    <div
+                        class="thinking-content"
+                        transition:slide={{ duration: 200, easing: cubicOut }}
+                    >
+                        <div in:fade={{ duration: 200, delay: 80 }}>
+                            <Markdown containerStyles="color: #444 !important;" text={thinkingText} rawText />
+                        </div>
                    </div>
                {/if}
            </div>
Evidence
The thinking panel now animates on expand/collapse via Svelte transitions, and the sparkle icon runs
an infinite keyframe animation while isThinking is true. The component’s <style> block contains the
animation but does not include any @media (prefers-reduced-motion: reduce) override (nor does the
markup gate transitions based on reduced-motion), so motion cannot be disabled for motion-sensitive
users.

src/routes/chat/[agentId]/[conversationId]/rich-content/rc-message.svelte[60-79]
src/routes/chat/[agentId]/[conversationId]/rich-content/rc-message.svelte[93-164]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The component introduces an infinite pulsing animation and slide/fade transitions without honoring the user’s reduced-motion preference.

### Issue Context
Motion-sensitive users (and many accessibility checks) expect UI animations/transitions to be disabled or significantly reduced when `prefers-reduced-motion: reduce` is enabled.

### Fix Focus Areas
- src/routes/chat/[agentId]/[conversationId]/rich-content/rc-message.svelte[60-79]
- src/routes/chat/[agentId]/[conversationId]/rich-content/rc-message.svelte[120-133]
- src/routes/chat/[agentId]/[conversationId]/rich-content/rc-message.svelte[93-164]

### Suggested approach
1. Add a reduced-motion flag (client-side via `matchMedia('(prefers-reduced-motion: reduce)')`) and use it to:
  - Set transition durations to `0` (or skip applying transitions) when reduced motion is enabled.
  - Avoid applying the `pulsing` class (or override it) when reduced motion is enabled.
2. Add a CSS fallback as well:
  - `@media (prefers-reduced-motion: reduce) { .thinking-sparkle.pulsing { animation: none; } }`
  - Optionally reduce/disable any other animated effects used by this component.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant