fix: synchronize plugin pane pwd - #2985
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughPlugin pane launches now reuse one resolved working directory for command and environment construction. Unix environments add ChangesPlugin pane PWD handling
Unix CLI output handling
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This localized change synchronizes plugin-pane Sequence Diagram(s)sequenceDiagram
participant PaneLaunch
participant plugin_pane_launch_env
participant PlatformPwdHelper
participant PluginPaneCommand
PaneLaunch->>plugin_pane_launch_env: pass resolved working directory
plugin_pane_launch_env->>PlatformPwdHelper: set default PWD when absent
PlatformPwdHelper->>PluginPaneCommand: provide environment
PaneLaunch->>PluginPaneCommand: launch with resolved working directory
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: e790bcea-af02-4ea6-94e9-0a54c318e26d
📒 Files selected for processing (2)
docs/next/CHANGELOG.mdsrc/app/api/plugins/panes.rs
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Greptile SummaryThe PR synchronizes
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| src/app/api/plugins/panes.rs | Passes each resolved plugin pane cwd into centralized launch-environment construction before spawning every supported placement. |
| src/platform/unix_common.rs | Adds the Unix policy that supplies PWD from cwd only when the caller did not provide PWD, with focused unit coverage. |
| src/platform/fallback.rs | Exposes the new platform function through matching Unix reexport and non-Unix no-op cfg branches. |
| src/platform/linux.rs | Reexports the shared Unix PWD helper through the Linux platform surface. |
| src/platform/macos.rs | Reexports the shared Unix PWD helper through the macOS platform surface. |
| src/platform/windows.rs | Adds the intentional Windows no-op required to keep the platform function surface uniform. |
| docs/next/CHANGELOG.md | Documents Unix plugin pane PWD synchronization and explicit-value preservation. |
Reviews (3): Last reviewed commit: "docs: fix changelog conflict resolution" | Re-trigger Greptile
Issue
Opening a plugin popup with
--cwdstarts the process in the requested directory, butPWDcan still point to the server's old directory. Applications that readPWDmay then open in the wrong place.Problem
Herdr changed the process directory without updating
PWD. Shells correctPWDwhen they start, which hid the bug. Direct applications kept the old value.How did we fix it?
On Unix, plugin panes now set
PWDto the launch directory unless the caller supplied its own value. This applies to popup, overlay, split, zoomed, and tab placements. Regular panes and other platforms are unchanged.Verification
Before the fix, a Python popup started in
/var/tmp/akbash-2984-target, butPWDstill pointed to/var/tmp/akbash-2984-repro. After the fix, both values point to the target directory in fresh sessions.The focused regression test and all 54 plugin API tests pass. Linux, macOS, Windows, and ConPTY CI pass. CodeRabbit and Greptile completed their reviews. The local suite passed 3477 of 3478 tests. The remaining live-handoff test starts its replacement process, but cannot find Kennel's build directory outside the checkout.
refs #2984