Commit graph

10 commits

Author SHA1 Message Date
Hibryda
a814e39410 fix(electrobun): set GTK window background to black (prevents white host flash) 2026-03-25 18:37:48 +01:00
Hibryda
8f4ec379ee fix(electrobun): clear min-size in configure handler during resize (prevents GTK bounce-back) 2026-03-25 18:06:06 +01:00
Hibryda
6d0a65eb65 fix(electrobun): disable WebView during resize drag in C (prevents grab theft) 2026-03-25 17:59:32 +01:00
Hibryda
7af94fd4bd fix(electrobun): clear min-size in C before begin_resize_drag + configure logging 2026-03-25 17:51:57 +01:00
Hibryda
683013d704 fix(electrobun): connect resize signals on WebKitWebView, not GtkWindow
KEY FIX: WebKit's GdkWindow receives all pointer events. Connecting
button-press-event on the GtkWindow never fires. Must connect on the
WebKitWebView widget itself (the Wails pattern).

C library now:
- Walks widget tree to find deepest child (WebKitWebView)
- Connects button-press + motion-notify on the WebView
- Does hit-test in C (8px border zone)
- Calls gtk_window_begin_resize_drag with real event data
- Returns TRUE to consume border clicks, FALSE for interior
2026-03-25 17:40:16 +01:00
Hibryda
178e560068 feat(electrobun): native C resize library (Wails pattern)
New: agor-pty/native/agor_resize.c — C shared library that:
- Connects button-press-event on GtkWindow + WebView children in C
- Stores mouseButton, xroot, yroot, dragTime from real GTK events
- Exports agor_resize_start(edge) for Bun FFI

Build: gcc -shared -fPIC -o libagor-resize.so agor_resize.c $(pkg-config --cflags --libs gtk+-3.0)

New: ui-electrobun/src/bun/native-resize.ts — Bun FFI wrapper
App.svelte: simplified to just edge detection + RPC call
2026-03-25 16:44:51 +01:00
Hibryda
621e1c5c8c fix(agor-pty): implement real PTY resize (TIOCSWINSZ via portable-pty)
Was only updating cached dimensions without calling PTY resize.
Shell thought terminal was wrong size → double prompts, escape code leaks.

- Session stores master PTY handle (Arc<Mutex<Box<dyn MasterPty>>>)
- resize() calls master.resize(PtySize) → issues TIOCSWINSZ
- Reader task no longer owns master handle (uses cloned reader only)
2026-03-20 03:29:53 +01:00
Hibryda
4676fc2c94 feat(electrobun): wire PTY daemon into terminal tabs via Electrobun RPC
- Bun process connects to agor-ptyd via PtyClient (5 retries, exponential backoff)
- RPC bridge: 5 request handlers (create/write/resize/unsubscribe/close)
- Daemon output forwarded to WebView as pty.output messages (base64 passthrough)
- Terminal.svelte: real PTY sessions via RPC instead of echo mode
- Shared RPC schema at src/shared/pty-rpc-schema.ts
- Fixed pty-client.ts protocol: base64 string for data (was number array)
- TerminalTabs passes sessionId to Terminal component
2026-03-20 03:20:13 +01:00
Hibryda
f3456bd09d feat(agor-pty): complete PTY daemon — auth, sessions, output fanout 2026-03-20 03:10:49 +01:00
Hibryda
4b5583430d feat: agor-pty crate — standalone PTY multiplexer daemon (Phase 1 WIP)
New crate at agor-pty/ (standalone, not in workspace — portable to Tauri/Electrobun):
- Rust daemon (agor-ptyd) with Unix socket IPC, JSON-framed protocol
- PTY session lifecycle: create, resize, write, close, output fanout
- 256-bit token auth, multi-client support, session persistence
- TypeScript IPC client at clients/ts/pty-client.ts (Bun + Node.js)
- Protocol: 9 client messages, 7 daemon messages
- Based on tribunal ruling (78% confidence, 4 rounds, 55 objections)

WIP: Rust implementation in progress (protocol.rs + auth.rs done)
2026-03-20 03:04:36 +01:00