mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-09-22 00:02:23 +00:00
ad9a0c0f81fe8c1e3bf2ffa052f1d33cfa7d2a39
Nine findings from a review pass over the branch. One commit because they cross the same files, and splitting them would leave an intermediate that does not build on Windows. - A dropped delta announced a LayoutResync and then delivered the backlog behind it. The queue is FIFO, so everything still in it is *older* than the gap: the peer re-pulled on the notice and was then walked back through history it had already left — TabRestructured restoring the shape a tab used to have, with window and mirror agreeing on the stale answer so nothing recovered a second time. The forwarder now drops the superseded queue and sends the resync in its place. - Pane facts persisted the whole document, with an fsync, from the PTY reader thread — once per OSC 7, so once per prompt per pane — while holding the lock that orders every other client's edits. A shell looping over directories was a write per iteration. Observations (pane facts, workspace_touch) now take Persist::Soon: the delta still goes out at once, the file catches up within FACT_FLUSH_INTERVAL, and the daemon flushes on the way out. The layout itself is never deferred. - An ordinary output chunk paid two AgentFacts clones and a clone-to-compare for facts it could not have changed. Gated on the signals that can move one, and the compare no longer clones. - machine.json was created 0644, naming every workspace's directories, the SSH user and host of every native-SSH pane, and each agent's session id. It is written owner-only from the first instant the final name exists, and a second corruption no longer overwrites the rescue copy of the first. - Windows had no control listener, so on the one platform where the tree is the only layout store, tabs did not come back at all. It now serves the dialect over the transport its pane socket already uses: a loopback listener whose port and 256-bit token live in a user-private control.port beside daemon.port — its own token, not the pane endpoint's — refusing to rebind over a live one, since binding is what writes the marker. run_daemon and the GUI's local link are one code path again. - Workspace names and paths came only from the machine's mirror, so a laptop shut since Friday listed every row as "Untitled" with a blank subtitle, in the picker whose whole job is offering workspaces on machines that are asleep. WindowView carries the label and subject the machine last gave, stamped on save and on detach; the tree still wins whenever it answers. - liveness_of read "the mirror has not been pulled yet" as Stopped, which tells the user their sessions are gone on the strength of our own ignorance. Unknown is what that state is for. - A WorkspaceRemove that never reached its machine was a debug line, though the client had already forgotten the workspace. It is now a warning that says what was left where. - MachineMirrors::install landed a pull without a repaint; the two tests the record store's retirement took with it (a closed connection stops being a subscriber, concurrent connections can all write) are back against the tree; and CHANGELOG records the migration's one-time layout loss and the Windows gap this closes. Suites green: tty7-core 675, tty7 819, tty7-server 9/5/3/3/51, fmt and clippy clean. The Windows listener is unverified by a compiler here — a C dependency in the tree blocks cross-checking from macOS — so CI's Windows job is its first build.
tty7
A terminal workbench: shells, sessions, SSH, coding agents.
Pure Rust · GPU rendering on Zed's gpui · VT core from Alacritty
English · 简体中文
Why
- Fast — ~2× the throughput of Alacritty, Ghostty, or Kitty (benchmarks)
- Sessions persist — quit or reboot; your shells keep running, no tmux
- Editor-grade input — completion, syntax highlighting, history search built in; zero config for zsh, bash, fish, PowerShell
- Agent-aware — recognizes Claude Code & co. in a pane: status, notifications, session resume
Install
Native builds for each platform on Releases:
| macOS | …-macos-arm64.dmg · …-x86_64.dmg |
drag into Applications |
| Windows | …-setup.exe · portable ….zip |
|
| Linux | …-x86_64.AppImage |
chmod +x and run — x11/wayland libs bundled |
What's inside
| Input | ghost suggestions from history · explained tab completion · syntax highlighting · multi-line editing · click places the caret · ⌃ R fuzzy history |
| Window | tabs & splits · ⌘ P palette · ⌘ F scrollback search · nine themes · IME |
| Coding agents | per-pane agent detection (~17 CLIs): status dot, notifications, branch + diff, resume after reboot, tray icon that signals "needs your input" |
| SSH | native russh stack: profiles with keychain secrets, SFTP panel, port forwarding, jump hosts |
Details for every row: docs/features.md. Keybindings: ⌘ , opens Settings — browse and remap everything, tmux preset included (full list).
Benchmarks
Same machine, same day, same 155×40 grid — Apple M1 Pro, macOS 26.3.1, five-run averages (2026-07-04):
| tty7 | Alacritty | Ghostty | Kitty | |
|---|---|---|---|---|
Plaintext IO — 11 MB cat (lower = better) |
95 ms | 239 ms | 179 ms | 185 ms |
| DOOM-fire frame rate (higher = better) | 888 fps | 485 fps | 552 fps | 617 fps |
| Cold-launch memory | 116 MB¹ | 105 MB | 128 MB | 130 MB |
¹ GUI 105 MB + the persistent daemon 11 MB.
Methodology and one-command reproduction: scripts/bench/.
Built on gpui and alacritty_terminal · Apache-2.0 · Discord · Changelog
Description
A terminal workbench in pure Rust: shells, persistent sessions, SSH, coding agents. GPU-rendered on Zed's gpui, VT core from Alacritty.
ai-agentsalacrittyclaude-codecoding-agentcross-platformdaemondeveloper-toolsgpugpuilinuxmacosptyrustshellsshterminalterminal-emulatorterminal-multiplexertmuxwindows
Readme
Apache-2.0
34 MiB
Languages
Rust
99.1%
Shell
0.5%
PowerShell
0.2%
Inno Setup
0.1%