Comment by replwoacause

3 months ago

Why the hell does it need to be so complex? People have been making TUIs for decades. Did we need a small game engine to run claude code?

They forgot to add 'make it as simple as possible' in the prompt is one possible cause.

On a more serious note using a react-like lib for TUI in the hope you'll share the codebase with the web version is a more likely explanation. Still not the best idea.

  • React is not that stupid to re-render in a loop at 60fps and instead waits for changes to happen before re-rendering. It even batches changes and stuff.

    • You don't need React for reactive TUIs - at all. I can understand chosing React for web, but for a TUI it sounds like a really poor idea. And in practice we can see that the claude code TUI is also poor.

      1 reply →

It doesn’t need to be that complex, but it can be that complex without being slow. Claude Code’s interface is extremely simple. It has tons and tons of headroom to tack on performance overhead without it being noticeable at all. You just have to not do dumb things like redraw the entire UI every time a spinner spins.

  • "We made our app chew up so many unnecessary resources that we can use even more resources in the future, and no one will notice" is not the strongest engineering idea I've ever heard.

    • It's like when Bill Gates tried to guess grocery prices. "How much memory does a regular computer have? I don't know, 50 GB? Like a small EC2?"

  • It may not be slow, but this crazy complexity is probably a hint at why it can't even scroll up without jumping to the beginning of time.

I can't help but think it's their engineer's and PM's making these decisions, since I know that if you asked Claude to write a TUI there is no world it would recommend whatever the frontend architecture of claude code is.