417 Commits

Author SHA1 Message Date
izackp ac18f65094 docs: update README, AGENTS.md, Makefile, and architecture docs
CI / check (push) Has been cancelled
2026-06-04 22:10:50 -04:00
izackp a7b5c13d4b chore: ignore .bkit/ local tool dir 2026-06-04 21:58:41 -04:00
izackp 6c273feda7 feat: add PWA offline support and model caching
Add service worker that enables full offline launch and persistent
caching of large Moonshine voice model assets (136MB .data file).

- sw.js: stale-while-revalidate for app shell (HTML, JS, CSS, fonts);
  cache-first for sherpa model files and ghostty WASM; old shell caches
  deleted on SW activate to reclaim storage after updates
- server.go: /sw.js route injects current staticAssetCacheBust version
  into SW content so browser detects new SW on each deploy; new SW
  pre-caches versioned terminal.js during install so update is ready
  before next launch; SW registration added to dashboard HTML
- terminal.ts: register /sw.js on load; detect navigator.onLine at
  startup; listen for online/offline events; pause reconnect loop when
  offline instead of exhausting attempts; resume with reset attempts
  when network returns; show "Offline. Will reconnect..." instead of
  misleading WebSocket error

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 11:59:13 -04:00
izackp 35fa7b5111 Fix settings button 2026-05-12 17:42:24 -04:00
izackp d9da2a5b85 feat: add frontend client logging 2026-05-12 16:17:25 -04:00
izackp 1859700f71 fix: improve mobile keyboard behavior 2026-05-12 14:39:09 -04:00
izackp 6a2c1609cd feat: add llm cleanup voice mode 2026-05-12 13:53:38 -04:00
izackp ea1ab6b2ce feat: add env-based auth config support 2026-05-12 12:03:00 -04:00
izackp 1696391441 fix: restore mobile virtual keyboard flow 2026-05-12 12:00:44 -04:00
izackp 541e0e1fe8 feat: redesign mobile keyboard 2026-05-12 03:34:49 -04:00
izackp ca870cc293 feat: add mobile virtual keyboard 2026-05-12 03:09:42 -04:00
izackp 3edc41e86c feat: add initial browser voice input prototype 2026-05-11 22:01:23 -04:00
izackp 67bd22b27d Make update helper executable 2026-05-11 20:39:57 -04:00
izackp be5df58698 Add mobile touch and keybar improvements 2026-05-11 20:39:32 -04:00
izackp 3e0c9f87c8 feat: dock mobile keybar to bottom of screen with larger touch targets
The mobile keybar was a small floating overlay that obscured terminal
content. Now it's a full-width bar docked to the bottom using flexbox
layout, so the terminal shrinks to accommodate it. Buttons use 44px
height (Apple HIG recommended touch target) and evenly fill the width.
Also uses 100dvh for correct mobile viewport sizing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 04:06:45 -04:00
GitHub Copilot 1abc0d04dc Bump version to 1.3.39 2026-03-01 20:28:43 +00:00
GitHub Copilot 5089aedd6f fix: bell indicator stuck after returning to terminal tab
Two issues prevented the bell emoji from clearing reliably:

1. Race on tab return: clearBellState() runs on visibilitychange/focus,
   but the WebSocket has buffered output from while the tab was hidden.
   The terminal processes it immediately, onBell fires, and the bell is
   right back. Fixed with a 1-second suppression window after clearing —
   bells from buffered output are ignored.

2. Bell stays when clicking without typing: the bell only cleared on
   onData (keyboard input). If you clicked the terminal or just switched
   back without typing, the emoji persisted. Added a mousedown listener
   on the terminal element to clear it on any mouse interaction.
2026-03-01 20:26:05 +00:00
GitHub Copilot 5acb468abb Bump version to 1.3.38 2026-02-26 20:43:32 +00:00
GitHub Copilot b6a9231b21 deps: update ghostty-web to fcc47d4 2026-02-26 20:43:19 +00:00
GitHub Copilot 4d38128636 Bump version to 1.3.37 2026-02-26 20:33:59 +00:00
GitHub Copilot 41071f8a89 fix: sync bell state on all dashboard tiles when tab regains focus
The orange bell outline on tiles could get stuck because:

1. The terminal tab clears its bell localStorage entry on focus/keypress,
   but the 'storage' event only fires across tabs — the dashboard in the
   same browser never sees the removal.

2. The only way to clear the bell class was to click the tile to open it
   (openTile → clearBellState). Simply switching back to the dashboard
   tab never re-checked localStorage.

Now onDashboardFocusChanged() calls syncAllBellStates() which re-reads
localStorage for every tile and toggles the bell class accordingly,
clearing stale orange outlines as soon as the dashboard becomes visible.
2026-02-26 20:33:44 +00:00
GitHub Copilot 571d0c0b9c Bump version to 1.3.36 2026-02-26 20:31:15 +00:00
GitHub Copilot b03219401e deps: update ghostty-web to a5d8c7b 2026-02-26 20:31:02 +00:00
GitHub Copilot bc3fac9a3f fix: refresh all dashboard thumbnails on tab return and add periodic fallback
Two issues caused stale thumbnails on the dashboard:

1. Returning to the dashboard tab only processed the (empty) refresh
   queue — it never triggered a full refresh. Now, if the dashboard was
   hidden for more than 3 seconds, all ETags are cleared and refreshAll()
   is called so every tile fetches a fresh screenshot.

2. If SSE activity events were missed (e.g. during reconnect), tiles
   would never update until the next terminal activity. Added a 10s
   periodic fallback that calls refreshAll() when the dashboard is
   visible, ensuring tiles stay reasonably current even without SSE.
2026-02-26 20:29:20 +00:00
GitHub Copilot 8496b13998 Bump version to 1.3.35 2026-02-26 20:17:57 +00:00
GitHub Copilot f68904d5b6 Merge branch 'main' of github.com:rcarmo/textual-webterm
# Conflicts:
#	VERSION
#	webterm/static/js/terminal.js
2026-02-26 20:17:44 +00:00
GitHub Copilot c88f01cbf1 Bump version to 1.3.34 2026-02-26 20:16:55 +00:00
GitHub Copilot 982a68ea1c deps: update ghostty-web to bbdea28 (fixes stale selection highlight on click) 2026-02-26 20:16:40 +00:00
GitHub Copilot 73414acdbc Bump version to 1.3.33 2026-02-26 19:58:33 +00:00
GitHub Copilot 82ccfeb6a9 perf: reduce input tarpitting and speed up large-display rendering
Input tarpitting fixes:
- terminal.ts: batch stdin writes with 10ms coalescing window (flushes
  immediately for large payloads like paste), replacing per-keystroke
  WebSocket messages with fewer, larger frames
- server.go: replace per-message time.After() with a reusable timer to
  eliminate GC pressure from repeated key input
- server.go: coalesce queued stdin writes (up to 4KB) into a single PTY
  write to reduce syscall overhead

Screenshot/rendering pipeline optimizations:
- tracker.go: stop forcing empty cells to space; let exporters decide
  what to render, drastically reducing work for mostly-blank terminals
- tracker.go: use clear() for dirty map instead of delete-in-loop
- svg_exporter.go: skip visually empty cells (blank glyph, default BG,
  no reverse/underline); still render background rects for colored or
  reverse-video cells
- png_exporter.go: add color parsing cache to avoid redundant hex
  parsing per cell; add empty cell fast-path; short-circuit blend math
  for coverage 0 and 255

Dashboard thumbnail concurrency:
- server.go: replace single-flight screenshot fetching with limited
  parallelism (2-4 concurrent requests based on hardwareConcurrency)
  so large dashboards with many tiles update faster

Also fixes typo in dashboard JS (tetagBySlug -> etagBySlug) that
silently broke ETag caching for screenshot refreshes.

Bumps version to 1.3.32.
2026-02-26 19:57:43 +00:00
GitHub Copilot 3d83b4b104 Bump version to 1.3.32 2026-02-26 19:56:58 +00:00
GitHub Copilot 2d9cb7f062 docs 2026-02-22 11:30:51 +00:00
GitHub Copilot df0a6ae12a Bump version to 1.3.31 2026-02-20 13:27:22 +00:00
GitHub Copilot 0d8cf7d49c Increase thumbnail refresh cadence 2026-02-20 13:26:19 +00:00
GitHub Copilot bb0bc77997 Bump version to 1.3.30 2026-02-20 09:53:43 +00:00
GitHub Copilot 671778a184 Bump version to 1.3.29 2026-02-19 15:59:33 +00:00
GitHub Copilot ce624f2966 Bump ghostty-web to 0.4.2
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-19 15:59:26 +00:00
GitHub Copilot 8dfe86e4eb Bump version to 1.3.28 2026-02-18 17:54:17 +00:00
GitHub Copilot 7a2a7877c4 Default dashboard thumbnails to PNG
PNG screenshots are now the default for dashboard previews,
with SVG available by setting WEBTERM_SCREENSHOT_MODE=svg.
Documentation and tests updated accordingly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 17:53:33 +00:00
GitHub Copilot 25049dd1b0 Bump version to 1.3.27 2026-02-18 15:59:29 +00:00
GitHub Copilot cdcc9bfc23 Always download SVG screenshots
The dashboard now always downloads SVG on right-click even when
PNG thumbnails are enabled, while keeping SVG as the default mode
in the docs and tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 15:56:41 +00:00
GitHub Copilot b5f3534995 Bump version to 1.3.26 2026-02-18 15:50:59 +00:00
GitHub Copilot a6ada31aa6 Add optional PNG screenshot mode
PNG screenshots are now gated by WEBTERM_SCREENSHOT_MODE.
The dashboard selects SVG by default and switches to PNG when enabled,
with ETag caching and eviction for both formats.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 15:45:22 +00:00
GitHub Copilot 8d54de6407 Bump version to 1.3.25 2026-02-18 15:24:40 +00:00
GitHub Copilot 52c52f8435 Reconnect terminals on visibility restore
When a tab is hidden, buffer inbound output and stop the heartbeat.
On visibility restore, drop the hidden buffer and reconnect to replay a clean
server state, while guarding against stale socket events.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 15:24:13 +00:00
GitHub Copilot 247c1a3340 Fix idle session breaking resize and input on reconnect
Two bugs introduced in the idle tracker pause commit:

1. handleOutput() short-circuited entirely when idle, skipping
   connector.OnData() — so terminal output never reached clients
   even after reconnecting. Fix: still call connector.OnData()
   during idle; only skip the expensive tracker.Feed().

2. When a WebSocket client reconnects to an existing session,
   handleWebSocket never called UpdateConnector(), so the idle
   flag was never cleared and the tracker stayed paused. Fix:
   create a fresh connector and call session.UpdateConnector()
   on reconnect, which clears idle and rebuilds the tracker.
2026-02-18 15:09:31 +00:00
GitHub Copilot d9d012996e Bump version to 1.3.24 2026-02-18 09:23:45 +00:00
GitHub Copilot 2c5d3c72f9 Pause VT parser for idle sessions to eliminate CPU waste
When no WebSocket client is connected, the session's readLoop still
processes every byte of terminal output through the go-te VT parser
(tracker.Feed), Screen.Draw grapheme segmentation, and string
allocations — even though nobody is consuming the screen state.
For programs like btop inside tmux that produce continuous full-screen
redraws, this causes sustained CPU usage and GC pressure over hours.

Fix: after a 10-second idle threshold (no client connected), skip
tracker.Feed() and only maintain the replay buffer. When a client
reconnects (UpdateConnector) or a screenshot is requested
(GetScreenSnapshot), rebuild the tracker by replaying the buffer
through a fresh VT parser instance.

Changes:
- Add idleSince atomic timestamp + MarkIdle() to Session interface
- handleOutput() skips tracker.Feed when idle > threshold
- UpdateConnector() clears idle flag and rebuilds tracker from replay
- GetScreenSnapshot() rebuilds stale tracker on-demand for screenshots
- Wire MarkIdle() call into handleWebSocket cleanup (client disconnect)
- Add TestIdleTrackerPauseAndRebuild covering the full lifecycle
2026-02-18 09:21:18 +00:00
GitHub Copilot 025d91a632 Bump version to 1.3.23 2026-02-18 00:05:04 +00:00
GitHub Copilot 0a6534fc40 Fix theme persistence: cache-busting, setTheme proxy, cleanup logging
- Add ?v=VERSION cache-busting query params to terminal page static URLs
  (monospace.css, terminal.js) so Safari serves fresh assets after upgrades
- Add Cache-Control: no-cache header to terminal HTML page response
- Fix WebTerminal.setTheme() to assign through terminal.options proxy,
  triggering handleOptionChange which updates renderer AND re-renders
  (previously bypassed the proxy and only called renderer.setTheme)
- Remove 40+ debug console.log statements from investigation phase,
  keeping only warnings/errors and essential lifecycle messages
2026-02-18 00:02:24 +00:00