Summary
The terminal emulator silently discards Event::PtyWrite events from alacritty's VTE engine, which means terminal query responses (DA1, device status, keyboard mode, text area size) are never written back to the PTY. This causes fish shell to display a 2-second startup warning and disable optional features.
Steps to reproduce
- Set
$SHELL to fish (or set embedded_shell = "/usr/bin/fish" in ~/.config/arbor/config.toml)
- Open an embedded terminal in Arbor
- Observe the warning:
warning: fish could not read response to Primary Device Attribute query after waiting for 2 seconds.
This is often due to a missing feature in your terminal. See 'help terminal-compatibility' or
'man fish-terminal-compatibility'. This fish process will no longer wait for outstanding queries,
which disables some optional features.
Root cause
When a shell sends a DA1 query (\ESC[c), alacritty's identify_terminal() generates the response \x1b[?6c and emits it as Event::PtyWrite(text) via the EventListener trait.
However, AlacrittyEventListener in alacritty_support.rs only handles Event::Bell and ignores all other events:
impl EventListener for AlacrittyEventListener {
fn send_event(&self, event: Event) {
if matches!(event, Event::Bell) {
self.bell_count.fetch_add(1, Ordering::Relaxed);
}
}
}
There is no mechanism to route PtyWrite data back to the PTY master writer. The response is silently dropped.
Affected terminal queries
All responses routed through Event::PtyWrite are lost:
- DA1 (Primary Device Attributes) —
\ESC[c → \x1b[?6c
- DA2 (Secondary Device Attributes) —
\ESC[>c
- Device status —
\ESC[5n, \ESC[6n (cursor position report)
- Keyboard mode report —
\ESC[?{mode}u
- Text area size —
\ESC[8;{rows};{cols}t
- DECRPM (mode report) —
\ESC[?{mode};{state}$y
Impact
- fish shell: visible warning, 2-second startup delay, disabled optional features
- zsh/bash: silent degradation (cursor position reports, prompt reflow after resize may not work correctly)
- TUI apps: any program relying on terminal capability queries may behave unexpectedly
Suggested fix
AlacrittyEventListener needs a shared reference to the PTY writer (Arc<Mutex<Box<dyn Write + Send>>>) so it can handle Event::PtyWrite by writing the response bytes back to the PTY master. This needs to be wired up in both terminal_backend.rs (GUI) and terminal_daemon.rs (httpd).
Workaround
Set a shell that doesn't depend on DA1 responses in ~/.config/arbor/config.toml:
embedded_shell = "/bin/zsh"
Summary
The terminal emulator silently discards
Event::PtyWriteevents from alacritty's VTE engine, which means terminal query responses (DA1, device status, keyboard mode, text area size) are never written back to the PTY. This causes fish shell to display a 2-second startup warning and disable optional features.Steps to reproduce
$SHELLto fish (or setembedded_shell = "/usr/bin/fish"in~/.config/arbor/config.toml)Root cause
When a shell sends a DA1 query (
\ESC[c), alacritty'sidentify_terminal()generates the response\x1b[?6cand emits it asEvent::PtyWrite(text)via theEventListenertrait.However,
AlacrittyEventListenerinalacritty_support.rsonly handlesEvent::Belland ignores all other events:There is no mechanism to route
PtyWritedata back to the PTY master writer. The response is silently dropped.Affected terminal queries
All responses routed through
Event::PtyWriteare lost:\ESC[c→\x1b[?6c\ESC[>c\ESC[5n,\ESC[6n(cursor position report)\ESC[?{mode}u\ESC[8;{rows};{cols}t\ESC[?{mode};{state}$yImpact
Suggested fix
AlacrittyEventListenerneeds a shared reference to the PTY writer (Arc<Mutex<Box<dyn Write + Send>>>) so it can handleEvent::PtyWriteby writing the response bytes back to the PTY master. This needs to be wired up in bothterminal_backend.rs(GUI) andterminal_daemon.rs(httpd).Workaround
Set a shell that doesn't depend on DA1 responses in
~/.config/arbor/config.toml: