Skip to content
Terminal > Blocks

Blocks overview

Each command and its output become one selectable block.


In Mel, every command you run becomes a block: one unit that groups the command line, its complete output, the directory it ran in, when it ran and how long it took, and whether it succeeded. Blocks turn scrollback from an undifferentiated stream into a list of things you did.

What a block contains

  • Header — the working directory and timestamp. You can fold this into the command row with the Compact block header option in Appearance.
  • Command line — with a status glyph showing running, finished, or failed.
  • Output — the raw PTY output, rendered with full ANSI colors intact. Colors are parsed once when the block finishes and preserved all the way to the screen, so ls, git diff, cargo, and every TUI-adjacent tool look exactly as they should.

File and directory paths in output are live: hover one and it turns blue and underlined; ctrl+click (cmd+click on macOS) opens directories in your file manager and files in their default app. Bare filenames are also linkified for listing commands like ls — only tokens that resolve to a real path become links.

Selection

Click a block to select it. The selected block gets a highlighted rounded card and reveals its header icons — attach as agent context, save as workflow, filter, and the ⋮ menu — plus keyboard shortcuts like ctrl+C to copy the whole block. Click again (or elsewhere) to deselect. See Block actions.

Dividers and layout

Unselected blocks render flush with the background; a thin 1px divider separates consecutive blocks (toggleable in Settings → Appearance). When a session has little history, scrollback is bottom-anchored — blocks hug the prompt rather than floating at the top of the pane, so your most recent work is always next to your cursor.

Collapsed agent conversations also live in the scrollback as mini-cards (✓ title ›); clicking one reopens the conversation. See Sessions.

Limits

Blocks are built to stay fast at scale:

LimitValue
Output kept per block1 MB
Blocks kept per session5,000 (configurable down to 100 in Settings)

Older blocks are pruned past the cap; oversized output is truncated rather than slowing the UI.