add TERMINFO env for top/ncurses, tighten output flush
test / unit + widget + golden + a11y (push) Failing after 28s
test / integration_test (xvfb) (push) Has been skipped
test / bundle smoke (xvfb 5s) (push) Has been skipped
test / daemon subprocess + web WASM smoke (push) Has been skipped
test / unit + widget + golden + a11y (push) Failing after 28s
test / integration_test (xvfb) (push) Has been skipped
test / bundle smoke (xvfb 5s) (push) Has been skipped
test / daemon subprocess + web WASM smoke (push) Has been skipped
top fails with "Error opening terminal: xterm-256color" because the PTY child can't find terminfo. Set TERMINFO=/usr/share/terminfo explicitly in the pane environment. Output flush changed from 16ms Timer to Duration.zero (next event loop turn) for tighter batching of escape sequences. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
3e6c0279ef
commit
2921adc9cb
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"exported_at": "2026-05-01T10:01:22Z",
|
||||
"exported_at": "2026-05-01T10:08:01Z",
|
||||
"decisions": [
|
||||
{
|
||||
"id": "D-1",
|
||||
|
||||
@@ -186,11 +186,13 @@ class _ClaudePaneState extends State<ClaudePane> {
|
||||
final b64 = e.data['bytes_b64'];
|
||||
if (b64 is String) {
|
||||
_outputBuf.write(utf8.decode(base64Decode(b64), allowMalformed: true));
|
||||
// Throttle writes to ~60fps. Multiple PTY reads within a
|
||||
// 16ms window are batched into one terminal.write() call,
|
||||
// preventing split escape sequences from rendering as
|
||||
// garbage between frames.
|
||||
_flushTimer ??= Timer(const Duration(milliseconds: 16), _flushOutput);
|
||||
// Batch all output from the current event loop turn into one
|
||||
// terminal.write() call. scheduleMicrotask runs after all
|
||||
// pending events but before the next frame, so split escape
|
||||
// sequences within the same event batch are reunited.
|
||||
if (_flushTimer == null) {
|
||||
_flushTimer = Timer(Duration.zero, _flushOutput);
|
||||
}
|
||||
}
|
||||
case 'pane.exit':
|
||||
if (widget.isPrimary) {
|
||||
|
||||
@@ -56,6 +56,7 @@ class PaneRegistry {
|
||||
'COLORTERM': 'truecolor',
|
||||
'LANG': 'en_US.UTF-8',
|
||||
'LC_ALL': 'en_US.UTF-8',
|
||||
'TERMINFO': '/usr/share/terminfo',
|
||||
if (env != null) ...env,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user