feat: back-navigation for the free-text input dialog (InputRequest.AllowBack)#9
Merged
Conversation
Propose InputRequest.AllowBack with Backspace-on-empty Back trigger, modifying the fixed-region "Awaitable modal dialogs" requirement. Co-Authored-By: Claude Opus 4.8 <[email protected]>
- 1.1 Add bool AllowBack=false to InputRequest primary ctor and the Line?/string?/IReadOnlyList<string>? convenience overloads (params-tail overloads documented as unable to carry it) - 1.2 Thread allowBack through InputDialog ctor and Terminal.InputAsync - 1.3 Backspace-on-empty raises OverlayCloseKind.Back when AllowBack=true; Backspace with text deletes normally; Ctrl+Backspace unaffected - 1.4 Refresh DialogOutcome.Back XML docs to list all four producers/triggers Co-Authored-By: Claude Opus 4.8 <[email protected]>
…ty (section 2) - 2.1 InputRequest.AllowBack default false + settable on each non-params overload - 2.2 AllowBack + empty + Backspace → Back, empty value - 2.3 type-then-delete-to-empty then Backspace → Back (current-emptiness, not _userEdited) - 2.4 Backspace with text deletes one char, dialog stays open - 2.5 AllowBack=false Backspace-on-empty is a no-op - 2.6 '[' inserts literally, no Back binding for input Co-Authored-By: Claude Opus 4.8 <[email protected]>
- 3.1 Bump Dcli and Dcli.Testing to 0.2.0-rc.4 (lockstep, per prior packaging sections) - 3.2 Gates green: build (0/0), test (866), format clean, openspec validate --strict; dcli.0.2.0-rc.4.nupkg packs cleanly Co-Authored-By: Claude Opus 4.8 <[email protected]>
Sync the "Awaitable modal dialogs" MODIFIED requirement (InputRequest.AllowBack + Backspace-on-empty Back trigger and scenarios) into the main fixed-region spec, and move the change to openspec/changes/archive/2026-05-31-back-nav-input/. Co-Authored-By: Claude Opus 4.8 <[email protected]>
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.
Why
InputRequestwas the only awaitable-dialog request type still missingAllowBack—SelectRequest,ChoiceRequest, andMultiSelectRequestall expose it (multi-select shipped in rc.3). This blocked wizard flows that interleave text entry with selection: a consumer could let the user step back through select/choice steps, but the flow hit a dead end on anyInputAsyncstep.What changed
InputRequest.AllowBack(opt-in, defaultfalse) on the primary ctor and theLine?/string?/IReadOnlyList<string>?convenience overloads. Theparams-tail overloads keep their signature (params must be last) and document that they can't carry it — mirrorsMultiSelectRequest.InputDialograisesOverlayCloseKind.BackwhenAllowBack=trueand Backspace is pressed while the buffer is currently empty — gated on live buffer length, not edit history, so typing then deleting back to empty still arms Back. Backspace with text present deletes normally; Ctrl+Backspace never triggers Back;[stays a literal character (deliberately not a Back key for free-text input).AllowBackthroughTerminal.InputAsync.OpenModalAsyncalready mapsOverlayCloseKind.Back → DialogOutcome.Back, so no plumbing below the dialog.DialogOutcome.BackXML docs to enumerate all four producers and each trigger.DcliandDcli.Testingto0.2.0-rc.4(lockstep, per prior packaging sections).The unifying family rule: Backspace when there's nothing left to delete → Back.
Spec
Modifies the fixed-region
Awaitable modal dialogsrequirement (synced toopenspec/specs/fixed-region/spec.md) and adds four Input scenarios. Change archived atopenspec/changes/archive/2026-05-31-back-nav-input/.Verification
dotnet build— 0 warnings / 0 errors (warnings-as-errors)dotnet test— 866 passing (10 new: §2.1 ctor defaults/settable, §2.2–2.6 dialog behaviour incl. the type→delete→empty discrimination guard)dotnet format --verify-no-changes— cleanopenspec validate --strict— validdcli.0.2.0-rc.4.nupkgpacks cleanlyBackward compatible:
AllowBackdefaults tofalseeverywhere; existing callers recompile unchanged. No human-in-the-loop terminal verification implicated (pure decoded-key handling).🤖 Generated with Claude Code