The --terminal-background CSS var now maps to chromeColor (same as
--sidebar-background) instead of raw syntaxBg. Consumers still use
bg-terminal — they don't need to know the underlying source.
The pill indicator below the composer is removed per feedback.
Backend commands (terminal_has_session, terminal_get_last_line) remain
available for future use. Focus management stays.
- Opening terminal: xterm.focus() called after fit in the visibility effect
- Closing terminal: ProseMirror editor focused via querySelector after rAF
- Works for all paths: pill click, ⌘+J toggle, trash icon kill
When the terminal panel is closed but a PTY session exists for the
current channel, a tiny pill appears in the bottom-right of the h-7 bar.
- Green dot = idle (shell alive, no recent output)
- White pulsing dot = active (data in last 2s)
- Red dot = process exited
- Shows last line of output (aggressively truncated, monospace)
- Click pill → opens terminal panel
- Hover → trash icon to kill the session
Backend: added terminal_has_session and terminal_get_last_line commands.
Frontend: TerminalStatusPill component with motion/react animations.
Positioned via ml-auto in the h-7 activity bar, right of bot indicators.
Adds terminal color tokens to the adaptive theme system, derived from
the Shiki syntax theme's raw bg/fg colors. Registered in Tailwind as
bg-terminal / text-terminal-foreground. Terminal panel and xterm instance
now adapt automatically to whatever syntax theme the user picks.
- adaptive-theme.ts: emit --terminal-background, --terminal-foreground
- tailwind.config.js: register terminal.DEFAULT + terminal.foreground
- TerminalInstance already reads these vars with Tokyo Night fallbacks
The typing/bot activity bar below the composer was always rendered with
a fixed h-7 height, creating a visible gap even when no indicators were
active. Now conditionally rendered only when there's actual content.
- Outer padding now px-4 pb-2 pt-1 matching the composer's inset
- Removed 'Terminal' header bar and drag handle for cleaner look
- Added p-2 padding inside the terminal content area
- Resize still works via invisible top-edge hit zone (6px)
- Removed unused onClose prop (toggle via ⌘+J only)
Terminal now renders inside the composer's pointer-events-auto wrapper,
sitting below the typing indicator. Wrapped with p-4 pt-2 for consistent
inset padding matching the composer's visual alignment. No more z-index
fight — it's in the natural flow.
Addresses Marge's review feedback:
1. Workspace-switch cleanup: Added terminal_close_all_sessions command
that kills all PTY sessions. Called from resetWorkspaceState() so
orphaned shells don't accumulate across workspace switches.
2. Light mode theme: Terminal surface stays dark in both modes (high
contrast "pop" against light app chrome). Added Tokyo Night Moon
variant for light mode with warmer foreground. Panel header/buttons
use consistent light-on-dark colors regardless of app theme.
MutationObserver syncs xterm theme when app theme class changes.
3. Buffer cap: Already implemented (256KB with drain-from-front) —
verified the existing MAX_BUFFER_BYTES guard in spawn_reader_thread.