Skip to content

Terminals - #19

Merged
hololee merged 8 commits into
mainfrom
terminals
Feb 15, 2026
Merged

hololee merged 8 commits into
mainfrom
terminals

Conversation

@hololee

@hololee hololee commented Feb 15, 2026

Copy link
Copy Markdown
Owner

Summary

This PR enhances terminal operations and resource management UX across Dashboard, Terminal, and Settings, with tmux-based session
management on the backend.

What changed

  • Added multi-tab terminal support with persistent tab metadata in browser storage.
  • Added per-tab session key handling for tmux-backed terminal session persistence.
  • Updated Dashboard SSH access action:
    • no longer copies command
    • now routes to Terminal and opens a new tab with prefilled SSH command.
  • Added backend tmux session APIs:
    • list host tmux sessions
    • kill selected tmux sessions.
  • Added Settings UI for terminal session management and moved it under Resource Management.
  • Unified Resource Management refresh to reload Docker resources + terminal sessions together.
  • Simplified terminal session feedback UX:
    • removed success/loading toasts/messages for session list flow
    • show error message only.
  • Updated i18n strings (EN/KO) for new terminal/resource behaviors.
  • Added host tmux setup guidance in INSTRUCTIONS.md.

———

Motivation

  • Improve terminal usability for multi-environment workflows.
  • Keep terminal sessions recoverable across tab switches/reloads.
  • Reduce friction from copy/paste SSH flow.
  • Provide centralized host resource + terminal session controls in Settings.

———

Key Files

  • frontend/src/pages/TerminalPage.tsx
  • frontend/src/pages/Dashboard.tsx
  • frontend/src/pages/Settings.tsx
  • frontend/src/i18n/locales/en/common.ts
  • frontend/src/i18n/locales/ko/common.ts
  • backend/app/routers/terminal.py
  • INSTRUCTIONS.md

———

API Changes

Added

  • POST /api/terminal/tmux/sessions/list
  • POST /api/terminal/tmux/sessions/kill

Existing behavior used

  • POST /api/terminal/ws (now receives/uses sessionKey from client INIT payload)

———

UX Changes

  • Terminal:
    • Add/close tabs (minimum 1 tab).
    • Persistent tab list/active tab in localStorage.
    • Dashboard-triggered terminal tab creation with environment-based naming.
  • Settings:
    • Terminal Sessions card moved into Resource Management section.
    • Resource Management top refresh refreshes both Docker resource data and tmux sessions.
    • Terminal session status now displays errors only (no success/loading status message).

———

Validation

  • Frontend lint: npm --prefix frontend run lint passed.
  • Backend tests: cd backend && pytest -q passed (20 passed).
  • Runtime verification: docker compose up --build -d executed after changes.

———

Known Issues / Follow-ups

  • Host resolution inconsistency:
    • tmux list/kill path currently uses raw ssh_host,
    • websocket terminal path maps localhost/127.0.0.1 -> host.docker.internal.
  • This can cause “terminal connects but tmux session APIs fail” in some Docker host setups.
  • Recommended follow-up: unify host resolution logic between websocket and tmux REST handlers.

———

Deployment Notes

  • Ensure host has tmux installed for session persistence/management features.
  • If tmux is unavailable, terminal still works but persistence/management features are limited.

@hololee hololee self-assigned this Feb 15, 2026
@hololee
hololee merged commit f259bc4 into main Feb 15, 2026
2 checks passed
@hololee
hololee deleted the terminals branch February 15, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant