# Hypa 1.2.0

Hypa 1.2.0 makes typing faster, in a local pane and on a remote cube.
On a cube, most of the keys that you type show before the round trip ends.
The mux and the attach also do less work for each key and each frame.

## Highlights

### Typed keys show before the round trip on a cube

On a remote cube, each typed key needed one network round trip before its echo showed.
The attach now predicts the echo of the keys that you type in the focused pane.

- The first key of a typing run waits for the cube's echo. When that echo agrees with the prediction, the next keys show at once.

- The prediction changes only what Hypa shows. It never changes the bytes that Hypa sends.
- A predicted character looks the same as the real one. There is no underline, dim text or other marker.
- The cube's reply replaces each prediction. If the reply is different, the reply shows.
- Prediction covers printable ASCII characters, Backspace, and the left and right arrows with no modifier.
  It does not predict other characters, for example accented letters or emoji.
  It works in a shell and on the alternate screen of an agent such as Claude Code.
- Prediction stops at a password prompt: when the pane turns off its echo in line mode, Hypa predicts nothing.
- The default, `adaptive`, starts to show predictions when the measured round trip to the pane is more than 25 to 30 ms.
  It stops when the round trip is 20 ms or less.
  One exception: after a prediction in the typing run matched, a later prediction that waits 250 ms for its echo shows at any round trip.
  A local pane thus shows almost no prediction.
  The setting is `experimental.predictive_echo` in the attach `config.toml`, with the values `adaptive`, `always` and `never`.

### Faster keys and frames

- A key goes to its pane on its own input lane. Slow work that is not for that key, such as a large paint, does not hold it.
  A key still waits for an earlier resize of its pane or an earlier focus change, so that it goes to the correct pane and size.
- The mux paints the pane that has a key echo waiting before the other panes.
- When most of a pane scrolls, Hypa can send the change as a row shift, not as a repaint of each row.
  It uses the row shift only when it is smaller. Otherwise it sends a normal update or a full frame.
- Hypa continues to send frames while you resize the outer terminal.

### Fewer pauses on a busy cube

When a cube pane wrote a lot of output, the mux and the accept bridge stopped for garbage collection.
A typed key that arrived during a pause waited for it.

- The mux allocates about 80% less memory for each byte of pane output.
  In our lab, the garbage collection pause time for each MB of output went down from 24–30 ms to 4–5 ms.
- Each `hypa` process no longer loads the 40 MB token vocabulary when it starts.
  The vocabulary loads when a command counts tokens for the first time.
  The accept bridge never counts tokens, so it no longer has this memory.

### Fixes

- **A crashed attach now resets the outer terminal.** Before, the cursor or the keypad mode of the outer terminal could stay changed.
- **The mux ends a synchronized-output block (DEC 2026) that a program did not end, after one second.** Before, the outer terminal could stop showing new frames.
- **The pane terminal answers the cursor position (DSR), device attributes (DA1) and terminal version (XTVERSION) queries** from the program in the pane.
  It does not answer the kitty keyboard query, because panes get legacy key bytes.
- **Scrolling and the scrollbar** keep their place while a pane writes output, when the view and the mux both run 1.2.0.
- **Dependencies:** the Pi package dependencies (`undici` and `@earendil-works/pi-coding-agent`) are updated.

## Platforms

- Linux and macOS, on x64 and arm64.
- Windows is not a mux host.

## Upgrade notes

- Restart the local mux after you upgrade, so that the mux uses the new version.
  Use the sidebar's **↻ restart to update** action, or run `hypa mux restart` from a terminal outside Hypa.
  A restart closes every pane and disconnects active peers.
- Upgrade each remote cube to 1.2.0 too.
  Then restart the mux on the cube. The faster key path and the fewer pauses are in the cube's mux.
- If you installed with `install.sh`, `hypa update` upgrades in place.

Report a fault at https://github.com/Hypabolic/Hypa/issues.
