fix(cua-driver-rs/windows): more honest hotkey no-match error message#1612
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR refines the error message reported when ChangesEnhanced UIA failure diagnostics
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The error returned when the UIA accelerator scan finds nothing said: "could not find a descendant UIA AcceleratorKey matching ..." But the scan tries BOTH approaches: the `UIA_AcceleratorKeyPropertyId` property AND the `(Ctrl+X)`-style hint in element Names (added for modern Notepad, which doesn't set AcceleratorKey). The original wording implied only the first was tried, which is misleading when 30+ elements were scanned and nothing matched. Updated to: "could not find a UIA AcceleratorKey or `(Ctrl+X)`-style name hint matching ..." Also added a one-line hint about the most common cause (menu-nested actions like modern Notepad's Save behind the File menu) so the caller knows what to look for in `get_window_state` output. Found via end-to-end Claude Code test in #1611 review — Claude noted the wording was a touch misleading after seeing the actual error message it received from `cua-driver call hotkey ctrl+s` on modern Notepad. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
35a5d70 to
d3dd063
Compare
Summary
Tiny wording fix on the
hotkeyUIA no-match error. The scan in #1611 tries TWO ways to match a shortcut: theUIA_AcceleratorKeyPropertyIdproperty AND the(Ctrl+X)-style hint in element Names (added because modern Notepad doesn't set AcceleratorKey). The error message only mentioned the first, which was misleading.Found in end-to-end testing of #1611 — Claude Code received the error after
cua-driver call hotkey ctrl+son modern Notepad and flagged the wording as not quite honest about what was tried.Diff
Also added a one-line hint about the most common root cause (menu-nested actions) so the caller knows what to look for in
get_window_stateoutput.Test plan
cargo build -p cua-driver -p cua-driver-uia --releaseclean on VM🤖 Generated with Claude Code
Summary by CodeRabbit