Comment by bronlund

4 days ago

I love Claude Code, but how they made the TUI is just plain stupid. Not how it looks, but you know, the React part.

It’s a very cumbersome UI that feels extremely bloated. Especially if you have a lot of text you want to scroll over — eg i want to see the details of the last X exchanges - it just performs absolutely horribly.

It seems like it already was like this from the start, though? I’m not a frontend / TUI dev, but why are these issues so hard to fix?

  • It's just architected poorly. The job of putting text on a screen fast has been solved for 50 years.

If the render is already made in JavaScript it makes sense to reuse react as the reconciliation engine instead of building one from scratch.

  • What is a "reconciliation engine" and why does a TUI need one?

    • Just like in GUI, in a TUI you need some mechanism to make the rendering output (the characters) match the internal state of the application.

      E.g., the user hit ESC -> internal state is CANCELED/WAIT FOR USER -> internal GUI representation now includes a prompt that asks the user to tell Claude what to do differently -> rendering output actually shows said prompt.

    • It solves the problem of if the UI changes, what characters on the terminal do we need to update to show the right thing to the user.

  • No, no it makes exactly zero sense to have a "reconciliation engine" or React in a TUI. There's nothing to reconcile. You can just output a stream of characters as fast as they appear.

    • That’s not a TUI, that’s a CLI.

      Any stateful UI needs a state management backend and a rendering frontend, React isn’t a bad choice for the former.

      8 replies →