Skip to content
Back

Terminal tabsPro

Terminal tabs: add, close, rename, cycle with Ctrl+Tab, activity dots on background tabs and exit codes.

oxyn add terminal-tabs
atlas · terminal
$ npm run dev
▲ Next.js ready on http://localhost:3000
✓ compiled in 412 ms
$
The code is part of Oxyn Pro

The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.

Get Pro

Rendered from Rust at build time · goes live when visible

When to use

  • In coding-agent apps the in-app terminal is table-stakes: Claude desktop (Ctrl+\`), Verdent, Conductor, Paradev, Orca (splits), Codex app, Zed (terminal threads as agent-panel tabs), Warp, pi-gui, Devin (Shell tab with command history and jump-in-time).
  • The new problem is that some tabs are the agent's and some are the user's.
  • The user wants to know, from the strip alone: which tabs are running, which finished and how (exit code), which need input, which rang the bell or printed something unseen, and which ones the agent owns — then rename, reorder, split and close them without killing a build by accident.

When not to use

  • An app sidebar: use Sidebar instead.
  • Fourteen text-glyph loaders (braille, sand, blocks, scanner…) that settle into a check, a warning or a cross when the agent finishes, waits or fails: use Glyph loader instead.
  • How long the agent has worked, without the time it spent waiting for you: use Elapsed timer instead.

Installation

Terminal tabs is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.

Terminal
oxyn add terminal-tabs

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

Three

Dev server, tests (exit 0) and a shell.

atlas · terminal
$ npm run dev
▲ Next.js ready on http://localhost:3000
✓ compiled in 412 ms
$
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Busy

Background tabs print often and show dots.

atlas · terminal
$ npm run dev
▲ Next.js ready on http://localhost:3000
✓ compiled in 412 ms
$
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

One

A single quiet tab.

atlas · terminal
$ npm run dev
▲ Next.js ready on http://localhost:3000
✓ compiled in 412 ms
$
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

TerminalTabs

PropTypeDefaultDescription
now_msrequiredu64—Host clock (ms).
titlesVec<String>vec!["dev server".to_string(), "cargo test".to_string(), "zsh".to_string()]Tab titles.
activity_msu642500Background tabs print a line every this many ms (0 = never).
heightf32320.0Height (px).

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
CtrlTabNext tab (Shift for previous)
←or→Move between tabs
Double-clickRename
EnterorEscapeSave or cancel a rename

Accessibility

  • A tablist with one tabpanel; background output adds “new output” to the tab name.
  • Close buttons are labelled per tab.
From the spec
  • Strip: role="tablist" labelled "Terminals"; tabs role="tab" with aria-selected, aria-controls the grid panel. Accessible name composes owner, title and status: "Agent terminal, cargo test, running, 1 minute 2 seconds" / "Your terminal, zsh, failed with exit code 101, unread output".
  • Close button: "Close cargo test"; confirm popover is an alertdialog with initial focus on Keep running.
  • Live region (polite): agent tab opened ("Agent opened terminal: cargo test"), finished, failed (with code); assertive only for AwaitingInput on a tab the user owns. Bells are announced as "Bell in dev-server" at most once per 10 s.
  • Contrast: status glyphs ≥ 3:1, titles ≥ 4.5:1; failure carries the code as text; owner carries a glyph plus the name in the accessible label — never colour alone.
  • Keyboard: §4 global keys; reorder via ⌘/Ctrl+Shift+←/→ announces "Moved to position 3 of 5".
  • F6 lands on the active terminal grid; Shift+Tab from the grid reaches the strip.
  • Reduced motion: §6 last row.

Motion & interaction

  • New tab. Inserts after the active tab; width grows from 0 with spring.snap while neighbours slide; title fades in 120 ms.
  • Running pulse (from OpenCode tab-pulse, note 08, MIT): the active running tab draws a 2 px highlight that travels along its top edge — 2.8 s loop, 450 ms attack, rest opacity 0.18. Inactive running tabs show only the slot loader (one busy signal per region, loaders.md §2.3).
  • Completion. Loader morphs to ✓ / ✕N (spring.snap 160 ms); a single 1.2 s completion pulse (attack 12 %) runs on the tab edge; failure adds an 800 ms edge flash in danger and a 2 × 3 px nudge of the glyph only (the tab itself never shakes).
  • Unseen output. Dot fades in 120 ms on the first byte that arrives while inactive; viewing the tab clears it with a 240 ms "diffuse" (dot scales 1 → 1.6 and fades; OpenCode's unread glow idea).
  • Bell. BEL triggers a 400 ms ring wobble (± 12°, 2 cycles) on the 🔔 glyph, rate-limited to once per 2 s per tab; system attention (dock bounce / taskbar flash) only if the app opts in and the window is unfocused.
  • Rename. Title morphs into a field with the same baseline (no jump); commit crossfades 120 ms.
  • Drag reorder. 4 px threshold; ghost at 0.95 scale + shadow; neighbours slide to open a gap with spring.snap; drop settles the ghost into the gap 160 ms. Dragging onto a pane edge hands off to the split preview of workspace-chrome.md §5. Pinned tabs only reorder among pinned.
  • Overflow. Scrolling the strip glides 200 ms ease.in-out; the active tab is always scrolled into view with 24 px margin; the ⌄ k count rolls (odometer, tabular digits).
  • Close. Tab width collapses to 0 (160 ms ease.in), neighbours fill; Undo toast for user tabs. ConfirmClose popover scales from the tab (0.96 → 1, 160 ms).
  • Ownership change. Owner glyph crossfades (200 ms) and the tab edge flashes once in the new owner's tone (acting-indicator rule 2: control changes are visible).
Timing
TransitionDurationDelayEasing / springStaggerFrame rate
Tab insert / remove~200 ms / 160 ms0spring.snap / ease.in—60 Hz
Loader show120 ms fade300 ms (Starting)ease.out—glyph frame rate (loader-glyph.md)
Running edge pulse2.8 s loop, 450 ms attack0sinemax 1 tab (active)30 Hz
Elapsed appear120 msat 10 sease.out—1 Hz
Exit morph160 ms0spring.snap—60 Hz
Completion pulse1.2 s, attack 12 %after morphease.out—30 Hz
Failure edge flash + glyph nudge800 ms + 300 ms (2 × 3 px)after morphease.out / linear—60 Hz
✓ fade (shell tabs)240 ms4 sease.in—60 Hz
Unseen dot in / diffuse out120 ms / 240 ms0ease.out—60 Hz
Bell wobble400 ms (2 × ±12°)rate limit 2 sspring.soft—60 Hz
Rename morph / commit120 ms / 120 ms0ease.out—60 Hz
Drag gap / drop settle~180 ms / 160 ms4 px thresholdspring.snap / ease.out—60 Hz
Overflow scroll200 ms0ease.in-out—60 Hz
Confirm popover in / out160 ms / 120 ms0ease.out / ease.in—60 Hz
Owner change flash200 ms crossfade + 400 ms edge0ease.out—60 Hz
Reduced motionno edge pulses, wobbles, nudges or slides; status glyphs swap with an 80 ms crossfade; running = static ◌ still frame (loaders.md §2.6); insert/remove/reorder instant; unseen dot and bell glyph still appear (information)—linearnone1 Hz (elapsed only)

Responsive behaviour

  • The strip scrolls sideways when tabs overflow.
Edge cases (spec)
  • Many tabs (30+): overflow list is searchable (type to filter); tabs needing attention sort first in the list; the strip keeps min width 96 px per tab (max 200 px).
  • Long titles / paths: middle-truncate paths (~/…/api/src), end-truncate commands; full title in tooltip and accessible name.
  • Rapid exit/restart (watchers, cargo watch): status changes faster than 400 ms are coalesced; the completion pulse runs at most once per 2 s per tab.
  • Bell storms: rate limit 1 wobble / 2 s; > 10 bells / 10 s auto-mutes that tab's bell with a tooltip "Bells muted (too many)".
  • Agent closes its own tab: removed without confirm; the transcript keeps the command block.
  • User closes an agent tab while the agent waits on it: confirm copy says so; on close the agent's tool call receives Killed (the app reports it) and the tool row shows "Stopped by you".
  • Agent wants to type into a user tab: never silently; the app must request control (family G); the tab shows the pending request as AwaitingInput-style amber with "Agent requests this terminal".
  • Restored workspace: tabs restore titles, owners and scrollback; processes do not restart; restored tabs show Idle with a dim "Restored" tooltip, never fake Running.
  • Remote / sandbox loss: all tabs go Lost together; one banner in the panel header rather than N toasts.
  • RTL: strip order mirrors; owner glyph stays at inline-start; terminal content stays LTR.
  • Tiny sizes: at 20 px strips, status slot + 8 ch titles; owner moves into the tooltip.
  • Touch: tabs ≥ 44 px tall in a horizontal scroller; long-press opens the tab menu (rename, close, move); close ✕ always visible.
  • Slow networks: Unseen and status come from the PTY host's events; stale status (> 5 s since last heartbeat) shows the glyph at 60 % with "last update 12s ago".
  • Very fast commands (< 150 ms): no loader, no completion pulse; only an exit badge if non-zero.

Notes for AI

  • Import TerminalTabs from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
  • A GPUI version exists: TermTabsEl in oxyn_gpui.
  • Props to set first: now_ms.
  • It reads a clock (now) for live timers; pass one clock for the whole page rather than one per component.
  • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI