Repository navigation
fix: preserve windows shell working directories - #5062
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (3)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughWindows cwd lookup now supports 32-bit WoW64 process layouts and selects the cwd of a shim’s sole direct pane-shell child. Pane cwd accessors use Suggested reviewers: Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to No actionable working-directory regression is established at the reviewed head. The change is mergeable after normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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 |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
fd150ce to
70e6da1
Compare
|
@coderabbitai review Rebased onto master 848075f (merged #5019). Please review current head 70e6da1. Full native Windows checks passed again (3,377 Rust tests, 12 existing skips), and both real-Scoop cd/follow/persist/restart smokes passed on the rebuilt binary. |
|
|
@coderabbitai full review Please complete a fresh full review of rebased head 70e6da1. The new CodeRabbit status says the review was skipped due to label configuration, but the PR has no labels and the summary still covers fd150ce. We need current-head coverage after the rebase. |
✅ Action performedFull review finished. |
Windows custom shells launched through Scoop could lose their working directory across tabs and restart. Herdr read the native 64-bit process block of the shim's 32-bit CMD process, where cwd was C:\Windows; the actual 32-bit block contained the requested directory. After CMD changed directory, the shim still retained its own launch directory.
Read 32-bit cwd from the WoW64 process block, and use the shim's unambiguous direct shell child for pane cwd. Ordinary process inspection retains exact-PID semantics. Shell launch/lifetime handling, OSC authority and persistence format are unchanged; absent/unreadable shim children use the existing saved/initial fallback.
Refs #4472.
Validation:
The shim resolution deliberately supports one direct known-shell child. An absent or ambiguous shell preserves the existing fallback rather than guessing through agents or subshells. No new dependency, protocol or persistence schema.