agentic-os/dashboard
Claude d7a1cbd292 Replace command-runner Terminal with a real interactive PTY
The previous Terminal ran one command at a time via subprocess.run
and returned its output - it couldn't run interactive programs
(colors, live input, TUIs like gemini's chat/auth flow), which is
what a terminal actually needs to do.

Backend: new /ws/terminal WebSocket endpoint spawns a real shell
attached to a pseudo-terminal (stdlib pty on POSIX, pywinpty/ConPTY
on Windows) and streams raw I/O bidirectionally, with resize support.
Replaces the old POST /api/terminal/run and GET /api/terminal/session
endpoints entirely.

Frontend: terminal.js now loads xterm.js + the fit addon from CDN
and renders a real terminal emulator wired to the WebSocket, instead
of a scrollback div with a single input line.

Verified on this Linux sandbox via raw WebSocket tests: shell spawns
correctly, commands execute and echo real output, resize propagates
to the PTY (confirmed via ), and closing the connection
cleanly kills the shell process with no orphans (interactive bash
ignores SIGTERM by default, so cleanup uses SIGKILL). Could not
visually verify the xterm.js browser rendering in this sandbox since
its egress policy blocks the CDN (cdn.jsdelivr.net) outright - same
CDN this app already uses for chart.js, so expected to work on a
normal machine; please confirm on Windows.
2026-07-06 05:12:54 +00:00
..
pages Replace command-runner Terminal with a real interactive PTY 2026-07-06 05:12:54 +00:00
api.js Replace command-runner Terminal with a real interactive PTY 2026-07-06 05:12:54 +00:00
app.js Security & polish: untrack settings.json, fix CORS, remove broken og:image, replace console.error with toast 2026-05-18 01:32:24 +05:30
index.html Add a Terminal page to the dashboard 2026-07-05 22:15:47 +00:00
styles.css Replace command-runner Terminal with a real interactive PTY 2026-07-06 05:12:54 +00:00
utils.js Add a Terminal page to the dashboard 2026-07-05 22:15:47 +00:00