fix(windows): preserve window state and Unicode focus metadata - #1409
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughWindows focus scripts now use explicit UTF-8 handling and suppress console windows. Foreground capture reads the measured window-title length. Activation restores a window only when it is minimized. Tests cover Windows subprocess settings and focus capture and restoration behavior. ChangesWindows focus handling
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to The change improves Windows focus capture and restoration, and no concrete merge-blocking issue was found. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change improves window targeting and cleanup without demonstrating expanded permissions or external access. Window-identity edge cases and incomplete calling-context coverage remain, but no material security regression was established. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Linked Issues checkExplanation The head addresses the Windows targeting and restoration objectives in [
✨ Finishing Touches🧪 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 |
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This replaces Windows title matching in the focus-nudge path with a saved HWND: capture returns
Minor: the tests that actually execute the PowerShell skip off Windows ( |
Signed-off-by: pumisj <pumisj@naver.com>
61f0c80 to
3daf3d5
Compare
Description
Follow up on #1410's Windows focus fixes by preserving normal/maximized window state, supporting Unicode and long titles, and keeping PowerShell child processes hidden.
Rebased onto
betaat6abce3e0after #1410 merged. The original HWND restoration is now in the base; this PR retains the remaining improvements and adapts its regression tests to the current project-specific targeting behavior.Changes Made
ShowWindow(SW_RESTORE)only whenIsIconicreports a minimized window. Normal and maximized windows retain their state.Only
Server/src/utils/focus_nudge.pyandServer/tests/test_focus_nudge.pydiffer from the current base. Original contribution attribution is preserved.Validation
At
3daf3d5b, on Windows / Python 3.13.7 with dependencies installed from the locked environment:git diff --check: passed.The PowerShell scripts execute on Windows, but focus-changing native calls in the regression tests are doubles. A live Unity desktop activation/restoration smoke test has not been performed. There are no C# or Unity package changes; no new local Unity EditMode/PlayMode run is claimed for this patch. Remote check results for the rebased head are listed above.
Related Issues
Relates to #1407 (Windows focus restoration); follows up on #1410. This PR does not close all symptoms in #1407.
Documentation
No tool/resource schema or generated reference changes.
Summary by CodeRabbit