Skip to content

Commit a1e787a

Browse files
committed
fix(docs): align box diagrams in tty-architecture and multiplexers
- terminal-stack diagram: right border was one column short on the 'Display ← GPU rendering' row, producing a doubled '││' bar; add ┬ connector tees to bottom borders so PTY links attach to the boxes - SSH diagram: 'Terminal'/'Emulator' rows were one column wider than the box border, shifting the remote box; sshd box had doubled '││' borders on the '(allocates remote PTY)' row - tmux diagram: content rows were one column wider than borders; widened boxes to fit and added ┬ tee for the PTY 2 link - multiplexer nesting diagram: all three nested boxes had right borders misaligned by 1-2 columns All diagrams regenerated with computed padding and validated programmatically (every border column verified).
1 parent b78579e commit a1e787a

2 files changed

Lines changed: 23 additions & 23 deletions

File tree

docs/fundamentals/tty-architecture.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ Every terminal session involves these components, connected through the kernel:
2121
┌─────────────────────────────────┐
2222
│ Terminal Emulator │ Ghostty, Kitty, iTerm2, Terminal.app
2323
│ (renders text, captures keys) │ Converts keystrokes → bytes
24-
│ Display ← GPU rendering ││ Parses escape sequences → pixels
25-
└────────────────────────────────┘
24+
│ Display ← GPU rendering Parses escape sequences → pixels
25+
└────────────────────────────────┘
2626
│ PTY master fd
2727
│ (read/write bytes)
2828
┌──────────────┴──────────────────┐
2929
│ Kernel PTY + Line Discipline │ Echo, line editing, signals
3030
│ (transforms input ↔ output) │ Ctrl+C → SIGINT, Ctrl+Z → SIGTSTP
31-
└────────────────────────────────┘
31+
└────────────────────────────────┘
3232
│ PTY slave fd
3333
│ (/dev/pts/N)
3434
┌──────────────┴──────────────────┐
@@ -109,13 +109,13 @@ SSH creates a terminal session across a network by adding a PTY layer on the rem
109109
<pre>
110110
LOCAL REMOTE
111111
┌────────────────┐ ┌─────────────────────────┐
112-
│ Terminal │ │ Shell (bash) │
113-
│ Emulator │ │ reads from PTY slave │
112+
│ Terminal │ │ Shell (bash) │
113+
│ Emulator │ │ reads from PTY slave │
114114
└───────┬────────┘ └──────────┬──────────────┘
115115
│ PTY │ PTY (remote)
116116
┌───────┴────────┐ ┌──────────┴──────────────┐
117117
│ ssh client │◄──TCP/SSH──────│ sshd │
118-
│ (raw mode) │────tunnel──────│ (allocates remote PTY)
118+
│ (raw mode) │────tunnel──────│ (allocates remote PTY)
119119
└────────────────┘ └─────────────────────────┘
120120
</pre>
121121
</div>
@@ -130,18 +130,18 @@ Terminal multiplexers insert an **extra PTY** between the terminal emulator and
130130

131131
<div class="architecture-diagram">
132132
<pre>
133-
┌────────────────────┐
133+
┌────────────────────
134134
│ Terminal Emulator │
135-
└────────┬───────────┘
135+
└────────┬───────────
136136
│ PTY 1
137-
┌────────┴───────────┐
138-
│ tmux server │ ← Maintains its own virtual terminal buffer
139-
│ (virtual terminal) │ ← Re-renders content to the outer PTY
140-
└────────────────────┘
137+
┌────────┴───────────
138+
│ tmux server │ ← Maintains its own virtual terminal buffer
139+
│ (virtual terminal) │ ← Re-renders content to the outer PTY
140+
└────────────────────┘
141141
│ PTY 2
142-
┌────────┴───────────┐
142+
┌────────┴───────────
143143
│ Shell / Application │
144-
└────────────────────┘
144+
└────────────────────
145145
</pre>
146146
</div>
147147

docs/multiplexers.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ This indirection gives you powerful features:
2323
The cost? Every escape sequence your application sends must now pass through an intermediary that may not understand it.
2424

2525
```
26-
┌─────────────────────────────────────────────────
27-
│ Terminal Emulator (Ghostty, iTerm2, etc.)
28-
│ ┌───────────────────────────────────────────┐
29-
│ │ Multiplexer (tmux, screen)
30-
│ │ ┌─────────────────────────────────────
31-
│ │ │ Shell / Application (vim, htop)
32-
│ │ └─────────────────────────────────────
33-
│ └───────────────────────────────────────────┘
34-
└─────────────────────────────────────────────────
26+
┌───────────────────────────────────────────────┐
27+
│ Terminal Emulator (Ghostty, iTerm2, etc.) │
28+
│ ┌─────────────────────────────────────────
29+
│ │ Multiplexer (tmux, screen)
30+
│ │ ┌───────────────────────────────────┐
31+
│ │ │ Shell / Application (vim, htop) │
32+
│ │ └───────────────────────────────────┘
33+
│ └─────────────────────────────────────────
34+
└───────────────────────────────────────────────┘
3535
```
3636

3737
Without a multiplexer, escape sequences travel one hop: app to terminal. With one, they travel two: app to multiplexer, multiplexer to terminal. The multiplexer must parse, understand, and re-emit every sequence — or decide to drop it.

0 commit comments

Comments
 (0)