Live.OnInput: a frontend hears each key or click the menu acts on (ATT-45) #158
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
needs-verification
question
queue
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
romaine-life/fzt-terminal!158
Loading…
Reference in a new issue
No description provided.
Delete branch "att-45-on-input"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Work package: https://openproject.home.romaine.life/wp/ATT-45
Asked: Win's summon of at-terminal should close the at menu when it is showing a pick that succeeded; Ctrl+Win leaves it open. fzt-automate marks the at server while its panel shows a green result. Any key or click after that means he is using the menu again, so the mark has to clear. A frontend had no way to hear that:
Liveoffered only Update, Reload, Show, Ask, Close and OnAbort.Added:
Live.OnInput(func()), set likeOnAbort. It runs on the menu's goroutine before the menu acts on a key, or on a click or wheel turn. Keys dropped while the menu is frozen don't count, and neither does a mouse move.Left alone: every key and click is handled exactly as before. A frontend that never calls
OnInputsees no change.Tests:
TestOnInputHearsKeysTheMenuActsOnchecks that a key reaches the hook and that a key dropped while frozen does not. ci-check: all passed.🤖 Generated with Claude Code