Skip to content

fix: allow legacy terminal keyboard reporting - #3772

Open
mvanhorn wants to merge 2 commits into
atuinsh:mainfrom
mvanhorn:fix/2559-bug-atuin-freezes-in-some-cases-and-completely-i
Open

fix: allow legacy terminal keyboard reporting#3772
mvanhorn wants to merge 2 commits into
atuinsh:mainfrom
mvanhorn:fix/2559-bug-atuin-freezes-in-some-cases-and-completely-i

Conversation

@mvanhorn

Copy link
Copy Markdown
Contributor

Checks

  • I am happy for maintainers to push small adjustments to this PR, to speed up the review cycle

Fixes #2559


#[cfg(not(target_os = "windows"))]
if let Some(flags) = stdout.keyboard_enhancement.flags_to_push() {
execute!(stdout.writer, PushKeyboardEnhancementFlags(flags))?;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Push failure skips terminal cleanup

When writing PushKeyboardEnhancementFlags fails, Stdout::new returns after raw mode, alternate-screen, mouse, and bracketed-paste setup but before Stdout reaches its caller, so its cleanup Drop never runs and the shell remains in a corrupted terminal state.

Knowledge Base Used: CLI entrypoint (atuin binary)

@greptile-apps

greptile-apps Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds a keyboard_enhancement setting, conditionally enables terminal keyboard-enhancement flags during interactive search, and documents legacy key reporting.

Confidence Score: 3/5

The terminal cleanup failure on keyboard-enhancement setup needs to be fixed before merging.

The new fallible keyboard-enhancement push occurs after terminal modes are enabled, and returning from that operation bypasses the cleanup guard that would restore the shell.

Files Needing Attention: crates/atuin/src/command/client/search/interactive.rs

Important Files Changed

Filename Overview
crates/atuin-client/src/settings.rs Adds the boolean setting with a default, override coverage, and validation tests.
crates/atuin/src/command/client/search/interactive.rs Conditionally pushes keyboard-enhancement flags, but a failed push bypasses cleanup of terminal modes enabled earlier in construction.
docs/docs/configuration/advanced-key-binding.md Documents legacy-mode compatibility and its advanced-keybinding limitations.

Reviews (1): Last reviewed commit: "fix: allow legacy terminal keyboard repo..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Atuin "freezes" in some cases and completely ignores all key press events and only responds for SIGTERM

1 participant