Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(tui): restore DialogPrompt enter submit - #27352

Closed
CasualDeveloper wants to merge 1 commit into
anomalyco:devfrom
CasualDeveloper:fix/26817-dialog-prompt-enter-submit
Closed

CasualDeveloper wants to merge 1 commit into
anomalyco:devfrom
CasualDeveloper:fix/26817-dialog-prompt-enter-submit

Conversation

@CasualDeveloper

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #26817

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Restores bare Enter submit behavior for DialogPrompt while keeping the OpenTUI keymap architecture.

When a user configures return as input_newline, the global managed textarea binding also applies to dialog textareas. This PR adds a dialog-local focused textarea binding so form-style dialogs, such as session rename, still confirm on bare Enter.

It keeps onSubmit wired to the same confirm path, so configured submit bindings still work.

Human driven and reviewed, with agentic assistance from openai/gpt-5.5/xhigh.

How did you verify your code works?

  • bun test --timeout 30000 test/cli/tui/dialog-prompt.test.tsx
  • bun typecheck
  • Rebuilt a local OpenCode fork with this patch and confirmed dialog Enter submit works with return configured as input_newline

Screenshots / recordings

N/A. This is a TUI input behavior fix with no visual UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@CasualDeveloper
CasualDeveloper force-pushed the fix/26817-dialog-prompt-enter-submit branch 3 times, most recently from 9562a68 to 4219fdb Compare May 15, 2026 09:12
Bind bare Enter in DialogPrompt's focused keymap layer so custom input_newline settings do not override form-style dialogs.

Cover the return-as-newline keybind configuration with a regression test.

Fixes anomalyco#26817
@CasualDeveloper
CasualDeveloper force-pushed the fix/26817-dialog-prompt-enter-submit branch from 4219fdb to da9f04b Compare May 15, 2026 17:10
@CasualDeveloper

Copy link
Copy Markdown
Contributor Author

Closing this PR as superseded by #27945, which landed the same fix with a dedicated dialog.prompt.submit keybind and additional coverage for rebinding dialog submit separately from input_submit.

I verified latest dev after syncing dependencies:

  • bun test --timeout 60000 test/cli/tui/dialog-prompt.test.tsx: 2 pass, 0 fail

Thanks for the review context on #26817; no further action needed on this duplicate PR.

@CasualDeveloper
CasualDeveloper deleted the fix/26817-dialog-prompt-enter-submit branch May 18, 2026 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tui: DialogPrompt Enter stops submitting when return is rebound to input_newline

1 participant