这是indexloc提供的服务,不要输入任何密码
Skip to content

fix flickering UI in Powershell #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 23, 2025
Merged

fix flickering UI in Powershell #36

merged 2 commits into from
Jul 23, 2025

Conversation

homanp
Copy link
Contributor

@homanp homanp commented Jul 23, 2025

What does this PR do?

This pull request introduces several updates across the codebase, focusing on performance improvements, code readability, and platform-specific optimizations. The key changes include memoization of chat entries to prevent unnecessary re-renders, adjustments to loading spinner intervals to reduce flickering on Windows, and enhancements for platform-specific behavior in the console. Additionally, a minor version bump and a new test function were added.

Performance and Optimization:

  • Memoized Chat Entries: Introduced MemoizedChatEntry in src/ui/components/chat-history.tsx to optimize rendering by preventing unnecessary re-renders of chat entries. This change includes updates to how entries are rendered in the ChatHistory component. [1] [2] [3]

  • Reduced Loading Spinner Flickering: Adjusted the spinner frame update interval to 500ms (from 250ms) and the loading text update interval to 4 seconds (from 2 seconds) in src/ui/components/loading-spinner.tsx to reduce flickering and state changes, especially on Windows. [1] [2]

Platform-Specific Enhancements:

  • Windows Console Behavior: Updated src/ui/components/chat-interface.tsx to conditionally clear the console only on non-Windows platforms or when not using PowerShell, addressing flickering issues in PowerShell.

Code Maintenance:

  • Version Bump: Updated the package version in package.json from 0.0.8 to 0.0.9.

  • Test Function Addition: Added a simple dummy_function in test.py for testing purposes.

Fixes #34

Checklist

  • I tested my changes
  • I reviewed my own code

@homanp homanp self-assigned this Jul 23, 2025
@homanp homanp changed the title Fix/flickering UI fix flickering UI in Powershell Jul 23, 2025
@homanp homanp merged commit e04a6ee into main Jul 23, 2025
2 checks passed
jasonkneen pushed a commit to jasonkneen/grok-cli that referenced this pull request Jul 24, 2025
* fix rendering issues in Ink

* fix tool names
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.

[Bug]: PowerShell terminal flickering and erratic behavior
1 participant