Found during the Avalonia 12 upgrade's driven GUI pass, then reproduced on the INSTALLED 1.25 build (Avalonia 11) — this is pre-existing, not a 12 regression, which is why it was kept out of PR #549.
Repro: Ctrl+N to open a new query tab, type immediately. The keystrokes vanish — the shortcut processes (tab created and selected, FocusEditor runs on attach per the code's stated intent), but keyboard focus is not in the editor until you click anywhere in the editor area (the empty-state background click hands focus over, as designed). Same behavior driven synthetically on both the 12 branch and the installed 11 build, screenshot-evidenced both times.
Suspicion, unverified: something after the attach pass (tab selection or window focus handling) wins the focus race against FocusEditor(); a dispatcher-posted focus at input priority would likely stick. Headless tests cannot catch it — SessionKeyboardTests raise events on the editor directly, and real-window focus arbitration never runs there.
Fix belongs in a normal release, not the migration.
Found during the Avalonia 12 upgrade's driven GUI pass, then reproduced on the INSTALLED 1.25 build (Avalonia 11) — this is pre-existing, not a 12 regression, which is why it was kept out of PR #549.
Repro: Ctrl+N to open a new query tab, type immediately. The keystrokes vanish — the shortcut processes (tab created and selected, FocusEditor runs on attach per the code's stated intent), but keyboard focus is not in the editor until you click anywhere in the editor area (the empty-state background click hands focus over, as designed). Same behavior driven synthetically on both the 12 branch and the installed 11 build, screenshot-evidenced both times.
Suspicion, unverified: something after the attach pass (tab selection or window focus handling) wins the focus race against FocusEditor(); a dispatcher-posted focus at input priority would likely stick. Headless tests cannot catch it — SessionKeyboardTests raise events on the editor directly, and real-window focus arbitration never runs there.
Fix belongs in a normal release, not the migration.