A Zed window is a Workspace. Inside it, docks hold panels (file tree, terminal, AI panel) and the center holds a tree of Panes, each of which can be split horizontally or vertically.
Pane | Pane
tabs of Editor items
Actions dispatched from GPUI arrive at the active pane, which forwards them to its active item. If the item handles the action, it stops there; otherwise it bubbles back up to the Workspace.
A Pane (pane.rs) is a tab strip backed by a list of items — anything that implements the Item trait: Editor, terminal views, diff views, etc. The active item fills the pane's content area.
When a user opens a file (e.g. from the file tree or command palette), here is the path from disk to rendered text:
Project and asks for a buffer.BufferStore::get_or_load(). If the buffer is already cached, it's returned immediately; otherwise the file is read from Fs, a new Buffer entity is created, and language detection runs.LspStore receives a BufferOpened event and sends textDocument/didOpen to each applicable language server.MultiBuffer, creates an Editor entity, and adds it to the active Pane. The pane activates it, GPUI renders the editor.