mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-09-22 00:02:23 +00:00
5418d66903c1b075cb12a430a0bf664346df9732
The history section now renders a real `CommitPage`: lanes, nodes, merge rings, refs and ages, over rows that behave like every other row in the panel. It replaces the three-lane figure from the G7·0 spike, whose shape it keeps unchanged — one canvas over the whole list, `paint_quad` for everything, lane centres snapped to device pixels before the quad is built. What the section is for decided most of the rest. 260px leaves about 26 characters beside the gutter, and this repository's subjects run to a median of 64, so reading a message here was never going to work: what a reader gets is where the branches are, where they merged, which refs sit where, and how recently anything moved. Two things buy back what can be bought: - The conventional-commit prefix comes off into a chip. `feat(terminal): ` is 12.7 characters on average, and the type is exactly the part that reads better as three coloured characters than as prose. The split is strict, so `Merge pull request`, `fix:it` and a bare URL all keep their whole line. - The lane gutter folds to a single column on request, worth another six. Lane colours are derived, not tabled. `Theme::lanes()` seeds from the palette in the order blue, yellow, magenta, green, cyan, red — no two neighbours share a hue family, red and green are never adjacent, and red is last because a panel three or four lanes wide never reaches it — then walks each one to `ACCENT_FLOOR` on the window, the sidebar and a popover. Across the nine builtins the worst contrast is 3.00:1 (untreated, `catppuccin_latte` sits at 2.31 and `rose_pine_dawn` at 2.05) and the worst adjacent pair is ΔE 13.8, against a JND of about 2.3. A hard-coded palette would have been the one colour in this file that ignores the theme, and the contrast tests cannot see a literal. Some notes on the drawing: - Segments are deduplicated by column before anything is painted, which is what makes the overflow bundle work: five lanes folded into the last column produce one line, not five stacked at five alphas. `project` is a pure projection and never feeds back into the layout, so dragging the panel narrower re-columns for free and no branch changes colour. - Cross-lane turns are right angles, and at a 12px pitch they read unambiguously — the same call tig, lazygit and `git log --graph` make. The horizontal runs half a line width past both centres, which is exactly what closes the corners the vertical stubs leave open. - No `paint_layer` per line. Zed's graph does that; each one is a full-drawable render pass. `BoundsTree` already orders overlapping primitives, and edges arrive sorted by `paint_rank`, so the node's own line lands last. - Nodes are rounded quads rather than paths: the quad shader rounds with an exact SDF and analytic anti-aliasing, where `PathBuilder` fills every vertex's `st` with `(0, 1)` and gets 4x MSAA alone. - Paging grows `requested` and re-runs the query. The layout is deterministic, so a longer run reproduces the same prefix row for row and nothing on screen moves; `--skip` is O(skip) and slides under you when a ref moves. It is a row, not a scroll trigger — a remote `git log` is an RPC, and scroll-to-load turns one flick into a burst of them. - Filtering hides the gutter. Lanes drawn across a subset of history would connect commits that are not adjacent, so a search result is a flat list, which is what it actually is. Seventeen tests. Four in `presets` run with the existing contrast batch and assert the floor on all three surfaces, adjacent ΔE, determinism and the seed order. The rest cover projection, snapped lane centres, the width clamp, the prefix split (including a Chinese subject, which is where byte indexing goes wrong), band deduplication, the filter and the scope label. One runs a real repository through a real pane and asserts the settled section draws zero frames while idle — a canvas that repaints every frame reads as correct code.
tty7
A terminal workbench: persistent sessions, remote work, agents.
Pure Rust · GPU rendering on Zed's gpui · VT core from Alacritty
English · 简体中文
Why
- Performance — ~2× the throughput of Alacritty, Ghostty, or Kitty (benchmarks)
- Persistent sessions — quit or reboot; your shells and supported agent sessions keep running, no tmux
- Editor-grade input — suggestions, completion, highlighting, history search
- Remote development — files, repos, panes, and git data stay on the remote machine
- Native SSH — profiles, SFTP, port forwarding, and jump hosts
- Agent-aware — Claude Code, Codex & co.: status, notifications, git context
- CLI + Skills — agents create panes, run commands, and inspect output
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 libraries bundled |
What's inside
| Editor-grade 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 |
| Agent-aware | per-pane detection (~18 CLIs): status dot · notifications · branch + diff · resume after reboot · tray icon when input is needed |
| Remote workspaces | remote files, repos, changes, diffs, worktrees, tabs, and panes · reconnect from any client and continue where you left off |
| CLI + Skills | bundled tty7 CLI · agent skill · pane/workspace control · real PTY commands · output, process, port, and agent status |
| SSH | native russh stack: profiles with keychain secrets · SFTP panel · port forwarding · jump hosts · one-time, unprivileged tty7-server install |
Terminal and keybinding reference: docs/features.md. The agent-facing CLI interface is documented in skills/tty7/SKILL.md.
Install the skill with:
npx skills add l0ng-ai/tty7
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 I/O — 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 server 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%