GitHub Copilot 5017e3a53f Add right-click sanitized SVG export for dashboard tiles
Introduce a dashboard workflow to export screenshot SVGs without external font URL references.

Server changes:
- Added screenshot query flags: sanitize_font_urls=1 and download=1.
- Added SVG sanitization that strips @font-face src:url(...) for the vendored font path.
- Added safe filename normalization for download responses.
- Added Content-Disposition attachment support for downloadable screenshot exports.
- Preserved existing cache behavior while computing ETags from the actual response variant.

Dashboard changes:
- Added tile contextmenu handler (right-click) to trigger sanitized SVG download per tile.
- Download URL includes cache-busting timestamp to avoid stale browser downloads.

Tests:
- Added coverage for sanitized download response (attachment header + font URL removal).
- Added coverage asserting dashboard HTML includes right-click sanitized download wiring.
- Validated with make format && make check.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-15 15:11:12 +00:00
2026-01-21 23:53:57 +00:00
2026-02-15 14:55:20 +00:00

webterm

Icon

webterm serves terminal sessions over HTTP/WebSocket, with a dashboard mode for multiple sessions and live-updating terminal tiles.

This repository is the Go port of the original Python implementation, which is preserved in the python branch.

Screenshot

Features

  • Typeahead find for quickly finding and launching sessions with minimal friction
  • Web terminal with reconnect support
  • Ghostty WebAssembly terminal engine for fast rendering from ghostty-web
  • Session dashboard with live SVG screenshots from go-te
  • Docker watch mode (webterm-command / webterm-theme labels)
  • Docker compose manifest ingestion
  • CPU sparkline tiles for compose services
  • SSE activity updates for fast dashboard refresh
  • Mobile/touch support with virtual keyboard + draggable keybar
  • Theme/font controls for terminal rendering
  • Vendored Nerd Font assets with full glyph/icon support (no external font fetch required)

Install

Build from source

git clone https://github.com/rcarmo/webterm.git
cd webterm
mkdir -p bin
go build -o ./bin/webterm ./cmd/webterm

The command above produces bin/webterm; you can also build it from repo root with make build-go.

Quick start

Run a default shell session:

go run ./cmd/webterm

Run a specific command:

go run ./cmd/webterm -- htop

Then open http://localhost:8080.

Dashboard modes

Landing manifest

- name: Logs
  slug: logs
  command: docker logs -f my-service
  theme: nord
go run ./cmd/webterm -- --landing-manifest ./landing.yaml

Docker watch

go run ./cmd/webterm -- --docker-watch

Containers with these labels become tiles:

  • webterm-command: command string, or auto for Docker exec
  • webterm-theme: theme name (fallback is xterm palette)

Compose manifest

go run ./cmd/webterm -- --compose-manifest ./docker-compose.yaml

Environment variables

  • WEBTERM_STATIC_PATH: override static asset directory
  • WEBTERM_DOCKER_USERNAME: user for Docker exec sessions
  • WEBTERM_DOCKER_AUTO_COMMAND: override auto command (/bin/bash default)
  • WEBTERM_SCREENSHOT_FORCE_REDRAW: force redraw before screenshots (true/1/yes/on)
  • DOCKER_HOST: Docker daemon endpoint override

Development (Makefile-first)

make install-dev
make check
make race
make test
make bump-patch

Frontend bundle tasks:

make build
make build-fast
make bundle-watch

Docker

docker build -t webterm .
docker run -v /var/run/docker.sock:/var/run/docker.sock -p 8080:8080 webterm --docker-watch

Web assets are embedded in the Go binary by default (you can still override with WEBTERM_STATIC_PATH). The Dockerfile uses a minimal Alpine runtime stage and only installs ca-certificates plus docker-cli.

S
Description
No description provided
Readme 122 MiB
Languages
Go 51.5%
TypeScript 31%
JavaScript 14.8%
Shell 1.2%
Makefile 0.8%
Other 0.7%