Honor HideOnAbort for external cancellation and enable NuGet packaging - #159
Merged
Conversation
BaseControlPrompt.Run()'s external-cancellation branch only cleared the frame for Live auto-render controls, so Ctrl+C (or a caller-supplied CancellationToken) never honored HideOnAbort for interactive controls regardless of how it was configured. Clear now when the control is Live OR HideOnAbort is set, relying on ConsolePlus's new bounded grace period to give the render loop a real chance to finish before the process exits. Also correct global-behaviors.md, which documented Ctrl+C as an internal abort gated by RemoveHandlerCtrlC -- that was never implemented; Ctrl+C has always hard-exited the process. RemoveHandlerCtrlC is now noted as reserved/currently unused. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…0.0-rc2 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Changed GeneratePackageOnBuild in PromptPlus.csproj from false to true, so building the project now automatically creates a NuGet package. This streamlines the packaging process and ensures packages are always up to date with each build.
Only run the test job when the diff touches a .cs file, skipping it for doc/config-only changes. Also drop the full-history checkout in the changes job (this repo's .git carries ~800MB of since-removed docs/images/*.gif) in favor of resolving changed files via the GitHub API, which was making every CI run needlessly slow. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…on push dorny/paths-filter's API mode only works for pull_request events; on push events (e.g. a merge commit to main) there's no local checkout to diff against and the step errors out, failing the whole job and skipping the build entirely. continue-on-error lets it degrade to "skip tests" instead.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request improves how PromptPlus controls handle external cancellations (such as Ctrl+C or a cancelled
CancellationToken), ensuring the UI is cleared or left in a consistent state according to theHideOnAbortoption. It also updates documentation, adds targeted tests for this behavior, and bumps package versions for both PromptPlus and ConsolePlus.Behavioral improvements and bug fixes:
HideOnAbortoption when cancelled externally (via Ctrl+C or aCancellationToken), clearing the UI frame if enabled, instead of only on Esc aborts. Live controls always clear their frame on external cancellation for terminal usability.Documentation updates:
docs/global-behaviors.mdto clarify thatHideOnAbortapplies to both Esc and external cancellations, and thatRemoveHandlerCtrlCis now reserved for future use. Expanded explanation of Ctrl+C handling and its effects on process termination and cleanup. [1] [2]Testing improvements:
CancelAbortRenderTests.csto verify that the control frame is cleared or left intact on external cancellation, depending on theHideOnAbortsetting.Build and dependency updates:
PromptPlusversion to6.0.0-rc2, enabled package generation on build, and updatedConsolePlus.netdependency to1.0.0-rc2. [1] [2]