Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Aug 29, 2025

Fixes #7523

Summary

This PR replaces the static "API Request" label with a customizable, animated "Generating..." indicator that provides better visual feedback during API requests.

Changes

  • ✨ Added AnimatedStatusIndicator component with subtle pulsing animation
  • 🎨 Implemented customizable status texts with emoji support
  • 🎲 Added random mode to cycle through different messages
  • ⚙️ Created settings UI for configuring the animated indicator
  • 🔄 Integrated with ChatRow to replace the static label
  • 💫 Added CSS animations for smooth visual effects

Features

  • Customizable Messages: Users can define their own status messages
  • Emoji Mode: Option to display emojis alongside text
  • Random Mode: Cycles through messages for variety
  • Subtle Animation: Non-distracting pulse effect
  • Settings Integration: Full configuration through settings panel

Testing

  • ✅ All existing tests pass (3668 tests)
  • ✅ Linting and type checking pass
  • ✅ Manual testing of animation and settings

Screenshots

The animated indicator provides visual feedback during API requests with customizable messages and optional emojis.

Related Issue

Closes #7523


Important

Replaces static API request label with AnimatedStatusIndicator, adding customizable animations and settings integration.

  • Behavior:
    • Replaces static "API Request" label with AnimatedStatusIndicator in ChatRow.tsx.
    • AnimatedStatusIndicator in AnimatedStatusIndicator.tsx shows customizable, animated status during API requests.
    • Supports custom messages, emojis, and random cycling of messages.
  • Settings:
    • Adds AnimatedStatusSettings in AnimatedStatusSettings.tsx for configuring status indicator.
    • Integrates settings into ExperimentalSettings.tsx and SettingsView.tsx.
  • State Management:
    • Adds apiStatusConfig to ExtensionStateContext.tsx for managing indicator settings.
  • Styling:
    • Adds CSS animations pulse-subtle in index.css for subtle pulsing effect.

This description was created by Ellipsis for 4ed2a3d. You can customize this summary. It will automatically update as commits are pushed.

…icator

- Add AnimatedStatusIndicator component with pulsing animation
- Support customizable status texts and emoji mode
- Add settings UI for configuring the animated indicator
- Include random mode to cycle through messages
- Add CSS animations for subtle pulse effect
- Integrate with ChatRow to replace static label

Implements #7523
Copy link
Contributor Author

@roomote roomote bot left a comment

Choose a reason for hiding this comment

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

I reviewed my own code and found issues I should have caught before pushing. Classic.

<VSCodeCheckbox
checked={localConfig.enabled}
onChange={(e: any) => setLocalConfig((prev) => ({ ...prev, enabled: e.target.checked }))}>
Enable animated status indicator
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Missing i18n for these UI strings. All user-facing text should use the translation system:

Suggested change
Enable animated status indicator
{t('settings:animatedStatus.enable')}

This applies to lines 90, 104, 110, 127, 168, and 174 as well.

cost?: number | null
cancelReason?: string | null
apiRequestFailedMessage?: string
streamingFailedMessage?: string
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is this streamingFailedMessage prop intentional? It's defined but never used in the component. Could we either use it or remove it to avoid confusion?

<div className="flex items-center gap-2">
<VSCodeCheckbox
checked={localConfig.enabled}
onChange={(e: any) => setLocalConfig((prev) => ({ ...prev, enabled: e.target.checked }))}>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could we improve type safety here? Using any for event handlers reduces TypeScript's ability to catch errors:

Suggested change
onChange={(e: any) => setLocalConfig((prev) => ({ ...prev, enabled: e.target.checked }))}>
onChange={(e: React.ChangeEvent<HTMLInputElement>) => setLocalConfig((prev) => ({ ...prev, enabled: e.target.checked }))}

}

return (
<div className="flex items-center gap-2">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Consider adding ARIA labels for better accessibility. Screen readers won't know what this animated indicator represents:

Suggested change
<div className="flex items-center gap-2">
<div className="flex items-center gap-2" role="status" aria-label="Loading status">

streamingFailedMessage?: string
}

const DEFAULT_STATUS_TEXTS = ["Generating...", "Thinking...", "Working on it...", "Processing...", "Analyzing..."]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These default constants are duplicated in AnimatedStatusSettings.tsx. Could we extract them to a shared constants file to maintain a single source of truth?

const [newStatusText, setNewStatusText] = useState("")
const [newEmoji, setNewEmoji] = useState("")

useEffect(() => {
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 useEffect triggers on every localConfig change. Since setApiStatusConfig is likely stable, we could optimize by removing it from the dependency array or using useCallback for a more targeted update.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Aug 29, 2025
@daniel-lxs
Copy link
Member

Closing, see #7523 (comment)

@daniel-lxs daniel-lxs closed this Sep 1, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Sep 1, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Sep 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:L This PR changes 100-499 lines, ignoring generated files. UI/UX UI/UX related or focused

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Replace static “API Request” label with customizable, animated “Generating…” indicator (with emoji + random mode)

4 participants