Live.OnInput: a frontend hears each key or click the menu acts on (ATT-45) #158

Merged
merge-queue merged 1 commit from att-45-on-input into main 2026-11-29 10:06:49 -08:00
Owner

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: Live offered only Update, Reload, Show, Ask, Close and OnAbort.

Added: Live.OnInput(func()), set like OnAbort. 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 OnInput sees no change.

Tests: TestOnInputHearsKeysTheMenuActsOn checks that a key reaches the hook and that a key dropped while frozen does not. ci-check: all passed.

🤖 Generated with Claude Code

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: `Live` offered only Update, Reload, Show, Ask, Close and OnAbort. **Added:** `Live.OnInput(func())`, set like `OnAbort`. 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 `OnInput` sees no change. **Tests:** `TestOnInputHearsKeysTheMenuActsOn` checks that a key reaches the hook and that a key dropped while frozen does not. ci-check: all passed. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Live.OnInput: a frontend hears each key or click the menu acts on (ATT-45)
All checks were successful
Suite release / module (pull_request) Has been skipped
Suite release / check-build (go, ubuntu-latest) (, go, false, ubuntu-latest, , go) (pull_request) Has been skipped
Suite release / deploy-image (pull_request) Has been skipped
Suite default / check-rules (pull_request) Has been skipped
Suite default / check-logs (pull_request) Successful in 9s
Suite release / check-package (pull_request) Has been skipped
Suite release / finalize (pull_request) Has been skipped
Suite release / home-sync (pull_request) Has been skipped
Suite release / deliver (pull_request) Has been skipped
Suite go / check-format (pull_request) Successful in 11s
Suite go / scope (pull_request) Successful in 9s
Suite go / check-test-linux (pull_request) Has been skipped
Suite default / scope (pull_request) Successful in 9s
Suite release / scope (pull_request) Successful in 10s
Suite release / reserve (pull_request) Has been skipped
Suite release / check-build (go, windows-amd64-c-shared) (, go-windows-amd64-c-shared, false, windows-latest, windows-amd64-c-shared, go) (pull_request) Has been skipped
Suite release / publish (push) Has been skipped
Suite release / home-sync (push) Has been skipped
Suite release / deliver (push) Has been skipped
Suite release / deploy-image (push) Has been skipped
Suite go / check-services (pull_request) Has been skipped
Suite default / check-fetches (pull_request) Has been skipped
Suite release / build (go, ubuntu-latest) (, go, false, ubuntu-latest, , go) (pull_request) Has been skipped
Suite release / build (go, windows-amd64-c-shared) (, go-windows-amd64-c-shared, false, windows-latest, windows-amd64-c-shared, go) (pull_request) Has been skipped
Suite release / publish (pull_request) Has been skipped
Suite release / reused-checks (pull_request) Successful in 8s
Suite default / reused-checks (pull_request) Successful in 8s
Suite go / check-test-windows (pull_request) Successful in 1m0s
merge-queue landed on main
Suite go / reused-checks (pull_request) Successful in 4s
7feecf2f22
merge-queue deleted branch att-45-on-input 2026-11-29 10:06:49 -08:00
Sign in to join this conversation.
No description provided.