417 Commits

Author SHA1 Message Date
GitHub Copilot 6ad4f7e550 Bump version to 1.3.22 2026-02-17 21:14:20 +00:00
GitHub Copilot 3a88fb45d9 Reduce terminal and dashboard memory footprint
Frontend terminal:
- Share single TextDecoder across all instances (was one per terminal)
- Write binary WS frames as Uint8Array directly to ghostty-web,
  avoiding intermediate string allocation from TextDecoder.decode()
- Reduce default scrollback to 200 on mobile (was 1000; Safari mobile
  has ~300MB budget across all tabs)
- Pause heartbeat watchdog when tab is hidden to reduce WS traffic
  and message queue growth for background terminals

Dashboard screenshots:
- Revoke old object URL before creating new one (reduces peak memory
  by not having two decoded bitmaps alive simultaneously)
- Re-lookup card from cardsBySlug in fetch callback to avoid orphaned
  blob URLs when renderTiles() runs during in-flight requests
- Remove thumbnailCache writes (was redundant with activeObjectURLBySlug)

Server:
- Halve replay buffer from 256KB to 128KB per session
2026-02-17 21:13:37 +00:00
GitHub Copilot c2b10f1145 Fix SVG preview memory leaks in dashboard and server
Browser-side:
- Sparkline images now use blob object URLs with explicit revocation
  instead of cache-busted img.src URLs that accumulate in Safari's
  internal image cache
- renderTiles() now clears thumbnailCache, sparkline object URLs,
  pending refresh timers, and etag cache on re-render
- Prevents unbounded growth of dashboard state objects

Server-side:
- Add periodic eviction of stale screenshotCache entries (every 60s,
  removes entries older than maxScreenshotCacheTTL) to prevent
  unbounded server memory growth from cached SVG strings
2026-02-17 21:08:07 +00:00
GitHub Copilot 10d40062e7 Bump version to 1.3.21 2026-02-17 20:54:01 +00:00
GitHub Copilot 5031bd5e7c Sync theme registries and support webterm-theme key in landing YAML
Two issues prevented themes from being applied:

1. Three server-side themes (miasma, github, gotham) were missing from
   the frontend THEMES map in terminal.ts, causing the browser to
   silently ignore them when set via data-theme attribute.

2. Landing YAML only recognized the 'theme' key, but users writing
   'webterm-theme' (matching the Docker label convention) got no theme.
   Now LoadLandingYAML accepts both 'theme' and 'webterm-theme' keys.

All 16 themes are now consistent across ThemeBackgrounds, ThemePalettes,
and the frontend THEMES map.
2026-02-17 20:53:47 +00:00
GitHub Copilot edfa239c3e Filter unsupported DEC private mode 7727 from terminal output
Shells (e.g. via Tera Term conventions) emit CSI ?7727h/l to toggle
Application Escape Key mode, which ghostty-web does not implement.
This produces noisy console warnings in the browser.

Strip these sequences server-side in the output pipeline (both
TerminalSession and DockerExecSession) before they reach the client,
using the same pattern as the existing DA response filter.
2026-02-17 20:38:55 +00:00
GitHub Copilot af79bdd59f Fix Safari crashes: share WASM singleton and fix resource leaks
- Share single Ghostty WASM instance across all terminals instead of
  loading a new one per tab (major memory savings on Safari)
- Track all window/document event listeners and remove them on dispose()
- Store and disconnect ResizeObserver on dispose()
- Clear resize debounce timer on dispose()
- Remove injected mobile keybar <style> element on dispose()
- Null out socket and clear message queue on dispose()
- Use addTrackedListener() helper for automatic cleanup registration
2026-02-17 20:30:26 +00:00
GitHub Copilot 7e35d4cb0b Add periodic browser resource cleanup to prevent memory leaks
- Cap message queue at 1000 entries; trim oldest on overflow in send()
- Add per-instance 30s cleanup timer that trims stale queued messages
- Add module-level 30s sweep that disposes terminal instances whose
  DOM containers have been removed (el.isConnected === false)
- Wire cleanup timer start/stop into initialize() and dispose()
2026-02-17 20:26:03 +00:00
GitHub Copilot 594533eae6 Bump version to 1.3.20 2026-02-17 19:33:46 +00:00
GitHub Copilot 77feb400ab Document all 16 available terminal themes in README and ARCHITECTURE 2026-02-17 19:33:07 +00:00
GitHub Copilot 461b94a59c Add complete palettes for all themes and new color schemes
- Add full 16-color palettes for tango and ristretto (previously background-only)
- Fix ristretto background from #2d2525 to #2c2525 per Monokai Pro Ristretto source
- Rename monokai to monokai-pro to reflect it is the Monokai Pro variant
- Add classic monokai theme (bg #272822) from Monokai Classic
- Import three new themes: miasma, github (dark dimmed), gotham
- All 16 themes now have complete entries in both ThemeBackgrounds and ThemePalettes
- Update terminal.ts frontend theme map to match
2026-02-17 19:32:26 +00:00
GitHub Copilot faca1b7d76 Bump version to 1.3.19 2026-02-17 16:16:43 +00:00
GitHub Copilot 153d6d1612 fix: bump ghostty-web to 0.4.1 with render loop resilience
Update ghostty-web to b0aa99e which wraps the requestAnimationFrame
render loop in try/catch. Previously, any exception in renderer.render()
or wasmTerm.getCursor() would silently kill the loop, permanently
freezing the terminal canvas while input continued to flow normally.

The fix ensures requestAnimationFrame is always re-scheduled and logs
errors to console for diagnosis. This addresses intermittent terminal
stalls that were not correlated with resize, focus, or user interaction.
2026-02-17 16:16:08 +00:00
GitHub Copilot 52b8703313 Bump version to 1.3.18 2026-02-17 09:50:56 +00:00
GitHub Copilot 3b5f36d239 Fix transparent websocket recovery for terminals
Close retired websocket connections in stopWSClient so clients reconnect promptly instead of remaining in a stdin-only state with no returning output. Add regression coverage to verify stopWSClient actively disconnects the websocket.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-17 09:50:26 +00:00
GitHub Copilot 62bab56589 Bump version to 1.3.17 2026-02-16 23:05:20 +00:00
GitHub Copilot 2d50731fa0 Harden websocket and stdin backpressure handling
Replace silent output frame dropping with fail-fast slow-client disconnects when websocket send queues saturate, and replace unbounded stdin write goroutine spawning with a bounded queue + worker and timeout-driven disconnect under input backlog. Also add targeted regression tests for queue saturation and stdin backlog disconnect behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-16 23:04:55 +00:00
GitHub Copilot b09d8d58ee Fix websocket lifecycle races that can stall terminal output
Guard route client cleanup against stale websocket/session close paths so newer connections keep receiving output after focus/reconnect transitions. Also refresh websocket read deadlines on every inbound message and add regression tests covering both reconnect and stale-session-close race scenarios.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-16 23:00:30 +00:00
GitHub Copilot c981c89435 Bump version to 1.3.16 2026-02-16 14:50:17 +00:00
GitHub Copilot 5d9d0b0ee1 Merge branch 'main' of github.com:rcarmo/textual-webterm 2026-02-16 14:50:14 +00:00
GitHub Copilot b2889b97e8 Bump version to 1.3.15 2026-02-16 14:50:06 +00:00
GitHub Copilot c905a66d9b Add Firefox WebSocket stall recovery watchdog
Address issue #3 by hardening the terminal WebSocket client against silent receive stalls seen in Firefox.

Changes:
- Added a client heartbeat watchdog that sends periodic ping messages.
- Detects stale inbound streams and forces reconnect when no inbound data/pong is seen within the timeout window.
- Added Blob WebSocket message handling for improved cross-browser receive compatibility.
- Ensures heartbeat timers are started/stopped with socket lifecycle and terminal disposal.

Validation:
- Rebuilt frontend bundle via make build-fast.
- Ran make check successfully.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-16 14:48:53 +00:00
Rui Carmo 8078ba6d4b Update README.md 2026-02-16 13:25:19 +00:00
Rui Carmo ebd16b86c2 Update video link in README.md
Updated video link in README to point to a new asset location.
2026-02-15 17:14:29 +00:00
GitHub Copilot 5e375edf01 Fix README demo video rendering on GitHub
Update the README <video> source to use the GitHub raw media URL for docs/demo.mp4 so the demo renders inline instead of resolving to a blob page.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-15 17:07:50 +00:00
GitHub Copilot 4c7641e380 Embed demo video in README
Replace the static screenshot with an embedded demo.mp4 player in the README and add docs/demo.mp4 to the repository so the preview is available in-repo.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-15 17:05:14 +00:00
GitHub Copilot a5e08c784a Bump version to 1.3.14 2026-02-15 16:20:32 +00:00
GitHub Copilot 98e000e3be Fix module path mismatch for go install
Resolve GitHub issue #2 by aligning the Go module identity with the repository path so  works.

Changes made:
- Updated go.mod module path from github.com/rcarmo/webterm-go-port to github.com/rcarmo/webterm.
- Updated all internal import references to the new module path.
- Updated version ldflags in Makefile and Dockerfile to use github.com/rcarmo/webterm/webterm.Version.
- Added README quick-install section documenting the  command.

Validation:
- Ran make check successfully after the rename/import updates.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-15 16:19:46 +00:00
GitHub Copilot 6a841837af Bump version to 1.3.13 2026-02-15 15:11:31 +00:00
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
GitHub Copilot 5ade64b367 Wire vendored Nerd font into dashboard SVG thumbnails
Ensure dashboard screenshot SVGs consistently use the vendored Fira Nerd font stack used by the terminal.

Changes:
- Added dashboard inline CSS declarations for @font-face (FiraCode Nerd Font/FiraMono Nerd Font) and --webterm-mono in the dashboard HTML template.
- Updated RenderTerminalSVG styling to use font-family: var(--webterm-mono, ...) with the full Nerd-font-aware fallback stack.
- Embedded matching @font-face declarations inside generated SVG style blocks so externally loaded SVG images can resolve the vendored font without relying on parent page CSS inheritance.

Result:
- Dashboard screenshot tiles and search thumbnails retain full glyph/icon coverage with consistent typography across environments.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-15 15:05:36 +00:00
GitHub Copilot 252ecb3714 Bump version to 1.3.12 2026-02-15 14:55:20 +00:00
GitHub Copilot fbf4c968ed Vendor Fira Nerd Font for full glyph coverage
Bundle FiraCode Nerd Font directly in static assets so terminal rendering no longer depends on host-installed Nerd Fonts.

Changes included:
- Added vendored font asset at webterm/static/fonts/FiraCodeNerdFont-Regular.ttf.
- Added bundled font license at webterm/static/fonts/FiraCode-LICENSE.txt.
- Wired local @font-face declarations in webterm/static/monospace.css for both "FiraCode Nerd Font" and "FiraMono Nerd Font" family names used by the existing font stack.
- Documented the capability in README Features as a first-class feature with full glyph/icon support and no external font fetch requirement.

Impact:
- Font glyph/icon rendering is now more consistent across environments.
- Font assets continue to be embedded in the Go binary by default through the existing static embed path.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-15 14:54:53 +00:00
GitHub Copilot cfc4b1d0f2 Bump version to 1.3.11 2026-02-15 14:28:45 +00:00
GitHub Copilot a4fb601c72 Merge branch 'main' of github.com:rcarmo/textual-webterm 2026-02-15 14:28:40 +00:00
GitHub Copilot cf2c5d14cb Bump version to 1.3.10 2026-02-15 14:28:34 +00:00
GitHub Copilot d43270d5dc Harden long-lived SSE and WebSocket connections
Address intermittent stalls seen after many hours by improving liveness detection and failure handling for both streaming channels.

WebSocket changes:
- Added periodic server ping frames and a read deadline refreshed by pong replies.
- On sender write/ping failure, explicitly close the underlying connection so clients promptly observe disconnect and reconnect instead of remaining half-open.

SSE changes:
- Excluded /events from gzip middleware and added X-Accel-Buffering: no to reduce proxy buffering risk.
- Stop the SSE loop on write errors for activity/keepalive frames so dead subscribers are cleaned up immediately.

Tests:
- Added regression coverage for gzip bypass on /events.
- Added regression coverage ensuring SSE handler exits and unsubscribes on write failure.
- Verified with make format && make check.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-15 14:28:09 +00:00
Rui Carmo 1820c10b54 Enhance README features section with repository links
Updated feature descriptions with links to relevant repositories.
2026-02-15 13:51:30 +00:00
GitHub Copilot 5fd2f92ef1 Bump version to 1.3.9 2026-02-14 22:40:47 +00:00
GitHub Copilot 516f1b1946 Reorganize project into standard root layout
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-14 22:40:29 +00:00
GitHub Copilot 374b69bd7e Bump version to 1.3.8 2026-02-14 22:14:54 +00:00
GitHub Copilot 73f162075e Embed web assets into the Go binary
Serve /static from embedded assets when no static path override is configured, add static route coverage, and update Docker/docs to reflect embedded-by-default behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-14 22:14:39 +00:00
GitHub Copilot ff60bc94ed Bump version to 1.3.7 2026-02-14 20:00:35 +00:00
GitHub Copilot 218aabc8ca Allow visible dashboard screenshots while unfocused
Relax screenshot request gating to depend on tab visibility only, so thumbnail updates continue when the dashboard tab is visible but the window is not focused.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-14 19:59:55 +00:00
GitHub Copilot d526fa1860 Bump version to 1.3.6 2026-02-14 19:52:53 +00:00
GitHub Copilot 8762e2cc7d Reduce idle screenshot churn with change-driven SSE
Emit dashboard activity updates only when terminal screen content actually changes, and tighten screenshot 304 fast-path behavior to avoid stale not-modified responses after newer activity.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-14 19:52:41 +00:00
GitHub Copilot d4be34dbc9 Bump version to 1.3.5 2026-02-14 19:42:21 +00:00
GitHub Copilot 2de22d37da Fix dashboard live refresh and UTF-8 hint rendering
Restore reliable live thumbnail updates in the single-flight queue and set UTF-8 charset metadata/headers so typeahead hint symbols render correctly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-14 19:42:09 +00:00
GitHub Copilot be45e91f9b Bump version to 1.3.4 2026-02-14 19:35:15 +00:00
GitHub Copilot 157da5deb9 Increase SSE activity debounce to 500ms
Reduce per-route SSE activity event frequency by doubling the server-side debounce window from 250ms to 500ms.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-14 19:34:44 +00:00