Fix Windows tool navigation and managed browser reuse - #27
Conversation
matt-greathouse
left a comment
There was a problem hiding this comment.
Reviewed the full diff (12 files, ~1000 added lines) across the Windows app resolver, desktop-session detection, native input hardening, managed-browser navigation Lua, and the Windows build/signing script. Ten findings inline, roughly in severity order.
The one to look at first is DaemonTextInput.cpp:160. The new ResolveKeycode pre-validation runs on all platforms, but the Linux implementation is a stub that returns -1 unconditionally — Linux input actually flows through NormalizeKey/XSendHotkey inside SendHotkey. Every press on Linux now fails with invalid_key. The existing tests are negative-only, so CI won't catch it.
Three other behavior regressions worth resolving before merge:
- RDP sessions lose native control (
PlatformWindows.cpp:546) — turning on real console-session detection makesonConsolefalse under RDP, failingwindow_activate,app_activate_pid, and managed-browser launch withdesktop_session_unavailable. focus_appinjects a stray Shift on every call (LuaPrelude.cpp:2302) —force = truebypasses the daemon'salreadyReadyshort-circuit, so macOS posts a real key event even on an awake, unlocked desktop.navigatetests for "URL changed" instead of "URL matches" (LuaPrelude.cpp:2184) — false failure when the target canonicalizes to the current URL, false success on any unrelated redirect during polling.
The rest are narrower: exe names dropped from GetFrontmostApp (breaks wait { frontmost = "notepad.exe" }, and so the confirm half of focus_app("notepad.exe")), a lost pid on the ShellExecute fast path, continue-on-activation-failure falling through to a duplicate launch, an app-catalog cache that never caches an empty result on a 200 ms poll path, a possibly-missing propsys link (unverified — worth checking the Windows CI job), and a post-sign Status -eq "Valid" check that a self-signed dev cert can't satisfy.
The direction of the PR is good — the activation retry, the input_failed vs invalid_key split, and the AUMID-based catalog matching are all real improvements. Most findings are about edges those changes opened up rather than the approach itself.
Generated by Claude Code
Summary
Testing