terminals: resize with the panel, and five xterm addons
The terminal was xterm with one addon (fit) and a single fit() call at connect, so the shell kept whatever cols/rows it was born with. Drag a panel wider and the PTY never heard about it — anything drawing a full screen (an agent TUI, top, vim) rendered into a box that no longer matched the one you were looking at. A ResizeObserver now refits and sends pty:resize, coalesced to one fit per frame because dragging an edge fires continuously and each fit reflows. Scrollback goes from xterm's default 1000 lines to 10,000 — one long agent turn was enough to lose the start of it. Addons, all off the shelf and none previously loaded: - webgl — the renderer, and the reason fast repainting feels smooth rather than syrupy. Guarded twice: construction can throw where there is no GL context, and the context can be lost later, so both paths fall back to the DOM renderer instead of a dead canvas. - unicode11 (+ allowProposedApi) — correct widths for emoji, CJK and box-drawing. The default unicode 6 tables are why agent TUI frames sit a column out. - web-links — URLs in output are clickable. - search — with a find bar on Ctrl/Cmd-Shift-F. Not plain Ctrl-F: that is forward-one-char in readline and emacs, and swallowing it would break every shell in the app. - serialize — installed for exact-state replay, not yet wired. Also reports the shell's own title (OSC 0/2) and the bell through new optional callbacks, so a panel can show what is running in it and flag a finished turn you weren't watching. Nothing consumes them yet. Unrelated but found by this run: three origin-validation tests were failing. Not from this change — ALLOW_ANY_ORIGIN=true in .env, added last night, and Bun loads the host .env into tests, so the kill switch had silently turned the assertions into no-ops. The test now pins both escape hatches off, since its whole job is asserting the checks reject things. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -56,6 +56,11 @@
|
||||
"@visual-json/core": "^0.1.1",
|
||||
"@visual-json/react": "^0.1.1",
|
||||
"@xterm/addon-fit": "^0.11.0",
|
||||
"@xterm/addon-search": "^0.16.0",
|
||||
"@xterm/addon-serialize": "^0.14.0",
|
||||
"@xterm/addon-unicode11": "^0.9.0",
|
||||
"@xterm/addon-web-links": "^0.12.0",
|
||||
"@xterm/addon-webgl": "^0.19.0",
|
||||
"@xterm/xterm": "^6.0.0",
|
||||
"argon2": "^0.44.0",
|
||||
"bech32": "2.0.0",
|
||||
@@ -1012,6 +1017,16 @@
|
||||
|
||||
"@xterm/addon-fit": ["@xterm/addon-fit@0.11.0", "", {}, "sha512-jYcgT6xtVYhnhgxh3QgYDnnNMYTcf8ElbxxFzX0IZo+vabQqSPAjC3c1wJrKB5E19VwQei89QCiZZP86DCPF7g=="],
|
||||
|
||||
"@xterm/addon-search": ["@xterm/addon-search@0.16.0", "", {}, "sha512-9OeuBFu0/uZJPu+9AHKY6g/w0Czyb/Ut0A5t79I4ULoU4IfU5BEpPFVGQxP4zTTMdfZEYkVIRYbHBX1xWwjeSA=="],
|
||||
|
||||
"@xterm/addon-serialize": ["@xterm/addon-serialize@0.14.0", "", {}, "sha512-uteyTU1EkrQa2Ux6P/uFl2fzmXI46jy5uoQMKEOM0fKTyiW7cSn0WrFenHm5vO5uEXX/GpwW/FgILvv3r0WbkA=="],
|
||||
|
||||
"@xterm/addon-unicode11": ["@xterm/addon-unicode11@0.9.0", "", {}, "sha512-FxDnYcyuXhNl+XSqGZL/t0U9eiNb/q3EWT5rYkQT/zuig8Gz/VagnQANKHdDWFM2lTMk9ly0EFQxxxtZUoRetw=="],
|
||||
|
||||
"@xterm/addon-web-links": ["@xterm/addon-web-links@0.12.0", "", {}, "sha512-4Smom3RPyVp7ZMYOYDoC/9eGJJJqYhnPLGGqJ6wOBfB8VxPViJNSKdgRYb8NpaM6YSelEKbA2SStD7lGyqaobw=="],
|
||||
|
||||
"@xterm/addon-webgl": ["@xterm/addon-webgl@0.19.0", "", {}, "sha512-b3fMOsyLVuCeNJWxolACEUED0vm7qC0cy4wRvf3oURSzDTYVQiGPhTnhWZwIHdvC48Y+oLhvYXnY4XDXPoJo6A=="],
|
||||
|
||||
"@xterm/xterm": ["@xterm/xterm@6.0.0", "", {}, "sha512-TQwDdQGtwwDt+2cgKDLn0IRaSxYu1tSUjgKarSDkUM0ZNiSRXFpjxEsvc/Zgc5kq5omJ+V0a8/kIM2WD3sMOYg=="],
|
||||
|
||||
"@zone-eu/mailsplit": ["@zone-eu/mailsplit@5.4.8", "", { "dependencies": { "libbase64": "1.3.0", "libmime": "5.3.7", "libqp": "2.1.1" } }, "sha512-eEyACj4JZ7sjzRvy26QhLgKEMWwQbsw1+QZnlLX+/gihcNH07lVPOcnwf5U6UAL7gkc//J3jVd76o/WS+taUiA=="],
|
||||
|
||||
Reference in New Issue
Block a user