mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-04 17:47:39 +01:00
WorkspaceTerminal (server PTY) and TerminalView (machine peek) were near-duplicate xterm wrappers — the input-buffering race fix was copy-pasted in both. Merge into one src/components/terminal/TerminalView.tsx parameterized by a TerminalTransport (terminal-transport.ts): - workspaceTransport(id) → server-owned PTY (/api/workspaces/[id]) - runnerTransport(tab) → Fleet Runner machine PTY (peek-stream + rawkey) The view owns xterm, the shared input buffer (race fix now in ONE place), fit/resize and chrome; the transport owns I/O. Delivers the 'same xterm view, two substrates' the TerminalSurface doc-comment promised. A third substrate is a third factory, no view change. All 4 call sites migrated; old control/WorkspaceTerminal.tsx + control/TerminalView.tsx deleted. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>