Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:0xranx OpenContext TerminalSidebar

From Leeroopedia
Knowledge Sources
Domains Terminal, React
Last Updated 2026-10-24 00:00 GMT

Overview

Embedded xterm.js terminal sidebar for the desktop app, supporting multiple terminal sessions with CLI presets, theme-aware colors, and PTY management via Tauri commands.

Description

The TerminalSidebar.jsx component in src/ui/src/components/ integrates xterm.js with the Tauri PTY backend. It supports multiple terminal tabs, CLI presets (Codex, Claude Code, OpenCode, Custom), theme-aware terminal colors (light/dark), fit-to-container resizing via FitAddon, and session lifecycle (spawn, write, resize, kill). It listens to terminal-output and terminal-exit Tauri events for streaming output and process exit codes.

Usage

Import this component in App.jsx to render the terminal sidebar panel.

Code Reference

Source Location

Signature

export default function TerminalSidebar({ isVisible, onClose })

Import

import TerminalSidebar from './components/TerminalSidebar';

I/O Contract

Inputs

Name Type Required Description
isVisible boolean Yes Panel visibility
onClose Function Yes Close panel callback

Usage Examples

Rendering Terminal Sidebar

import TerminalSidebar from './components/TerminalSidebar';

<TerminalSidebar
  isVisible={showTerminal}
  onClose={() => setShowTerminal(false)}
/>

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment