Files
tty7/docs/window/side-panel.mdx
0x38eandl0ng-ai 90073007f0 fix(ui): align title-bar rows and share document header switches (#1178)
* fix(ui): align title-bar rows and share document header switches

Keep #1146's leading space derived from the macOS traffic lights, rather
than the previous fixed 80pt. Add a shared content centre for the title-bar
rows, so headers with different bottom borders align with those buttons.

Keep the editor's full leading space: a control's inner padding should not
reduce the gap before its clickable area or shift docked file tabs.

Share Dock / Fill controls between the editor and diff headers, and use
matching icons with localized tooltips for Split / Unified view.

Validation: formatting and Host boundary checks passed; GUI tests passed
(2506 passed, 2 ignored); local visual acceptance passed.

* fix(ui): give icon switches accessible button names

Expose each shared switch cell as a button with its localized tooltip name
and pressed state. This lets assistive technology identify the icon-only
choices and use GPUI's existing accessible click handling.

Formatting, Host boundary, and diff checks passed. GUI tests: 2506 passed,
2 ignored.

* fix(ui): share the terminal button in filled document headers

Use the editor's terminal button in both filled headers. Clicking it docks
the current file or diff beside the terminal without closing its content.
The shared builder also provides an accessible button name.

The click test verifies that the diff, focused file, expanded state, view
mode, and other tabs' layouts are preserved. GUI tests: 2507 passed, 2
ignored. Build, formatting, Host boundary, and visual acceptance passed.

* fix(ui): draw Split / Unified as two panes so they don't read as Dock

The diff header now holds both switches side by side, and a frame with
one vertical stroke was the Dock glyph shifted a point and a half. Split
is two frames next to each other, Unified two frames stacked.

---------

Co-authored-by: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com>
2026-10-15 15:03:17 +08:00

187 lines
8.8 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "The side panel"
description: "Info, Files, Search, Source Control and GitHub — plus the built-in editor."
---
<kbd>⌘ J</kbd> opens a panel on the right of the window. It is hidden by
default; whichever tab you leave it on is where it opens next time.
The tabs at the top switch what the panel shows; the current one sits on a
pill. <kbd>⌘ J</kbd> or the panel tile in the title bar puts it away.
<Frame caption="The Info tab beside a terminal: session, processes, listening ports">
<img src="/images/side-panel.webp" alt="The tty7 side panel" />
</Frame>
## Info
Everything tty7 knows about the focused pane, in one column:
| Section | What it shows |
|---|---|
| **Session** | working directory, shell, SSH connection, git branch, `+N −M` changes, and the coding agent with its status (idle / working / waiting / done) |
| **Processes** | the process tree inside the pane, with the foreground process marked |
| **Ports** | every port those processes are listening on |
Hovering a row shows what it can do at the right-hand end of it: **Copy** on the
working directory, the SSH host and the branch, and **Reveal in Finder** / **Open
Folder** alongside it on a working directory this machine can see. The `+N −M`
counts open the [diff overlay](/git/diffs), the same click the sidebar's counts
answer to.
The ports section is the quickest answer to "what is this pane serving, and
where" — the same data `tty7 procs` prints. A port row copies `localhost:PORT`,
and on a local pane opens it in your browser.
## Files
A file tree rooted at the pane's working directory, with git status decorations
on every row and a search box at the top. The search box carries a clear button
while there is something in it.
- **Click a file** to open it in the built-in editor.
- **Drag a file out** to Finder or Explorer to copy it there.
- **Drag files in** from the desktop to copy them into the folder under the
cursor. A folder row takes them itself, a file row stands in for the folder
holding it, and the empty space below the tree means the top of it. Folders
come in whole, the executable bit survives, and a name that is already taken
is asked about rather than replaced.
Both directions work over a [remote workspace](/remote/workspaces) too, reading
on one machine and writing on the other, up to the size one control frame can
carry — past that the panel tells you to use [SFTP](/remote/sftp).
## Search
Find in files across the project the Files tab shows: the repository root of
each pane in the tab, or its working directory outside a repository. Opening the
tab — from its icon, **Right Panel: Search** in Search Everywhere, or the
`ShowRightPanelSearch` action — puts the cursor in the search field.
Results arrive as you type, grouped by file with a count per file; click a
file's row to fold it away. Each hit is its line with the matches highlighted,
and **clicking one opens the file in the built-in editor with the cursor on that
line and column**. <kbd>Enter</kbd> in the field searches again, for when the
files changed underneath you.
The three toggles at the end of the field:
| | |
|---|---|
| **Aa** | Match case — off by default, so `needle` finds `Needle` |
| **ab** | Whole word — `foo` no longer finds `foobar` or `foo_bar` |
| **.\*** | Regular expression, in Rust [`regex`](https://docs.rs/regex) syntax. A pattern that does not parse says why in red instead of searching |
What is searched is what the tree shows: a folder's `.gitignore` applies whether
or not it is in a repository, and dot-files and dot-directories are skipped.
Binary files and files over 1 MB are stepped past. A search stops at 2,000
matching lines, 100 per file, 20,000 files or ten seconds, whichever comes
first, and says so under the results — narrow the query to see the rest.
In a [remote workspace](/remote/workspaces) the search runs on the remote
machine and only the hits cross the network. A remote `tty7-server` older than
this feature cannot search; the tab says so and asks you to update the server
rather than showing an empty result. An SSH pane's files are browsed over
[SFTP](/remote/sftp), which cannot search them — open the host as a remote
workspace for that.
## Source Control
The git panel for the focused pane's repository, in four groups — **Merge
Changes**, **Staged Changes**, **Changes**, **Untracked**. Write a message,
commit, and push without leaving the window.
[Source control →](/git/source-control)
## GitHub
Issues and pull requests for the repository the focused pane is in, read-only.
The tab reads the repository's remotes and binds to the one on `github.com`; in a
fork, where `origin` is yours and `upstream` is the project, it picks
`upstream`, and the name at the top is a menu of every GitHub remote when there
is more than one. GitHub Enterprise hosts are not supported.
- **Issues | Pull Requests** and **Open | Closed** switch the list, newest
activity first, 50 at a time with **Load more** underneath.
- Each row carries a state glyph whose *shape* says open, closed, not planned,
merged or draft; the number, author and last update; and the labels.
**Click a label** to show only that label, and the × beside it to clear it.
- **Click a row** for the detail: title, state, author, labels, the description
and the conversation as Markdown. A pull request adds its branches, size and
changed files — click a file to open its patch in the
[diff overlay](/git/diffs).
- The ↗ button opens the repository, or the issue, on github.com; ↻ refreshes.
Lists are kept per repository, so switching tabs or panes does not fetch them
again; anything older than two minutes is refreshed in the background while
it stays on screen.
### Signing in
There is nothing to sign in to in tty7. It reuses the GitHub CLI's login: the
token comes from `GH_TOKEN`, then `GITHUB_TOKEN`, then `gh auth token`. `gh` is
looked for on your `PATH` and in the usual Homebrew and `/usr/local/bin`
locations, so it is found even when tty7 was opened from Finder.
Without a token, public repositories still work, at GitHub's unauthenticated
limit of 60 requests an hour. A private repository, or a spent limit, says so
in the panel and suggests running `gh auth login`; press ↻ afterwards and the
new login is picked up without a restart.
The Info tab gains a **GitHub** row for a repository with a GitHub remote. It
opens the branch you are on, on the remote it tracks — or the repository's page
for a branch you have not pushed.
Markdown from GitHub is written by strangers, so it is rendered with two
changes: only images GitHub hosts itself — the screenshots pasted into an issue
— are loaded, and any other image becomes a link you can open in the browser;
and links that would open anything other than a web page or an e-mail are
disabled. See [what leaves your machine](/reference/privacy#what-leaves-your-machine).
## The editor
<kbd>⌘ ⇧ E</kbd> toggles the code panel; clicking a file in the Files tab opens
it there. It is a real editor — syntax highlighting, line and column readout,
wrap toggle, and a Markdown preview — meant for the edit you would otherwise
have opened `vim` for.
| | |
|---|---|
| <kbd>⌘ S</kbd> | Save |
| <kbd>Esc</kbd> | Back to the terminal |
Files are watched on disk: a change underneath you is picked up, and closing
with unsaved edits asks before discarding them. Files over 4 MB and anything
that looks binary are refused with a note rather than opened badly.
### Where it opens
The editor docks beside the terminal, taking half the space between the sidebar
and the right panel. The terminal keeps running, stays visible, and stays
typeable — click it, read what your agent said, click back. Diffs open in the
same column.
Drag the divider for any width between a fifth and four fifths of that space —
the range `document_ratio` keeps — or double-click it to cycle a third, a half
and two thirds. **Document: Third / Half / Two-Thirds Width** in Search
Everywhere do the same. On a narrow window the terminal's own floor stops the
divider sooner.
Two cells at the end of the document's header switch it: the window with a
column in it is **Dock beside terminal**, the filled one is **Fill window**, the
old full-workspace overlay, unchanged. **Document: Fill Window** and **Document:
Dock Beside Terminal** in Search Everywhere are the same switch.
In **Fill window**, both the editor and diff headers show the current terminal's
name on the left. Click it to dock the document beside the terminal, keeping
the file or diff open.
Fill or dock is **per tab**: read a long file over the whole window in one tab
while an agent keeps half of another, and neither moves the other. A fresh tab
starts from `document_layout` in `config.json`. The width is shared, and
persists as `document_ratio`.
A window too narrow to give both the terminal and the document a readable width
fills for that file only — widen it and the column comes back, without your
setting having changed.