Skip to content

fix: Windows install first-run parity#489

Open
Tah10n wants to merge 2 commits intoPeonPing:mainfrom
Tah10n:fix/windows-install-first-run-parity
Open

fix: Windows install first-run parity#489
Tah10n wants to merge 2 commits intoPeonPing:mainfrom
Tah10n:fix/windows-install-first-run-parity

Conversation

@Tah10n
Copy link
Copy Markdown

@Tah10n Tah10n commented Apr 23, 2026

Summary

  • replace the Windows install docs with a PowerShell download-and-run flow that matches install.ps1
  • add Windows installer parameters for local/global/init-local-config flows and safer first-run behavior
  • make README-style Windows commands work through the generated CLI shim while preserving legacy flag forms
  • extend Windows Pester coverage for install docs, shim routing, packs, volume, notifications, and local install guardrails

Why

The Windows README and generated CLI had drifted from the actual PowerShell installer behavior. A fresh Windows user could follow the docs and still hit mismatched parameter syntax, broken command routing, or first-run commands that did not work as written.

Validation

  • git diff --check
  • git diff --check -- README.md
  • Invoke-Pester -Path tests\adapters-windows.Tests.ps1 (426 passed, 0 failed)

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 23, 2026

@Tah10n is attempting to deploy a commit to the Gary Sheng's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Tah10n Tah10n changed the title Fix Windows install first-run parity fix: Windows install first-run parity Apr 23, 2026
@Tah10n Tah10n marked this pull request as ready for review April 23, 2026 19:38
@garysheng garysheng force-pushed the fix/windows-install-first-run-parity branch from dec77b5 to 3d090ee Compare April 25, 2026 16:24
@garysheng
Copy link
Copy Markdown
Collaborator

Thanks @Tah10n, the README rewrite plus the -Local / -InitLocalConfig plumbing is exactly the shape we want here. I rebased onto current main (post #480, #485, #487) and ran CI: BATS green, Pester is at 843/846 with 3 failures. Two are introduced by this PR and one is a pre-existing main breakage from #485 that I'll fix separately. Detail below so you can address the two real regressions.

Pre-existing on main (not yours):

removes hooks from settings.json. Test regex peon\.ps1.*peon\.sh.*notify\.sh.*hook-handle-use no longer matches uninstall.ps1 after #485 narrowed the inner-hook filter from peon to literal peon\\.ps1, peon\\.sh, etc. The escaped backslash in the source breaks the regex's \. literal-dot anchor. I'll patch this on main directly so it isn't blocking your PR.

Introduced by this PR:

  1. peon.cmd shim probes for pwsh before falling back to powershell (added in feat(tts-native): platform-native TTS backends for macOS, Linux, Windows #487). The test asserts the literal string pwsh -NoProfile -NonInteractive -Command "& '%USERPROFILE%\\.claude\\hooks\\peon-ping\\peon\.ps1' in install.ps1. Your refactor (rightly) replaces the literal %USERPROFILE%\.claude\hooks\peon-ping\peon.ps1 with $peonPs1Path so -Local mode resolves to the project-local path. The test needs updating to anchor on $peonPs1Path instead of the userprofile literal. There are two test sites: the peon.cmd block and the bash-shim block. Same pattern in both.

  2. help text shows notifications and popups commands. After New-TestInstall lays down a fresh peon.ps1, peon --help no longer surfaces the --notifications and --popups lines. The strings are still present in the install.ps1 file (23 notifications/popups occurrences pre and post-PR), but something in the help-routing path drops them. My guess is the help dispatcher now exits earlier than it used to in the new layout, but I haven't pinpointed it. Worth running peon --help | findstr -i notifications against a fresh install.ps1 from this branch on Windows.

Logistics:

  • I rebased your branch onto current main and force-pushed to your fork (Tah10n/fix/windows-install-first-run-parity). Pulling will give you the conflict-resolved tree with the -Local block preserved.
  • I'll merge once both Pester regressions are addressed and a fresh CI run is green.
  • Approving CI on each push; action_required is just the fork-PR safety dance.

Big PR, thoughtful design, looking forward to landing it.

@Tah10n
Copy link
Copy Markdown
Author

Tah10n commented Apr 28, 2026

Thanks, I checked the two PR regressions you called out and both should be addressed in 4f5fd7d:

  • updated the peon.cmd and bash shim assertions to anchor on $peonPs1Path
  • restored peon --help output for --notifications and --popups

Local verification:

  • Invoke-Pester -Path tests\win-notification-templates.Tests.ps1 passes: 26/26
  • Invoke-Pester -Path tests\adapters-windows.Tests.ps1 is 447/448; the only remaining failure is the pre-existing uninstall regex test you mentioned, and upstream/main now has 284ef98 for that

Current PR checks look blocked on action_required / Vercel authorization rather than a code failure.

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