claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[Feature Request] Migrate Claude Code to Toad Terminal UI Framework

Open BeeegZee opened this issue 1 year ago • 10 comments

Feature Request Summary

Replace Claude Code's current terminal interface with Will McGugan's Toad framework to resolve critical UX issues and provide a modern, responsive terminal experience.

Current Problems with Existing UI

Critical Performance Issues

  • View races/teleports up and down the buffer uncontrollably, requiring session termination
  • Scrolling becomes painfully slow after large sessions or compaction
  • UI jumps to buffer start automatically every ~15 seconds during work
  • Terminal "jumps" and "skips" with multiple terminals or certain shells (fish)

Text Input/Output Issues

  • Multi-line pastes get truncated or freeze the CLI entirely
  • Copied text gains unwanted formatting characters
  • Bracketed-paste mode corrupts text input
  • Text selection copies unwanted line numbers/prefixes

Accessibility Concerns

  • Current terminal-first UI favors Vim/Emacs/power-terminal users
  • Not friendly to developers using standard terminal environments

Proposed Solution: Toad Integration

Technical Benefits

  • Flicker-free updates: Partial region updates as small as single characters eliminate visual disruptions
  • Enhanced text interaction: Proper text selection and copying without formatting corruption
  • Architectural separation: Front-end (Python/Textual) separated from back-end for better maintainability
  • Performance optimization: Smooth scrolling, minimal startup overhead (~100ms)
  • Cross-platform compatibility: Works efficiently on low-power devices

User Experience Improvements

  • Stable viewport: Eliminates buffer racing and unwanted scrolling
  • Reliable paste operations: Proper handling of multi-line content
  • Clean text copying: No extra formatting or line number artifacts
  • Responsive interface: Consistent performance across different terminal environments

Advanced Features

  • Interactive UI elements (contextual menus, inline editing)
  • Real-time streaming of markdown responses
  • JSON-based communication protocol for extensibility
  • Potential for future multi-platform interfaces

Expected Impact

Immediate Benefits

  • Elimination of current critical UX bugs
  • Improved accessibility for all developer types
  • Reliable text input/output operations

Long-term Benefits

  • Modern, maintainable codebase architecture
  • Foundation for future UI enhancements
  • Better cross-platform compatibility

Technical Implementation Details

Toad Framework Advantages

  • Built with Textual for advanced terminal UI capabilities
  • Separates front-end presentation from back-end processing
  • Language-agnostic backend implementations possible
  • Minimal resource usage and fast startup times

Key Features to Implement

  1. Stable Buffer Management: Prevent unwanted scrolling and jumping
  2. Enhanced Text Operations: Proper multi-line paste, clean copy operations
  3. Responsive UI: Smooth scrolling and consistent performance
  4. Cross-Shell Compatibility: Works reliably with fish, zsh, bash, etc.

References

  • Toad announcement: https://willmcgugan.github.io/announcing-toad/
  • Toad in its end-of-July state https://www.youtube.com/watch?v=EKsCS54xduo
  • Textual framework: https://github.com/Textualize/textual

BeeegZee avatar Aug 27 '25 15:08 BeeegZee

I can't emphasize how much this would help the UI catch up to a lot of the other CLI coding agents out there. Toad looks like an amazing opportunity to expand Claude Code's use case to an "everything tool" for technical individuals. There would be so many tools you could extend when having just a little bit of UI to go with it.

JamesonNyp avatar Aug 27 '25 19:08 JamesonNyp

The engineers at Anthropic must know that for Claude Code to continue to be state of the art its terminal ui (TUI) needs to evolve. Off the top of my head I want:

  • Collapsable tool call results and Agent outputs
  • Copy-command and copy-result widgets
  • Rich prompt editability and/or features to revise your prompt in your editor of choice
  • keyboard navigation up and down the conversation tree
  • 'block' based components
  • Configurable color schemes and other nice-to-haves
  • File trees and pickers
  • plugins

I have a feeling that this is known and likely being worked on right now. using Textual would probably get you there faster. Let us hope! 🤞

kylesnowschwartz avatar Aug 27 '25 22:08 kylesnowschwartz

I'll settle for any solution that makes it usable for more than ~20 minutes at a time. It gets slower and slower until some "event" happens (>50 lines paste), at which point the view will just start teleporting up and down like you mention, and never recover.

PazerOP avatar Sep 08 '25 04:09 PazerOP

I don't understand how this is still a bug. "Text" has been a solved problem since the 1970's.

tachyon-beep avatar Sep 09 '25 19:09 tachyon-beep

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

github-actions[bot] avatar Dec 05 '25 10:12 github-actions[bot]

While this feature request specifically calls out Textual unnecessarily, the principle stands. Ink is likely not the right framework to build out this Tui. The Claude Code terminal UI could be much better than it is. A few months spent doing a rewrite would pay dividends almost immediately, in my opinion. Toad, Opencode, Crush, Gemini-CLI and others are leading the charge in terms of UI, even if Claude has many more features.

kylesnowschwartz avatar Dec 06 '25 01:12 kylesnowschwartz

Still hitting the paste freeze issue. Here's a specific reproduction case that narrows down the cause:

Repro:

  1. In Claude Code, press Ctrl+G to open nvim
  2. Paste ~100+ lines of text
  3. nvim freezes for several seconds during paste

Key finding: The same paste into nvim launched directly (outside Claude Code) works instantly. No freeze at all.

This pretty much confirms the issue is in Claude Code's PTY/stdin forwarding layer when subprocess editors are active, not in the terminal or editor.

Environment:

  • Claude Code 2.0.69
  • Ghostty 1.2.3
  • nvim 0.11.5 (LazyVim)
  • macOS

alexfazio avatar Dec 14 '25 12:12 alexfazio

This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

github-actions[bot] avatar Jan 15 '26 10:01 github-actions[bot]

This issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at https://github.com/anthropics/claude-code/issues/16497. Please upvote that issue, so maybe it gets noticed.

marcindulak avatar Jan 15 '26 15:01 marcindulak

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Jan 23 '26 14:01 github-actions[bot]