Summary
In AppModel.Inline, the first frame waits up to 1 s on terminals that don't answer the kitty keyboard query (CSI ? u). The Windows console host (conhost) and several SSH/ConPTY setups never answer it.
The terminal-colours query (OSC 10/11) has its own 1 s timeout, and the inbox console host doesn't forward it either. So on those terminals a 1 s delay before first paint is the norm.
Observed
Time to first frame, measured with a ConPTY harness:
| Setup |
Time to first frame |
| Our inline host, inbox conhost |
~1.2 s |
| Kitty probe released once the DA1 reply has arrived |
kitty wait removed |
| Colour query also released on DA1 |
~310–380 ms |
The kitty probe can't be skipped through configuration: the 1 s timeout is a private static. Only the legacy-console path bypasses it.
Workaround we use
IApplication.AnsiStartupGate is public, and so is its MarkComplete(AnsiStartupQuery.KittyKeyboard). After Init(), a short AddTimeout poll marks the kitty query complete once the DA1 (device attributes) reply has arrived.
This is safe because DA1 is queried after the kitty query and terminals answer in order: a kitty-capable terminal always replies before DA1. A late kitty reply still enables the protocol.
Request
- End the kitty probe when the DA1 reply arrives first, or make the probe optional or configurable (for example
Application.StartupProbes / a timeout setting).
- Treat the OSC 10/11 colour query the same way: if DA1 is answered and the colour query isn't, assume no reply is coming and render with default colours.
- Optionally expose the timeouts as configuration rather than private statics.
Environment
- Terminal.Gui 2.5.0, .NET 10.
- Windows 11: conhost, ConPTY and Windows Terminal.
Summary
In
AppModel.Inline, the first frame waits up to 1 s on terminals that don't answer the kitty keyboard query (CSI ? u). The Windows console host (conhost) and several SSH/ConPTY setups never answer it.The terminal-colours query (OSC 10/11) has its own 1 s timeout, and the inbox console host doesn't forward it either. So on those terminals a 1 s delay before first paint is the norm.
Observed
Time to first frame, measured with a ConPTY harness:
The kitty probe can't be skipped through configuration: the 1 s timeout is a private static. Only the legacy-console path bypasses it.
Workaround we use
IApplication.AnsiStartupGateis public, and so is itsMarkComplete(AnsiStartupQuery.KittyKeyboard). AfterInit(), a shortAddTimeoutpoll marks the kitty query complete once the DA1 (device attributes) reply has arrived.This is safe because DA1 is queried after the kitty query and terminals answer in order: a kitty-capable terminal always replies before DA1. A late kitty reply still enables the protocol.
Request
Application.StartupProbes/ a timeout setting).Environment