Repository navigation
fix(tui): Esc dismisses the announcement popup like Enter - #883
Conversation
The global escape handler had an empty arm for the announcement prompt, so Esc never reached the popup's own handler even though the prompt says ENTER or ESC. Delegate Esc to the announcement prompt handler, the same way the community pin prompt arm does. Fixes LargeModGames#871
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Fixes #871
The announcement popup said
[Press ENTER or ESC to dismiss], but Esc did nothing:handle_appsends Esc to the globalhandle_escapebefore the per-screen handlers run, and theActiveBlock::AnnouncementPromptarm there was empty. The popup's own handler already treats Esc like Enter, so the arm now delegates to it, the same way the community pin prompt arm does.esc_dismisses_the_announcement_promptin the slim build walks two announcements throughhandle_app(Key::Esc, ...): after the first Esc the second announcement is active and the route is still the prompt, after the second the queue is empty and the route has moved on. The test failed on main with the first announcement still active.Local verification:
cargo test --no-default-features --features telemetry,tui1695 passed / 0 failed,cargo fmt --all -- --checkclean,cargo clippy --no-default-features --features telemetry,tui -- -D warningsclean,tools/check_gates_ratchet.sh origin/mainokSummary by CodeRabbit