Skip to content

feat: native Windows plugin pane spawning with backward compatibility - #148

Closed
Only-Moon wants to merge 0 commit into
smarzban:mainfrom
Only-Moon:main
Closed

feat: native Windows plugin pane spawning with backward compatibility#148
Only-Moon wants to merge 0 commit into
smarzban:mainfrom
Only-Moon:main

Conversation

@Only-Moon

Copy link
Copy Markdown

Summary

This PR adds native Windows plugin pane spawning support (available since herdr v0.8.0-preview) with backward compatibility for older herdr versions.

Changes

Native Windows Pane Spawning

  • Cross-platform pane entrypoint: command = ["herdr-file-viewer"] with platforms = ["linux", "macos", "windows"]
  • Build scripts create PATH shim at ~/.local/bin/herdr-file-viewer.exe (symlink to binary)
  • Native pane spawning since herdr v0.8.0 (commit d3be4f8b) - direct CreateProcessW spawn, no shell

Windows Launcher Scripts (with version detection & fallback)

  • scripts/open-file-viewer-windows.ps1 - split pane
  • scripts/open-file-viewer-tab-windows.ps1 - new tab
  • Version detection: checks herdr --version, uses native if >= v0.8.0
  • Fallback: pane split + pane run + send-keys for herdr < v0.8.0

Build System

  • Updated scripts/fetch-or-build.ps1 and scripts/fetch-or-build.sh to create PATH shim at ~/.local/bin/herdr-file-viewer.exe
  • Removed deprecated Windows-only scripts: open-file-viewer.ps1, open-file-viewer-tab.ps1
  • Updated herdr-plugin.toml with cross-platform pane and Windows-specific actions

Tests Updated

  • tests/launcher_ps1.rs: Updated for new script names (open-file-viewer-windows.ps1, open-file-viewer-tab-windows.ps1)
  • tests/launcher_content.rs: Updated script names, validated call-operator spawn, UTF-8 JSON handling, config dir passing
  • All tests pass including cargo test launcher_ps1 and cargo test launcher_content

Backward Compatibility

  • Version detection: checks herdr --version, uses native if >= v0.8.0
  • Fallback for older herdr: pane split + pane run + send-keys

Testing

  • All cargo test pass
  • Manual verification: split pane, tab pane both work natively (pane PID 1 = herdr-file-viewer, no shell)
  • Backward compatibility fallback tested manually

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant