Skip to content

fix: native Windows pane spawning and manifest tests - #149

Merged
smarzban merged 0 commit into
smarzban:mainfrom
Only-Moon:main
Aug 15, 2026
Merged

fix: native Windows pane spawning and manifest tests#149
smarzban merged 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) and fixes manifest tests for native Windows pane.

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 (symlink)
  • 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
  • tests/manifest.rs: Updated for native Windows pane support
  • All tests pass including cargo test launcher_ps1, cargo test launcher_content, cargo test manifest

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 (282/283 pass, 1 pre-existing unrelated failure)
  • Manual verification: split pane, tab pane both work natively (pane PID 1 = herdr-file-viewer, no shell)
  • Backward compatibility fallback tested manually

@Only-Moon
Only-Moon requested a review from smarzban as a code owner August 11, 2026 17:55
@smarzban
smarzban merged commit 75000cb into smarzban:main Aug 15, 2026
7 checks passed
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.

2 participants