Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TUI: Navigation and exiting in dialogs broken #1159

Closed
ch1bo opened this issue Nov 10, 2023 · 0 comments · Fixed by #1173
Closed

TUI: Navigation and exiting in dialogs broken #1159

ch1bo opened this issue Nov 10, 2023 · 0 comments · Fixed by #1173
Assignees
Labels
bug 🐛 Something isn't working
Milestone

Comments

@ch1bo
Copy link
Member

ch1bo commented Nov 10, 2023

Context & versions

Likely since the rewrite to brick 1.10
b6f5028

Steps to reproduce

  1. Start the TUI
  2. Try exit it with Ctrl+C
  3. Open a head to get access to some dialogs
  4. Try navigate a dialog (form) with up/down arrows

Actual behavior

  • Exiting the TUI via Ctrl+C is not working
  • Navigation in dialogs only works with and arrow keys don't work

Expected behavior

All key bindings to work

Hypothesis

The TUI has been rewritten with brick 1.10. The monadic event handling via EventM was expected to short-circuit when doing a halt. However EventM is just a state transformer around IO and has no early exiting. That means, if we continue handling events after doing a halt in a global event handler.. the TUI main loop does not exit.

Something different is fishy with delegating event handling to forms.

It seems like composing event handlers should be done differently.

@ch1bo ch1bo added the bug 🐛 Something isn't working label Nov 10, 2023
@ch1bo ch1bo added this to the 0.14.0 milestone Nov 21, 2023
@ffakenz ffakenz self-assigned this Nov 21, 2023
@ffakenz ffakenz linked a pull request Nov 22, 2023 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants