Skip to content

Enable interactive input for dotnetup prompts - #218

Merged
Redth merged 1 commit into
mainfrom
redth-fix-dotnetup-interaction
Jul 28, 2026
Merged

Enable interactive input for dotnetup prompts#218
Redth merged 1 commit into
mainfrom
redth-fix-dotnetup-interaction

Conversation

@Redth

@Redth Redth commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Why

dotnetup can display a terminal setup menu during SDK installation, but Sherpa's process modal was output-only. The process remained blocked because users could not send arrow keys or Enter to the running command.

What changed

  • Add opt-in standard-input support to process requests and execution services.
  • Forward raw xterm input to the active process so terminal navigation and control sequences remain intact.
  • Enable input for dotnetup SDK installs on Apple pseudo-terminals, including tracked-channel installs.
  • Serialize input, cancellation, and process disposal to avoid stdin races.
  • Keep non-interactive and completed terminals read-only by default.

Validation

  • Targeted DotnetUpServiceTests
  • Mac Catalyst compile
  • Isolated pseudo-terminal stdin smoke test
  • xterm-to-.NET bridge smoke test

Fixes: #203

Forward opt-in xterm input to active process stdin so dotnetup setup menus can accept navigation and confirmation keys.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 4ae088bc-2250-4e42-a218-731f5d7d76d3
@Redth
Redth merged commit 5fadcb0 into main Jul 28, 2026
9 checks passed
Redth added a commit that referenced this pull request Jul 29, 2026
Both branches independently added standard input support to
IProcessExecutionService: main added SendInputAsync for dotnetup's
interactive prompts (#218), and this branch added WriteInputAsync to
drive the MAUI CLI's start/stop recording prompts.

Converged on main's SendInputAsync and removed WriteInputAsync. Main's
version is the better contract: it returns false rather than throwing
when the process can no longer accept input, requires callers to opt in
via ProcessRequest.AcceptsStandardInput, rejects elevated processes, and
serializes writes against Cancel() and process disposal so stdin cannot
be closed mid-write.

MauiProfilingCliService now sets AcceptsStandardInput for interaction
captures and sends Environment.NewLine through SendInputAsync, throwing
if the CLI has stopped accepting input.

ProcessExecutionService keeps the improvements from both sides: main's
input serialization plus this branch's output-builder locking and the
Cancel() hardening that kills the process tree instead of only
cancelling the linked token source.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5c34731b-bd7f-47de-b52b-ad36257ab3b4
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.

dotnetup no way to interact

1 participant