Skip to content

Releases

v2.2.0

Choose a tag to compare

@github-actions github-actions released this 26 Nov 10:58
v2.2.0
f510168

Resume your programs

This new protocol for Rex came out 12 hours ago and…Bubble Tea supports it! ✌️

OSC 7577: Program Resume Protocol

Demo

Bubble Tea programs can now tell the terminal how to bring them back after it restarts. Set ProgramResume on your view with the command that restarts your program, and optionally the folder to run it in:

func (m model) View() tea.View {
	v := tea.NewView(m.render())
	if !m.quitting {
		v.ProgramResume = &tea.ProgramResume{
			Args: []string{m.exe, "--session", m.sessionID},
			Dir:  m.dir,
		}
	}
	return v
}

Put everything the program needs to pick up where it left off in the command, like a session ID or the path to a state file.

Detecting support

Terminals that support the protocol set OSC7577_TOKEN. Bubble Tea sends you a tea.EnvMsg at startup, so check for it there:

func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
	switch msg := msg.(type) {
	case tea.EnvMsg:
		m.canResume = msg.Getenv("OSC7577_TOKEN") != ""
	}
	return m, nil
}

You only need the tea.EnvMsg check if your app should act differently depending on support, for example to show "this session will survive a restart" or to skip saving resume state.

Read the spec for all the details.

Have a nice week,
Charm ⭐

Changelog

New!

Other stuff


The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.

v2.1.3

Choose a tag to compare

@github-actions github-actions released this 25 Nov 09:38
v2.1.3
4d61172

Another bugfix release 🩹

A patch release full of stability fixes, mostly from our favorite contributors!

Security

Fixed a crash on malformed escape sequences. An ANSI sequence with more than 32 parameters (e.g. \x1b[1;1;1;…m) could panic the renderer with an index-out-of-range error. Any app that shows text it doesn't control, like logs, file contents, chat messages or LLM output, could be crashed by a single crafted line. If you render untrusted text, we recommend upgrading.

There are more fixes below πŸ‘‡πŸ»

Have a nice week,
Charm ⭐

Changelog

Fixed

Other stuff


The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.

v2.1.2

Choose a tag to compare

@github-actions github-actions released this 18 Nov 08:46
v2.1.2
38ddf5f

Calmer, cooler, sturdier πŸ§‹

A patch release, but it's a good one! Idle Bubble Tea programs now really sit idle, the terminal gets restored after just about anything goes wrong, and a long list of renderer bugs is gone.

Rest light!

The renderer no longer redraws when there's nothing to draw. After about half a second without changes, the frame ticker stops, and it picks right back up the moment something does change. Views that are empty or taller than the screen also skip redraws when they haven't changed.

Restoring in many more cases!

Bubble Tea now cleans up properly when:

  • A command in Batch or Sequence panics
  • Run returns early with an error
  • RestoreTerminal swaps the input reader
  • Run finishes and the TTY files it opened for input need closing

And when you come back from suspending a program, Unicode mode comes back with it, so wide characters and emoji line up just like before!

Smoother rendering

  • Resizing the terminal no longer flashes a stale frame.
  • The view's height is right from the very first frame.
  • Lines printed above your view keep their exact width, and they're measured the same way as the rest of your program.
  • Running a subprocess with Exec clears your view first, so it doesn't leave a ghost behind.

Big thanks to everyone who contributed to this release, and especially to the many first-time contributors! πŸ’˜

Read more below! πŸ‘‡πŸ»

Have a nice day,
Charm XX 🌟

Changelog

Fixed

Other stuff


The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.

v2.1.1

Choose a tag to compare

@github-actions github-actions released this 28 Oct 10:19
v2.1.1
67b4c7a

Terminal size query vulnerability

This patch version fixes a vulnerability reported by @Reload3d. You can find the details of the exploit here.

Best regards,
Charm XX πŸ’«

Changelog

Fixed

Other stuff


The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.

v2.1.0

Choose a tag to compare

@github-actions github-actions released this 08 Oct 17:40
v2.1.0
f9df43c

Hello OSC 7501

The exciting news in this release is support for the brand new Program Status Protocol, otherwise known as OSC 7501, released just a few days ago. The protocol is designed to allow terminal applications to report what they're doing (e.g. idle, working, waiting on the user, finished, or failed) and why.

The obvious case for the design is AI agents, but are lots of other use cases for this, and we’re excited to see what you build with it.

It’s subtle, but here’s Crush in Superlogical’s Rex with the feature integrated (notice the dot in the first tab).

Bugfixes

Also, this release brings some very important fixes done by @AdamMagued, @simpleqt and @GreedyC.

Cheers!
Charm 🌞

Changelog

New!

Fixed

Docs

Other stuff


The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.

v2.0.10

Choose a tag to compare

@github-actions github-actions released this 24 Sep 08:08
v2.0.10
d5bfd5c

Change to no input programs

This is a small change to programs with no WithInput. Removed capability queries, which resulted in leaking of raw ANSI escape sequences.

Changelog

Fixed

Other stuff


The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.

v2.0.9

Choose a tag to compare

@github-actions github-actions released this 19 Aug 15:33
v2.0.9
73b6d91

Small patches 🩹

Keybinds missing!

MouseButton11 and media record buttons were improperly handled, now fixed! (thanks to @Ricardo-M-L and @bunlongheng)

Weird UI artifacts with some terminals πŸ‘½

Sometimes, when switching between tabs in your terminal for example, the screen would not clear, now fixed!

... And some small corrections to docs!

Happy coding πŸ€–

Changelog

Fixed

Docs

Other stuff


The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.

v2.0.8

Choose a tag to compare

@github-actions github-actions released this 03 Jul 01:56
v2.0.8

Graphemes, schmraphemes

No terminal can render emojis perfectly, but we can try. This release improves some very specific edge cases around emoji rendering. Enjoy!

Changelog

  • db569ad: fix(deps): bump ultraviolet for emoji-related rendering improvements

The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.

v2.0.7

Choose a tag to compare

@github-actions github-actions released this 01 Jun 16:35
v2.0.7
a23da80

A few lil’ stability patches

Hi! This is a patch release with a few solid improvements around stability and correctness.

  • @lrstanley, one of our faves, fixed a race condition around mice in the Cursed Renderer
  • @lawrence3699 fixed a panic that could happen when input's not available
  • We fixed a correctness issue with regard to mouse releases when Kitty Keyboard was active (thanks, @mitchellh)

Thanks for using Bubble Tea, and if you see anything awry please do let us know!

β€”Charm πŸ‘‹

Changelog

Fixed


The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.

v2.0.6

Choose a tag to compare

@github-actions github-actions released this 16 Apr 16:02
v2.0.6
fdcd0cf

This release fixes an issue with how Bubble Tea handled wide characters. Before, a wide character might be skipped or cause an infinite loop causing the CPU to spike. See fdcd0cf and charmbracelet/ultraviolet#109 for more details.


The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.