diff --git a/README.md b/README.md index 2a2476c..7bf43ec 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ The room is a browser workspace: - **Files** pane: the tree, a read-only file view, `git status`, and `git diff`. - **Terminal**: a real PTY in the sandbox, same target and key as the - agent, rendered with ghostty-web (Ghostty's VT parser in WebAssembly). + agent, rendered with xterm.js. - **Presence**: who is online, who is typing. Accounts own rooms, plans, and providers. Friends join by a single-use diff --git a/specs/rhema-together.md b/specs/rhema-together.md index e5991d2..d084963 100644 --- a/specs/rhema-together.md +++ b/specs/rhema-together.md @@ -386,12 +386,11 @@ when the shell ends. There is no server-side ring buffer; a reconnect starts a fresh shell. Closing the socket closes the channel, which hangs up the remote shell. -The emulator is ghostty-web in the browser, which runs Ghostty's VT -parser as WebAssembly behind an xterm.js-compatible API. The server -parses no escape sequences. A server-side libghostty-vt is a later -option: it gives screen snapshots on reconnect and a way to let the -model read the terminal, and it costs an FFI crate that allows `unsafe`. -That crate would live in this project, not in the framework. +The emulator is xterm.js in the browser. The server parses no escape +sequences. A server-side libghostty-vt is a later option: it gives screen +snapshots on reconnect and a way to let the model read the terminal, and +it costs an FFI crate that allows `unsafe`. That crate would live in this +project, not in the framework. ### Editor (read-only) @@ -665,7 +664,7 @@ This repository, as committed: - SSE event feed with durable replay (`?since=`) and transient deltas; a WS presence socket with online and typing state. - Read-only files tree and file view, `git status` and `git diff`. -- ghostty-web terminal over a WebSocket PTY. +- xterm.js terminal over a WebSocket PTY. - Preview proxy over ssh `direct-tcpip`, signed wildcard hosts, no rewriting. - No approval prompts: the sandbox is the boundary, so `AllowAll`. diff --git a/src/api/mod.rs b/src/api/mod.rs index 20968dc..fe5bc4d 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -171,11 +171,9 @@ async fn headers(State(state): State, request: Request, next: Next) -> R Some(source) => format!("'self' {source}"), None => "'self'".to_owned(), }; - // ghostty-web compiles its inlined WASM in the browser. Keep the - // narrow wasm-unsafe-eval allowance and let it fetch the data: module. let csp = format!( "default-src 'self'; img-src 'self' data: blob:; style-src 'self' 'unsafe-inline'; \ - script-src 'self' 'unsafe-inline' 'wasm-unsafe-eval'; connect-src 'self' data: ws: wss:; frame-src {frame_src}; \ + script-src 'self' 'unsafe-inline'; connect-src 'self' ws: wss:; frame-src {frame_src}; \ frame-ancestors 'self'; base-uri 'self'; form-action 'self'" ); if let Ok(value) = HeaderValue::from_str(&csp) { diff --git a/web/app/assets/css/main.css b/web/app/assets/css/main.css index 4de70d9..060589c 100644 --- a/web/app/assets/css/main.css +++ b/web/app/assets/css/main.css @@ -1387,12 +1387,8 @@ button { overflow: hidden; } -.terminal-host:focus { - outline: none; -} - -.terminal-host canvas { - display: block; +.terminal-host .xterm { + height: 100%; } .preview-wrap { diff --git a/web/app/components/TerminalPane.vue b/web/app/components/TerminalPane.vue index dff3d0f..4611372 100644 --- a/web/app/components/TerminalPane.vue +++ b/web/app/components/TerminalPane.vue @@ -1,6 +1,8 @@